mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2026-02-23 00:20:50 +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,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;
|
||||
|
||||
Reference in New Issue
Block a user