mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-21 19:06:29 +03:00
1.0.0.3 Developer Build
+ [FIXED] Battleye kick when calling dog. Thanks to @kikyou2 + [FIXED] Moved vehicle event handler to server side with a call to all connected clients. Before it was just set on only the owner and the server. This should fix issues with damage/repair handling of just purchased vehicles. + [FIXED] Fixed case sensitivity in building loot generation. This was only a problem on new maps that share the same buildings as others yet have differing case in the classnames. + [ADDED] New build-ables: Fence_corrugated_DZ, M240Nest_DZ, CanvasHut_DZ, ParkBench_DZ, MetalGate_DZ, OutHouse_DZ, Wooden_shed_DZ, WoodShack_DZ, StorageShed_DZ. + [ADDED] New crafting items: ItemCanvas, PartWoodLumber, PartWoodPlywood, ItemCorrugated, ItemPole + [ADDED] 55 gallon (210 liter) Fuel Barrel that can only be used on helicopters or fuel trucks. + [ADDED] All DayZ specific magazine items now only take one slot, this also makes it easier to become over burdened so be careful about blacking out. + [ADDED] More building loot spawn positions for Namalsk. + [FIXED] When packing tent get classname of new weapon_holder from config. + [CHANGED] Totally reworked player building system. Preview and placement accuracy has been significantly improved. Building now requires X number of stages to complete. Players cannot build while in combat. + [CHANGED] Added required tools array and is nearby checking for fire, etc. Also, each item can now have 5 separate crafting options. + [CHANGED] Reworked refuel and siphon code to support more can types. + [CHANGED] Removed all infinite fueling sources and added (KamazRefuel_DZ, UralRefuel_TK_EP1_DZ,MtvrRefuel_DES_EP1_DZ) variants of the fuel trucks to remove auto refuel and increase siphon-able fuel capacity to 10000. Old style refuel can still be used if the variable dayz_oldrefuel = true is set in the missions init.sqf. + [CHANGED] Remove object code now uses config variables instead of hard coded into sqf (default: constructioncount = 5) + [CHANGED] Moved most arrays for revealing objects, allowed objects, update objects, disallowed combat roll to arrays within variables.sqf. So that these arrays are unified and easier to change. + [CHANGED] New vehicle spawns now have a new fuel system using a random percent between min and max variables. Defaults: (DynamicVehicleFuelLow = 0; DynamicVehicleFuelHigh = 100;) + [CHANGED] New vehicle spawns now damage all parts and without a limiter on fuel and engine parts, this could cause a vehicle to be very close to blowing up. + [CHANGED] Disabled simulation server side of all road debris and crashes.
This commit is contained in:
@@ -18,10 +18,11 @@ _cookedmeat = meatcooked;
|
||||
_removed = 0;
|
||||
if (_meat in magazines player) then {
|
||||
_text = getText (configFile >> "CfgMagazines" >> _meatcooked >> "displayName");
|
||||
cutText [format["Started cooking %1 of %2",_qty,_text], "PLAIN DOWN"];
|
||||
|
||||
_qty = {_x == _meat} count magazines player;
|
||||
|
||||
_qty = {_x == _meat} count magazines player;
|
||||
|
||||
cutText [format["Started cooking %1",_text], "PLAIN DOWN"];
|
||||
|
||||
player playActionNow "Medic";
|
||||
|
||||
_dis=6;
|
||||
@@ -69,7 +70,7 @@ _cookedmeat = meatcooked;
|
||||
[objNull, player, rSwitchMove,""] call RE;
|
||||
player playActionNow "stop";
|
||||
|
||||
cutText [format["Canceled cooking %1 of %2",_qty,_text], "PLAIN DOWN"];
|
||||
cutText [format["Canceled cooking %1",_text], "PLAIN DOWN"];
|
||||
|
||||
// player addMagazine "ItemBandage";
|
||||
};
|
||||
|
||||
@@ -1,127 +1,219 @@
|
||||
private["_location","_isOk","_dir","_classname","_item"];
|
||||
private ["_location","_dir","_classname","_item","_hasrequireditem","_missing","_hastoolweapon","_cancel","_reason","_isBuilding","_started","_finished","_animState","_isMedic","_startcombattimer","_dis","_sfx","_hasbuilditem","_tmpbuilt","_buildings","_onLadder","_isWater","_require","_text","_offset"];
|
||||
|
||||
if(TradeInprogress) exitWith { cutText ["Building already in progress." , "PLAIN DOWN"]; };
|
||||
TradeInprogress = true;
|
||||
|
||||
_onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
|
||||
_isWater = (surfaceIsWater _location) or dayz_isSwimming;
|
||||
_bypass = false;
|
||||
_isWater = (surfaceIsWater (getPosATL player)) or dayz_isSwimming;
|
||||
_cancel = false;
|
||||
_reason = "";
|
||||
|
||||
// call gear_ui_init;
|
||||
call gear_ui_init;
|
||||
|
||||
if(_isWater) exitWith {cutText [localize "str_player_26", "PLAIN DOWN"];};
|
||||
if(_onLadder) exitWith {cutText [localize "str_player_21", "PLAIN DOWN"];};
|
||||
if(_isWater) exitWith {TradeInprogress = false; cutText [localize "str_player_26", "PLAIN DOWN"];};
|
||||
if(_onLadder) exitWith {TradeInprogress = false; cutText [localize "str_player_21", "PLAIN DOWN"];};
|
||||
if(player getVariable["combattimeout", 0] >= time) exitWith {TradeInprogress = false; cutText ["Cannot build while in combat.", "PLAIN DOWN"];};
|
||||
|
||||
_item = _this;
|
||||
_classname = getText (configFile >> "CfgMagazines" >> _item >> "ItemActions" >> "Build" >> "create");
|
||||
_require = getText (configFile >> "CfgMagazines" >> _item >> "ItemActions" >> "Build" >> "require");
|
||||
_require = getArray (configFile >> "cfgMagazines" >> _this >> "ItemActions" >> "Build" >> "require");
|
||||
|
||||
_text = getText (configFile >> "CfgVehicles" >> _classname >> "displayName");
|
||||
_attachToOffset = getArray (configFile >> "CfgVehicles" >> _classname >> "offset");
|
||||
_offset = getArray (configFile >> "CfgVehicles" >> _classname >> "offset");
|
||||
|
||||
_hasbuilditem = _this in magazines player;
|
||||
_hasrequireditem = _require in items player;
|
||||
_missing = "";
|
||||
_hasrequireditem = true;
|
||||
{
|
||||
_hastoolweapon = _x in weapons player;
|
||||
if(!_hastoolweapon) exitWith { _hasrequireditem = false; _missing = _x; }
|
||||
} forEach _require;
|
||||
|
||||
if (!_hasbuilditem) exitWith {cutText [format[(localize "str_player_31"),_text,"build"] , "PLAIN DOWN"]};
|
||||
if (_text == "TrapBear") then { _bypass = true; };
|
||||
_hasbuilditem = _this in magazines playwer;
|
||||
if (!_hasbuilditem) exitWith {TradeInprogress = false; cutText [format[(localize "str_player_31"),_text,"build"] , "PLAIN DOWN"]; };
|
||||
|
||||
if (_hasrequireditem or _bypass) then {
|
||||
|
||||
_dir = getDir player;
|
||||
if (!_hasrequireditem) exitWith {TradeInprogress = false; cutText [format["Missing tool %1",_missing] , "PLAIN DOWN"]; };
|
||||
if (_hasrequireditem) then {
|
||||
|
||||
_location = [0,0,0];
|
||||
_dir = getDir player;
|
||||
|
||||
// Start Preview loop
|
||||
_tmpbuilt = createVehicle [_classname, _location, [], 0, "CAN_COLLIDE"];
|
||||
_tmpbuilt setdir _dir;
|
||||
_tmpbuilt attachTo [player,_attachToOffset];
|
||||
player allowDamage false;
|
||||
|
||||
_position = player modeltoworld _offset;
|
||||
_position = [(_position select 0),(_position select 1), 0];
|
||||
|
||||
_object = createVehicle [_classname, _location, [], 0, "CAN_COLLIDE"];
|
||||
|
||||
_object setDir _dir;
|
||||
|
||||
_object setPos _position;
|
||||
|
||||
_object allowDamage false;
|
||||
|
||||
_object attachTo [player];
|
||||
|
||||
_cancel = false;
|
||||
_counter = 0;
|
||||
_isOk = true;
|
||||
|
||||
|
||||
|
||||
while {_isOk} do {
|
||||
|
||||
if(_counter == 0) then {
|
||||
cutText ["Planning consruction stand still 5 seconds to build.", "PLAIN DOWN"];
|
||||
sleep 5;
|
||||
_location1 = getPosATL player;
|
||||
sleep 5;
|
||||
_location2 = getPosATL player;
|
||||
|
||||
if(_location1 distance _location2 < 0.1) exitWith {
|
||||
|
||||
cutText ["Started consruction move within 5 seconds to cancel.", "PLAIN DOWN"];
|
||||
_location3 = getPosATL player;
|
||||
sleep 5;
|
||||
_location4 = getPosATL player;
|
||||
|
||||
cutText ["Planning consruction stand still 5 seconds to build.", "PLAIN DOWN"];
|
||||
|
||||
_location1 = getPosATL player;
|
||||
sleep 5;
|
||||
_location2 = getPosATL player;
|
||||
|
||||
if(_location3 distance _location4 > 0.1) exitWith {
|
||||
_isOk = false;
|
||||
_cancel = true;
|
||||
};
|
||||
|
||||
_isOk = false;
|
||||
};
|
||||
if(_location1 distance _location2 < 0.1) exitWith {
|
||||
_isOk = false;
|
||||
};
|
||||
if(_counter >= 1) exitWith {
|
||||
|
||||
if(_location1 distance _location2 > 5) exitWith {
|
||||
_isOk = false;
|
||||
_cancel = true;
|
||||
_reason = "Moving to fast.";
|
||||
};
|
||||
|
||||
if(_counter >= 10) exitWith {
|
||||
_isOk = false;
|
||||
_cancel = true;
|
||||
_reason = "Ran out of time to find position.";
|
||||
};
|
||||
_counter = _counter + 1;
|
||||
};
|
||||
|
||||
detach _tmpbuilt;
|
||||
detach _object;
|
||||
deleteVehicle _object;
|
||||
|
||||
// Get location of detached tmp built
|
||||
_built_location = (getPosATL _tmpbuilt);
|
||||
|
||||
deleteVehicle _tmpbuilt;
|
||||
// Start Build
|
||||
_tmpbuilt = createVehicle [_classname, _location, [], 0, "CAN_COLLIDE"];
|
||||
|
||||
_dir = getDir player;
|
||||
_tmpbuilt setdir _dir;
|
||||
|
||||
// Get position based on player
|
||||
_location = player modeltoworld _offset;
|
||||
|
||||
// No building on roads
|
||||
if (isOnRoad _location) then { _cancel = true; _reason = "Cannot build on a road."; };
|
||||
|
||||
// set building with ground
|
||||
_location = [(_location select 0),(_location select 1), 0];
|
||||
_tmpbuilt setpos _location;
|
||||
|
||||
// set building with offset
|
||||
// _tmpbuilt setpos _location;
|
||||
|
||||
player allowDamage true;
|
||||
|
||||
|
||||
// testing new way of finding building
|
||||
_buildings = nearestObjects [(vehicle player), ["Building"], 100];
|
||||
{
|
||||
_isBuilding = [(vehicle player),_x] call fnc_isInsideBuilding;
|
||||
if(_isBuilding) exitWith {
|
||||
_cancel = true;
|
||||
_reason = "Cannot build inside another building.";
|
||||
};
|
||||
} forEach _buildings;
|
||||
|
||||
// No building in trader zones
|
||||
if(!placevault) then { _cancel = true; _reason = "Cannot build in a city."; };
|
||||
|
||||
if(!_cancel) then {
|
||||
|
||||
_dir = getDir player;
|
||||
player removeMagazine _item;
|
||||
|
||||
//disableSerialization;
|
||||
//call dayz_forceSave;
|
||||
|
||||
player playActionNow "Medic";
|
||||
sleep 1;
|
||||
|
||||
_dis=20;
|
||||
_sfx = "repair";
|
||||
[player,_sfx,0,false,_dis] call dayz_zombieSpeak;
|
||||
[player,_dis,true,(getPosATL player)] spawn player_alertZombies;
|
||||
|
||||
sleep 5;
|
||||
cutText [format["Placing %1, move to cancel.",_text], "PLAIN DOWN"];
|
||||
|
||||
_hasbuilditem = _this in magazines player;
|
||||
if (!_hasbuilditem) exitWith {cutText [format[(localize "str_player_31"),_text,"build"] , "PLAIN DOWN"]};
|
||||
_limit = 5;
|
||||
|
||||
player allowDamage false;
|
||||
_object = createVehicle [_classname, _built_location, [], 0, "CAN_COLLIDE"];
|
||||
_object setDir _dir;
|
||||
_object setpos _built_location;
|
||||
player reveal _object;
|
||||
if(isNumber (configFile >> "CfgVehicles" >> _objType >> "constructioncount")) then {
|
||||
_limit = getNumber(configFile >> "CfgVehicles" >> _objType >> "constructioncount");
|
||||
};
|
||||
|
||||
cutText [format[localize "str_build_01",_text], "PLAIN DOWN"];
|
||||
_isOk = true;
|
||||
_proceed = false;
|
||||
_counter = 0;
|
||||
|
||||
while {_isOk} do {
|
||||
|
||||
player playActionNow "Medic";
|
||||
|
||||
_dis=20;
|
||||
_sfx = "repair";
|
||||
[player,_sfx,0,false,_dis] call dayz_zombieSpeak;
|
||||
[player,_dis,true,(getPosATL player)] spawn player_alertZombies;
|
||||
|
||||
//["dayzPublishObj",[dayz_characterID,_object,[_dir,_location],_classname]] call callRpcProcedure;
|
||||
dayzPublishObj = [dayz_characterID,_object,[_dir,_location],_classname];
|
||||
publicVariableServer "dayzPublishObj";
|
||||
r_interrupt = false;
|
||||
_animState = animationState player;
|
||||
r_doLoop = true;
|
||||
_started = false;
|
||||
_finished = false;
|
||||
|
||||
while {r_doLoop} do {
|
||||
_animState = animationState player;
|
||||
_isMedic = ["medic",_animState] call fnc_inString;
|
||||
if (_isMedic) then {
|
||||
_started = true;
|
||||
};
|
||||
if (_started and !_isMedic) then {
|
||||
r_doLoop = false;
|
||||
_finished = true;
|
||||
};
|
||||
if (r_interrupt or (player getVariable["combattimeout", 0] >= time)) then {
|
||||
r_doLoop = false;
|
||||
};
|
||||
sleep 0.1;
|
||||
};
|
||||
r_doLoop = false;
|
||||
|
||||
sleep 2;
|
||||
player allowDamage true;
|
||||
|
||||
if(!_finished) exitWith {
|
||||
_isOk = false;
|
||||
_proceed = false;
|
||||
};
|
||||
|
||||
if(_finished) then {
|
||||
_counter = _counter + 1;
|
||||
};
|
||||
|
||||
cutText [format["Constructing %1 stage %2 of %3, move to cancel.",_text, _counter,_limit], "PLAIN DOWN"];
|
||||
|
||||
if(_counter == _limit) exitWith {
|
||||
_isOk = false;
|
||||
_proceed = true;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
if (_proceed) then {
|
||||
|
||||
_num_removed = ([player,_item] call BIS_fnc_invRemove);
|
||||
if(_num_removed == 1) then {
|
||||
|
||||
cutText [format[localize "str_build_01",_text], "PLAIN DOWN"];
|
||||
|
||||
//["dayzPublishObj",[dayz_characterID,_tmpbuilt,[_dir,_location],_classname]] call callRpcProcedure;
|
||||
dayzPublishObj = [dayz_characterID,_tmpbuilt,[_dir,_location],_classname];
|
||||
publicVariableServer "dayzPublishObj";
|
||||
} else {
|
||||
deleteVehicle _tmpbuilt;
|
||||
cutText ["Canceled building." , "PLAIN DOWN"];
|
||||
};
|
||||
|
||||
} else {
|
||||
r_interrupt = false;
|
||||
[objNull, player, rSwitchMove,""] call RE;
|
||||
player playActionNow "stop";
|
||||
|
||||
deleteVehicle _tmpbuilt;
|
||||
|
||||
cutText ["Canceled building." , "PLAIN DOWN"];
|
||||
};
|
||||
|
||||
} else {
|
||||
cutText [format["Canceled construction of %1.",_text], "PLAIN DOWN"];
|
||||
deleteVehicle _tmpbuilt;
|
||||
cutText [format["Canceled construction of %1 %2.",_text,_reason], "PLAIN DOWN"];
|
||||
};
|
||||
|
||||
} else {
|
||||
cutText [format[localize "str_build_failed_01",_text], "PLAIN DOWN"];
|
||||
};
|
||||
|
||||
TradeInprogress = false;
|
||||
@@ -67,143 +67,174 @@ TradeInprogress = true;
|
||||
|
||||
// temp array of removed parts
|
||||
_temp_removed_array = [];
|
||||
_abort = false;
|
||||
_distance = 2;
|
||||
_reason = "";
|
||||
|
||||
_onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
|
||||
_canDo = (!r_drag_sqf and !r_player_unconscious and !_onLadder);
|
||||
|
||||
// reqire fire target
|
||||
// TODO: add requirements to config. example: fire nearby, specific toolbelt items like toolbox.
|
||||
_isFireNear = {inflamed _x} count (position player nearObjects 2);
|
||||
_crafting = "Crafting";
|
||||
|
||||
diag_log format["Checking for fire: %1", _isFireNear];
|
||||
// check if fire is reqired
|
||||
_needNear = getArray (configFile >> "cfgMagazines" >> _this >> "ItemActions" >> _crafting >> "neednearby");
|
||||
|
||||
if (_isFireNear >= 1 and _canDo) then {
|
||||
if("fire" in _needNear) then {
|
||||
_isNear = {inflamed _x} count (position player nearObjects _distance);
|
||||
if(_isNear == 0) then {
|
||||
_abort = true;
|
||||
_reason = "fire";
|
||||
};
|
||||
};
|
||||
|
||||
if(_abort) exitWith {
|
||||
cutText [format["Crafting needs a %1 within %2 meters",_reason,_distance], "PLAIN DOWN"];
|
||||
TradeInprogress = false;
|
||||
};
|
||||
|
||||
// diag_log format["Checking for fire: %1", _isFireNear];
|
||||
|
||||
if (_canDo) then {
|
||||
|
||||
// Moved all recipes input and outputs to configs
|
||||
|
||||
_selectedRecipeOutput = getArray (configFile >> "cfgMagazines" >> _this >> "ItemActions" >> "Crafting" >> "output");
|
||||
_selectedRecipeInput = getArray (configFile >> "cfgMagazines" >> _this >> "ItemActions" >> "Crafting" >> "input");
|
||||
_selectedRecipeOutput = getArray (configFile >> "cfgMagazines" >> _this >> "ItemActions" >> _crafting >> "output");
|
||||
_selectedRecipeInput = getArray (configFile >> "cfgMagazines" >> _this >> "ItemActions" >> _crafting >> "input");
|
||||
_selectedRecipeTools = getArray (configFile >> "cfgMagazines" >> _this >> "ItemActions" >> _crafting >> "require");
|
||||
|
||||
diag_log format["Selected Recipe Input: %1", _selectedRecipeInput];
|
||||
diag_log format["Selected Recipe Output: %1", _selectedRecipeOutput];
|
||||
|
||||
// Dry run to see if all parts are available.
|
||||
_proceed = true;
|
||||
_missing = "";
|
||||
_missingTools = false;
|
||||
{
|
||||
_itemIn = _x select 0;
|
||||
_countIn = _x select 1;
|
||||
_hastoolweapon = _x in weapons player;
|
||||
if(!_hastoolweapon) exitWith { _missingTools = true; _missing = _x; };
|
||||
} forEach _selectedRecipeTools;
|
||||
|
||||
if(!_missingTools) then {
|
||||
|
||||
diag_log format["Selected Recipe Input: %1", _selectedRecipeInput];
|
||||
diag_log format["Selected Recipe Output: %1", _selectedRecipeOutput];
|
||||
|
||||
// Dry run to see if all parts are available.
|
||||
_proceed = true;
|
||||
{
|
||||
_itemIn = _x select 0;
|
||||
_countIn = _x select 1;
|
||||
|
||||
diag_log format["Recipe Check: %1 %2", _itemIn,_countIn];
|
||||
diag_log format["Recipe Check: %1 %2", _itemIn,_countIn];
|
||||
|
||||
// not neccessary
|
||||
//if (!(_itemIn in magazines player)) exitWith { _missing = _itemIn; _missingQty = _countIn; _proceed = false; };
|
||||
// not neccessary
|
||||
//if (!(_itemIn in magazines player)) exitWith { _missing = _itemIn; _missingQty = _countIn; _proceed = false; };
|
||||
|
||||
// match against class and parentClass
|
||||
_qty = { (_x == _itemIn) || (configName(inheritsFrom(configFile >> "cfgMagazines" >> _x)) == _itemIn) } count magazines player;
|
||||
// match against class and parentClass
|
||||
_qty = { (_x == _itemIn) || (configName(inheritsFrom(configFile >> "cfgMagazines" >> _x)) == _itemIn) } count magazines player;
|
||||
|
||||
if(_qty < _countIn) exitWith { _missing = _itemIn; _missingQty = (_countIn - _qty); _proceed = false; };
|
||||
if(_qty < _countIn) exitWith { _missing = _itemIn; _missingQty = (_countIn - _qty); _proceed = false; };
|
||||
|
||||
} forEach _selectedRecipeInput;
|
||||
} forEach _selectedRecipeInput;
|
||||
|
||||
// If all parts proceed
|
||||
if (_proceed) then {
|
||||
// If all parts proceed
|
||||
if (_proceed) then {
|
||||
|
||||
cutText ["Crafting started", "PLAIN DOWN"];
|
||||
cutText ["Crafting started", "PLAIN DOWN"];
|
||||
|
||||
player playActionNow "Medic";
|
||||
player playActionNow "Medic";
|
||||
|
||||
[player,"repair",0,false] call dayz_zombieSpeak;
|
||||
_id = [player,50,true,(getPosATL player)] spawn player_alertZombies;
|
||||
[player,"repair",0,false] call dayz_zombieSpeak;
|
||||
_id = [player,50,true,(getPosATL player)] spawn player_alertZombies;
|
||||
|
||||
r_interrupt = false;
|
||||
_animState = animationState player;
|
||||
r_doLoop = true;
|
||||
_started = false;
|
||||
_finished = false;
|
||||
|
||||
while {r_doLoop} do {
|
||||
r_interrupt = false;
|
||||
_animState = animationState player;
|
||||
_isMedic = ["medic",_animState] call fnc_inString;
|
||||
if (_isMedic) then {
|
||||
_started = true;
|
||||
r_doLoop = true;
|
||||
_started = false;
|
||||
_finished = false;
|
||||
|
||||
while {r_doLoop} do {
|
||||
_animState = animationState player;
|
||||
_isMedic = ["medic",_animState] call fnc_inString;
|
||||
if (_isMedic) then {
|
||||
_started = true;
|
||||
};
|
||||
if (_started and !_isMedic) then {
|
||||
r_doLoop = false;
|
||||
_finished = true;
|
||||
};
|
||||
if (r_interrupt) then {
|
||||
r_doLoop = false;
|
||||
};
|
||||
sleep 0.1;
|
||||
};
|
||||
if (_started and !_isMedic) then {
|
||||
r_doLoop = false;
|
||||
_finished = true;
|
||||
};
|
||||
if (r_interrupt) then {
|
||||
r_doLoop = false;
|
||||
};
|
||||
sleep 0.1;
|
||||
};
|
||||
r_doLoop = false;
|
||||
r_doLoop = false;
|
||||
|
||||
if (_finished) then {
|
||||
if (_finished) then {
|
||||
|
||||
_removed_total = 0; // count total of removed items
|
||||
_tobe_removed_total = 0; // count total of all to be removed items
|
||||
// Take items
|
||||
{
|
||||
_removed = 0;
|
||||
_itemIn = _x select 0;
|
||||
_countIn = _x select 1;
|
||||
// diag_log format["Recipe Finish: %1 %2", _itemIn,_countIn];
|
||||
_tobe_removed_total = _tobe_removed_total + _countIn;
|
||||
|
||||
{
|
||||
if( (_removed < _countIn) && ((_x == _itemIn) || configName(inheritsFrom(configFile >> "cfgMagazines" >> _x)) == _itemIn)) then {
|
||||
_num_removed = ([player,_x] call BIS_fnc_invRemove);
|
||||
_removed = _removed + _num_removed;
|
||||
_removed_total = _removed_total + _num_removed;
|
||||
if(_num_removed >= 1) then {
|
||||
_temp_removed_array set [count _temp_removed_array,_x];
|
||||
};
|
||||
};
|
||||
|
||||
} forEach magazines player;
|
||||
|
||||
} forEach _selectedRecipeInput;
|
||||
|
||||
diag_log format["removed: %1 of: %2", _removed, _tobe_removed_total];
|
||||
|
||||
// Only proceed if all parts were removed successfully
|
||||
if(_removed_total == _tobe_removed_total) then {
|
||||
|
||||
// Put items
|
||||
_removed_total = 0; // count total of removed items
|
||||
_tobe_removed_total = 0; // count total of all to be removed items
|
||||
// Take items
|
||||
{
|
||||
_itemOut = _x select 0;
|
||||
_countOut = _x select 1;
|
||||
diag_log format["Recipe Output: %1 %2", _itemOut,_countOut];
|
||||
|
||||
for "_x" from 1 to _countOut do {
|
||||
player addMagazine _itemOut;
|
||||
};
|
||||
|
||||
// get display name
|
||||
_textCreate = getText(configFile >> "CfgMagazines" >> _itemOut >> "displayName");
|
||||
_removed = 0;
|
||||
_itemIn = _x select 0;
|
||||
_countIn = _x select 1;
|
||||
// diag_log format["Recipe Finish: %1 %2", _itemIn,_countIn];
|
||||
_tobe_removed_total = _tobe_removed_total + _countIn;
|
||||
|
||||
// Add crafted item
|
||||
cutText [format["Crafted Item: %1 x %2",_textCreate,_countOut], "PLAIN DOWN"];
|
||||
{
|
||||
if( (_removed < _countIn) && ((_x == _itemIn) || configName(inheritsFrom(configFile >> "cfgMagazines" >> _x)) == _itemIn)) then {
|
||||
_num_removed = ([player,_x] call BIS_fnc_invRemove);
|
||||
_removed = _removed + _num_removed;
|
||||
_removed_total = _removed_total + _num_removed;
|
||||
if(_num_removed >= 1) then {
|
||||
_temp_removed_array set [count _temp_removed_array,_x];
|
||||
};
|
||||
};
|
||||
|
||||
} forEach _selectedRecipeOutput;
|
||||
} forEach magazines player;
|
||||
|
||||
} forEach _selectedRecipeInput;
|
||||
|
||||
diag_log format["removed: %1 of: %2", _removed, _tobe_removed_total];
|
||||
|
||||
// Only proceed if all parts were removed successfully
|
||||
if(_removed_total == _tobe_removed_total) then {
|
||||
|
||||
// Put items
|
||||
{
|
||||
_itemOut = _x select 0;
|
||||
_countOut = _x select 1;
|
||||
diag_log format["Recipe Output: %1 %2", _itemOut,_countOut];
|
||||
|
||||
for "_x" from 1 to _countOut do {
|
||||
player addMagazine _itemOut;
|
||||
};
|
||||
|
||||
// get display name
|
||||
_textCreate = getText(configFile >> "CfgMagazines" >> _itemOut >> "displayName");
|
||||
|
||||
// Add crafted item
|
||||
cutText [format["Crafted Item: %1 x %2",_textCreate,_countOut], "PLAIN DOWN"];
|
||||
|
||||
} forEach _selectedRecipeOutput;
|
||||
|
||||
} else {
|
||||
// Refund parts since we failed
|
||||
{player addMagazine _x;} forEach _temp_removed_array;
|
||||
|
||||
cutText [format["Missing Parts after first check Item: %1 / %2",_removed_total,_tobe_removed_total], "PLAIN DOWN"];
|
||||
};
|
||||
|
||||
} else {
|
||||
// Refund parts since we failed
|
||||
{player addMagazine _x;} forEach _temp_removed_array;
|
||||
|
||||
cutText [format["Missing Parts after first check Item: %1 / %2",_removed_total,_tobe_removed_total], "PLAIN DOWN"];
|
||||
r_interrupt = false;
|
||||
[objNull, player, rSwitchMove,""] call RE;
|
||||
player playActionNow "stop";
|
||||
cutText ["Canceled crafting.", "PLAIN DOWN"];
|
||||
};
|
||||
|
||||
} else {
|
||||
r_interrupt = false;
|
||||
[objNull, player, rSwitchMove,""] call RE;
|
||||
player playActionNow "stop";
|
||||
cutText ["Canceled crafting.", "PLAIN DOWN"];
|
||||
};
|
||||
|
||||
} else {
|
||||
_textMissing = getText(configFile >> "CfgMagazines" >> _missing >> "displayName");
|
||||
cutText [format["Missing %1 more of %2",_missingQty, _textMissing], "PLAIN DOWN"];
|
||||
};
|
||||
} else {
|
||||
_textMissing = getText(configFile >> "CfgMagazines" >> _missing >> "displayName");
|
||||
cutText [format["Missing %1 more of %2",_missingQty, _textMissing], "PLAIN DOWN"];
|
||||
_textMissing = getText(configFile >> "CfgWeapons" >> _missing >> "displayName");
|
||||
cutText [format["Missing Tool: %1",_textMissing], "PLAIN DOWN"];
|
||||
};
|
||||
} else {
|
||||
cutText ["Crafting needs a fire within 2 meters.", "PLAIN DOWN"];
|
||||
|
||||
243
dayz_code/actions/player_craftItem1.sqf
Normal file
243
dayz_code/actions/player_craftItem1.sqf
Normal file
@@ -0,0 +1,243 @@
|
||||
/*
|
||||
* Crafting by [VB]AWOL
|
||||
* usage: spawn player_craftitem;
|
||||
*/
|
||||
private ["_onLadder","_canDo","_selectedRecipeOutput","_proceed","_itemIn","_countIn","_missing","_missingQty","_qty","_itemOut","_countOut","_started","_finished","_animState","_isMedic","_removed","_tobe_removed_total","_textCreate","_id","_textMissing","_selectedRecipeInput","_num_removed","_removed_total","_temp_removed_array","_isFireNear"];
|
||||
|
||||
if(TradeInprogress) exitWith { cutText ["Crafting already in progress." , "PLAIN DOWN"]; };
|
||||
TradeInprogress = true;
|
||||
|
||||
/*
|
||||
== Canned Foods
|
||||
"FoodCanBakedBeans",
|
||||
"FoodCanSardines",
|
||||
"FoodCanFrankBeans",
|
||||
"FoodCanPasta",
|
||||
"FoodBioMeat"
|
||||
|
||||
== Drinks
|
||||
"ItemSodaCoke",
|
||||
"ItemSodaPepsi",
|
||||
|
||||
== Trash
|
||||
"TrashTinCan",
|
||||
"TrashJackDaniels",
|
||||
"ItemSodaEmpty",
|
||||
"ItemSodaCokeEmpty",
|
||||
"ItemSodaPepsiEmpty",
|
||||
|
||||
== community stuff Trash
|
||||
"ItemSodaMdewEmpty",
|
||||
"ItemSodaMtngreenEmpty",
|
||||
"ItemSodaR4z0rEmpty",
|
||||
"ItemSodaClaysEmpty",
|
||||
"ItemSodaSmashtEmpty",.
|
||||
"ItemSodaDrwasteEmpty",.
|
||||
"ItemSodaLemonadeEmpty",.
|
||||
"ItemSodaLvgEmpty",.
|
||||
"ItemSodaMzlyEmpty",.
|
||||
"ItemSodaRabbitEmpty"
|
||||
|
||||
== Raw Meats
|
||||
"FoodSteakRaw",
|
||||
"FoodmeatRaw",
|
||||
"FoodbeefRaw",
|
||||
"FoodmuttonRaw",
|
||||
"FoodchickenRaw",
|
||||
"FoodrabbitRaw",
|
||||
"FoodbaconRaw"
|
||||
|
||||
== Cooked Meats
|
||||
"FoodSteakCooked",
|
||||
"FoodmeatCooked",
|
||||
"FoodbeefCooked",
|
||||
"FoodmuttonCooked",
|
||||
"FoodchickenCooked",
|
||||
"FoodrabbitCooked",
|
||||
"FoodbaconCooked"
|
||||
*/
|
||||
|
||||
// Removed metals:
|
||||
// _recipe_ItemBronzeBar = [[["ItemBronzeBar",1] ],[["ItemCopperBar",3],["ItemTinBar",3]]];
|
||||
|
||||
// New item ideas:
|
||||
// _recipe_FoodChickenNoodle = [["FoodchickenRaw",1],["FoodCanPasta",1],["ItemWaterbottle",1]];
|
||||
// _recipe_FoodBeefBakedBeans = [["FoodbeefRaw",1],["FoodCanBakedBeans",1]];
|
||||
// ItemSalt
|
||||
|
||||
// temp array of removed parts
|
||||
_temp_removed_array = [];
|
||||
_abort = false;
|
||||
_distance = 2;
|
||||
_reason = "";
|
||||
|
||||
_onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
|
||||
_canDo = (!r_drag_sqf and !r_player_unconscious and !_onLadder);
|
||||
|
||||
_crafting = "Crafting1";
|
||||
|
||||
// check if fire is reqired
|
||||
_needNear = getArray (configFile >> "cfgMagazines" >> _this >> "ItemActions" >> _crafting >> "neednearby");
|
||||
|
||||
if("fire" in _needNear) then {
|
||||
_isNear = {inflamed _x} count (position player nearObjects _distance);
|
||||
if(_isNear == 0) then {
|
||||
_abort = true;
|
||||
_reason = "fire";
|
||||
};
|
||||
};
|
||||
|
||||
if(_abort) exitWith {
|
||||
cutText [format["Crafting needs a %1 within %2 meters",_reason,_distance], "PLAIN DOWN"];
|
||||
TradeInprogress = false;
|
||||
};
|
||||
|
||||
// diag_log format["Checking for fire: %1", _isFireNear];
|
||||
|
||||
if (_canDo) then {
|
||||
|
||||
// Moved all recipes input and outputs to configs
|
||||
|
||||
_selectedRecipeOutput = getArray (configFile >> "cfgMagazines" >> _this >> "ItemActions" >> _crafting >> "output");
|
||||
_selectedRecipeInput = getArray (configFile >> "cfgMagazines" >> _this >> "ItemActions" >> _crafting >> "input");
|
||||
_selectedRecipeTools = getArray (configFile >> "cfgMagazines" >> _this >> "ItemActions" >> _crafting >> "require");
|
||||
|
||||
_missing = "";
|
||||
_missingTools = false;
|
||||
{
|
||||
_hastoolweapon = _x in weapons player;
|
||||
if(!_hastoolweapon) exitWith { _missingTools = true; _missing = _x; };
|
||||
} forEach _selectedRecipeTools;
|
||||
|
||||
if(!_missingTools) then {
|
||||
|
||||
diag_log format["Selected Recipe Input: %1", _selectedRecipeInput];
|
||||
diag_log format["Selected Recipe Output: %1", _selectedRecipeOutput];
|
||||
|
||||
// Dry run to see if all parts are available.
|
||||
_proceed = true;
|
||||
{
|
||||
_itemIn = _x select 0;
|
||||
_countIn = _x select 1;
|
||||
|
||||
diag_log format["Recipe Check: %1 %2", _itemIn,_countIn];
|
||||
|
||||
// not neccessary
|
||||
//if (!(_itemIn in magazines player)) exitWith { _missing = _itemIn; _missingQty = _countIn; _proceed = false; };
|
||||
|
||||
// match against class and parentClass
|
||||
_qty = { (_x == _itemIn) || (configName(inheritsFrom(configFile >> "cfgMagazines" >> _x)) == _itemIn) } count magazines player;
|
||||
|
||||
if(_qty < _countIn) exitWith { _missing = _itemIn; _missingQty = (_countIn - _qty); _proceed = false; };
|
||||
|
||||
} forEach _selectedRecipeInput;
|
||||
|
||||
// If all parts proceed
|
||||
if (_proceed) then {
|
||||
|
||||
cutText ["Crafting started", "PLAIN DOWN"];
|
||||
|
||||
player playActionNow "Medic";
|
||||
|
||||
[player,"repair",0,false] call dayz_zombieSpeak;
|
||||
_id = [player,50,true,(getPosATL player)] spawn player_alertZombies;
|
||||
|
||||
r_interrupt = false;
|
||||
_animState = animationState player;
|
||||
r_doLoop = true;
|
||||
_started = false;
|
||||
_finished = false;
|
||||
|
||||
while {r_doLoop} do {
|
||||
_animState = animationState player;
|
||||
_isMedic = ["medic",_animState] call fnc_inString;
|
||||
if (_isMedic) then {
|
||||
_started = true;
|
||||
};
|
||||
if (_started and !_isMedic) then {
|
||||
r_doLoop = false;
|
||||
_finished = true;
|
||||
};
|
||||
if (r_interrupt) then {
|
||||
r_doLoop = false;
|
||||
};
|
||||
sleep 0.1;
|
||||
};
|
||||
r_doLoop = false;
|
||||
|
||||
if (_finished) then {
|
||||
|
||||
_removed_total = 0; // count total of removed items
|
||||
_tobe_removed_total = 0; // count total of all to be removed items
|
||||
// Take items
|
||||
{
|
||||
_removed = 0;
|
||||
_itemIn = _x select 0;
|
||||
_countIn = _x select 1;
|
||||
// diag_log format["Recipe Finish: %1 %2", _itemIn,_countIn];
|
||||
_tobe_removed_total = _tobe_removed_total + _countIn;
|
||||
|
||||
{
|
||||
if( (_removed < _countIn) && ((_x == _itemIn) || configName(inheritsFrom(configFile >> "cfgMagazines" >> _x)) == _itemIn)) then {
|
||||
_num_removed = ([player,_x] call BIS_fnc_invRemove);
|
||||
_removed = _removed + _num_removed;
|
||||
_removed_total = _removed_total + _num_removed;
|
||||
if(_num_removed >= 1) then {
|
||||
_temp_removed_array set [count _temp_removed_array,_x];
|
||||
};
|
||||
};
|
||||
|
||||
} forEach magazines player;
|
||||
|
||||
} forEach _selectedRecipeInput;
|
||||
|
||||
diag_log format["removed: %1 of: %2", _removed, _tobe_removed_total];
|
||||
|
||||
// Only proceed if all parts were removed successfully
|
||||
if(_removed_total == _tobe_removed_total) then {
|
||||
|
||||
// Put items
|
||||
{
|
||||
_itemOut = _x select 0;
|
||||
_countOut = _x select 1;
|
||||
diag_log format["Recipe Output: %1 %2", _itemOut,_countOut];
|
||||
|
||||
for "_x" from 1 to _countOut do {
|
||||
player addMagazine _itemOut;
|
||||
};
|
||||
|
||||
// get display name
|
||||
_textCreate = getText(configFile >> "CfgMagazines" >> _itemOut >> "displayName");
|
||||
|
||||
// Add crafted item
|
||||
cutText [format["Crafted Item: %1 x %2",_textCreate,_countOut], "PLAIN DOWN"];
|
||||
|
||||
} forEach _selectedRecipeOutput;
|
||||
|
||||
} else {
|
||||
// Refund parts since we failed
|
||||
{player addMagazine _x;} forEach _temp_removed_array;
|
||||
|
||||
cutText [format["Missing Parts after first check Item: %1 / %2",_removed_total,_tobe_removed_total], "PLAIN DOWN"];
|
||||
};
|
||||
|
||||
} else {
|
||||
r_interrupt = false;
|
||||
[objNull, player, rSwitchMove,""] call RE;
|
||||
player playActionNow "stop";
|
||||
cutText ["Canceled crafting.", "PLAIN DOWN"];
|
||||
};
|
||||
|
||||
} else {
|
||||
_textMissing = getText(configFile >> "CfgMagazines" >> _missing >> "displayName");
|
||||
cutText [format["Missing %1 more of %2",_missingQty, _textMissing], "PLAIN DOWN"];
|
||||
};
|
||||
} else {
|
||||
_textMissing = getText(configFile >> "CfgWeapons" >> _missing >> "displayName");
|
||||
cutText [format["Missing Tool: %1",_textMissing], "PLAIN DOWN"];
|
||||
};
|
||||
} else {
|
||||
cutText ["Crafting needs a fire within 2 meters.", "PLAIN DOWN"];
|
||||
};
|
||||
|
||||
TradeInprogress = false;
|
||||
243
dayz_code/actions/player_craftItem2.sqf
Normal file
243
dayz_code/actions/player_craftItem2.sqf
Normal file
@@ -0,0 +1,243 @@
|
||||
/*
|
||||
* Crafting by [VB]AWOL
|
||||
* usage: spawn player_craftitem;
|
||||
*/
|
||||
private ["_onLadder","_canDo","_selectedRecipeOutput","_proceed","_itemIn","_countIn","_missing","_missingQty","_qty","_itemOut","_countOut","_started","_finished","_animState","_isMedic","_removed","_tobe_removed_total","_textCreate","_id","_textMissing","_selectedRecipeInput","_num_removed","_removed_total","_temp_removed_array","_isFireNear"];
|
||||
|
||||
if(TradeInprogress) exitWith { cutText ["Crafting already in progress." , "PLAIN DOWN"]; };
|
||||
TradeInprogress = true;
|
||||
|
||||
/*
|
||||
== Canned Foods
|
||||
"FoodCanBakedBeans",
|
||||
"FoodCanSardines",
|
||||
"FoodCanFrankBeans",
|
||||
"FoodCanPasta",
|
||||
"FoodBioMeat"
|
||||
|
||||
== Drinks
|
||||
"ItemSodaCoke",
|
||||
"ItemSodaPepsi",
|
||||
|
||||
== Trash
|
||||
"TrashTinCan",
|
||||
"TrashJackDaniels",
|
||||
"ItemSodaEmpty",
|
||||
"ItemSodaCokeEmpty",
|
||||
"ItemSodaPepsiEmpty",
|
||||
|
||||
== community stuff Trash
|
||||
"ItemSodaMdewEmpty",
|
||||
"ItemSodaMtngreenEmpty",
|
||||
"ItemSodaR4z0rEmpty",
|
||||
"ItemSodaClaysEmpty",
|
||||
"ItemSodaSmashtEmpty",.
|
||||
"ItemSodaDrwasteEmpty",.
|
||||
"ItemSodaLemonadeEmpty",.
|
||||
"ItemSodaLvgEmpty",.
|
||||
"ItemSodaMzlyEmpty",.
|
||||
"ItemSodaRabbitEmpty"
|
||||
|
||||
== Raw Meats
|
||||
"FoodSteakRaw",
|
||||
"FoodmeatRaw",
|
||||
"FoodbeefRaw",
|
||||
"FoodmuttonRaw",
|
||||
"FoodchickenRaw",
|
||||
"FoodrabbitRaw",
|
||||
"FoodbaconRaw"
|
||||
|
||||
== Cooked Meats
|
||||
"FoodSteakCooked",
|
||||
"FoodmeatCooked",
|
||||
"FoodbeefCooked",
|
||||
"FoodmuttonCooked",
|
||||
"FoodchickenCooked",
|
||||
"FoodrabbitCooked",
|
||||
"FoodbaconCooked"
|
||||
*/
|
||||
|
||||
// Removed metals:
|
||||
// _recipe_ItemBronzeBar = [[["ItemBronzeBar",1] ],[["ItemCopperBar",3],["ItemTinBar",3]]];
|
||||
|
||||
// New item ideas:
|
||||
// _recipe_FoodChickenNoodle = [["FoodchickenRaw",1],["FoodCanPasta",1],["ItemWaterbottle",1]];
|
||||
// _recipe_FoodBeefBakedBeans = [["FoodbeefRaw",1],["FoodCanBakedBeans",1]];
|
||||
// ItemSalt
|
||||
|
||||
// temp array of removed parts
|
||||
_temp_removed_array = [];
|
||||
_abort = false;
|
||||
_distance = 2;
|
||||
_reason = "";
|
||||
|
||||
_onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
|
||||
_canDo = (!r_drag_sqf and !r_player_unconscious and !_onLadder);
|
||||
|
||||
_crafting = "Crafting2";
|
||||
|
||||
// check if fire is reqired
|
||||
_needNear = getArray (configFile >> "cfgMagazines" >> _this >> "ItemActions" >> _crafting >> "neednearby");
|
||||
|
||||
if("fire" in _needNear) then {
|
||||
_isNear = {inflamed _x} count (position player nearObjects _distance);
|
||||
if(_isNear == 0) then {
|
||||
_abort = true;
|
||||
_reason = "fire";
|
||||
};
|
||||
};
|
||||
|
||||
if(_abort) exitWith {
|
||||
cutText [format["Crafting needs a %1 within %2 meters",_reason,_distance], "PLAIN DOWN"];
|
||||
TradeInprogress = false;
|
||||
};
|
||||
|
||||
// diag_log format["Checking for fire: %1", _isFireNear];
|
||||
|
||||
if (_canDo) then {
|
||||
|
||||
// Moved all recipes input and outputs to configs
|
||||
|
||||
_selectedRecipeOutput = getArray (configFile >> "cfgMagazines" >> _this >> "ItemActions" >> _crafting >> "output");
|
||||
_selectedRecipeInput = getArray (configFile >> "cfgMagazines" >> _this >> "ItemActions" >> _crafting >> "input");
|
||||
_selectedRecipeTools = getArray (configFile >> "cfgMagazines" >> _this >> "ItemActions" >> _crafting >> "require");
|
||||
|
||||
_missing = "";
|
||||
_missingTools = false;
|
||||
{
|
||||
_hastoolweapon = _x in weapons player;
|
||||
if(!_hastoolweapon) exitWith { _missingTools = true; _missing = _x; };
|
||||
} forEach _selectedRecipeTools;
|
||||
|
||||
if(!_missingTools) then {
|
||||
|
||||
diag_log format["Selected Recipe Input: %1", _selectedRecipeInput];
|
||||
diag_log format["Selected Recipe Output: %1", _selectedRecipeOutput];
|
||||
|
||||
// Dry run to see if all parts are available.
|
||||
_proceed = true;
|
||||
{
|
||||
_itemIn = _x select 0;
|
||||
_countIn = _x select 1;
|
||||
|
||||
diag_log format["Recipe Check: %1 %2", _itemIn,_countIn];
|
||||
|
||||
// not neccessary
|
||||
//if (!(_itemIn in magazines player)) exitWith { _missing = _itemIn; _missingQty = _countIn; _proceed = false; };
|
||||
|
||||
// match against class and parentClass
|
||||
_qty = { (_x == _itemIn) || (configName(inheritsFrom(configFile >> "cfgMagazines" >> _x)) == _itemIn) } count magazines player;
|
||||
|
||||
if(_qty < _countIn) exitWith { _missing = _itemIn; _missingQty = (_countIn - _qty); _proceed = false; };
|
||||
|
||||
} forEach _selectedRecipeInput;
|
||||
|
||||
// If all parts proceed
|
||||
if (_proceed) then {
|
||||
|
||||
cutText ["Crafting started", "PLAIN DOWN"];
|
||||
|
||||
player playActionNow "Medic";
|
||||
|
||||
[player,"repair",0,false] call dayz_zombieSpeak;
|
||||
_id = [player,50,true,(getPosATL player)] spawn player_alertZombies;
|
||||
|
||||
r_interrupt = false;
|
||||
_animState = animationState player;
|
||||
r_doLoop = true;
|
||||
_started = false;
|
||||
_finished = false;
|
||||
|
||||
while {r_doLoop} do {
|
||||
_animState = animationState player;
|
||||
_isMedic = ["medic",_animState] call fnc_inString;
|
||||
if (_isMedic) then {
|
||||
_started = true;
|
||||
};
|
||||
if (_started and !_isMedic) then {
|
||||
r_doLoop = false;
|
||||
_finished = true;
|
||||
};
|
||||
if (r_interrupt) then {
|
||||
r_doLoop = false;
|
||||
};
|
||||
sleep 0.1;
|
||||
};
|
||||
r_doLoop = false;
|
||||
|
||||
if (_finished) then {
|
||||
|
||||
_removed_total = 0; // count total of removed items
|
||||
_tobe_removed_total = 0; // count total of all to be removed items
|
||||
// Take items
|
||||
{
|
||||
_removed = 0;
|
||||
_itemIn = _x select 0;
|
||||
_countIn = _x select 1;
|
||||
// diag_log format["Recipe Finish: %1 %2", _itemIn,_countIn];
|
||||
_tobe_removed_total = _tobe_removed_total + _countIn;
|
||||
|
||||
{
|
||||
if( (_removed < _countIn) && ((_x == _itemIn) || configName(inheritsFrom(configFile >> "cfgMagazines" >> _x)) == _itemIn)) then {
|
||||
_num_removed = ([player,_x] call BIS_fnc_invRemove);
|
||||
_removed = _removed + _num_removed;
|
||||
_removed_total = _removed_total + _num_removed;
|
||||
if(_num_removed >= 1) then {
|
||||
_temp_removed_array set [count _temp_removed_array,_x];
|
||||
};
|
||||
};
|
||||
|
||||
} forEach magazines player;
|
||||
|
||||
} forEach _selectedRecipeInput;
|
||||
|
||||
diag_log format["removed: %1 of: %2", _removed, _tobe_removed_total];
|
||||
|
||||
// Only proceed if all parts were removed successfully
|
||||
if(_removed_total == _tobe_removed_total) then {
|
||||
|
||||
// Put items
|
||||
{
|
||||
_itemOut = _x select 0;
|
||||
_countOut = _x select 1;
|
||||
diag_log format["Recipe Output: %1 %2", _itemOut,_countOut];
|
||||
|
||||
for "_x" from 1 to _countOut do {
|
||||
player addMagazine _itemOut;
|
||||
};
|
||||
|
||||
// get display name
|
||||
_textCreate = getText(configFile >> "CfgMagazines" >> _itemOut >> "displayName");
|
||||
|
||||
// Add crafted item
|
||||
cutText [format["Crafted Item: %1 x %2",_textCreate,_countOut], "PLAIN DOWN"];
|
||||
|
||||
} forEach _selectedRecipeOutput;
|
||||
|
||||
} else {
|
||||
// Refund parts since we failed
|
||||
{player addMagazine _x;} forEach _temp_removed_array;
|
||||
|
||||
cutText [format["Missing Parts after first check Item: %1 / %2",_removed_total,_tobe_removed_total], "PLAIN DOWN"];
|
||||
};
|
||||
|
||||
} else {
|
||||
r_interrupt = false;
|
||||
[objNull, player, rSwitchMove,""] call RE;
|
||||
player playActionNow "stop";
|
||||
cutText ["Canceled crafting.", "PLAIN DOWN"];
|
||||
};
|
||||
|
||||
} else {
|
||||
_textMissing = getText(configFile >> "CfgMagazines" >> _missing >> "displayName");
|
||||
cutText [format["Missing %1 more of %2",_missingQty, _textMissing], "PLAIN DOWN"];
|
||||
};
|
||||
} else {
|
||||
_textMissing = getText(configFile >> "CfgWeapons" >> _missing >> "displayName");
|
||||
cutText [format["Missing Tool: %1",_textMissing], "PLAIN DOWN"];
|
||||
};
|
||||
} else {
|
||||
cutText ["Crafting needs a fire within 2 meters.", "PLAIN DOWN"];
|
||||
};
|
||||
|
||||
TradeInprogress = false;
|
||||
243
dayz_code/actions/player_craftItem3.sqf
Normal file
243
dayz_code/actions/player_craftItem3.sqf
Normal file
@@ -0,0 +1,243 @@
|
||||
/*
|
||||
* Crafting by [VB]AWOL
|
||||
* usage: spawn player_craftitem;
|
||||
*/
|
||||
private ["_onLadder","_canDo","_selectedRecipeOutput","_proceed","_itemIn","_countIn","_missing","_missingQty","_qty","_itemOut","_countOut","_started","_finished","_animState","_isMedic","_removed","_tobe_removed_total","_textCreate","_id","_textMissing","_selectedRecipeInput","_num_removed","_removed_total","_temp_removed_array","_isFireNear"];
|
||||
|
||||
if(TradeInprogress) exitWith { cutText ["Crafting already in progress." , "PLAIN DOWN"]; };
|
||||
TradeInprogress = true;
|
||||
|
||||
/*
|
||||
== Canned Foods
|
||||
"FoodCanBakedBeans",
|
||||
"FoodCanSardines",
|
||||
"FoodCanFrankBeans",
|
||||
"FoodCanPasta",
|
||||
"FoodBioMeat"
|
||||
|
||||
== Drinks
|
||||
"ItemSodaCoke",
|
||||
"ItemSodaPepsi",
|
||||
|
||||
== Trash
|
||||
"TrashTinCan",
|
||||
"TrashJackDaniels",
|
||||
"ItemSodaEmpty",
|
||||
"ItemSodaCokeEmpty",
|
||||
"ItemSodaPepsiEmpty",
|
||||
|
||||
== community stuff Trash
|
||||
"ItemSodaMdewEmpty",
|
||||
"ItemSodaMtngreenEmpty",
|
||||
"ItemSodaR4z0rEmpty",
|
||||
"ItemSodaClaysEmpty",
|
||||
"ItemSodaSmashtEmpty",.
|
||||
"ItemSodaDrwasteEmpty",.
|
||||
"ItemSodaLemonadeEmpty",.
|
||||
"ItemSodaLvgEmpty",.
|
||||
"ItemSodaMzlyEmpty",.
|
||||
"ItemSodaRabbitEmpty"
|
||||
|
||||
== Raw Meats
|
||||
"FoodSteakRaw",
|
||||
"FoodmeatRaw",
|
||||
"FoodbeefRaw",
|
||||
"FoodmuttonRaw",
|
||||
"FoodchickenRaw",
|
||||
"FoodrabbitRaw",
|
||||
"FoodbaconRaw"
|
||||
|
||||
== Cooked Meats
|
||||
"FoodSteakCooked",
|
||||
"FoodmeatCooked",
|
||||
"FoodbeefCooked",
|
||||
"FoodmuttonCooked",
|
||||
"FoodchickenCooked",
|
||||
"FoodrabbitCooked",
|
||||
"FoodbaconCooked"
|
||||
*/
|
||||
|
||||
// Removed metals:
|
||||
// _recipe_ItemBronzeBar = [[["ItemBronzeBar",1] ],[["ItemCopperBar",3],["ItemTinBar",3]]];
|
||||
|
||||
// New item ideas:
|
||||
// _recipe_FoodChickenNoodle = [["FoodchickenRaw",1],["FoodCanPasta",1],["ItemWaterbottle",1]];
|
||||
// _recipe_FoodBeefBakedBeans = [["FoodbeefRaw",1],["FoodCanBakedBeans",1]];
|
||||
// ItemSalt
|
||||
|
||||
// temp array of removed parts
|
||||
_temp_removed_array = [];
|
||||
_abort = false;
|
||||
_distance = 2;
|
||||
_reason = "";
|
||||
|
||||
_onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
|
||||
_canDo = (!r_drag_sqf and !r_player_unconscious and !_onLadder);
|
||||
|
||||
_crafting = "Crafting3";
|
||||
|
||||
// check if fire is reqired
|
||||
_needNear = getArray (configFile >> "cfgMagazines" >> _this >> "ItemActions" >> _crafting >> "neednearby");
|
||||
|
||||
if("fire" in _needNear) then {
|
||||
_isNear = {inflamed _x} count (position player nearObjects _distance);
|
||||
if(_isNear == 0) then {
|
||||
_abort = true;
|
||||
_reason = "fire";
|
||||
};
|
||||
};
|
||||
|
||||
if(_abort) exitWith {
|
||||
cutText [format["Crafting needs a %1 within %2 meters",_reason,_distance], "PLAIN DOWN"];
|
||||
TradeInprogress = false;
|
||||
};
|
||||
|
||||
// diag_log format["Checking for fire: %1", _isFireNear];
|
||||
|
||||
if (_canDo) then {
|
||||
|
||||
// Moved all recipes input and outputs to configs
|
||||
|
||||
_selectedRecipeOutput = getArray (configFile >> "cfgMagazines" >> _this >> "ItemActions" >> _crafting >> "output");
|
||||
_selectedRecipeInput = getArray (configFile >> "cfgMagazines" >> _this >> "ItemActions" >> _crafting >> "input");
|
||||
_selectedRecipeTools = getArray (configFile >> "cfgMagazines" >> _this >> "ItemActions" >> _crafting >> "require");
|
||||
|
||||
_missing = "";
|
||||
_missingTools = false;
|
||||
{
|
||||
_hastoolweapon = _x in weapons player;
|
||||
if(!_hastoolweapon) exitWith { _missingTools = true; _missing = _x; };
|
||||
} forEach _selectedRecipeTools;
|
||||
|
||||
if(!_missingTools) then {
|
||||
|
||||
diag_log format["Selected Recipe Input: %1", _selectedRecipeInput];
|
||||
diag_log format["Selected Recipe Output: %1", _selectedRecipeOutput];
|
||||
|
||||
// Dry run to see if all parts are available.
|
||||
_proceed = true;
|
||||
{
|
||||
_itemIn = _x select 0;
|
||||
_countIn = _x select 1;
|
||||
|
||||
diag_log format["Recipe Check: %1 %2", _itemIn,_countIn];
|
||||
|
||||
// not neccessary
|
||||
//if (!(_itemIn in magazines player)) exitWith { _missing = _itemIn; _missingQty = _countIn; _proceed = false; };
|
||||
|
||||
// match against class and parentClass
|
||||
_qty = { (_x == _itemIn) || (configName(inheritsFrom(configFile >> "cfgMagazines" >> _x)) == _itemIn) } count magazines player;
|
||||
|
||||
if(_qty < _countIn) exitWith { _missing = _itemIn; _missingQty = (_countIn - _qty); _proceed = false; };
|
||||
|
||||
} forEach _selectedRecipeInput;
|
||||
|
||||
// If all parts proceed
|
||||
if (_proceed) then {
|
||||
|
||||
cutText ["Crafting started", "PLAIN DOWN"];
|
||||
|
||||
player playActionNow "Medic";
|
||||
|
||||
[player,"repair",0,false] call dayz_zombieSpeak;
|
||||
_id = [player,50,true,(getPosATL player)] spawn player_alertZombies;
|
||||
|
||||
r_interrupt = false;
|
||||
_animState = animationState player;
|
||||
r_doLoop = true;
|
||||
_started = false;
|
||||
_finished = false;
|
||||
|
||||
while {r_doLoop} do {
|
||||
_animState = animationState player;
|
||||
_isMedic = ["medic",_animState] call fnc_inString;
|
||||
if (_isMedic) then {
|
||||
_started = true;
|
||||
};
|
||||
if (_started and !_isMedic) then {
|
||||
r_doLoop = false;
|
||||
_finished = true;
|
||||
};
|
||||
if (r_interrupt) then {
|
||||
r_doLoop = false;
|
||||
};
|
||||
sleep 0.1;
|
||||
};
|
||||
r_doLoop = false;
|
||||
|
||||
if (_finished) then {
|
||||
|
||||
_removed_total = 0; // count total of removed items
|
||||
_tobe_removed_total = 0; // count total of all to be removed items
|
||||
// Take items
|
||||
{
|
||||
_removed = 0;
|
||||
_itemIn = _x select 0;
|
||||
_countIn = _x select 1;
|
||||
// diag_log format["Recipe Finish: %1 %2", _itemIn,_countIn];
|
||||
_tobe_removed_total = _tobe_removed_total + _countIn;
|
||||
|
||||
{
|
||||
if( (_removed < _countIn) && ((_x == _itemIn) || configName(inheritsFrom(configFile >> "cfgMagazines" >> _x)) == _itemIn)) then {
|
||||
_num_removed = ([player,_x] call BIS_fnc_invRemove);
|
||||
_removed = _removed + _num_removed;
|
||||
_removed_total = _removed_total + _num_removed;
|
||||
if(_num_removed >= 1) then {
|
||||
_temp_removed_array set [count _temp_removed_array,_x];
|
||||
};
|
||||
};
|
||||
|
||||
} forEach magazines player;
|
||||
|
||||
} forEach _selectedRecipeInput;
|
||||
|
||||
diag_log format["removed: %1 of: %2", _removed, _tobe_removed_total];
|
||||
|
||||
// Only proceed if all parts were removed successfully
|
||||
if(_removed_total == _tobe_removed_total) then {
|
||||
|
||||
// Put items
|
||||
{
|
||||
_itemOut = _x select 0;
|
||||
_countOut = _x select 1;
|
||||
diag_log format["Recipe Output: %1 %2", _itemOut,_countOut];
|
||||
|
||||
for "_x" from 1 to _countOut do {
|
||||
player addMagazine _itemOut;
|
||||
};
|
||||
|
||||
// get display name
|
||||
_textCreate = getText(configFile >> "CfgMagazines" >> _itemOut >> "displayName");
|
||||
|
||||
// Add crafted item
|
||||
cutText [format["Crafted Item: %1 x %2",_textCreate,_countOut], "PLAIN DOWN"];
|
||||
|
||||
} forEach _selectedRecipeOutput;
|
||||
|
||||
} else {
|
||||
// Refund parts since we failed
|
||||
{player addMagazine _x;} forEach _temp_removed_array;
|
||||
|
||||
cutText [format["Missing Parts after first check Item: %1 / %2",_removed_total,_tobe_removed_total], "PLAIN DOWN"];
|
||||
};
|
||||
|
||||
} else {
|
||||
r_interrupt = false;
|
||||
[objNull, player, rSwitchMove,""] call RE;
|
||||
player playActionNow "stop";
|
||||
cutText ["Canceled crafting.", "PLAIN DOWN"];
|
||||
};
|
||||
|
||||
} else {
|
||||
_textMissing = getText(configFile >> "CfgMagazines" >> _missing >> "displayName");
|
||||
cutText [format["Missing %1 more of %2",_missingQty, _textMissing], "PLAIN DOWN"];
|
||||
};
|
||||
} else {
|
||||
_textMissing = getText(configFile >> "CfgWeapons" >> _missing >> "displayName");
|
||||
cutText [format["Missing Tool: %1",_textMissing], "PLAIN DOWN"];
|
||||
};
|
||||
} else {
|
||||
cutText ["Crafting needs a fire within 2 meters.", "PLAIN DOWN"];
|
||||
};
|
||||
|
||||
TradeInprogress = false;
|
||||
243
dayz_code/actions/player_craftItem4.sqf
Normal file
243
dayz_code/actions/player_craftItem4.sqf
Normal file
@@ -0,0 +1,243 @@
|
||||
/*
|
||||
* Crafting by [VB]AWOL
|
||||
* usage: spawn player_craftitem;
|
||||
*/
|
||||
private ["_onLadder","_canDo","_selectedRecipeOutput","_proceed","_itemIn","_countIn","_missing","_missingQty","_qty","_itemOut","_countOut","_started","_finished","_animState","_isMedic","_removed","_tobe_removed_total","_textCreate","_id","_textMissing","_selectedRecipeInput","_num_removed","_removed_total","_temp_removed_array","_isFireNear"];
|
||||
|
||||
if(TradeInprogress) exitWith { cutText ["Crafting already in progress." , "PLAIN DOWN"]; };
|
||||
TradeInprogress = true;
|
||||
|
||||
/*
|
||||
== Canned Foods
|
||||
"FoodCanBakedBeans",
|
||||
"FoodCanSardines",
|
||||
"FoodCanFrankBeans",
|
||||
"FoodCanPasta",
|
||||
"FoodBioMeat"
|
||||
|
||||
== Drinks
|
||||
"ItemSodaCoke",
|
||||
"ItemSodaPepsi",
|
||||
|
||||
== Trash
|
||||
"TrashTinCan",
|
||||
"TrashJackDaniels",
|
||||
"ItemSodaEmpty",
|
||||
"ItemSodaCokeEmpty",
|
||||
"ItemSodaPepsiEmpty",
|
||||
|
||||
== community stuff Trash
|
||||
"ItemSodaMdewEmpty",
|
||||
"ItemSodaMtngreenEmpty",
|
||||
"ItemSodaR4z0rEmpty",
|
||||
"ItemSodaClaysEmpty",
|
||||
"ItemSodaSmashtEmpty",.
|
||||
"ItemSodaDrwasteEmpty",.
|
||||
"ItemSodaLemonadeEmpty",.
|
||||
"ItemSodaLvgEmpty",.
|
||||
"ItemSodaMzlyEmpty",.
|
||||
"ItemSodaRabbitEmpty"
|
||||
|
||||
== Raw Meats
|
||||
"FoodSteakRaw",
|
||||
"FoodmeatRaw",
|
||||
"FoodbeefRaw",
|
||||
"FoodmuttonRaw",
|
||||
"FoodchickenRaw",
|
||||
"FoodrabbitRaw",
|
||||
"FoodbaconRaw"
|
||||
|
||||
== Cooked Meats
|
||||
"FoodSteakCooked",
|
||||
"FoodmeatCooked",
|
||||
"FoodbeefCooked",
|
||||
"FoodmuttonCooked",
|
||||
"FoodchickenCooked",
|
||||
"FoodrabbitCooked",
|
||||
"FoodbaconCooked"
|
||||
*/
|
||||
|
||||
// Removed metals:
|
||||
// _recipe_ItemBronzeBar = [[["ItemBronzeBar",1] ],[["ItemCopperBar",3],["ItemTinBar",3]]];
|
||||
|
||||
// New item ideas:
|
||||
// _recipe_FoodChickenNoodle = [["FoodchickenRaw",1],["FoodCanPasta",1],["ItemWaterbottle",1]];
|
||||
// _recipe_FoodBeefBakedBeans = [["FoodbeefRaw",1],["FoodCanBakedBeans",1]];
|
||||
// ItemSalt
|
||||
|
||||
// temp array of removed parts
|
||||
_temp_removed_array = [];
|
||||
_abort = false;
|
||||
_distance = 2;
|
||||
_reason = "";
|
||||
|
||||
_onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
|
||||
_canDo = (!r_drag_sqf and !r_player_unconscious and !_onLadder);
|
||||
|
||||
_crafting = "Crafting4";
|
||||
|
||||
// check if fire is reqired
|
||||
_needNear = getArray (configFile >> "cfgMagazines" >> _this >> "ItemActions" >> _crafting >> "neednearby");
|
||||
|
||||
if("fire" in _needNear) then {
|
||||
_isNear = {inflamed _x} count (position player nearObjects _distance);
|
||||
if(_isNear == 0) then {
|
||||
_abort = true;
|
||||
_reason = "fire";
|
||||
};
|
||||
};
|
||||
|
||||
if(_abort) exitWith {
|
||||
cutText [format["Crafting needs a %1 within %2 meters",_reason,_distance], "PLAIN DOWN"];
|
||||
TradeInprogress = false;
|
||||
};
|
||||
|
||||
// diag_log format["Checking for fire: %1", _isFireNear];
|
||||
|
||||
if (_canDo) then {
|
||||
|
||||
// Moved all recipes input and outputs to configs
|
||||
|
||||
_selectedRecipeOutput = getArray (configFile >> "cfgMagazines" >> _this >> "ItemActions" >> _crafting >> "output");
|
||||
_selectedRecipeInput = getArray (configFile >> "cfgMagazines" >> _this >> "ItemActions" >> _crafting >> "input");
|
||||
_selectedRecipeTools = getArray (configFile >> "cfgMagazines" >> _this >> "ItemActions" >> _crafting >> "require");
|
||||
|
||||
_missing = "";
|
||||
_missingTools = false;
|
||||
{
|
||||
_hastoolweapon = _x in weapons player;
|
||||
if(!_hastoolweapon) exitWith { _missingTools = true; _missing = _x; };
|
||||
} forEach _selectedRecipeTools;
|
||||
|
||||
if(!_missingTools) then {
|
||||
|
||||
diag_log format["Selected Recipe Input: %1", _selectedRecipeInput];
|
||||
diag_log format["Selected Recipe Output: %1", _selectedRecipeOutput];
|
||||
|
||||
// Dry run to see if all parts are available.
|
||||
_proceed = true;
|
||||
{
|
||||
_itemIn = _x select 0;
|
||||
_countIn = _x select 1;
|
||||
|
||||
diag_log format["Recipe Check: %1 %2", _itemIn,_countIn];
|
||||
|
||||
// not neccessary
|
||||
//if (!(_itemIn in magazines player)) exitWith { _missing = _itemIn; _missingQty = _countIn; _proceed = false; };
|
||||
|
||||
// match against class and parentClass
|
||||
_qty = { (_x == _itemIn) || (configName(inheritsFrom(configFile >> "cfgMagazines" >> _x)) == _itemIn) } count magazines player;
|
||||
|
||||
if(_qty < _countIn) exitWith { _missing = _itemIn; _missingQty = (_countIn - _qty); _proceed = false; };
|
||||
|
||||
} forEach _selectedRecipeInput;
|
||||
|
||||
// If all parts proceed
|
||||
if (_proceed) then {
|
||||
|
||||
cutText ["Crafting started", "PLAIN DOWN"];
|
||||
|
||||
player playActionNow "Medic";
|
||||
|
||||
[player,"repair",0,false] call dayz_zombieSpeak;
|
||||
_id = [player,50,true,(getPosATL player)] spawn player_alertZombies;
|
||||
|
||||
r_interrupt = false;
|
||||
_animState = animationState player;
|
||||
r_doLoop = true;
|
||||
_started = false;
|
||||
_finished = false;
|
||||
|
||||
while {r_doLoop} do {
|
||||
_animState = animationState player;
|
||||
_isMedic = ["medic",_animState] call fnc_inString;
|
||||
if (_isMedic) then {
|
||||
_started = true;
|
||||
};
|
||||
if (_started and !_isMedic) then {
|
||||
r_doLoop = false;
|
||||
_finished = true;
|
||||
};
|
||||
if (r_interrupt) then {
|
||||
r_doLoop = false;
|
||||
};
|
||||
sleep 0.1;
|
||||
};
|
||||
r_doLoop = false;
|
||||
|
||||
if (_finished) then {
|
||||
|
||||
_removed_total = 0; // count total of removed items
|
||||
_tobe_removed_total = 0; // count total of all to be removed items
|
||||
// Take items
|
||||
{
|
||||
_removed = 0;
|
||||
_itemIn = _x select 0;
|
||||
_countIn = _x select 1;
|
||||
// diag_log format["Recipe Finish: %1 %2", _itemIn,_countIn];
|
||||
_tobe_removed_total = _tobe_removed_total + _countIn;
|
||||
|
||||
{
|
||||
if( (_removed < _countIn) && ((_x == _itemIn) || configName(inheritsFrom(configFile >> "cfgMagazines" >> _x)) == _itemIn)) then {
|
||||
_num_removed = ([player,_x] call BIS_fnc_invRemove);
|
||||
_removed = _removed + _num_removed;
|
||||
_removed_total = _removed_total + _num_removed;
|
||||
if(_num_removed >= 1) then {
|
||||
_temp_removed_array set [count _temp_removed_array,_x];
|
||||
};
|
||||
};
|
||||
|
||||
} forEach magazines player;
|
||||
|
||||
} forEach _selectedRecipeInput;
|
||||
|
||||
diag_log format["removed: %1 of: %2", _removed, _tobe_removed_total];
|
||||
|
||||
// Only proceed if all parts were removed successfully
|
||||
if(_removed_total == _tobe_removed_total) then {
|
||||
|
||||
// Put items
|
||||
{
|
||||
_itemOut = _x select 0;
|
||||
_countOut = _x select 1;
|
||||
diag_log format["Recipe Output: %1 %2", _itemOut,_countOut];
|
||||
|
||||
for "_x" from 1 to _countOut do {
|
||||
player addMagazine _itemOut;
|
||||
};
|
||||
|
||||
// get display name
|
||||
_textCreate = getText(configFile >> "CfgMagazines" >> _itemOut >> "displayName");
|
||||
|
||||
// Add crafted item
|
||||
cutText [format["Crafted Item: %1 x %2",_textCreate,_countOut], "PLAIN DOWN"];
|
||||
|
||||
} forEach _selectedRecipeOutput;
|
||||
|
||||
} else {
|
||||
// Refund parts since we failed
|
||||
{player addMagazine _x;} forEach _temp_removed_array;
|
||||
|
||||
cutText [format["Missing Parts after first check Item: %1 / %2",_removed_total,_tobe_removed_total], "PLAIN DOWN"];
|
||||
};
|
||||
|
||||
} else {
|
||||
r_interrupt = false;
|
||||
[objNull, player, rSwitchMove,""] call RE;
|
||||
player playActionNow "stop";
|
||||
cutText ["Canceled crafting.", "PLAIN DOWN"];
|
||||
};
|
||||
|
||||
} else {
|
||||
_textMissing = getText(configFile >> "CfgMagazines" >> _missing >> "displayName");
|
||||
cutText [format["Missing %1 more of %2",_missingQty, _textMissing], "PLAIN DOWN"];
|
||||
};
|
||||
} else {
|
||||
_textMissing = getText(configFile >> "CfgWeapons" >> _missing >> "displayName");
|
||||
cutText [format["Missing Tool: %1",_textMissing], "PLAIN DOWN"];
|
||||
};
|
||||
} else {
|
||||
cutText ["Crafting needs a fire within 2 meters.", "PLAIN DOWN"];
|
||||
};
|
||||
|
||||
TradeInprogress = false;
|
||||
@@ -1,116 +1,146 @@
|
||||
private["_vehicle","_curFuel","_newFuel","_timeLeft"];
|
||||
_vehicle = cursorTarget;
|
||||
private ["_vehicle","_curFuel","_newFuel","_started","_finished","_animState","_isMedic","_location1","_location2","_abort","_canName","_canSizeEmpty","_canTypeEmpty","_canName","_canSize","_configCan","_configVeh","_capacity","_nameText","_availableCansEmpty","_availableCans"];
|
||||
|
||||
if(TradeInprogress) exitWith { cutText ["Refuel already in progress." , "PLAIN DOWN"] };
|
||||
TradeInprogress = true;
|
||||
|
||||
// Use target from addaction
|
||||
_vehicle = _this select 0;
|
||||
|
||||
_fillCounter = 0;
|
||||
_abort = false;
|
||||
|
||||
_canSize = getNumber(configFile >> "cfgMagazines" >> "ItemJerrycan" >> "fuelQuantity");
|
||||
// Static vehicle fuel information
|
||||
_configVeh = configFile >> "cfgVehicles" >> TypeOf(_vehicle);
|
||||
_capacity = getNumber(_configVeh >> "fuelCapacity");
|
||||
_nameType = getText(_configVeh >> "displayName");
|
||||
_nameText = getText(_configVeh >> "displayName");
|
||||
|
||||
// _availableCansEmpty = ["ItemJerrycanEmpty","ItemFuelBarrelEmpty"];
|
||||
_availableCans = ["ItemJerrycan","ItemFuelBarrel"];
|
||||
|
||||
// Get number of full jerry cans
|
||||
_refuelQty = {_x == "ItemJerrycan"} count magazines player;
|
||||
// Loop to find containers that can could hold fuel and fill them
|
||||
{
|
||||
_configCan = configFile >> "CfgMagazines" >> _x;
|
||||
|
||||
// attempt to refuel for each empty jerry can
|
||||
for "_x" from 1 to _refuelQty do {
|
||||
|
||||
_curFuel = ((fuel _vehicle) * _capacity);
|
||||
_newFuel = (_curFuel + _canSize);
|
||||
if(_x in _availableCans) then {
|
||||
|
||||
// Get full can size
|
||||
_canName = _x;
|
||||
_canSize = getNumber(_configCan >> "fuelQuantity");
|
||||
_canText = getText(_configCan >> "displayName");
|
||||
|
||||
_curFuel = ((fuel _vehicle) * _capacity);
|
||||
_newFuel = (_curFuel + _canSize);
|
||||
|
||||
if (_newFuel > _capacity) exitWith {
|
||||
cutText [format["%1 is full of fuel.",_nameType], "PLAIN DOWN"];
|
||||
};
|
||||
if (_newFuel <= _capacity) then {
|
||||
|
||||
_newFuel = (_newFuel / _capacity);
|
||||
// calculate new fuel
|
||||
_newFuel = (_newFuel / _capacity);
|
||||
|
||||
_fillCounter = _fillCounter + 1;
|
||||
diag_log ("refuel check: " + str(_newFuel) + " / " + str(_capacity));
|
||||
|
||||
if(_refuelQty == 1) then {
|
||||
cutText ["Preparing to refuel, stand still to drain full jerry can.", "PLAIN DOWN"];
|
||||
} else {
|
||||
cutText [format[("Preparing to refuel, stand still to drain full jerry can %1 of %2."),_fillCounter,_refuelQty] , "PLAIN DOWN"];
|
||||
};
|
||||
cutText [format["Preparing to refuel, stand still to drain %1.",_canText], "PLAIN DOWN"];
|
||||
|
||||
// alert zombies
|
||||
[player,20,true,(getPosATL player)] spawn player_alertZombies;
|
||||
|
||||
// force animation
|
||||
player playActionNow "Medic";
|
||||
// Play sound and alert zombies
|
||||
[player,"refuel",0,false] call dayz_zombieSpeak;
|
||||
[player,20,true,(getPosATL player)] spawn player_alertZombies;
|
||||
|
||||
if(!dayz_isSwimming) then {
|
||||
|
||||
r_interrupt = false;
|
||||
_animState = animationState player;
|
||||
r_doLoop = true;
|
||||
_started = false;
|
||||
_finished = false;
|
||||
|
||||
while {r_doLoop} do {
|
||||
_animState = animationState player;
|
||||
_isMedic = ["medic",_animState] call fnc_inString;
|
||||
if (_isMedic) then {
|
||||
_started = true;
|
||||
};
|
||||
if (_started and !_isMedic) then {
|
||||
r_doLoop = false;
|
||||
_finished = true;
|
||||
};
|
||||
if (r_interrupt) then {
|
||||
r_doLoop = false;
|
||||
};
|
||||
sleep 0.1;
|
||||
};
|
||||
r_doLoop = false;
|
||||
|
||||
if (!_finished) exitWith {
|
||||
r_interrupt = false;
|
||||
[objNull, player, rSwitchMove,""] call RE;
|
||||
player playActionNow "stop";
|
||||
cutText ["Canceled refuel." , "PLAIN DOWN"];
|
||||
_abort = true;
|
||||
};
|
||||
} else {
|
||||
// Alternate method in water make sure player stays in one spot for 6 seconds
|
||||
_location1 = getPosATL player;
|
||||
sleep 6;
|
||||
_location2 = getPosATL player;
|
||||
|
||||
if(_location1 distance _location2 > 0.1) then {
|
||||
_finished = false;
|
||||
} else {
|
||||
_finished = true;
|
||||
};
|
||||
};
|
||||
|
||||
if (_finished) then {
|
||||
if(!dayz_isSwimming) then {
|
||||
|
||||
if ("ItemJerrycan" in magazines player) then {
|
||||
// force animation
|
||||
player playActionNow "Medic";
|
||||
|
||||
player removeMagazine "ItemJerrycan";
|
||||
player addMagazine "ItemJerrycanEmpty";
|
||||
r_interrupt = false;
|
||||
_animState = animationState player;
|
||||
r_doLoop = true;
|
||||
_started = false;
|
||||
|
||||
// Get fuel levels again to prevent wasted gas from others filling
|
||||
_curFuel = ((fuel _vehicle) * _capacity);
|
||||
_newFuel = (_curFuel + _canSize);
|
||||
_newFuel = (_newFuel / _capacity);
|
||||
while {r_doLoop} do {
|
||||
_animState = animationState player;
|
||||
_isMedic = ["medic",_animState] call fnc_inString;
|
||||
if (_isMedic) then {
|
||||
_started = true;
|
||||
};
|
||||
if (_started and !_isMedic) then {
|
||||
r_doLoop = false;
|
||||
_finished = true;
|
||||
};
|
||||
if (r_interrupt) then {
|
||||
r_doLoop = false;
|
||||
};
|
||||
sleep 0.1;
|
||||
};
|
||||
r_doLoop = false;
|
||||
|
||||
dayzSetFuel = [_vehicle,_newFuel];
|
||||
publicVariable "dayzSetFuel";
|
||||
if (local _vehicle) then {
|
||||
dayzSetFuel spawn local_setFuel;
|
||||
if(!_finished) then {
|
||||
r_interrupt = false;
|
||||
[objNull, player, rSwitchMove,""] call RE;
|
||||
player playActionNow "stop";
|
||||
};
|
||||
|
||||
} else {
|
||||
// Alternate method in water make sure player stays in one spot for 6 seconds
|
||||
_location1 = getPosATL player;
|
||||
sleep 6;
|
||||
_location2 = getPosATL player;
|
||||
if(_location1 distance _location2 < 3) then {
|
||||
_finished = true;
|
||||
};
|
||||
};
|
||||
|
||||
cutText [format[localize "str_player_05",_nameType,_canSize], "PLAIN DOWN"];
|
||||
if (_finished) then {
|
||||
|
||||
call fnc_usec_medic_removeActions;
|
||||
r_action = false;
|
||||
// Get vehicle fuel levels again
|
||||
_curFuel = ((fuel _vehicle) * _capacity);
|
||||
_newFuel = (_curFuel + _canSize);
|
||||
|
||||
sleep 1;
|
||||
if (_newFuel <= _capacity) then {
|
||||
|
||||
// calculate minimum needed fuel
|
||||
_newFuel = (_newFuel / _capacity);
|
||||
|
||||
if(([player,_canName] call BIS_fnc_invRemove) == 1) then {
|
||||
|
||||
dayzSetFuel = [_vehicle,_newFuel];
|
||||
if (local _vehicle) then {
|
||||
dayzSetFuel spawn local_setFuel;
|
||||
};
|
||||
publicVariable "dayzSetFuel";
|
||||
|
||||
// Play sound
|
||||
[player,"refuel",0,false] call dayz_zombieSpeak;
|
||||
|
||||
// Add filled can
|
||||
player addMagazine _canName+"Empty";
|
||||
|
||||
cutText [format[localize "str_player_05",_nameText,_canSize], "PLAIN DOWN"];
|
||||
|
||||
call fnc_usec_medic_removeActions;
|
||||
r_action = false;
|
||||
|
||||
sleep 1;
|
||||
} else {
|
||||
_abort = true;
|
||||
};
|
||||
|
||||
} else {
|
||||
cutText [format["%1 cannot hold that much fuel.",_nameText], "PLAIN DOWN"];
|
||||
_abort = true;
|
||||
};
|
||||
|
||||
} else {
|
||||
cutText ["Canceled refuel." , "PLAIN DOWN"];
|
||||
_abort = true;
|
||||
};
|
||||
|
||||
} else {
|
||||
cutText [format["%1 cannot hold that much fuel.",_nameText], "PLAIN DOWN"];
|
||||
_abort = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
if(_abort) exitWith {};
|
||||
};
|
||||
|
||||
// exit if abort flag was set
|
||||
if(_abort) exitWith {};
|
||||
|
||||
} forEach magazines player;
|
||||
|
||||
TradeInprogress = false;
|
||||
@@ -10,23 +10,12 @@ _objectUID = _obj getVariable ["ObjectUID","0"];
|
||||
_isOk = true;
|
||||
_proceed = false;
|
||||
_objType = typeOf _obj;
|
||||
|
||||
_limit = 5;
|
||||
|
||||
switch(true)do{
|
||||
case (_objType == "WoodGate_DZ"): {
|
||||
_limit = 5;
|
||||
};
|
||||
case (_objType == "Land_HBarrier1_DZ"): {
|
||||
_limit = 20;
|
||||
};
|
||||
case (_objType == "Sandbag1_DZ"): {
|
||||
_limit = 10;
|
||||
};
|
||||
case (_objType == "Hedgehog_DZ"): {
|
||||
_limit = 10;
|
||||
};
|
||||
};
|
||||
|
||||
if(isNumber (configFile >> "CfgVehicles" >> _objType >> "constructioncount")) then {
|
||||
_limit = getNumber(configFile >> "CfgVehicles" >> _objType >> "constructioncount");
|
||||
};
|
||||
|
||||
cutText [format["Starting de-construction of %1.",_objType], "PLAIN DOWN"];
|
||||
|
||||
|
||||
@@ -1,133 +1,156 @@
|
||||
private["_vehicle","_curFuel","_newFuel","_timeLeft"];
|
||||
_vehicle = cursorTarget;
|
||||
private ["_vehicle","_curFuel","_newFuel","_started","_finished","_animState","_isMedic","_location1","_location2","_abort","_canNameEmpty","_canSizeEmpty","_canTypeEmpty","_canName","_canSize","_configCanEmpty","_configVeh","_capacity","_nameText","_availableCansEmpty","_availableCans"];
|
||||
|
||||
if(TradeInprogress) exitWith { cutText ["Siphon already in progress." , "PLAIN DOWN"] };
|
||||
TradeInprogress = true;
|
||||
|
||||
// Use target from addaction
|
||||
_vehicle = _this select 0;
|
||||
|
||||
_fillCounter = 0;
|
||||
_abort = false;
|
||||
|
||||
_canSize = getNumber(configFile >> "cfgMagazines" >> "ItemJerrycan" >> "fuelQuantity");
|
||||
// Static vehicle fuel information
|
||||
_configVeh = configFile >> "cfgVehicles" >> TypeOf(_vehicle);
|
||||
_capacity = getNumber(_configVeh >> "fuelCapacity");
|
||||
_nameType = getText(_configVeh >> "displayName");
|
||||
_nameText = getText(_configVeh >> "displayName");
|
||||
|
||||
// Get number of empty jerry cans
|
||||
_siphonQty = {_x == "ItemJerrycanEmpty"} count magazines player;
|
||||
_availableCansEmpty = ["ItemJerrycanEmpty","ItemFuelBarrelEmpty"];
|
||||
_availableCans = ["ItemJerrycan","ItemFuelBarrel"];
|
||||
|
||||
// attempt to siphon for each empty jerry can
|
||||
for "_x" from 1 to _siphonQty do {
|
||||
// Loop to find containers that can could hold fuel and fill them
|
||||
{
|
||||
_configCanEmpty = configFile >> "CfgMagazines" >> _x;
|
||||
diag_log format["Looking for: %1", _x];
|
||||
if(_x in _availableCansEmpty) then {
|
||||
|
||||
_curFuel = ((fuel _vehicle) * _capacity);
|
||||
_newFuel = (_curFuel - _canSize);
|
||||
|
||||
// calculate minimum needed fuel
|
||||
_newFuel = (_newFuel / _capacity);
|
||||
|
||||
if(_newFuel <= 0) exitWith {
|
||||
cutText [format["%1 does not have enough fuel.",_nameType], "PLAIN DOWN"];
|
||||
};
|
||||
|
||||
if (_newFuel > 0) then {
|
||||
|
||||
_fillCounter = _fillCounter + 1;
|
||||
|
||||
if(_siphonQty == 1) then {
|
||||
cutText ["Preparing to siphon, stand still to fill empty jerry can.", "PLAIN DOWN"];
|
||||
} else {
|
||||
cutText [format[("Preparing to siphon, stand still to fill empty jerry can %1 of %2."),_fillCounter,_siphonQty] , "PLAIN DOWN"];
|
||||
};
|
||||
|
||||
// alert zombies
|
||||
[player,20,true,(getPosATL player)] spawn player_alertZombies;
|
||||
|
||||
if(!dayz_isSwimming) then {
|
||||
|
||||
// force animation
|
||||
player playActionNow "Medic";
|
||||
|
||||
r_interrupt = false;
|
||||
_animState = animationState player;
|
||||
r_doLoop = true;
|
||||
_started = false;
|
||||
_finished = false;
|
||||
|
||||
while {r_doLoop} do {
|
||||
_animState = animationState player;
|
||||
_isMedic = ["medic",_animState] call fnc_inString;
|
||||
if (_isMedic) then {
|
||||
_started = true;
|
||||
};
|
||||
if (_started and !_isMedic) then {
|
||||
r_doLoop = false;
|
||||
_finished = true;
|
||||
};
|
||||
if (r_interrupt) then {
|
||||
r_doLoop = false;
|
||||
};
|
||||
sleep 0.1;
|
||||
};
|
||||
r_doLoop = false;
|
||||
|
||||
if (!_finished) exitWith {
|
||||
r_interrupt = false;
|
||||
[objNull, player, rSwitchMove,""] call RE;
|
||||
player playActionNow "stop";
|
||||
cutText ["Canceled siphon." , "PLAIN DOWN"];
|
||||
_abort = true;
|
||||
};
|
||||
|
||||
} else {
|
||||
// Alternate method in water make sure player stays in one spot for 6 seconds
|
||||
_location1 = getPosATL player;
|
||||
sleep 6;
|
||||
_location2 = getPosATL player;
|
||||
|
||||
if(_location1 distance _location2 > 0.1) then {
|
||||
_finished = false;
|
||||
} else {
|
||||
_finished = true;
|
||||
};
|
||||
};
|
||||
|
||||
if (_finished) then {
|
||||
|
||||
if ("ItemJerrycanEmpty" in magazines player) then {
|
||||
|
||||
// Play sound
|
||||
[player,"refuel",0,false] call dayz_zombieSpeak;
|
||||
diag_log format["gas fuelQuantity config : %1", _x];
|
||||
|
||||
player removeMagazine "ItemJerrycanEmpty";
|
||||
player addMagazine "ItemJerrycan";
|
||||
// Get Empty can size
|
||||
_canNameEmpty = _x;
|
||||
_canSizeEmpty = getNumber(_configCanEmpty >> "fuelQuantity");
|
||||
_canTypeEmpty = getText(_configCanEmpty >> "displayName");
|
||||
|
||||
// Get fuel levels again to ensure proper fuel level from others siphoning
|
||||
_curFuel = ((fuel _vehicle) * _capacity);
|
||||
_newFuel = (_curFuel - _canSize);
|
||||
// Get Full can size
|
||||
_canName = configName(inheritsFrom(configFile >> "cfgMagazines" >> _canNameEmpty));
|
||||
_canSize = getNumber(configFile >> "cfgMagazines" >> _canName >> "fuelQuantity");
|
||||
|
||||
// is empty
|
||||
if(_canSizeEmpty == 0) then {
|
||||
|
||||
// calculate minimum needed fuel
|
||||
_newFuel = (_newFuel / _capacity);
|
||||
diag_log format["is empty fuelQuantity : %1", _x];
|
||||
|
||||
_curFuel = ((fuel _vehicle) * _capacity);
|
||||
_newFuel = (_curFuel - _canSize);
|
||||
|
||||
if (_newFuel > 0) then {
|
||||
|
||||
dayzSetFuel = [_vehicle,_newFuel];
|
||||
if (local _vehicle) then {
|
||||
dayzSetFuel spawn local_setFuel;
|
||||
};
|
||||
publicVariable "dayzSetFuel";
|
||||
// calculate new fuel
|
||||
_newFuel = (_newFuel / _capacity);
|
||||
|
||||
cutText [format["%1 has been drained for %2 litres of Fuel",_nameType,_canSize], "PLAIN DOWN"];
|
||||
|
||||
call fnc_usec_medic_removeActions;
|
||||
r_action = false;
|
||||
if (_newFuel > 0) then {
|
||||
|
||||
cutText [format["Preparing to siphon, stand still to fill %1.",_canTypeEmpty], "PLAIN DOWN"];
|
||||
|
||||
sleep 1;
|
||||
// alert zombies
|
||||
[player,20,true,(getPosATL player)] spawn player_alertZombies;
|
||||
|
||||
_finished = false;
|
||||
|
||||
if(!dayz_isSwimming) then {
|
||||
|
||||
// force animation
|
||||
player playActionNow "Medic";
|
||||
|
||||
r_interrupt = false;
|
||||
_animState = animationState player;
|
||||
r_doLoop = true;
|
||||
_started = false;
|
||||
|
||||
while {r_doLoop} do {
|
||||
_animState = animationState player;
|
||||
_isMedic = ["medic",_animState] call fnc_inString;
|
||||
if (_isMedic) then {
|
||||
_started = true;
|
||||
};
|
||||
if (_started and !_isMedic) then {
|
||||
r_doLoop = false;
|
||||
_finished = true;
|
||||
};
|
||||
if (r_interrupt) then {
|
||||
r_doLoop = false;
|
||||
};
|
||||
sleep 0.1;
|
||||
};
|
||||
r_doLoop = false;
|
||||
|
||||
if(!_finished) then {
|
||||
r_interrupt = false;
|
||||
[objNull, player, rSwitchMove,""] call RE;
|
||||
player playActionNow "stop";
|
||||
};
|
||||
|
||||
} else {
|
||||
// Alternate method in water make sure player stays in one spot for 6 seconds
|
||||
_location1 = getPosATL player;
|
||||
sleep 6;
|
||||
_location2 = getPosATL player;
|
||||
if(_location1 distance _location2 < 3) then {
|
||||
_finished = true;
|
||||
};
|
||||
};
|
||||
|
||||
if (_finished) then {
|
||||
|
||||
// Get vehicle fuel levels again
|
||||
_curFuel = ((fuel _vehicle) * _capacity);
|
||||
_newFuel = (_curFuel - _canSize);
|
||||
|
||||
// calculate minimum needed fuel
|
||||
_newFuel = (_newFuel / _capacity);
|
||||
|
||||
if (_newFuel > 0) then {
|
||||
|
||||
if(([player,_canNameEmpty] call BIS_fnc_invRemove) == 1) then {
|
||||
|
||||
dayzSetFuel = [_vehicle,_newFuel];
|
||||
if (local _vehicle) then {
|
||||
dayzSetFuel spawn local_setFuel;
|
||||
};
|
||||
publicVariable "dayzSetFuel";
|
||||
|
||||
// Play sound
|
||||
[player,"refuel",0,false] call dayz_zombieSpeak;
|
||||
|
||||
// Add filled can
|
||||
player addMagazine _canName;
|
||||
|
||||
cutText [format["%1 has been drained for %2 litres of Fuel",_nameText,_canSize], "PLAIN DOWN"];
|
||||
|
||||
call fnc_usec_medic_removeActions;
|
||||
r_action = false;
|
||||
|
||||
sleep 1;
|
||||
} else {
|
||||
_abort = true;
|
||||
};
|
||||
|
||||
} else {
|
||||
cutText [format["%1 does not have enough fuel to siphon.",_nameText], "PLAIN DOWN"];
|
||||
_abort = true;
|
||||
};
|
||||
|
||||
} else {
|
||||
cutText ["Canceled siphon." , "PLAIN DOWN"];
|
||||
_abort = true;
|
||||
};
|
||||
|
||||
|
||||
|
||||
} else {
|
||||
cutText [format["%1 does not have enough fuel to siphon.",_nameText], "PLAIN DOWN"];
|
||||
_abort = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
// exit if abort flag was set
|
||||
if(_abort) exitWith {};
|
||||
|
||||
if(_abort) exitWith {};
|
||||
};
|
||||
} forEach magazines player;
|
||||
|
||||
TradeInprogress = false;
|
||||
@@ -24,20 +24,20 @@ _dog = _this select 3;
|
||||
_removed = 0;
|
||||
_itemIn = "FoodmeatRaw";
|
||||
_countIn = 1;
|
||||
_selected = "";
|
||||
|
||||
{
|
||||
if( (_removed < _countIn) && ((_x == _itemIn) || configName(inheritsFrom(configFile >> "cfgMagazines" >> _x)) == _itemIn)) then {
|
||||
_removed = _removed + ([player,_x] call BIS_fnc_invRemove);
|
||||
};
|
||||
if(_removed == 1) exitWith { _selected = _x; };
|
||||
|
||||
if(_removed == 1) exitWith { _selected = _x; };
|
||||
} forEach magazines player;
|
||||
|
||||
// get name of item removed
|
||||
_textRemoved = getText(configFile >> "CfgMagazines" >> _selected >> "displayName");
|
||||
|
||||
// Only proceed if removed count matches
|
||||
if(_removed == _countIn) then {
|
||||
|
||||
// get name of item removed
|
||||
_textRemoved = getText(configFile >> "CfgMagazines" >> _selected >> "displayName");
|
||||
|
||||
// add failure rate based on skill level variable (days alive)
|
||||
_chanceToFail = ((random 1 + (dayz_skilllevel/100)) > 0.5);
|
||||
|
||||
@@ -105,8 +105,6 @@ if (_qty >= _qty_in) then {
|
||||
dayzPublishVeh2 = [_veh,[_dir,_location],_part_out,false,dayz_playerUID];
|
||||
publicVariableServer "dayzPublishVeh2";
|
||||
|
||||
_veh call fnc_vehicleEventHandler;
|
||||
|
||||
player reveal _veh;
|
||||
|
||||
cutText [format[("Bought %3 %4 for %1 %2"),_qty_in,_textPartIn,_qty_out,_textPartOut], "PLAIN DOWN"];
|
||||
|
||||
@@ -111,9 +111,6 @@ if (_qty >= _qty_in) then {
|
||||
dayzPublishVeh2 = [_veh,[_dir,_location],_part_out,false,dayz_playerUID];
|
||||
publicVariableServer "dayzPublishVeh2";
|
||||
|
||||
// event handlers to correctly track damage client side
|
||||
_veh call fnc_vehicleEventHandler;
|
||||
|
||||
player reveal _veh;
|
||||
|
||||
cutText [format[("Bought %3 %4 for %1 %2"),_qty_in,_textPartIn,_qty_out,_textPartOut], "PLAIN DOWN"];
|
||||
|
||||
Reference in New Issue
Block a user