mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-21 19:06:29 +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,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