mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-24 17:39:18 +03:00
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.
30 lines
995 B
Plaintext
30 lines
995 B
Plaintext
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 = ["ItemPlasticWaterbottleUnfilled", "ItemWaterBottleUnfilled"] select (_bottle == "ItemWaterbottleDmg");
|
|
|
|
call gear_ui_init;
|
|
closeDialog 0;
|
|
|
|
// Check if the player has the tape
|
|
if (_tape in magazines player) then {
|
|
[player,"bandage",0,false] call dayz_zombieSpeak;
|
|
_finished = ["Medic",1] call fn_loopAction;
|
|
if (!_finished) exitWith {};
|
|
|
|
// Check again to make sure player didn't drop item
|
|
if (_tape in magazines player) then {
|
|
player removeMagazine _bottle;
|
|
player removeMagazine _tape;
|
|
player addMagazine _fixedBottle;
|
|
localize "str_fix_water_bottle" call dayz_rollingMessages;
|
|
};
|
|
} else { //If the player doesn't have the tape
|
|
localize "str_fix_water_bottle_fail" call dayz_rollingMessages;
|
|
};
|
|
|
|
dayz_actionInProgress = false; |