Initial commit

Initial commit
This commit is contained in:
Jaysyn904
2024-09-13 09:10:39 -04:00
parent 09dc8aec92
commit d1c309ae63
8437 changed files with 8727659 additions and 0 deletions

View File

@@ -0,0 +1,68 @@
////////////////////////////////////////////////////////////////////////////////
//
// Olander's Time Sync
// opw_timesync
// By Don Anderson
// dandersonru@msn.com
//
// This is for Module Cycle Executions That Require Accuracy
// This is Executed When the Module Loads - opw_mod_onload
//
////////////////////////////////////////////////////////////////////////////////
void TimeSync(object oMod)
{
//Cycle Time
int nCycle = 30;
float f30MC = IntToFloat(nCycle);
//:****************************************************************************/
//: MODULES HAVING TIMING ISSUES WITH THE CLOCK (MODULE STRESS)
int nCLOCKSYNC = GetLocalInt(oMod,"CLOCKSYNC");
if(nCLOCKSYNC == 1)
{
//Current Time Info
int nCurHour = GetTimeHour();
int nCurMin = GetTimeMinute();
int nCurSec = GetTimeSecond();
int nCurMS = GetTimeMillisecond();
//Clock Sync
SetTime(nCurHour,nCurMin,nCurSec,nCurMS);
}
//: MODULES HAVING TIMING ISSUES WITH THE CLOCK (MODULE STRESS)
//:****************************************************************************/
//:****************************************************************************/
//: MODULE TIMED UDE
//DB Update
SignalEvent(oMod, EventUserDefined(202));
//Local Clock
SignalEvent(oMod, EventUserDefined(205));
//College Clock
SignalEvent(oMod, EventUserDefined(204));
//Realistic Weather
SignalEvent(oMod, EventUserDefined(206));
//: MODULE TIMED UDE
//:****************************************************************************/
DelayCommand(f30MC,TimeSync(oMod));
}
void main()
{
object oMod = GetModule();
if(GetLocalInt(oMod,"TIMESYNCRUNNING") == 1) return;
//Start the Time Sync Loop
SetLocalInt(oMod,"TIMESYNCRUNNING",1);
DelayCommand(120.0,TimeSync(oMod));
}