Files
DayZ-Epoch/dayz_code/actions/player_loadCrate.sqf
vbawol 11cb1c820c 0.998 released
Final testing started on 0.998. Patch notes so far:
+ Crafting now only requires a fire within 2m.
+ Safe should now drop items on ground when packed.
+ Changed humanity gains/losses based on player death so that humanity
is accounted for.
+ Fixed broken humanity hit and freetarget with player damage since
1.7.6.1.
+ Potential fix for swimming in ground.
+ !isNull and Distance checks for player zombie "feed" option.
+ Added open crate option for supply crates. Requires crowbar in
toolbelt.
+ fixed Auto Refueling Station (Dingor) #234
+ Added new pink clothes option to loot tables.
+ Added medic animation to complete trades to selling/buying weapons,
toolbelt items, backpacks, and vehicles.
+ Added medic animation to complete siphon, refueling, and fill jerry.
+ Changed number of possible siphon and refuel is based on quantity of
empty or full jerry cans.
+ Changed Player zombies V or getover animation to walkforward instead
of sitdown. This will cause the player to be stuck walking until an
attack is issued.
+ Fixed serveral lingor/dingor buildings that had incorrect classnames
in loot tables causing no loot to spawn with more recent builds.
+ Added a few building loot spawns for tavi 1.0
+ updated server SQL with latest copy from server.
2013-03-23 14:46:22 -05:00

56 lines
1.5 KiB
Plaintext

private ["_dir","_classname","_box","_location","_item","_config","_create_raw","_create","_qty","_type","_hasCrate","_hasTool"];
if(TradeInprogress) exitWith { cutText ["Repair already in progress." , "PLAIN DOWN"]; };
TradeInprogress = true;
_hasTool = "ItemCrowbar" in items player;
if(!_hasTool) exitWith {
cutText ["You need a crowbar to open this.", "PLAIN DOWN"];
TradeInprogress = false;
};
_item = _this;
_hasCrate = _item in magazines player;
if (!_hasCrate) then {
cutText ["Missing supply crate.", "PLAIN DOWN"];
TradeInprogress = false;
};
_config = configFile >> "CfgMagazines" >> _item;
_create_raw = getArray (_config >> "ItemActions" >> "CreateMags" >> "output");
_create = _create_raw select 0;
_qty = _create_raw select 1;
_type = _create_raw select 2;
_location = player modeltoworld [0,0.3,0];
if ((_location select 2) < 0) then {
_location set [2,0];
};
player removeMagazine _item;
_dir = getDir player;
_classname = "WeaponHolder";
// Change to optional wait to complete
player playActionNow "Medic";
sleep 6;
_box = createVehicle [_classname, _location, [], 0, "CAN_COLLIDE"];
_box setDir _dir;
// Fill box with Items from config.
if(_type == "magazine") then {
_box addMagazineCargoGlobal [_create,_qty];
};
if(_type == "weapon") then {
_box addWeaponCargoGlobal [_create,_qty];
};
if(_type == "backpack") then {
_box addBackpackCargoGlobal [_create,_qty];
};
player reveal _box;
cutText ["Opened supply crate.", "PLAIN DOWN"];
TradeInprogress = false;