mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-13 19:52:38 +03:00
Fill mixed gas into a chainsaw requires a chainsaw now
This commit is contained in:
@@ -77,7 +77,7 @@ class ItemJerryMixed: CA_Magazine {
|
||||
text = $STR_EPOCH_CHAINSAW_MIXEDGAS_CAN_ACTION;
|
||||
script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;";
|
||||
neednearby[] = {};
|
||||
requiretools[] = {"ItemToolbox"};
|
||||
requiretools[] = {"ItemToolbox","ChainSaw"};
|
||||
output[] = {{"CSGAS",1},{"ItemJerryMixed4",1}};
|
||||
input[] = {{"ItemJerryMixed",1}};
|
||||
};
|
||||
@@ -103,7 +103,7 @@ class ItemJerryMixed4: CA_Magazine {
|
||||
text = $STR_EPOCH_CHAINSAW_MIXEDGAS_CAN_ACTION;
|
||||
script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;";
|
||||
neednearby[] = {};
|
||||
requiretools[] = {"ItemToolbox"};
|
||||
requiretools[] = {"ItemToolbox","ChainSaw"};
|
||||
output[] = {{"CSGAS",1},{"ItemJerryMixed3",1}};
|
||||
input[] = {{"ItemJerryMixed4",1}};
|
||||
};
|
||||
@@ -129,7 +129,7 @@ class ItemJerryMixed3: CA_Magazine {
|
||||
text = $STR_EPOCH_CHAINSAW_MIXEDGAS_CAN_ACTION;
|
||||
script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;";
|
||||
neednearby[] = {};
|
||||
requiretools[] = {"ItemToolbox"};
|
||||
requiretools[] = {"ItemToolbox","ChainSaw"};
|
||||
output[] = {{"CSGAS",1},{"ItemJerryMixed2",1}};
|
||||
input[] = {{"ItemJerryMixed3",1}};
|
||||
};
|
||||
@@ -155,7 +155,7 @@ class ItemJerryMixed2: CA_Magazine {
|
||||
text = $STR_EPOCH_CHAINSAW_MIXEDGAS_CAN_ACTION;
|
||||
script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;";
|
||||
neednearby[] = {};
|
||||
requiretools[] = {"ItemToolbox"};
|
||||
requiretools[] = {"ItemToolbox","ChainSaw"};
|
||||
output[] = {{"CSGAS",1},{"ItemJerryMixed1",1}};
|
||||
input[] = {{"ItemJerryMixed2",1}};
|
||||
};
|
||||
@@ -181,7 +181,7 @@ class ItemJerryMixed1: CA_Magazine {
|
||||
text = $STR_EPOCH_CHAINSAW_MIXEDGAS_CAN_ACTION;
|
||||
script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;";
|
||||
neednearby[] = {};
|
||||
requiretools[] = {"ItemToolbox"};
|
||||
requiretools[] = {"ItemToolbox","ChainSaw"};
|
||||
output[] = {{"CSGAS",1},{"ItemJerrycanEmpty",1}};
|
||||
input[] = {{"ItemJerryMixed1",1}};
|
||||
};
|
||||
|
||||
@@ -13,26 +13,30 @@ _weapons = weapons player;
|
||||
{
|
||||
_weapon = _x;
|
||||
_hastoolweapon = _x in _weapons;
|
||||
|
||||
|
||||
if (_x == "ItemKnife") then {
|
||||
{if (_x in Dayz_Gutting) exitWith {_hastoolweapon = true};} forEach _items;
|
||||
{if (_x in Dayz_Gutting) exitWith {_hastoolweapon = true};} count _items;
|
||||
};
|
||||
if (_x == "ItemMatchbox") then {
|
||||
{if (_x in DayZ_Ignitors) exitWith {_hastoolweapon = true};} forEach _items;
|
||||
{if (_x in DayZ_Ignitors) exitWith {_hastoolweapon = true};} count _items;
|
||||
};
|
||||
if (_x == "ChainSaw") then {
|
||||
{if (_x in ["ChainSaw","ChainSawB","ChainSawG","ChainSawG","ChainSawR"]) exitWith {_hastoolweapon = true};} count _weapons;
|
||||
};
|
||||
|
||||
{
|
||||
_melee = format ["Melee%1",_x];
|
||||
if (_weapon == format["Item%1",_x] && {(_melee in _weapons) or (dayz_onBack == _melee)}) then {
|
||||
if (_weapon == format["Item%1",_x] && {(_melee in _weapons) || {dayz_onBack == _melee}}) then {
|
||||
_hastoolweapon = true;
|
||||
};
|
||||
} forEach ["Crowbar","Hatchet","Sledge"];
|
||||
|
||||
} count ["Crowbar","Hatchet","Sledge"];
|
||||
|
||||
if (!_hastoolweapon) then {
|
||||
_missingText = getText (configFile >> "cfgWeapons" >> _x >> "displayName");
|
||||
_missing set [count _missing, _missingText];
|
||||
_hasrequireditem = false;
|
||||
};
|
||||
} forEach _require;
|
||||
} count _require;
|
||||
|
||||
_missingText = "";
|
||||
{
|
||||
@@ -48,8 +52,8 @@ _missingText = "";
|
||||
} forEach _missing;
|
||||
|
||||
_hasbuilditem = _item in magazines player;
|
||||
if (!_hasbuilditem && _text != "") exitWith {dayz_actionInProgress = false; format[localize "str_player_31",_text,"build"] call dayz_rollingMessages; false;};
|
||||
if (!_hasbuilditem && {_text != ""}) exitWith {dayz_actionInProgress = false; format[localize "str_player_31",_text,"build"] call dayz_rollingMessages; false;};
|
||||
if (!_hasrequireditem) exitWith {dayz_actionInProgress = false; format[localize "str_epoch_player_137",_missingText] call dayz_rollingMessages; false;};
|
||||
|
||||
//When calling this function in another script use a silent exitWith, unless you have something special to say. i.e. if (!_hasrequireditem) exitWith{};
|
||||
_hasrequireditem;
|
||||
_hasrequireditem;
|
||||
|
||||
Reference in New Issue
Block a user