mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 20:13:13 +03:00
rebase melee hatchet to fix #814
This commit is contained in:
@@ -16,7 +16,7 @@ class ItemHatchet_DZE : ItemCore {
|
||||
};
|
||||
output[]=
|
||||
{
|
||||
"MeleeHatchet"
|
||||
"MeleeHatchet_DZE"
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class MeleeHatchet: MeleeWeapon
|
||||
class MeleeHatchet_DZE: MeleeWeapon
|
||||
{
|
||||
scope=2;
|
||||
melee= "true";
|
||||
@@ -25,7 +25,7 @@ class MeleeHatchet: MeleeWeapon
|
||||
script="spawn player_addToolbelt;";
|
||||
use[]=
|
||||
{
|
||||
"MeleeHatchet"
|
||||
"MeleeHatchet_DZE"
|
||||
};
|
||||
output[]=
|
||||
{
|
||||
|
||||
@@ -44,7 +44,7 @@ if(_qty >= 1) then {
|
||||
_isOk = [player,_config] call BIS_fnc_invAdd;
|
||||
if (_isOk) then {
|
||||
deleteVehicle _holder;
|
||||
if (_classname in ["MeleeHatchet","MeleeCrowbar","MeleeMachete","MeleeFishingPole","MeleeSledge"]) then {
|
||||
if (_classname in ["MeleeHatchet_DZE","MeleeCrowbar","MeleeMachete","MeleeFishingPole","MeleeSledge"]) then {
|
||||
if (_type == "cfgWeapons") then {
|
||||
_muzzles = getArray(configFile >> "cfgWeapons" >> _classname >> "muzzles");
|
||||
//_wtype = ((weapons player) select 0);
|
||||
|
||||
@@ -20,7 +20,7 @@ _create = getArray (_config >> "ItemActions" >> "Toolbelt" >> "output") select
|
||||
_config2 = configFile >> "cfgWeapons" >> _create;
|
||||
|
||||
//Remove magazines if needed
|
||||
if (_item in ["MeleeHatchet","MeleeCrowbar","MeleeMachete","MeleeFishingPole","MeleeSledge"]) then {
|
||||
if (_item in ["MeleeHatchet_DZE","MeleeCrowbar","MeleeMachete","MeleeFishingPole","MeleeSledge"]) then {
|
||||
_magType = ([] + getArray (configFile >> "cfgWeapons" >> _item >> "magazines")) select 0;
|
||||
_meleeNum = ({_x == _magType} count magazines player);
|
||||
for "_i" from 1 to _meleeNum do {
|
||||
@@ -31,7 +31,7 @@ if (_item in ["MeleeHatchet","MeleeCrowbar","MeleeMachete","MeleeFishingPole","M
|
||||
if (_item in ["ItemHatchet_DZE","ItemCrowbar","ItemMachete","ItemFishingPole","ItemSledge"]) then {
|
||||
switch (primaryWeapon player) do
|
||||
{
|
||||
case "MeleeHatchet": { "MeleeHatchet" call player_addToolbelt };
|
||||
case "MeleeHatchet_DZE": { "MeleeHatchet_DZE" call player_addToolbelt };
|
||||
case "MeleeCrowbar": { "MeleeCrowbar" call player_addToolbelt };
|
||||
case "MeleeMachete": { "MeleeMachete" call player_addToolbelt };
|
||||
case "MeleeFishingPole": { "MeleeFishingPole" call player_addToolbelt };
|
||||
@@ -46,14 +46,14 @@ if (_isOk) then {
|
||||
player removeWeapon _item;
|
||||
|
||||
//Add magazines if needed
|
||||
if (_create in ["MeleeHatchet","MeleeCrowbar","MeleeMachete","MeleeFishingPole","MeleeSledge"]) then {
|
||||
if (_create in ["MeleeHatchet_DZE","MeleeCrowbar","MeleeMachete","MeleeFishingPole","MeleeSledge"]) then {
|
||||
if (_create == "MeleeCrowbar") then {
|
||||
player addMagazine 'crowbar_swing';
|
||||
};
|
||||
if (_create == "MeleeSledge") then {
|
||||
player addMagazine 'sledge_swing';
|
||||
};
|
||||
if (_create == "MeleeHatchet") then {
|
||||
if (_create == "MeleeHatchet_DZE") then {
|
||||
player addMagazine 'Hatchet_swing';
|
||||
};
|
||||
if (_create == "MeleeMachete") then {
|
||||
@@ -76,14 +76,14 @@ if (_isOk) then {
|
||||
cutText [localize "STR_DAYZ_CODE_2", "PLAIN DOWN"];
|
||||
|
||||
//Add magazines back
|
||||
if (_item in ["MeleeHatchet","MeleeCrowbar","MeleeMachete","MeleeFishingPole","MeleeSledge"]) then {
|
||||
if (_item in ["MeleeHatchet_DZE","MeleeCrowbar","MeleeMachete","MeleeFishingPole","MeleeSledge"]) then {
|
||||
if (_item == "MeleeCrowbar") then {
|
||||
player addMagazine 'crowbar_swing';
|
||||
};
|
||||
if (_item == "MeleeSledge") then {
|
||||
player addMagazine 'sledge_swing';
|
||||
};
|
||||
if (_item == "MeleeHatchet") then {
|
||||
if (_item == "MeleeHatchet_DZE") then {
|
||||
player addMagazine 'Hatchet_Swing';
|
||||
};
|
||||
if (_item == "MeleeMachete") then {
|
||||
|
||||
@@ -8,7 +8,7 @@ private ["_isOk","_objName","_finished","_proceed","_counter","_itemOut","_count
|
||||
if(DZE_ActionInProgress) exitWith { cutText [(localize "str_epoch_player_53") , "PLAIN DOWN"]; };
|
||||
DZE_ActionInProgress = true;
|
||||
|
||||
if((currentWeapon player) != "MeleeHatchet") exitWith {DZE_ActionInProgress = false; cutText [(localize "str_epoch_player_54"), "PLAIN DOWN"]; };
|
||||
if((currentWeapon player) != "MeleeHatchet_DZE") exitWith {DZE_ActionInProgress = false; cutText [(localize "str_epoch_player_54"), "PLAIN DOWN"]; };
|
||||
|
||||
// allowed trees list move this later
|
||||
_trees = DZE_trees;
|
||||
|
||||
@@ -15,7 +15,7 @@ for "_i" from 1 to _meleeNum do {
|
||||
};
|
||||
|
||||
player removeWeapon _item;
|
||||
if (_item == "MeleeHatchet") then {_item = "ItemHatchet_DZE";};
|
||||
if (_item == "MeleeHatchet_DZE") then {_item = "ItemHatchet_DZE";};
|
||||
if (_item == "MeleeCrowbar") then {_item = "MeleeCrowbar";};
|
||||
if (_item == "MeleeMachete") then {_item = "ItemMachete";};
|
||||
|
||||
|
||||
@@ -127,7 +127,7 @@ diag_log (str(_backpackMag));
|
||||
if (_primweapon == "MeleeSledge") then {
|
||||
_newUnit addMagazine 'sledge_swing';
|
||||
};
|
||||
if (_primweapon == "MeleeHatchet") then {
|
||||
if (_primweapon == "MeleeHatchet_DZE") then {
|
||||
_newUnit addMagazine 'Hatchet_Swing';
|
||||
};
|
||||
if (_primweapon == "MeleeMachete") then {
|
||||
|
||||
@@ -1232,7 +1232,7 @@ class CfgWeight
|
||||
{
|
||||
weight = 1;
|
||||
};
|
||||
class MeleeHatchet
|
||||
class MeleeHatchet_DZE
|
||||
{
|
||||
weight = 1;
|
||||
};
|
||||
|
||||
@@ -1098,7 +1098,7 @@ class FSM
|
||||
" player removeMagazine 'sledge_swing'; " \n
|
||||
" player addMagazine 'sledge_swing';" \n
|
||||
"};" \n
|
||||
"if (player hasWeapon ""MeleeHatchet"") then {" \n
|
||||
"if (player hasWeapon ""MeleeHatchet_DZE"") then {" \n
|
||||
" player removeMagazine 'Hatchet_Swing'; " \n
|
||||
" player addMagazine 'Hatchet_Swing';" \n
|
||||
"};" \n
|
||||
|
||||
Reference in New Issue
Block a user