Files
DayZ-Epoch/dayz_code/actions/cook.sqf
vbawol 320046779b 0.992
+ Added variable pricing to traders. Stock under 5 will be sold at the
buy price and over 50 will be bought at the sell price.
+ Fixed trades not forcing a gear save and added more forced gear saves.
+ Added test for time based UID for purchased vehicles.
+ Reduced humanity gained by using a blood bag to 100 down from 250.
+ Added 5 minute penalty knockout for combat loggers.
+ Added prevention to logging out in a trader city. fixes #171
+ Changed cargo check to only show on alive vehicles. Fixes #176
+ Potential fix for gunner on armored SUV. Fixes #172
+ Fixes for refueling and repairing that was broken by 1.7.61
+ Removed taming of dogs for now. fixes #162
2013-03-03 13:41:35 -06:00

34 lines
1.0 KiB
Plaintext

private["_config","_item","_text","_rawmeat","_cookedmeat","_meat","_meatcooked","_qty","_id"];
diag_log ("Cook Enabled");
player removeAction s_player_cook;
s_player_cook = -1;
_rawmeat = meatraw;
_cookedmeat = meatcooked;
{
_meat = _x;
_meatcooked = _cookedmeat select (_rawmeat find _meat);
if (_meat in magazines player) then {
_text = getText (configFile >> "CfgMagazines" >> _meatcooked >> "displayName");
_qty = {_x == _meat} count magazines player;
player playActionNow "Medic";
_dis=6;
_sfx = "cook";
[player,_sfx,0,false,_dis] call dayz_zombieSpeak;
[player,_dis,true,(getPosATL player)] spawn player_alertZombies;
sleep _qty;
for "_x" from 1 to _qty do {
player removeMagazine _meat;
player addMagazine _meatcooked;
if !(_meat in magazines player) exitWith {cutText [format[(localize "str_player_31"),_text,"cook"] , "PLAIN DOWN"]};
};
disableSerialization;
call dayz_forceSave;
cutText [format[(localize "str_success_cooked"),_qty,_text], "PLAIN DOWN"];
};
} forEach _rawmeat;