avoid allmissionobjects 'PlotPole_EPOCH'

This commit is contained in:
He-Man 2018-06-30 13:37:35 +02:00
parent 4ee52e3881
commit 3fd9071c51

View File

@ -150,14 +150,12 @@ else {
_buildingAllowed = false; _buildingAllowed = false;
["The Group Leader must place the Jammer!", 5] call Epoch_message; ["The Group Leader must place the Jammer!", 5] call Epoch_message;
}; };
// TODO: rework not ideal to use allmissionobjects
_alljammer = allmissionobjects 'PlotPole_EPOCH';
_c = 0; _c = 0;
{ {
if ((_x getVariable["BUILD_OWNER", "-1"]) in[getPlayerUID player, Epoch_my_GroupUID]) then { if ((_x getVariable["BUILD_OWNER", "-1"]) in[getPlayerUID player, Epoch_my_GroupUID]) then {
_c = _c+1; _c = _c+1;
}; };
} foreach _alljammer; } foreach (missionnamespace getvariable ["Epoch_Plotpoles",allmissionobjects 'PlotPole_EPOCH']);
if (_c >= _jammerPerGroup) then { if (_c >= _jammerPerGroup) then {
_buildingAllowed = false; _buildingAllowed = false;
[format["Building Disallowed: Max %1 Jammer per Group!", _jammerPerGroup], 5] call Epoch_message; [format["Building Disallowed: Max %1 Jammer per Group!", _jammerPerGroup], 5] call Epoch_message;