mirror of
https://github.com/EpochModTeam/Epoch.git
synced 2024-08-30 18:22:13 +00:00
handle null objects
This commit is contained in:
parent
aa263d6e0b
commit
fb08ef4a76
@ -15,6 +15,11 @@ _teenClasses = ["SaplingTeen_GoldenSeal","SaplingTeen_Hemp","SaplingTeen_Poppy",
|
||||
_matureClasses = ["GoldenSeal","Hemp","Poppy","Pumpkin","Sunflower"];
|
||||
_spoil = false;
|
||||
|
||||
// init var if not set
|
||||
if (isNil "EPOCH_activeGardens") then {EPOCH_activeGardens = []};
|
||||
// remove any null objects
|
||||
EPOCH_activeGardens = EPOCH_activeGardens - [objNull];
|
||||
|
||||
_modifiedGardens = [];
|
||||
{
|
||||
_garden = _x;
|
||||
@ -61,7 +66,7 @@ _modifiedGardens = [];
|
||||
_modifiedGardens pushBack _garden;
|
||||
};
|
||||
|
||||
} forEach (missionNamespace getVariable ["EPOCH_activeGardens", []]);
|
||||
} forEach EPOCH_activeGardens;
|
||||
|
||||
// force all modified gardens to save via queue
|
||||
if !(_modifiedGardens isEqualTo []) then {
|
||||
|
Loading…
x
Reference in New Issue
Block a user