mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2026-02-17 21:52:56 +03:00
Adding dayz mod waterbottles
This commit adds the waterbottles from DayZ Mod. The icons were made by @DeVloek. The waterbottles are fully functional with all actions. To boil a plastic waterbottle you need an empty trash can. Dogs could not be watered with other waterbottle than the ItemWaterbottle itself. This is fixed now. Also fix missing reset action from hide body.
This commit is contained in:
@@ -1,61 +1,84 @@
|
||||
private ["_bottletext","_tin1text","_tin2text","_tintext","_hastinitem","_qty","_dis","_sfx","_WB2Add","_finished"];
|
||||
|
||||
if (dayz_actionInProgress) exitWith {localize "str_player_actionslimit" call dayz_rollingMessages;};
|
||||
dayz_actionInProgress = true;
|
||||
|
||||
private ["_bottletext","_hastinitem","_qty","_dis","_sfx","_bottle","_finished","_waterbottles","_platicBottles","_magsPlayer","_bottles"];
|
||||
|
||||
_bottletext = getText (configFile >> "CfgMagazines" >> "ItemWaterBottle" >> "displayName");
|
||||
_tin1text = getText (configFile >> "CfgMagazines" >> "TrashTinCan" >> "displayName");
|
||||
_tin2text = getText (configFile >> "CfgMagazines" >> "ItemSodaEmpty" >> "displayName");
|
||||
_tintext = format["%1 / %2",_tin1text,_tin2text];
|
||||
_qty = {_x in ["ItemWaterBottleInfected","ItemWaterBottle","ItemWaterBottleSafe","ItemWaterbottle1oz","ItemWaterbottle2oz","ItemWaterbottle3oz","ItemWaterbottle4oz","ItemWaterbottle5oz","ItemWaterbottle6oz","ItemWaterbottle7oz","ItemWaterbottle8oz","ItemWaterbottle9oz"]} count magazines player;
|
||||
_waterbottles = ["ItemWaterBottleInfected","ItemWaterBottle","ItemWaterBottleSafe","ItemWaterbottle1oz","ItemWaterbottle2oz","ItemWaterbottle3oz","ItemWaterbottle4oz","ItemWaterbottle5oz","ItemWaterbottle6oz","ItemWaterbottle7oz","ItemWaterbottle8oz","ItemWaterbottle9oz","ItemPlasticWaterBottle","ItemPlasticWaterBottleInfected","ItemPlasticWaterBottleSafe","ItemPlasticWaterbottle1oz","ItemPlasticWaterbottle2oz","ItemPlasticWaterbottle3oz","ItemPlasticWaterbottle4oz","ItemPlasticWaterbottle5oz","ItemPlasticWaterbottle6oz","ItemPlasticWaterbottle7oz","ItemPlasticWaterbottle8oz","ItemPlasticWaterbottle9oz"];
|
||||
_platicBottles = ["ItemPlasticWaterBottle","ItemPlasticWaterBottleInfected","ItemPlasticWaterBottleSafe","ItemPlasticWaterbottle1oz","ItemPlasticWaterbottle2oz","ItemPlasticWaterbottle3oz","ItemPlasticWaterbottle4oz","ItemPlasticWaterbottle5oz","ItemPlasticWaterbottle6oz","ItemPlasticWaterbottle7oz","ItemPlasticWaterbottle8oz","ItemPlasticWaterbottle9oz"];
|
||||
_magsPlayer = magazines player;
|
||||
_qty = {_x in _waterbottles} count _magsPlayer;
|
||||
_hastinitem = true;
|
||||
a_player_boil = true;
|
||||
player removeAction s_player_boil;
|
||||
//s_player_boil = -1;
|
||||
|
||||
/* //canteens are metal, we only use canteens in Epoch
|
||||
_hastinitem = {_x in magazines player} count boil_tin_cans > 0;
|
||||
if (!_hastinitem) exitWith {format[localize "str_player_31",_tintext,localize "str_player_31_fill"] call dayz_rollingMessages; a_player_boil = false; dayz_actionInProgress = false;};
|
||||
*/
|
||||
if ({_x in _platicBottles} count _magsPlayer > 0) then {
|
||||
_hastinitem = {_x in _magsPlayer} count boil_tin_cans > 0;
|
||||
};
|
||||
|
||||
if !(_hastinitem) exitWith {
|
||||
private ["_tin1text","_tin2text","_tintext"];
|
||||
|
||||
_tin1text = getText (configFile >> "CfgMagazines" >> "TrashTinCan" >> "displayName");
|
||||
_tin2text = getText (configFile >> "CfgMagazines" >> "ItemSodaEmpty" >> "displayName");
|
||||
_tintext = format["%1 / %2",_tin1text,_tin2text];
|
||||
format[localize "str_player_31",_tintext,localize "str_player_31_fill"] call dayz_rollingMessages;
|
||||
a_player_boil = false;
|
||||
dayz_actionInProgress = false;
|
||||
};
|
||||
|
||||
if (_qty > 0) then {
|
||||
_dis=10;
|
||||
_sfx = "cook";
|
||||
[player,_sfx,0,false,_dis] call dayz_zombieSpeak;
|
||||
[player,_dis,true,(getPosATL player)] call player_alertZombies;
|
||||
|
||||
_finished = ["Medic",1] call fn_loopAction;
|
||||
|
||||
// Double check player did not drop item
|
||||
_qty = {_x in ["ItemWaterBottleInfected","ItemWaterBottle","ItemWaterBottleSafe","ItemWaterbottle1oz","ItemWaterbottle2oz","ItemWaterbottle3oz","ItemWaterbottle4oz","ItemWaterbottle5oz","ItemWaterbottle6oz","ItemWaterbottle7oz","ItemWaterbottle8oz","ItemWaterbottle9oz"]} count magazines player;
|
||||
|
||||
if (_qty == 0 or !_finished) exitWith {};
|
||||
|
||||
for "_x" from 1 to _qty do {
|
||||
_WB2Add = "ItemWaterBottleBoiled";
|
||||
switch (true) do {
|
||||
case ("ItemWaterBottleInfected" in magazines player): { player removeMagazine "ItemWaterBottleInfected"; };
|
||||
case ("ItemWaterBottleSafe" in magazines player): { player removeMagazine "ItemWaterBottleSafe"; };
|
||||
case ("ItemWaterBottle" in magazines player): { player removeMagazine "ItemWaterBottle"; };
|
||||
case ("ItemWaterbottle1oz" in magazines player): { player removeMagazine "ItemWaterbottle1oz"; _WB2Add = "ItemWaterbottle1ozBoiled"; };
|
||||
case ("ItemWaterbottle2oz" in magazines player): { player removeMagazine "ItemWaterbottle2oz"; _WB2Add = "ItemWaterbottle2ozBoiled"; };
|
||||
case ("ItemWaterbottle3oz" in magazines player): { player removeMagazine "ItemWaterbottle3oz"; _WB2Add = "ItemWaterbottle3ozBoiled"; };
|
||||
case ("ItemWaterbottle4oz" in magazines player): { player removeMagazine "ItemWaterbottle4oz"; _WB2Add = "ItemWaterbottle4ozBoiled"; };
|
||||
case ("ItemWaterbottle5oz" in magazines player): { player removeMagazine "ItemWaterbottle5oz"; _WB2Add = "ItemWaterbottle5ozBoiled"; };
|
||||
case ("ItemWaterbottle6oz" in magazines player): { player removeMagazine "ItemWaterbottle6oz"; _WB2Add = "ItemWaterbottle6ozBoiled"; };
|
||||
case ("ItemWaterbottle7oz" in magazines player): { player removeMagazine "ItemWaterbottle7oz"; _WB2Add = "ItemWaterbottle7ozBoiled"; };
|
||||
case ("ItemWaterbottle8oz" in magazines player): { player removeMagazine "ItemWaterbottle8oz"; _WB2Add = "ItemWaterbottle8ozBoiled"; };
|
||||
case ("ItemWaterbottle9oz" in magazines player): { player removeMagazine "ItemWaterbottle9oz"; _WB2Add = "ItemWaterbottle9ozBoiled"; };
|
||||
_finished = ["Medic",1] call fn_loopAction;
|
||||
|
||||
// Double check player did not drop item
|
||||
_bottles = [];
|
||||
|
||||
{
|
||||
if (_x in _waterbottles) then {
|
||||
_bottles set [count _bottles, _x];
|
||||
};
|
||||
} count magazines player;
|
||||
|
||||
_qty = count _bottles;
|
||||
|
||||
if (_qty < 1 || !_finished) exitWith {};
|
||||
|
||||
{
|
||||
_bottle = _x;
|
||||
player removeMagazine _bottle;
|
||||
if (dayz_waterBottleBreaking && {[0.1] call fn_chance}) then {
|
||||
player addMagazine "ItemWaterBottleDmg";
|
||||
if (_bottle in _platicBottles) then {
|
||||
player addMagazine "ItemPlasticWaterbottleDmg";
|
||||
} else {
|
||||
player addMagazine "ItemWaterBottleDmg";
|
||||
};
|
||||
localize "str_waterbottle_broke" call dayz_rollingMessages;
|
||||
} else {
|
||||
player addMagazine _WB2Add;
|
||||
if (_bottle in _platicBottles) then {
|
||||
if (_bottle in ["ItemPlasticWaterBottleInfected","ItemPlasticWaterBottleSafe"]) then {
|
||||
player addMagazine "ItemPlasticWaterbottleBoiled";
|
||||
} else {
|
||||
player addMagazine (_bottle + "Boiled");
|
||||
};
|
||||
} else {
|
||||
if (_bottle in ["ItemWaterBottleInfected","ItemWaterBottleSafe"]) then {
|
||||
player addMagazine "ItemWaterBottleBoiled";
|
||||
} else {
|
||||
player addMagazine (_bottle + "Boiled");
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
} count _bottles;
|
||||
format [localize "str_player_boiledwater",_qty] call dayz_rollingMessages;
|
||||
} else {
|
||||
format[localize "str_player_31",_bottletext,localize "str_player_31_fill"] call dayz_rollingMessages;
|
||||
};
|
||||
|
||||
a_player_boil = false;
|
||||
dayz_actionInProgress = false;
|
||||
dayz_actionInProgress = false;
|
||||
|
||||
@@ -1,14 +1,15 @@
|
||||
private ["_array","_handle","_type","_onLadder","_removed","_itemIn","_countIn"];
|
||||
if (dayz_actionInProgress) exitWith {localize "str_player_actionslimit" call dayz_rollingMessages;};
|
||||
dayz_actionInProgress = true;
|
||||
|
||||
private ["_array","_handle","_type","_onLadder","_removed","_itemIn","_countIn","_bottles"];
|
||||
|
||||
_onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
|
||||
if (_onLadder) exitWith {dayz_actionInProgress = false;localize "str_player_21" call dayz_rollingMessages;};
|
||||
|
||||
_array = _this select 3;
|
||||
_handle = _array select 0;
|
||||
_type = _array select 1;
|
||||
|
||||
_onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
|
||||
if (_onLadder) exitWith {localize "str_player_21" call dayz_rollingMessages;};
|
||||
|
||||
if (dayz_actionInProgress) exitWith {localize "str_player_actionslimit" call dayz_rollingMessages;};
|
||||
dayz_actionInProgress = true;
|
||||
|
||||
player playActionNow "PutDown";
|
||||
|
||||
switch (_type) do {
|
||||
@@ -17,7 +18,7 @@ switch (_type) do {
|
||||
_removed = 0;
|
||||
_itemIn = "FoodRaw";
|
||||
_countIn = 1;
|
||||
{
|
||||
{
|
||||
if( (_removed < _countIn) && ((_x == _itemIn) || configName(inheritsFrom(configFile >> "cfgMagazines" >> _x)) == _itemIn)) then {
|
||||
_removed = _removed + ([player,_x] call BIS_fnc_invRemove);
|
||||
};
|
||||
@@ -30,13 +31,21 @@ switch (_type) do {
|
||||
|
||||
};
|
||||
case 1: {
|
||||
if(([player,"ItemWaterbottle"] call BIS_fnc_invRemove) == 1) then {
|
||||
player addMagazine "ItemWaterbottleUnfilled";
|
||||
};
|
||||
_handle setFSMVariable ["_thirst",0];
|
||||
_bottles = ["ItemWaterBottle","ItemWaterBottleInfected","ItemWaterBottleSafe","ItemWaterBottleBoiled","ItemPlasticWaterBottle","ItemPlasticWaterBottleInfected","ItemPlasticWaterBottleSafe","ItemPlasticWaterBottleBoiled"];
|
||||
{
|
||||
if (_x in _bottles) exitwith {
|
||||
if (_x in ["ItemWaterBottle","ItemWaterBottleInfected","ItemWaterBottleSafe","ItemWaterBottleBoiled"]) then {
|
||||
player addMagazine "ItemWaterbottleUnfilled";
|
||||
} else {
|
||||
player addMagazine "ItemPlasticWaterbottleUnfilled";
|
||||
};
|
||||
player removeMagazine _x;
|
||||
};
|
||||
} count magazines player;
|
||||
_handle setFSMVariable ["_thirst",0];
|
||||
player removeAction s_player_waterdog;
|
||||
s_player_waterdog = -1;
|
||||
};
|
||||
};
|
||||
|
||||
dayz_actionInProgress = false;
|
||||
dayz_actionInProgress = false;
|
||||
|
||||
@@ -23,11 +23,11 @@ class ItemActions
|
||||
};
|
||||
};
|
||||
*/
|
||||
private ["_tradeComplete","_onLadder","_canDo","_selectedRecipeOutput","_boiled","_proceed","_itemIn","_countIn","_missing","_missingQty","_qty","_itemOut","_countOut","_finished","_removed","_tobe_removed_total","_textCreate","_textMissing","_selectedRecipeInput","_selectedRecipeInputStrict","_num_removed","_removed_total","_temp_removed_array","_abort","_waterLevel","_waterLevel_lowest","_reason","_isNear","_selectedRecipeTools","_distance","_crafting","_needNear","_item","_baseClass","_num_removed_weapons","_outputWeapons","_inputWeapons","_randomOutput","_craft_doLoop","_selectedWeapon","_selectedMag","_sfx"];
|
||||
|
||||
if (dayz_actionInProgress) exitWith {localize "str_player_actionslimit" call dayz_rollingMessages;};
|
||||
dayz_actionInProgress = true;
|
||||
|
||||
private ["_tradeComplete","_onLadder","_canDo","_selectedRecipeOutput","_boiled","_proceed","_itemIn","_countIn","_missing","_missingQty","_qty","_itemOut","_countOut","_finished","_removed","_tobe_removed_total","_textCreate","_textMissing","_selectedRecipeInput","_selectedRecipeInputStrict","_num_removed","_removed_total","_temp_removed_array","_abort","_waterLevel","_waterLevel_lowest","_reason","_isNear","_selectedRecipeTools","_distance","_crafting","_needNear","_item","_baseClass","_num_removed_weapons","_outputWeapons","_inputWeapons","_randomOutput","_craft_doLoop","_selectedWeapon","_selectedMag","_sfx","_configParent","_pPos"];
|
||||
|
||||
// This is used to find correct recipe based what itemaction was click allows multiple recipes per item.
|
||||
_crafting = _this select 0;
|
||||
|
||||
@@ -102,10 +102,8 @@ if (_canDo) then {
|
||||
_itemIn = _x select 0;
|
||||
_countIn = _x select 1;
|
||||
|
||||
_qty = { (_x == _itemIn) || (!_selectedRecipeInputStrict && configName(inheritsFrom(configFile >> "cfgMagazines" >> _x)) == _itemIn) } count magazines player;
|
||||
|
||||
_qty = { (_x == _itemIn) || (!_selectedRecipeInputStrict && configName(inheritsFrom(configFile >> "cfgMagazines" >> _x)) == _itemIn)} count magazines player;
|
||||
if (_qty < _countIn) exitWith { _missing = _itemIn; _missingQty = (_countIn - _qty); _proceed = false; };
|
||||
|
||||
} forEach _selectedRecipeInput;
|
||||
};
|
||||
|
||||
@@ -127,7 +125,7 @@ if (_canDo) then {
|
||||
_removed = 0;
|
||||
_itemIn = _x select 0;
|
||||
_countIn = _x select 1;
|
||||
// diag_log format["Recipe Finish: %1 %2", _itemIn,_countIn];
|
||||
//diag_log format["Recipe Finish: %1 %2", _itemIn,_countIn];
|
||||
_tobe_removed_total = _tobe_removed_total + _countIn;
|
||||
|
||||
// Preselect the item
|
||||
@@ -135,7 +133,7 @@ if (_canDo) then {
|
||||
_configParent = configName(inheritsFrom(configFile >> "cfgMagazines" >> _x));
|
||||
if ((_x == _itemIn) || (!_selectedRecipeInputStrict && _configParent == _itemIn)) then {
|
||||
// Get lowest waterlevel
|
||||
if ((_x == "ItemWaterbottle") ||( _configParent == "ItemWaterbottle")) then {
|
||||
if ((_x == "ItemWaterbottle") || (_configParent == "ItemWaterbottle")) then {
|
||||
_waterLevel = getNumber(configFile >> "CfgMagazines" >> _x >> "wateroz");
|
||||
if (_waterLevel_lowest == 0 || _waterLevel < _waterLevel_lowest) then {
|
||||
_waterLevel_lowest = _waterLevel;
|
||||
@@ -157,9 +155,9 @@ if (_canDo) then {
|
||||
_removed_total = _removed_total + _num_removed;
|
||||
if (_num_removed >= 1) then {
|
||||
//diag_log format["debug remove: %1 of: %2", _configParent, _x];
|
||||
if (_x == "ItemWaterbottle" || _configParent == "ItemWaterbottle") then {
|
||||
if ((_x == "ItemWaterbottle") || (_configParent == "ItemWaterbottle")) then {
|
||||
_waterLevel = floor((getNumber(configFile >> "CfgMagazines" >> _x >> "wateroz")) - 1);
|
||||
if (_x in ["ItemWaterbottle9ozBoiled","ItemWaterbottle8ozBoiled","ItemWaterbottle7ozBoiled","ItemWaterbottle6ozBoiled","ItemWaterbottle5ozBoiled","ItemWaterbottle4ozBoiled","ItemWaterbottle3ozBoiled","ItemWaterbottle2ozBoiled","ItemWaterBottleBoiled"]) then {
|
||||
if (_x in ["ItemWaterbottle9ozBoiled","ItemWaterbottle8ozBoiled","ItemWaterbottle7ozBoiled","ItemWaterbottle6ozBoiled","ItemWaterbottle5ozBoiled","ItemWaterbottle4ozBoiled","ItemWaterbottle3ozBoiled","ItemWaterbottle2ozBoiled","ItemWaterBottleBoiled","ItemPlasticWaterbottle9ozBoiled","ItemPlasticWaterbottle8ozBoiled","ItemPlasticWaterbottle7ozBoiled","ItemPlasticWaterbottle6ozBoiled","ItemPlasticWaterbottle5ozBoiled","ItemPlasticWaterbottle4ozBoiled","ItemPlasticWaterbottle3ozBoiled","ItemPlasticWaterbottle2ozBoiled","ItemPlasticWaterBottleBoiled"]) then {
|
||||
_boiled = true;
|
||||
};
|
||||
};
|
||||
@@ -202,14 +200,28 @@ if (_canDo) then {
|
||||
_itemOut = _x select 0;
|
||||
_countOut = _x select 1;
|
||||
if (_itemOut == "ItemWaterbottleUnfilled") then {
|
||||
if (_waterLevel > 0) then {
|
||||
if (_boiled) then {
|
||||
_itemOut = format["ItemWaterbottle%1ozBoiled",_waterLevel];
|
||||
{
|
||||
if (_x in ["ItemPlasticWaterbottle","ItemPlasticWaterbottleInfected","ItemPlasticWaterbottleSafe","ItemPlasticWaterBottleBoiled","ItemPlasticWaterbottle1oz","ItemPlasticWaterbottle2oz","ItemPlasticWaterbottle3oz","ItemPlasticWaterbottle4oz","ItemPlasticWaterbottle5oz","ItemPlasticWaterbottle6oz","ItemPlasticWaterbottle7oz","ItemPlasticWaterbottle8oz","ItemPlasticWaterbottle9oz","ItemPlasticWaterbottle1ozBoiled","ItemPlasticWaterbottle2ozBoiled","ItemPlasticWaterbottle3ozBoiled","ItemPlasticWaterbottle4ozBoiled","ItemPlasticWaterbottle5ozBoiled","ItemPlasticWaterbottle6ozBoiled","ItemPlasticWaterbottle7ozBoiled","ItemPlasticWaterbottle8ozBoiled","ItemPlasticWaterbottle9ozBoiled"]) then {
|
||||
_itemOut = "ItemPlasticWaterbottleUnfilled";
|
||||
if (_waterLevel > 0) then {
|
||||
if (_boiled) then {
|
||||
_itemOut = format["ItemPlasticWaterbottle%1ozBoiled",_waterLevel];
|
||||
} else {
|
||||
_itemOut = format["ItemPlasticWaterbottle%1oz",_waterLevel];
|
||||
};
|
||||
};
|
||||
} else {
|
||||
_itemOut = format["ItemWaterbottle%1oz",_waterLevel];
|
||||
if (_waterLevel > 0) then {
|
||||
if (_boiled) then {
|
||||
_itemOut = format["ItemWaterbottle%1ozBoiled",_waterLevel];
|
||||
} else {
|
||||
_itemOut = format["ItemWaterbottle%1oz",_waterLevel];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
} foreach _temp_removed_array;
|
||||
};
|
||||
|
||||
// diag_log format["Checking for water level: %1", _waterLevel];
|
||||
for "_x" from 1 to _countOut do {
|
||||
player addMagazine _itemOut;
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
if (dayz_actionInProgress) exitWith { localize "str_player_actionslimit" call dayz_rollingMessages; };
|
||||
dayz_actionInProgress = true;
|
||||
|
||||
private ["_bottle","_tape","_fixedBottle","_finished"];
|
||||
|
||||
_bottle = _this;
|
||||
_tape = "equip_duct_tape";
|
||||
_fixedBottle = "ItemWaterBottleUnfilled";
|
||||
|
||||
if (dayz_actionInProgress) exitWith { localize "str_player_actionslimit" call dayz_rollingMessages; };
|
||||
dayz_actionInProgress = true;
|
||||
_fixedBottle = ["ItemPlasticWaterbottleUnfilled", "ItemWaterBottleUnfilled"] select (_bottle == "ItemWaterbottleDmg");
|
||||
|
||||
call gear_ui_init;
|
||||
closeDialog 0;
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
if (dayz_actionInProgress) exitWith {localize "str_player_actionslimit" call dayz_rollingMessages;};
|
||||
dayz_actionInProgress = true;
|
||||
|
||||
private ["_item","_use","_repair","_waterUsed","_displayName"];
|
||||
|
||||
//['ItemKnifeBlunt','ItemKnife']
|
||||
_item = _this select 0; //Item to be sharpened
|
||||
_repair = _this select 1; //Item to be given back.
|
||||
|
||||
_use = ["ItemWaterBottle","ItemWaterBottleInfected","ItemWaterBottleSafe","ItemWaterBottleBoiled","ItemWaterBottleHerbal","ItemCanteen","ItemCanteenInfected","ItemCanteenSafe","ItemCanteenBoiled","ItemCanteenHerbal"];
|
||||
_use = ["ItemWaterBottle","ItemWaterBottleInfected","ItemWaterBottleSafe","ItemWaterBottleBoiled","ItemWaterBottleHerbal","ItemPlasticWaterBottle","ItemPlasticWaterBottleInfected","ItemPlasticWaterBottleSafe","ItemPlasticWaterBottleBoiled","ItemPlasticWaterBottleHerbal"];
|
||||
_waterUsed = nil;
|
||||
|
||||
call gear_ui_init;
|
||||
@@ -18,20 +21,22 @@ closeDialog 1;
|
||||
if (isNil "_waterUsed") exitWith {
|
||||
//_displayName = getText (configFile >> "CfgMagazines" >> _use >> "displayName");
|
||||
localize "str_sharpen_missing_water" call dayz_rollingMessages;
|
||||
dayz_actionInProgress = false;
|
||||
};
|
||||
|
||||
// item is missing or tools are missing
|
||||
if !("equip_brick" IN magazines player) exitWith {
|
||||
_displayName = getText (configFile >> "CfgMagazines" >> "equip_brick" >> "displayName");
|
||||
format [localize "str_missing_to_do_this",_displayName] call dayz_rollingMessages;
|
||||
dayz_actionInProgress = false;
|
||||
};
|
||||
|
||||
if (player hasWeapon _item) then {
|
||||
_displayName = getText (configFile >> "CfgWeapons" >> _item >> "displayName");
|
||||
|
||||
|
||||
player removeMagazine _waterUsed;
|
||||
player removeWeapon _item;
|
||||
|
||||
|
||||
if !(player hasWeapon _repair) then {
|
||||
player addWeapon _repair;
|
||||
} else {
|
||||
@@ -39,11 +44,13 @@ if (player hasWeapon _item) then {
|
||||
[_repair,2,1] call fn_dropItem;
|
||||
format[localize "str_actions_noroom",_repair] call dayz_rollingMessages;
|
||||
};
|
||||
|
||||
|
||||
player addMagazine (getText(configFile >> "CfgMagazines" >> _waterUsed >> "containerEmpty"));
|
||||
|
||||
|
||||
//Remove Later
|
||||
player removeMagazine "equip_brick";
|
||||
|
||||
format [localize "str_sharpen_success",_displayName] call dayz_rollingMessages;
|
||||
};
|
||||
};
|
||||
|
||||
dayz_actionInProgress = false;
|
||||
|
||||
Reference in New Issue
Block a user