Merge pull request #881 from dayz10k/master

#869 area maintenance tweaks
This commit is contained in:
HARLAN
2013-12-09 07:43:55 -08:00
2 changed files with 12 additions and 1 deletions

View File

@@ -10,10 +10,19 @@ player removeAction s_player_maintain_area_preview;
s_player_maintain_area_preview = 1;
_target = cursorTarget; // Plastic_Pole_EP1_DZ
_objectClasses = ["ModularItems", "DZE_Housebase"];
_objectClasses = ["ModularItems", "DZE_Housebase"] + DZE_ExtraMaintain;
_range = 50; // set the max range for the maintain area
_objects = nearestObjects [_target, _objectClasses, _range];
//filter to only those that have 10% damage
_objects_filtered = [];
{
if (damage _x >= 0.1) then {
_objects_filtered set [count _objects_filtered, _x];
};
} forEach _objects;
_objects = _objects_filtered;
// TODO dynamic requirements based on used building parts?
_count = count _objects;
_requirements = [];

View File

@@ -245,6 +245,8 @@ dayz_resetSelfActions = {
s_player_towing = -1;
s_halo_action = -1;
s_player_SurrenderedGear = -1;
s_player_maintain_area = -1;
s_player_maintain_area_preview = -1;
};
call dayz_resetSelfActions;