mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2026-02-07 08:42:54 +03:00
0.791
This commit is contained in:
@@ -13,7 +13,13 @@ _classbag = typeOf _bag;
|
||||
_isWater = (surfaceIsWater (position player)) or dayz_isSwimming;
|
||||
_hasAntiB = "ItemAntibiotic" in magazines player;
|
||||
_hasFuelE = "ItemJerrycanEmpty" in magazines player;
|
||||
_hasRawMeat = "FoodSteakRaw" in magazines player;
|
||||
//RawFood
|
||||
_hasRawMeat = _hasSteakRaw or _hasmuttonRaw or _hasrabbitRaw or _hasbaconRaw;
|
||||
_hasSteakRaw = "FoodSteakRaw" in magazines player;
|
||||
_hasmuttonRaw = "FoodmuttonRaw" in magazines player;
|
||||
_haschickenRaw = "FoodchickenRaw" in magazines player;
|
||||
_hasrabbitRaw = "FoodrabbitRaw" in magazines player;
|
||||
_hasbaconRaw = "FoodbaconRaw" in magazines player;
|
||||
_hasKnife = "ItemKnife" in items player;
|
||||
_hasToolbox = "ItemToolbox" in items player;
|
||||
//_hasTent = "ItemTent" in items player;
|
||||
@@ -164,7 +170,7 @@ if (!isNull cursorTarget and !_inVehicle and (player distance cursorTarget < 4))
|
||||
};
|
||||
};
|
||||
//Fireplace Actions check
|
||||
if(inflamed cursorTarget and _hasRawMeat and _canDo) then {
|
||||
if(inflamed cursorTarget and (_hasSteakRaw or _hasmuttonRaw or _hasrabbitRaw or _hasbaconRaw) and _canDo) then {
|
||||
if (s_player_cook < 0) then {
|
||||
s_player_cook = player addAction [localize "str_actions_self_05", "\z\addons\dayz_code\actions\cook.sqf",cursorTarget, 3, true, true, "", ""];
|
||||
};
|
||||
@@ -705,7 +711,7 @@ if (!isNull cursorTarget and !_inVehicle and (player distance cursorTarget < 4))
|
||||
};
|
||||
|
||||
//Dog
|
||||
if (_isDog and _isAlive and _hasRawMeat and _canDo and _ownerID == "0" and player getVariable ["dogID", 0] == 0) then {
|
||||
if (_isDog and _isAlive and (_hasRawMeat) and _canDo and _ownerID == "0" and player getVariable ["dogID", 0] == 0) then {
|
||||
if (s_player_tamedog < 0) then {
|
||||
s_player_tamedog = player addAction [localize "str_actions_tamedog", "\z\addons\dayz_code\actions\tame_dog.sqf", cursorTarget, 1, false, true, "", ""];
|
||||
};
|
||||
|
||||
28
dayz_code/compile/local_gutObject.sqf
Normal file
28
dayz_code/compile/local_gutObject.sqf
Normal file
@@ -0,0 +1,28 @@
|
||||
private["_item","_qty","_type","_meat","_loop"];
|
||||
_item = _this select 0;
|
||||
_qty = _this select 1;
|
||||
_type = typeOf _item;
|
||||
_meat = 0;
|
||||
_loop = true;
|
||||
_rawfoodtype = getText (configFile >> "CfgSurvival" >> "Meat" >> _type >> "rawfoodtype");
|
||||
|
||||
if (local _item) then {
|
||||
for "_x" from 1 to _qty do {
|
||||
_item addMagazine _rawfoodtype;
|
||||
};
|
||||
sleep 2;
|
||||
_timer = time;
|
||||
while {_loop} do {
|
||||
_meat = count magazines _item;
|
||||
if (_meat == 0) then {_loop = false};
|
||||
if ((time - _timer) > 300) then {_loop = false};
|
||||
sleep 1;
|
||||
};
|
||||
["dayzHideBody",_item] call broadcastRpcCallAll;
|
||||
sleep 10;
|
||||
deleteVehicle _item;
|
||||
} else {
|
||||
_ehLoc = "client";
|
||||
if (isServer) then { _ehLoc = "server"; };
|
||||
diag_log format["gutObject EH on %1 item not local ! Type: %2",_ehLoc,str(_item)];
|
||||
};
|
||||
24
dayz_code/compile/local_gutObjectZ.sqf
Normal file
24
dayz_code/compile/local_gutObjectZ.sqf
Normal file
@@ -0,0 +1,24 @@
|
||||
private["_item","_qty","_type","_meat","_loop"];
|
||||
_item = _this select 0;
|
||||
_qty = _this select 1;
|
||||
_type = typeOf _item;
|
||||
_meat = 0;
|
||||
_loop = true;
|
||||
if (local _item) then {
|
||||
_item addMagazine "ItemZombieParts";
|
||||
sleep 2;
|
||||
_timer = time;
|
||||
while {_loop} do {
|
||||
_meat = count magazines _item;
|
||||
if (_meat == 0) then {_loop = false};
|
||||
if ((time - _timer) > 300) then {_loop = false};
|
||||
sleep 1;
|
||||
};
|
||||
["dayzHideBodyZ",_item] call broadcastRpcCallAll;
|
||||
sleep 10;
|
||||
deleteVehicle _item;
|
||||
} else {
|
||||
_ehLoc = "client";
|
||||
if (isServer) then { _ehLoc = "server"; };
|
||||
diag_log format["gutObject EH on %1 item not local ! Type: %2",_ehLoc,str(_item)];
|
||||
};
|
||||
Reference in New Issue
Block a user