Tweaked save loaded isNils to also check for true
This commit is contained in:
parent
5df5081b80
commit
1f353e3a80
|
@ -1,5 +1,6 @@
|
|||
waitUntil {!isNil "save_is_loaded"};
|
||||
waitUntil {!isNil "GRLIB_all_fobs"};
|
||||
waitUntil {save_is_loaded};
|
||||
|
||||
uiSleep 3;
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
waitUntil {!isNil "save_is_loaded"};
|
||||
waitUntil {!isNil "GRLIB_vehicle_to_military_base_links"};
|
||||
waitUntil {!isNil "blufor_sectors"};
|
||||
waitUntil {save_is_loaded};
|
||||
|
||||
private _vehicle_unlock_markers = [];
|
||||
private _cfg = configFile >> "cfgVehicles";
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
waitUntil {!isNil "save_is_loaded"};
|
||||
waitUntil {!isNil "KP_liberation_production_markers"};
|
||||
waitUntil {save_is_loaded};
|
||||
|
||||
private _KP_liberation_production_markers_old = [0];
|
||||
|
||||
|
@ -7,7 +8,7 @@ while {GRLIB_endgame == 0} do {
|
|||
waitUntil {sleep 5;
|
||||
!(_KP_liberation_production_markers_old isEqualTo KP_liberation_production_markers)
|
||||
};
|
||||
|
||||
|
||||
{
|
||||
private _marker_text = (_x select 4) + " [";
|
||||
if (_x select 1) then {_marker_text = _marker_text + "S";};
|
||||
|
|
|
@ -10,6 +10,7 @@ GRLIB_force_redeploy = false;
|
|||
waitUntil {!isNil "GRLIB_all_fobs"};
|
||||
waitUntil {!isNil "blufor_sectors"};
|
||||
waitUntil {!isNil "save_is_loaded"};
|
||||
waitUntil {save_is_loaded};
|
||||
|
||||
private _spawn_str = "";
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
waitUntil {!isNil "save_is_loaded"};
|
||||
waitUntil {!isNil "KP_liberation_civ_rep"};
|
||||
waitUntil {save_is_loaded};
|
||||
|
||||
if (KP_liberation_asymmetric_debug > 0) then {diag_log format ["[KP LIBERATION] [ASYMMETRIC] Loop spawned on: %1", debug_source];};
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
waitUntil {time > 1};
|
||||
waitUntil {!isNil "GRLIB_all_fobs"};
|
||||
waitUntil {!isNil "save_is_loaded"};
|
||||
waitUntil {save_is_loaded};
|
||||
|
||||
if (count GRLIB_all_fobs == 0) then {
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@ if (!GRLIB_permissions_param) exitWith {};
|
|||
|
||||
waitUntil {!isNil "GRLIB_permissions"};
|
||||
waitUntil {!isNil "save_is_loaded"};
|
||||
waitUntil {save_is_loaded};
|
||||
|
||||
while {true} do {
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@ waitUntil{!isNil "save_is_loaded"};
|
|||
waitUntil{!isNil "KP_liberation_production"};
|
||||
waitUntil{!isNil "KP_liberation_logistics"};
|
||||
waitUntil{!isNil "KP_liberation_production_markers"};
|
||||
waitUntil {save_is_loaded};
|
||||
|
||||
if (KP_liberation_production_markers isEqualTo []) then {
|
||||
{
|
||||
|
@ -23,7 +24,7 @@ while {true} do {
|
|||
};
|
||||
{
|
||||
private _sector = _x;
|
||||
{
|
||||
{
|
||||
if ((_sector select 1) == (_x select 0)) exitWith {
|
||||
_x set [1, (_sector select 4)];
|
||||
_x set [2, (_sector select 5)];
|
||||
|
@ -34,7 +35,7 @@ while {true} do {
|
|||
sleep 0.25;
|
||||
sync_eco = [KP_liberation_production,KP_liberation_logistics,KP_liberation_production_markers];
|
||||
publicVariable "sync_eco";
|
||||
|
||||
|
||||
_KP_liberation_production_old = +KP_liberation_production;
|
||||
_KP_liberation_logistics_old = +KP_liberation_logistics;
|
||||
};
|
||||
|
|
|
@ -18,6 +18,7 @@ waitUntil{!isNil "KP_liberation_guerilla_strength"};
|
|||
waitUntil{!isNil "infantry_weight"};
|
||||
waitUntil{!isNil "armor_weight"};
|
||||
waitUntil{!isNil "air_weight"};
|
||||
waitUntil {save_is_loaded};
|
||||
|
||||
private _KP_liberation_fob_resources_old = [];
|
||||
private _KP_liberation_supplies_global_old = -1;
|
||||
|
@ -57,7 +58,7 @@ while {true} do {
|
|||
|| _armor_weight_old != armor_weight
|
||||
|| _air_weight_old != air_weight
|
||||
};
|
||||
|
||||
|
||||
if (KP_liberation_guerilla_strength < 0) then {KP_liberation_guerilla_strength = 0;};
|
||||
|
||||
sleep 0.25;
|
||||
|
@ -81,7 +82,7 @@ while {true} do {
|
|||
air_weight
|
||||
];
|
||||
publicVariable "sync_vars";
|
||||
|
||||
|
||||
_KP_liberation_fob_resources_old = +KP_liberation_fob_resources;
|
||||
_KP_liberation_supplies_global_old = KP_liberation_supplies_global;
|
||||
_KP_liberation_ammo_global_old = KP_liberation_ammo_global;
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
waitUntil {!isNil "save_is_loaded"};
|
||||
waitUntil {!isNil "KP_liberation_logistics"};
|
||||
waitUntil {save_is_loaded};
|
||||
|
||||
if (KP_liberation_logistic_debug > 0) then {diag_log "[KP LIBERATION] [LOGISTIC] Logistic management started";};
|
||||
|
||||
|
@ -10,7 +11,7 @@ while {GRLIB_endgame == 0} do {
|
|||
|
||||
if (((count (allPlayers - entities "HeadlessClient_F")) > 0) && ((count KP_liberation_logistics) > 0)) then {
|
||||
if (KP_liberation_logistic_debug > 0) then {diag_log format ["[KP LIBERATION] [LOGISTIC] Logistic interval started: %1", time];};
|
||||
|
||||
|
||||
private _tempLogistics = +KP_liberation_logistics;
|
||||
|
||||
{
|
||||
|
@ -42,7 +43,7 @@ while {GRLIB_endgame == 0} do {
|
|||
} forEach _storage_areas;
|
||||
|
||||
if (_spaceSum < _toProcess) exitWith {_x set [9,2];};
|
||||
|
||||
|
||||
_x set [8,((_x select 8) - 1)];
|
||||
private _currentIndex = _forEachIndex;
|
||||
private _processed = 0;
|
||||
|
@ -121,7 +122,7 @@ while {GRLIB_endgame == 0} do {
|
|||
private _supplyValue = 0;
|
||||
private _ammoValue = 0;
|
||||
private _fuelValue = 0;
|
||||
|
||||
|
||||
{
|
||||
{
|
||||
switch ((typeOf _x)) do {
|
||||
|
@ -207,7 +208,7 @@ while {GRLIB_endgame == 0} do {
|
|||
private _crateValue = _x getVariable ["KP_liberation_crate_value",0];
|
||||
|
||||
switch ((typeOf _x)) do {
|
||||
case KP_liberation_supply_crate: {
|
||||
case KP_liberation_supply_crate: {
|
||||
if (_getSupply > 0) then {
|
||||
if (_crateValue > _getSupply) then {
|
||||
_crateValue = _crateValue - _getSupply;
|
||||
|
@ -249,7 +250,7 @@ while {GRLIB_endgame == 0} do {
|
|||
default {diag_log format ["[KP LIBERATION] [ERROR] Invalid object (%1) at storage area", (typeOf _x)];};
|
||||
};
|
||||
} forEach _storedCrates;
|
||||
|
||||
|
||||
switch (typeOf _x) do {
|
||||
case KP_liberation_small_storage_building: {_storage_positions = KP_liberation_small_storage_positions;};
|
||||
case KP_liberation_large_storage_building: {_storage_positions = KP_liberation_large_storage_positions;};
|
||||
|
@ -272,7 +273,7 @@ while {GRLIB_endgame == 0} do {
|
|||
} forEach attachedObjects (_x);
|
||||
|
||||
if ((_getSupply == 0) && (_getAmmo == 0) && (_getFuel == 0)) exitWith {};
|
||||
|
||||
|
||||
} forEach _storage_areas;
|
||||
|
||||
if (KP_liberation_logistic_debug > 0) then {diag_log format ["[KP LIBERATION] [LOGISTIC] Logistic Group Update: %1", _x];};
|
||||
|
@ -298,7 +299,7 @@ while {GRLIB_endgame == 0} do {
|
|||
case 2;
|
||||
case 4: {
|
||||
if ((_x select 8) > 1) then {
|
||||
|
||||
|
||||
if (((_x select 8) <= ((ceil (((_x select 2) distance2D (_x select 3)) / 400)) - 3)) && ((_x select 8) >= 3) && !((_x select 6) isEqualTo [0,0,0]) && !KP_liberation_convoy_ambush_inProgress && (KP_liberation_civ_rep <= -25) && (((_x select 8) % 2) == 0)) then {
|
||||
private _dice = round (random 100);
|
||||
private _chance = KP_liberation_convoy_ambush_chance + ([] call F_cr_getMulti);
|
||||
|
@ -322,7 +323,7 @@ while {GRLIB_endgame == 0} do {
|
|||
KP_liberation_convoy_ambush_check = 0;
|
||||
};
|
||||
} else {
|
||||
_x set [8,((_x select 8) - 1)];
|
||||
_x set [8,((_x select 8) - 1)];
|
||||
};
|
||||
} else {
|
||||
_x set [8,((_x select 8) - 1)];
|
||||
|
@ -336,7 +337,7 @@ while {GRLIB_endgame == 0} do {
|
|||
switch (_x select 7) do {
|
||||
case 2: {
|
||||
_nextState = 3;
|
||||
_time = ceil (((ceil (((_x select 5) select 0) / 100)) + (ceil (((_x select 5) select 1) / 100)) + (ceil (((_x select 5) select 2) / 100))) / 3);
|
||||
_time = ceil (((ceil (((_x select 5) select 0) / 100)) + (ceil (((_x select 5) select 1) / 100)) + (ceil (((_x select 5) select 2) / 100))) / 3);
|
||||
};
|
||||
case 4: {
|
||||
_nextState = 1;
|
||||
|
@ -376,7 +377,7 @@ while {GRLIB_endgame == 0} do {
|
|||
} forEach _storage_areas;
|
||||
|
||||
if (_spaceSum < _toProcess) exitWith {_x set [9,2];};
|
||||
|
||||
|
||||
_x set [8,((_x select 8) - 1)];
|
||||
private _currentIndex = _forEachIndex;
|
||||
private _processed = 0;
|
||||
|
@ -459,7 +460,7 @@ while {GRLIB_endgame == 0} do {
|
|||
};
|
||||
default {};
|
||||
};
|
||||
} forEach _tempLogistics;
|
||||
} forEach _tempLogistics;
|
||||
|
||||
KP_liberation_logistics = +_tempLogistics;
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
waitUntil {!isNil "save_is_loaded"};
|
||||
waitUntil {!isNil "KP_liberation_production"};
|
||||
waitUntil {save_is_loaded};
|
||||
|
||||
sectors_recalculating = false;
|
||||
sectors_timer = false;
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
waitUntil { !isNil "save_is_loaded" };
|
||||
waitUntil {save_is_loaded};
|
||||
|
||||
while {true} do {
|
||||
sleep 3;
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
waitUntil {!isNil "save_is_loaded"};
|
||||
waitUntil {save_is_loaded};
|
||||
|
||||
while {true} do {
|
||||
uiSleep 60;
|
||||
|
|
Loading…
Reference in New Issue