0.9 + pre 1.7.5

This commit is contained in:
vbawol
2013-02-03 08:26:46 -06:00
parent 8fd13cf31f
commit 6cdcf6c094
20 changed files with 32879 additions and 257 deletions

View File

@@ -19,6 +19,9 @@ _hasmuttonRaw = "FoodmuttonRaw" in magazines player;
_haschickenRaw = "FoodchickenRaw" in magazines player;
_hasrabbitRaw = "FoodrabbitRaw" in magazines player;
_hasbaconRaw = "FoodbaconRaw" in magazines player;
//boiled Water
_hasbottleitem = "ItemWaterbottle" in magazines player;
_hastinitem = ("TrashTinCan" in magazines player) or ("ItemSodaEmpty" in magazines player);
//Define all Raw food
_hasRawMeat = _hasSteakRaw or _hasmuttonRaw or _haschickenRaw or _hasrabbitRaw or _hasbaconRaw;
@@ -69,6 +72,7 @@ if (!isNull cursorTarget and !_inVehicle and (player distance cursorTarget < 4))
_isMan = cursorTarget isKindOf "Man";
_traderType = typeOf cursorTarget;
_ownerID = cursorTarget getVariable ["characterID","0"];
diag_log ("owner = " + str(_ownerID) + " of " + str(cursorTarget));
_isAnimal = cursorTarget isKindOf "Animal";
_isDog = (cursorTarget isKindOf "DZ_Pastor" || cursorTarget isKindOf "DZ_Fin");
_isZombie = cursorTarget isKindOf "zZombie_base";
@@ -78,6 +82,15 @@ if (!isNull cursorTarget and !_inVehicle and (player distance cursorTarget < 4))
_isAlive = alive cursorTarget;
_canmove = canmove cursorTarget;
_text = getText (configFile >> "CfgVehicles" >> typeOf cursorTarget >> "displayName");
_rawmeat = meatraw;
_hasRawMeat = false;
{
if (_x in magazines player) then {
_hasRawMeat = true;
};
} forEach _rawmeat;
if (_hasFuelE) then {
_isFuel = (cursorTarget isKindOf "Land_Ind_TankSmall") or (cursorTarget isKindOf "Land_fuel_tank_big") or (cursorTarget isKindOf "Land_fuel_tank_stairs") or (cursorTarget isKindOf "Land_fuel_tank_stairs_ep1") or (cursorTarget isKindOf "Land_wagon_tanker") or (cursorTarget isKindOf "Land_fuelstation") or (cursorTarget isKindOf "Land_fuelstation_army");
};
@@ -171,7 +184,7 @@ if (!isNull cursorTarget and !_inVehicle and (player distance cursorTarget < 4))
};
};
//Fireplace Actions check
if(inflamed cursorTarget and (_hasSteakRaw or _hasmuttonRaw or _haschickenRaw or _hasrabbitRaw or _hasbaconRaw) and _canDo) then {
if(inflamed _cursor and _hasRawMeat 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, "", ""];
};
@@ -179,6 +192,15 @@ if (!isNull cursorTarget and !_inVehicle and (player distance cursorTarget < 4))
player removeAction s_player_cook;
s_player_cook = -1;
};
if(inflamed _cursor and (_hasbottleitem and _hastinitem) and _canDo) then {
if (s_player_boil < 0) then {
s_player_boil = player addAction [localize "str_actions_boilwater", "\z\addons\dayz_code\actions\boil.sqf",_cursor, 3, true, true, "", ""];
};
} else {
player removeAction s_player_boil;
s_player_boil = -1;
};
if(cursorTarget == dayz_hasFire and _canDo) then {
if ((s_player_fireout < 0) and !(inflamed cursorTarget) and (player distance cursorTarget < 3)) then {
s_player_fireout = player addAction [localize "str_actions_self_06", "\z\addons\dayz_code\actions\fire_pack.sqf",cursorTarget, 0, false, true, "",""];
@@ -407,13 +429,13 @@ if (!isNull cursorTarget and !_inVehicle and (player distance cursorTarget < 4))
dayz_myCursorTarget = objNull;
{player removeAction _x} forEach s_player_madsci;s_player_madsci = [];
//{player removeAction _x} forEach s_player_madsci;s_player_madsci = [];
{player removeAction _x} forEach s_player_parts;s_player_parts = [];
//{player removeAction _x} forEach s_player_bank;s_player_bank = [];
{player removeAction _x} forEach s_player_lockunlock;s_player_lockunlock = [];
s_player_madsci_crtl = -1;
//s_player_madsci_crtl = -1;
s_player_parts_crtl = -1;
s_last_trader = -1;
@@ -436,6 +458,8 @@ if (!isNull cursorTarget and !_inVehicle and (player distance cursorTarget < 4))
s_player_butcher = -1;
player removeAction s_player_cook;
s_player_cook = -1;
player removeAction s_player_boil;
s_player_boil = -1;
player removeAction s_player_fireout;
s_player_fireout = -1;
player removeAction s_player_packtent;