mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-17 17:20:26 +03:00
+ Fixed females unable to select gender after death. + Fixed Alice and Assault packs inventory issues created with last patch. + Fixed being unable to take items that may have already been claimed by another player. Should work if no other players are within 6 meters. + Cooking, Crafting, Repairing, and Salvaging all now require full Medic animation cycle to complete. You can cancel the process just by moving. + Traders that deal with magazine items now require full Medic animation cycle per trade. Also, number of possible trades now based on quantity of available items being sold or cost divided by available bars. + Changed several PublicVariable calls from 1.7.6.1 code sync that should have been PublicVariableServer. + Fixed Bio-meat was not causing infection and increased chance of infection from "Bad Food" to 50/50. + Added distance checks (5m) for player zombie attacks. + Fixed player zombie was unable to feed.
54 lines
1.8 KiB
Plaintext
54 lines
1.8 KiB
Plaintext
private["_hasbottleitem","_hastinitem","_bottletext","_tin1text","_tin2text","_tintext","_qty","_dis","_sfx"];
|
|
|
|
if(TradeInprogress) exitWith { cutText ["Boil already in progress." , "PLAIN DOWN"]; };
|
|
TradeInprogress = true;
|
|
|
|
player removeAction s_player_boil;
|
|
s_player_boil = -1;
|
|
|
|
_hasbottleitem = "ItemWaterbottle" in magazines player;
|
|
_hastinitem = false;
|
|
{
|
|
if (_x in magazines player) then {
|
|
_hastinitem = true;
|
|
};
|
|
|
|
} forEach boil_tin_cans;
|
|
|
|
_bottletext = getText (configFile >> "CfgMagazines" >> "ItemWaterbottle" >> "displayName");
|
|
_tin1text = getText (configFile >> "CfgMagazines" >> "TrashTinCan" >> "displayName");
|
|
_tin2text = getText (configFile >> "CfgMagazines" >> "ItemSodaEmpty" >> "displayName");
|
|
_tintext = format["%1 / %2",_tin1text,_tin2text];
|
|
if (!_hasbottleitem) exitWith {TradeInprogress = false; cutText [format[(localize "str_player_31"),_bottletext,"fill"] , "PLAIN DOWN"]};
|
|
if (!_hastinitem) exitWith {TradeInprogress = false; cutText [format[(localize "str_player_31"),_tintext,"fill"] , "PLAIN DOWN"]};
|
|
|
|
_removed = 0;
|
|
|
|
if (_hasbottleitem and _hastinitem) then {
|
|
_qty = {_x == "ItemWaterbottle"} count magazines player;
|
|
if ("ItemWaterbottle" in magazines player) then {
|
|
|
|
_removed = _removed + ([player,"ItemWaterbottle",_qty] call BIS_fnc_invRemove);
|
|
|
|
player playActionNow "Medic";
|
|
sleep 1;
|
|
|
|
_dis=10;
|
|
_sfx = "cook";
|
|
[player,_sfx,0,false,_dis] call dayz_zombieSpeak;
|
|
[player,_dis,true,(getPosATL player)] spawn player_alertZombies;
|
|
|
|
sleep 5;
|
|
|
|
// Add back only number of removed
|
|
for "_x" from 1 to _removed do {
|
|
player addMagazine "ItemWaterbottleBoiled";
|
|
};
|
|
|
|
cutText [format[(localize "str_player_01"),_qty], "PLAIN DOWN"];
|
|
} else {
|
|
cutText [(localize "str_player_02") , "PLAIN DOWN"];
|
|
};
|
|
};
|
|
|
|
TradeInprogress = false; |