mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2026-02-22 16:10:49 +03:00
Use Epoch player_harvest instead of player_chopWood
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
|
||||
private ["_item","_result","_dis","_sfx","_num","_breaking","_countOut","_woodCutting","_trees","_findNearestTree","_objInfo","_lenInfo","_objName","_i","_k","_counter","_isOk","_proceed","_animState","_started","_finished","_isMedic","_itemOut"];
|
||||
private ["_item","_result","_dis","_sfx","_num","_breaking","_countOut","_woodCutting","_findNearestTree","_objName","_counter","_isOk","_proceed","_animState","_started","_finished","_isMedic","_itemOut"];
|
||||
|
||||
//if (!isnil "faco_player_chopWood") exitWith { _this call faco_player_chopWood };
|
||||
|
||||
@@ -15,29 +15,11 @@ if (["forest",dayz_surfaceType] call fnc_inString) then {
|
||||
_woodCutting = true;
|
||||
|
||||
} else {
|
||||
// allowed trees list move this later
|
||||
_trees = ["ind_timbers.p3d","t_larix3s.p3d","t_pyrus2s.p3d","str_briza_kriva.p3d","dd_borovice.p3d","les_singlestrom_b.p3d","les_singlestrom.p3d","smrk_velky.p3d","smrk_siroky.p3d","smrk_maly.p3d","les_buk.p3d","str krovisko vysoke.p3d","str_fikovnik_ker.p3d","str_fikovnik.p3d","str vrba.p3d","hrusen2.p3d","str dub jiny.p3d","str lipa.p3d","str briza.p3d","p_akat02s.p3d","jablon.p3d","p_buk.p3d","str_topol.p3d","str_topol2.p3d","p_osika.p3d","t_picea3f.p3d","t_picea2s.p3d","t_picea1s.p3d","t_fagus2w.p3d","t_fagus2s.p3d","t_fagus2f.p3d","t_betula1f.p3d","t_betula2f.p3d","t_betula2s.p3d","t_betula2w.p3d","t_alnus2s.p3d","t_acer2s.p3d","t_populus3s.p3d","t_quercus2f.p3d","t_sorbus2s.p3d","t_malus1s.p3d","t_salix2s.p3d","t_picea1s_w.p3d","t_picea2s_w.p3d","t_ficusb2s_ep1.p3d","t_populusb2s_ep1.p3d","t_populusf2s_ep1.p3d","t_amygdalusc2s_ep1.p3d","t_ficusb2s_ep1.p3d","t_pistacial2s_ep1.p3d","t_pinuse2s_ep1.p3d","t_pinuss3s_ep1.p3d","t_prunuss2s_ep1.p3d","t_pinusn2s.p3d","t_pinusn1s.p3d","t_pinuss2f.p3d","t_poplar2f_dead_pmc.p3d","misc_torzotree_pmc.p3d","misc_burnspruce_pmc.p3d","brg_cocunutpalm8.p3d","brg_umbrella_acacia01b.p3d","brg_jungle_tree_canopy_1.p3d","brg_jungle_tree_canopy_2.p3d","brg_cocunutpalm4.p3d","brg_cocunutpalm3.p3d","palm_01.p3d","palm_02.p3d","palm_03.p3d","palm_04.p3d","palm_09.p3d","palm_10.p3d","brg_cocunutpalm2.p3d","brg_jungle_tree_antiaris.p3d","brg_cocunutpalm1.p3d"];
|
||||
_findNearestTree = objNull;
|
||||
|
||||
{
|
||||
_objInfo = toArray(str(_x));
|
||||
_lenInfo = count _objInfo - 1;
|
||||
_objName = [];
|
||||
_i = 0;
|
||||
// determine where the object name starts
|
||||
{
|
||||
if (58 == _objInfo select _i) exitWith {};
|
||||
_i = _i + 1;
|
||||
} forEach _objInfo;
|
||||
_i = _i + 2; // skip the ": " part
|
||||
|
||||
for "_k" from _i to _lenInfo do {
|
||||
_objName = _objName + [_objInfo select _k];
|
||||
};
|
||||
_objName = toLower(toString(_objName));
|
||||
|
||||
_objName = _x call fn_getModelName;
|
||||
// Exit since we found a tree
|
||||
if (_objName in _trees) exitWith { _findNearestTree = _x; };
|
||||
if (_objName in dayz_trees) exitWith { _findNearestTree = _x; };
|
||||
} foreach nearestObjects [getPosATL player, [], 8];
|
||||
|
||||
_countOut = floor(random 3) + 2;
|
||||
|
||||
@@ -13,7 +13,7 @@ _findNearestlight = [];
|
||||
|
||||
if (alive _x) then {
|
||||
|
||||
_objName = _x call DZE_getModelName;
|
||||
_objName = _x call fn_getModelName;
|
||||
|
||||
if (_objName in _lights) then {
|
||||
_findNearestlight set [(count _findNearestlight),_x];
|
||||
|
||||
@@ -23,7 +23,7 @@ _findNearestTree = [];
|
||||
|
||||
if (alive _x) then {
|
||||
|
||||
_objName = _x call DZE_getModelName;
|
||||
_objName = _x call fn_getModelName;
|
||||
|
||||
// Exit since we found a tree
|
||||
if (_objName in _trees) exitWith {
|
||||
|
||||
Reference in New Issue
Block a user