mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2026-02-04 15:22:53 +03:00
Update harvest wood
Harvest wood with a hatchet drops a wood pile or a wood log now. Also lumber planks can be crafted directly from wood logs now.
This commit is contained in:
@@ -18,17 +18,26 @@ class ItemLog : CA_Magazine
|
|||||||
};
|
};
|
||||||
class Crafting
|
class Crafting
|
||||||
{
|
{
|
||||||
text = $STR_BLD_craft_ItemLog;//"Wooden Plank"
|
text = $STR_EPOCH_PLAYER_242;//"Lumber"
|
||||||
script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;";
|
script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;";
|
||||||
|
neednearby[] = {};
|
||||||
|
requiretools[] = {"ItemHatchet","ItemToolbox","ItemKnife" };
|
||||||
|
output[] = {{"PartWoodLumber",2}};
|
||||||
|
input[] = {{"ItemLog",1}};
|
||||||
|
};
|
||||||
|
class Crafting1
|
||||||
|
{
|
||||||
|
text = $STR_BLD_craft_ItemLog;//"Wooden Plank"
|
||||||
|
script = ";['Crafting1','CfgMagazines', _id] spawn player_craftItem;";
|
||||||
neednearby[] = {};
|
neednearby[] = {};
|
||||||
requiretools[] = {"ItemHatchet"};
|
requiretools[] = {"ItemHatchet"};
|
||||||
output[] = {{"ItemPlank",2}};
|
output[] = {{"ItemPlank",2}};
|
||||||
input[] = {{"ItemLog",1}};
|
input[] = {{"ItemLog",1}};
|
||||||
};
|
};
|
||||||
class Crafting1
|
class Crafting2
|
||||||
{
|
{
|
||||||
text = $STR_EQUIP_NAME_40;//"Wood Piles"
|
text = $STR_EQUIP_NAME_40;//"Wood Piles"
|
||||||
script = ";['Crafting1','CfgMagazines', _id] spawn player_craftItem;";
|
script = ";['Crafting2','CfgMagazines', _id] spawn player_craftItem;";
|
||||||
neednearby[] = {};
|
neednearby[] = {};
|
||||||
requiretools[] = {"ItemHatchet"};
|
requiretools[] = {"ItemHatchet"};
|
||||||
output[] = {{"PartWoodPile",4}};
|
output[] = {{"PartWoodPile",4}};
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
private ["_unit","_ammo","_weapon","_projectile","_tree"];
|
private ["_ammo","_tree","_distance2d","_damage","_itemOut"];
|
||||||
_unit = _this select 0;
|
|
||||||
_weapon = _this select 1;
|
_ammo = _this select 4;
|
||||||
_ammo = _this select 4;
|
|
||||||
_projectile = _this select 6;
|
|
||||||
|
|
||||||
if (_ammo in ["Hatchet_Swing_Ammo","Chainsaw_Swing_Ammo"]) then {
|
if (_ammo in ["Hatchet_Swing_Ammo","Chainsaw_Swing_Ammo"]) then {
|
||||||
_tree = objNull;
|
_tree = objNull;
|
||||||
@@ -16,7 +14,7 @@ if (_ammo in ["Hatchet_Swing_Ammo","Chainsaw_Swing_Ammo"]) then {
|
|||||||
if (!isNull _tree) then {
|
if (!isNull _tree) then {
|
||||||
// get 2d distance
|
// get 2d distance
|
||||||
_distance2d = [player, _tree] call BIS_fnc_distance2D;
|
_distance2d = [player, _tree] call BIS_fnc_distance2D;
|
||||||
|
|
||||||
if (_distance2d <= 5) then {
|
if (_distance2d <= 5) then {
|
||||||
// damage must be going down
|
// damage must be going down
|
||||||
_damage = damage _tree;
|
_damage = damage _tree;
|
||||||
@@ -30,7 +28,7 @@ if (_ammo in ["Hatchet_Swing_Ammo","Chainsaw_Swing_Ammo"]) then {
|
|||||||
deleteVehicle _tree;
|
deleteVehicle _tree;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
_itemOut = if (_ammo == "Chainsaw_Swing_Ammo") then {"PartWoodLumber"} else {"PartWoodPile"}; // Log can be crafted to > 2x plank > 4x woodpile
|
_itemOut = [["PartWoodPile","PartWoodPile","ItemLog"] call BIS_fnc_selectRandom,"PartWoodLumber"] select (_ammo == "Chainsaw_Swing_Ammo");
|
||||||
[_itemOut,1,1] call fn_dropItem;
|
[_itemOut,1,1] call fn_dropItem;
|
||||||
|
|
||||||
[player,60,false,getPosATL player] spawn player_alertZombies;
|
[player,60,false,getPosATL player] spawn player_alertZombies;
|
||||||
|
|||||||
Reference in New Issue
Block a user