This commit is contained in:
vbawol
2013-01-25 20:28:26 -06:00
parent aaa01cb0dd
commit fbb55f318c
16 changed files with 547 additions and 186 deletions

View File

@@ -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, "", ""];
};

View 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)];
};

View 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)];
};