Add support for harvesting added plants

Closes #1928
This commit is contained in:
ebayShopper
2017-04-04 13:32:06 -04:00
parent cb09bb6bc9
commit 496681cd9b
8 changed files with 53 additions and 72 deletions

View File

@@ -453,10 +453,10 @@ if (dayz_townGenerator) then {execVM "\z\addons\dayz_server\system\lit_fireplace
_uid = getPlayerUID _player;
_treeModel = _tree call fn_getModelName;
if ((_dis < 30) && (_treeModel in dayz_trees) && (_uid != "")) then {
if (_dis < 30 && (_treeModel in dayz_trees or (_treeModel in dayz_plant)) && (_uid != "")) then {
_tree setDamage 1;
dayz_choppedTrees set [count dayz_choppedTrees,_tree];
diag_log format["Server setDamage on tree %1 chopped down by %2(%3)",_treeModel,_name,_uid];
diag_log format["Server setDamage on tree or plant %1 chopped down by %2(%3)",_treeModel,_name,_uid];
};
};