mirror of
https://github.com/EpochModTeam/Epoch.git
synced 2024-08-30 18:22:13 +00:00
separate restart and events
make events timer 1 second
This commit is contained in:
parent
b21e394b7d
commit
06464c3266
@ -12,7 +12,7 @@ lootMultiplier = 0.5; // 1 = max loot bias. This controls how much loot can payo
|
||||
// Events
|
||||
WeatherStaticForecast[] = {}; // Default: {75.5,0,{0,0,0},0,{1,1}}; // Clear day; {19,1,{1,1,40},1,{5,5}}; // Cold Foggy Rainy Overcast Windy; Format: {temp <scalar>,rain <scalar>,fog <array>,overcast <scalar>,wind <array>}
|
||||
events[] = {
|
||||
{ 3600, "CarnivalSpawner", 0 , 1, -1, {} ,{"VR"}}, // SECOND <scalar>, EVENT <string>, INIT <scalar> 1 = run script at startup or 0 normal delay, PREPOSTFIX <scalar> 1 = use pre/postfix path (inside epoch settings pbo) 0 = use full file path
|
||||
{ 3600, "CarnivalSpawner", 0 , 1, -1, {} ,{"VR"}}, // SECOND <scalar>, EVENT <string>, INIT <scalar> 1 = run script at startup or 0 normal delay, PREPOSTFIX <scalar> 1 = use pre/postfix path (inside epoch settings pbo) 0 = use full file path, RUNNUMTIMES <scalar> -1 infinite, execVM payload <array>, disallowed worlds <array>
|
||||
// { 1800, "PaydayEvent", 0, 1},
|
||||
// { 1200, "MessageServer", 0, 1},
|
||||
{ 2700, "AirDrop", 0 , 1, -1, {} ,{"VR"}},
|
||||
|
@ -4,14 +4,15 @@
|
||||
item0[] = {"Init",0,250,600.000000,-575.000000,700.000000,-525.000000,0.000000,"Init"};
|
||||
item1[] = {"_",8,218,600.000000,-500.000000,700.000000,-450.000000,0.000000,""};
|
||||
item2[] = {"Process",2,250,600.000000,-350.000000,700.000000,-300.000000,0.000000,"Process"};
|
||||
item3[] = {"Vehicle_and_Player",4,218,740.131958,-228.950928,840.131958,-178.950928,1.000000,"" \n "Vehicle and Player" \n "Checks"};
|
||||
item3[] = {"Vehicle_and_Player",4,4314,750.986694,-310.854675,850.986694,-260.854675,1.000000,"" \n "Vehicle and Player" \n "Checks"};
|
||||
item4[] = {"CMD_queue",4,218,450.000000,-450.000000,550.000000,-400.000000,10.000000,"CMD queue"};
|
||||
item5[] = {"Save_Players",4,218,450.000000,-375.000000,550.000000,-325.000000,3.000000,"Save" \n "Players"};
|
||||
item6[] = {"Cleanup",4,218,750.000000,-375.000000,850.000000,-325.000000,8.000000,"Cleanup"};
|
||||
item7[] = {"Events_and_Resta",4,4314,450.000000,-225.000000,550.000000,-175.000000,0.000000,"Events" \n "and" \n "Restart"};
|
||||
item7[] = {"Events_Manager",4,218,599.992371,-192.435822,699.992371,-142.435822,0.000000,"Events" \n "Manager"};
|
||||
item8[] = {"Save_Vehicles",4,218,450.000000,-300.000000,550.000000,-250.000000,4.000000,"Save" \n "Vehicles"};
|
||||
item9[] = {"Cleanup_Handler",4,218,750.000000,-450.000000,850.000000,-400.000000,8.000000,"Cleanup" \n "Handler"};
|
||||
item10[] = {"Server_FPS",4,218,600.000000,-148.030182,700.000000,-98.030182,0.000000,"Server FPS"};
|
||||
item10[] = {"Server_FPS",4,218,746.045227,-248.683014,846.045227,-198.683014,0.000000,"Server FPS"};
|
||||
item11[] = {"Forced_Restart",4,218,684.856567,-214.145233,784.856567,-164.145233,0.000000,"Forced" \n "Restart"};
|
||||
link0[] = {0,1};
|
||||
link1[] = {1,2};
|
||||
link2[] = {2,3};
|
||||
@ -22,15 +23,17 @@ link6[] = {2,7};
|
||||
link7[] = {2,8};
|
||||
link8[] = {2,9};
|
||||
link9[] = {2,10};
|
||||
link10[] = {3,2};
|
||||
link11[] = {4,2};
|
||||
link12[] = {5,2};
|
||||
link13[] = {6,2};
|
||||
link14[] = {7,2};
|
||||
link15[] = {8,2};
|
||||
link16[] = {9,2};
|
||||
link17[] = {10,2};
|
||||
globals[] = {0.000000,0,0,0,0,640,480,1,3,6316128,1,275.180084,1161.319580,208.497711,-659.879456,898,884,1};
|
||||
link10[] = {2,11};
|
||||
link11[] = {3,2};
|
||||
link12[] = {4,2};
|
||||
link13[] = {5,2};
|
||||
link14[] = {6,2};
|
||||
link15[] = {7,2};
|
||||
link16[] = {8,2};
|
||||
link17[] = {9,2};
|
||||
link18[] = {10,2};
|
||||
link19[] = {11,2};
|
||||
globals[] = {0.000000,0,0,0,0,640,480,1,5,6316128,1,275.180084,1161.319580,208.497711,-659.879456,898,884,1};
|
||||
window[] = {2,-1,-1,-1,-1,838,78,1370,78,3,916};
|
||||
*//*%FSM</HEAD>*/
|
||||
class FSM
|
||||
@ -203,21 +206,6 @@ class FSM
|
||||
""/*%FSM</ACTION""">*/;
|
||||
};
|
||||
/*%FSM</LINK>*/
|
||||
/*%FSM<LINK "Cleanup_Handler">*/
|
||||
class Cleanup_Handler
|
||||
{
|
||||
priority = 8.000000;
|
||||
to="Process";
|
||||
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
||||
condition=/*%FSM<CONDITION""">*/"((diag_tickTime - _lastObjectCleanup) > 300)"/*%FSM</CONDITION""">*/;
|
||||
action=/*%FSM<ACTION""">*/"_lastObjectCleanup = diag_tickTime;" \n
|
||||
"" \n
|
||||
"// TODO need better way allMissionObjects is not performant" \n
|
||||
"if (_cleanupItems isEqualTo []) then {" \n
|
||||
" _cleanupItems = allMissionObjects ""groundWeaponHolder"" + entities ""WeaponHolderSimulated"";" \n
|
||||
"};"/*%FSM</ACTION""">*/;
|
||||
};
|
||||
/*%FSM</LINK>*/
|
||||
/*%FSM<LINK "Cleanup">*/
|
||||
class Cleanup
|
||||
{
|
||||
@ -235,6 +223,21 @@ class FSM
|
||||
"};"/*%FSM</ACTION""">*/;
|
||||
};
|
||||
/*%FSM</LINK>*/
|
||||
/*%FSM<LINK "Cleanup_Handler">*/
|
||||
class Cleanup_Handler
|
||||
{
|
||||
priority = 8.000000;
|
||||
to="Process";
|
||||
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
||||
condition=/*%FSM<CONDITION""">*/"((diag_tickTime - _lastObjectCleanup) > 300)"/*%FSM</CONDITION""">*/;
|
||||
action=/*%FSM<ACTION""">*/"_lastObjectCleanup = diag_tickTime;" \n
|
||||
"" \n
|
||||
"// TODO need better way allMissionObjects is not performant" \n
|
||||
"if (_cleanupItems isEqualTo []) then {" \n
|
||||
" _cleanupItems = allMissionObjects ""groundWeaponHolder"" + entities ""WeaponHolderSimulated"";" \n
|
||||
"};"/*%FSM</ACTION""">*/;
|
||||
};
|
||||
/*%FSM</LINK>*/
|
||||
/*%FSM<LINK "Save_Vehicles">*/
|
||||
class Save_Vehicles
|
||||
{
|
||||
@ -321,35 +324,13 @@ class FSM
|
||||
""/*%FSM</ACTION""">*/;
|
||||
};
|
||||
/*%FSM</LINK>*/
|
||||
/*%FSM<LINK "Server_FPS">*/
|
||||
class Server_FPS
|
||||
/*%FSM<LINK "Events_Manager">*/
|
||||
class Events_Manager
|
||||
{
|
||||
priority = 0.000000;
|
||||
to="Process";
|
||||
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
||||
condition=/*%FSM<CONDITION""">*/"((diag_tickTime - _serverFpsTime) > 30) && _serverFPSCheckFine"/*%FSM</CONDITION""">*/;
|
||||
action=/*%FSM<ACTION""">*/"_serverFpsTime = diag_tickTime;" \n
|
||||
"" \n
|
||||
"if (_oldFPS isEqualTo EPOCH_diag_fps) then {" \n
|
||||
" _currentFPS = round(diag_fps);" \n
|
||||
" if !(_oldFPS isEqualTo _currentFPS) then {" \n
|
||||
" missionNamespace setVariable [""EPOCH_diag_fps"",_currentFPS,true];" \n
|
||||
" _oldFPS = _currentFPS;" \n
|
||||
" };" \n
|
||||
"} else {" \n
|
||||
" missionNamespace setVariable [""EPOCH_diag_fps"", compileFinal """",true];" \n
|
||||
" _serverFPSCheckFine = false;" \n
|
||||
"};" \n
|
||||
""/*%FSM</ACTION""">*/;
|
||||
};
|
||||
/*%FSM</LINK>*/
|
||||
/*%FSM<LINK "Events_and_Resta">*/
|
||||
class Events_and_Resta
|
||||
{
|
||||
priority = 0.000000;
|
||||
to="Process";
|
||||
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
||||
condition=/*%FSM<CONDITION""">*/"((diag_tickTime - _pvehTime) > 20)"/*%FSM</CONDITION""">*/;
|
||||
condition=/*%FSM<CONDITION""">*/"((diag_tickTime - _pvehTime) > 1)"/*%FSM</CONDITION""">*/;
|
||||
action=/*%FSM<ACTION""">*/"// Epoch Events" \n
|
||||
"_pvehTime = diag_tickTime;" \n
|
||||
"_events append (missionNamespace getVariable [""EPOCH_dynamicEvents"", []]);" \n
|
||||
@ -415,9 +396,39 @@ class FSM
|
||||
" };" \n
|
||||
"} forEach _events;" \n
|
||||
"// remove expired events" \n
|
||||
"_events = _newEvents;" \n
|
||||
"_events = _newEvents;"/*%FSM</ACTION""">*/;
|
||||
};
|
||||
/*%FSM</LINK>*/
|
||||
/*%FSM<LINK "Server_FPS">*/
|
||||
class Server_FPS
|
||||
{
|
||||
priority = 0.000000;
|
||||
to="Process";
|
||||
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
||||
condition=/*%FSM<CONDITION""">*/"((diag_tickTime - _serverFpsTime) > 30) && _serverFPSCheckFine"/*%FSM</CONDITION""">*/;
|
||||
action=/*%FSM<ACTION""">*/"_serverFpsTime = diag_tickTime;" \n
|
||||
"" \n
|
||||
"// restart script" \n
|
||||
"if (_oldFPS isEqualTo EPOCH_diag_fps) then {" \n
|
||||
" _currentFPS = round(diag_fps);" \n
|
||||
" if !(_oldFPS isEqualTo _currentFPS) then {" \n
|
||||
" missionNamespace setVariable [""EPOCH_diag_fps"",_currentFPS,true];" \n
|
||||
" _oldFPS = _currentFPS;" \n
|
||||
" };" \n
|
||||
"} else {" \n
|
||||
" missionNamespace setVariable [""EPOCH_diag_fps"", compileFinal """",true];" \n
|
||||
" _serverFPSCheckFine = false;" \n
|
||||
"};" \n
|
||||
""/*%FSM</ACTION""">*/;
|
||||
};
|
||||
/*%FSM</LINK>*/
|
||||
/*%FSM<LINK "Forced_Restart">*/
|
||||
class Forced_Restart
|
||||
{
|
||||
priority = 0.000000;
|
||||
to="Process";
|
||||
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
||||
condition=/*%FSM<CONDITION""">*/"((diag_tickTime - _pvehTime) > 20)"/*%FSM</CONDITION""">*/;
|
||||
action=/*%FSM<ACTION""">*/"// restart script" \n
|
||||
"if (_scriptBasedRestart) then {" \n
|
||||
" if (diag_tickTime >= _forceRestartTimeWarning) then {" \n
|
||||
" if (!_serverLocked) then {" \n
|
||||
|
Loading…
x
Reference in New Issue
Block a user