mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 20:13:13 +03:00
1.0.0.4 Developer Build
+ [ADDED] 30m_plot_kit as a trader only item so that server admins can control how many any the cost. + [ADDED] Building now requires a plot pole within 30 meters. + [FIXED] Building preview will now be cancelled if you get in combat. + [FIXED] When building constructioncount config variable is now used correctly. + [ADDED] Removal of some build-ables now come with a refund of parts. + [ADDED] Requirement and consumption of a M240_DZ when crafting mg240 nest. + [CHANGED] Added crowbar requirement to remove some new build-ables. + [FIXED] Removed refuel,siphon,repair,salvage from m240 nest. + [ADDED] one more non auto refuel large fuel capacity truck V3S_Refuel_TK_GUE_EP1_DZ + [ADDED] Building loot for 3 more Namalsk buildings. + [FIXED] Made sure we do not lock the mg nest and other buildables with within allvehicles. + [ADDED] Experiment with player zombie night vision. + [FIXED] Added fix to allow new storage devices to use cargo check feature. + [FIXED] offset with oil/fuel barrel should be fixed TODO: binarize + [CHANGED] Removed ammo from m240 nest, players must supply their own.
This commit is contained in:
@@ -49,10 +49,11 @@ class CfgMagazines {
|
||||
text = "Craft M240 Nest";
|
||||
script = "spawn player_craftItem1;";
|
||||
neednearby[] = {};
|
||||
requiretools[] = {"ItemEtool","ItemToolbox"};
|
||||
requiretools[] = {"ItemEtool","ItemToolbox","M240_DZ"};
|
||||
output[] = {{"m240_nest_kit",1}};
|
||||
input[] = {{"ItemSandbag",4},{"ItemCanvas",1},{"PartWoodPlywood",4},{"PartWoodLumber",3}};
|
||||
// TODO add consume weapon
|
||||
consumeweapons[] = {"M240_DZ"};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
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"];
|
||||
private ["_location","_dir","_classname","_item","_hasrequireditem","_missing","_hastoolweapon","_cancel","_reason","_isBuilding","_started","_finished","_animState","_isMedic","_dis","_sfx","_hasbuilditem","_tmpbuilt","_buildings","_onLadder","_isWater","_require","_text","_offset","_IsNearPlot","_isOk","_location1","_location2","_counter","_limit","_proceed","_num_removed","_position","_object"];
|
||||
|
||||
if(TradeInprogress) exitWith { cutText ["Building already in progress." , "PLAIN DOWN"]; };
|
||||
TradeInprogress = true;
|
||||
@@ -14,6 +14,9 @@ if(_isWater) exitWith {TradeInprogress = false; cutText [localize "str_player_26
|
||||
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 = getArray (configFile >> "cfgMagazines" >> _this >> "ItemActions" >> "Build" >> "require");
|
||||
@@ -21,6 +24,14 @@ _require = getArray (configFile >> "cfgMagazines" >> _this >> "ItemActions" >>
|
||||
_text = getText (configFile >> "CfgVehicles" >> _classname >> "displayName");
|
||||
_offset = getArray (configFile >> "CfgVehicles" >> _classname >> "offset");
|
||||
|
||||
// Allow building of plot
|
||||
if(_classname == "Plastic_Pole_EP1_DZ") then {
|
||||
_IsNearPlot = 1;
|
||||
} else {
|
||||
_IsNearPlot = count (position player nearObjects ["Plastic_Pole_EP1_DZ",30]);
|
||||
};
|
||||
if(_IsNearPlot == 0) exitWith { TradeInprogress = false; cutText [format["Building requires plot within 30m %1",_missing] , "PLAIN DOWN"]; };
|
||||
|
||||
_missing = "";
|
||||
_hasrequireditem = true;
|
||||
{
|
||||
@@ -57,6 +68,12 @@ if (_hasrequireditem) then {
|
||||
|
||||
while {_isOk} do {
|
||||
|
||||
if (player getVariable["combattimeout", 0] >= time) exitWith {
|
||||
_isOk = false;
|
||||
_cancel = true;
|
||||
_reason = "Cannot build while in combat.";
|
||||
};
|
||||
|
||||
cutText ["Planning consruction stand still 5 seconds to build.", "PLAIN DOWN"];
|
||||
|
||||
_location1 = getPosATL player;
|
||||
@@ -115,7 +132,7 @@ if (_hasrequireditem) then {
|
||||
_cancel = true;
|
||||
_reason = "Cannot build inside another building.";
|
||||
};
|
||||
} forEach _buildings;
|
||||
} forEach _buildings;
|
||||
|
||||
// No building in trader zones
|
||||
if(!placevault) then { _cancel = true; _reason = "Cannot build in a city."; };
|
||||
@@ -126,8 +143,8 @@ if (_hasrequireditem) then {
|
||||
|
||||
_limit = 5;
|
||||
|
||||
if(isNumber (configFile >> "CfgVehicles" >> _objType >> "constructioncount")) then {
|
||||
_limit = getNumber(configFile >> "CfgVehicles" >> _objType >> "constructioncount");
|
||||
if(isNumber (configFile >> "CfgVehicles" >> _classname >> "constructioncount")) then {
|
||||
_limit = getNumber(configFile >> "CfgVehicles" >> _classname >> "constructioncount");
|
||||
};
|
||||
|
||||
_isOk = true;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* 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"];
|
||||
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","_abort","_reason","_isNear","_missingTools","_hastoolweapon","_selectedRecipeTools","_distance","_crafting","_needNear"];
|
||||
|
||||
if(TradeInprogress) exitWith { cutText ["Crafting already in progress." , "PLAIN DOWN"]; };
|
||||
TradeInprogress = true;
|
||||
@@ -74,10 +74,16 @@ _reason = "";
|
||||
_onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
|
||||
_canDo = (!r_drag_sqf and !r_player_unconscious and !_onLadder);
|
||||
|
||||
_crafting = "Crafting";
|
||||
if (count _this == 2) then {
|
||||
_item = _this select 0;
|
||||
_crafting = _this select 1; // "Crafting1"
|
||||
} else {
|
||||
_item = _this;
|
||||
_crafting = "Crafting";
|
||||
};
|
||||
|
||||
// check if fire is reqired
|
||||
_needNear = getArray (configFile >> "cfgMagazines" >> _this >> "ItemActions" >> _crafting >> "neednearby");
|
||||
_needNear = getArray (configFile >> "cfgMagazines" >> _item >> "ItemActions" >> _crafting >> "neednearby");
|
||||
|
||||
if("fire" in _needNear) then {
|
||||
_isNear = {inflamed _x} count (position player nearObjects _distance);
|
||||
@@ -98,9 +104,10 @@ 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");
|
||||
_selectedRecipeOutput = getArray (configFile >> "cfgMagazines" >> _item >> "ItemActions" >> _crafting >> "output");
|
||||
_selectedRecipeInput = getArray (configFile >> "cfgMagazines" >> _item >> "ItemActions" >> _crafting >> "input");
|
||||
_selectedRecipeTools = getArray (configFile >> "cfgMagazines" >> _item >> "ItemActions" >> _crafting >> "requiretools");
|
||||
_consumeweapons = getArray (configFile >> "cfgMagazines" >> _item >> "ItemActions" >> _crafting >> "consumeweapons");
|
||||
|
||||
_missing = "";
|
||||
_missingTools = false;
|
||||
@@ -198,6 +205,11 @@ if (_canDo) then {
|
||||
|
||||
// Put items
|
||||
{
|
||||
// consumeweapons
|
||||
{
|
||||
player removeWeapon _x;
|
||||
} forEach _consumeweapons;
|
||||
|
||||
_itemOut = _x select 0;
|
||||
_countOut = _x select 1;
|
||||
diag_log format["Recipe Output: %1 %2", _itemOut,_countOut];
|
||||
@@ -205,6 +217,8 @@ if (_canDo) then {
|
||||
for "_x" from 1 to _countOut do {
|
||||
player addMagazine _itemOut;
|
||||
};
|
||||
|
||||
|
||||
|
||||
// get display name
|
||||
_textCreate = getText(configFile >> "CfgMagazines" >> _itemOut >> "displayName");
|
||||
|
||||
@@ -1,243 +1,3 @@
|
||||
/*
|
||||
* 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);
|
||||
|
||||
private["_crafting"];
|
||||
_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;
|
||||
[_this,_crafting] spawn player_craftitem;
|
||||
|
||||
@@ -1,243 +1,3 @@
|
||||
/*
|
||||
* 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);
|
||||
|
||||
private["_crafting"];
|
||||
_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;
|
||||
[_this,_crafting] spawn player_craftitem;
|
||||
@@ -1,243 +1,3 @@
|
||||
/*
|
||||
* 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);
|
||||
|
||||
private["_crafting"];
|
||||
_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;
|
||||
[_this,_crafting] spawn player_craftitem;
|
||||
@@ -1,243 +1,3 @@
|
||||
/*
|
||||
* 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);
|
||||
|
||||
private["_crafting"];
|
||||
_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;
|
||||
[_this,_crafting] spawn player_craftitem;
|
||||
@@ -1,4 +1,4 @@
|
||||
private ["_target","_ent","_cnt","_index","_wound","_damage","_rnd","_move"];
|
||||
private ["_target","_ent","_rnd","_move","_isZombie"];
|
||||
_target = _this select 3;
|
||||
_ent = _target;
|
||||
|
||||
@@ -6,7 +6,7 @@ _ent = _target;
|
||||
player removeAction s_player_pzombiesattack;
|
||||
s_player_pzombiesattack = 1;
|
||||
|
||||
_rnd = round(random 9) + 1;
|
||||
_rnd = (round(random 9)) + 1;
|
||||
_move = "ZombieStandingAttack" + str(_rnd);
|
||||
player playMoveNow _move;
|
||||
|
||||
|
||||
48
dayz_code/actions/pzombie/pz_vision.sqf
Normal file
48
dayz_code/actions/pzombie/pz_vision.sqf
Normal file
@@ -0,0 +1,48 @@
|
||||
|
||||
private ["_gen","_caller","_id","_NV","_NVOn","_OldAperture"];
|
||||
_gen = _this select 0;
|
||||
_caller = _this select 1;
|
||||
_id = _this select 2;
|
||||
|
||||
_gen removeAction _id;
|
||||
|
||||
_NV = player getvariable "NV";
|
||||
_NVOn = (_NV select 0);
|
||||
_OldAperture = (_NV select 1);
|
||||
|
||||
if(_NVOn == "ON")
|
||||
exitwith
|
||||
{
|
||||
setaperture -1;
|
||||
ppEffectDestroy ppColor;
|
||||
ppEffectDestroy ppBlur;
|
||||
player setvariable ["NV",["OFF",_oldAperture]];
|
||||
player addAction ["Night Vision", "\z\addons\dayz_code\actions\pzombie\pz_vision.sqf", [], 0, false, true, "nightVision", "_this == _target"];
|
||||
};
|
||||
|
||||
ppEffectDestroy ppColor;
|
||||
ppEffectDestroy ppBlur;
|
||||
|
||||
ppColor = ppEffectCreate ["ColorCorrections", 1999];
|
||||
ppColor ppEffectEnable true;
|
||||
ppColor ppEffectAdjust [1, 1, 0, [0.4, 1, 0.4, 0], [0.4, 1, 0.4, 0.0], [0.4, 1, 0.4, 1.0]];
|
||||
ppColor ppEffectCommit 0;
|
||||
|
||||
ppBlur = ppEffectCreate ["dynamicBlur", 505];
|
||||
ppBlur ppEffectEnable true;
|
||||
ppBlur ppEffectAdjust [.2];
|
||||
ppBlur ppEffectCommit 0;
|
||||
|
||||
aperture = 0.0001;
|
||||
while { aperture < _oldAperture } do
|
||||
{
|
||||
aperture = aperture + 0.0005;
|
||||
setAperture aperture;
|
||||
sleep 0.001;
|
||||
};
|
||||
|
||||
|
||||
player setVariable ["NV", ["ON", _oldAperture]];
|
||||
|
||||
player addAction ["Vision", "\z\addons\dayz_code\actions\pzombie\pz_vision.sqf", [], 0, false, true, "nightVision", "_this == _target"];
|
||||
exit;
|
||||
@@ -2,7 +2,7 @@
|
||||
delete object from db with extra waiting by [VB]AWOL
|
||||
parameters: _obj
|
||||
*/
|
||||
private ["_obj","_objectID","_objectUID","_started","_finished","_animState","_isMedic","_isOk","_proceed","_counter","_limit","_id","_objType"];
|
||||
private ["_obj","_objectID","_objectUID","_started","_finished","_animState","_isMedic","_isOk","_proceed","_counter","_limit","_id","_objType","_sfx","_dis","_itemOut","_countOut","_textCreate","_selectedRemoveOutput"];
|
||||
_obj = _this select 3;
|
||||
_objectID = _obj getVariable ["ObjectID","0"];
|
||||
_objectUID = _obj getVariable ["ObjectUID","0"];
|
||||
@@ -82,6 +82,24 @@ if (_proceed) then {
|
||||
publicVariableServer "dayzDeleteObj";
|
||||
|
||||
deleteVehicle _obj;
|
||||
|
||||
// give refund items
|
||||
_selectedRemoveOutput = getArray (configFile >> "CfgVehicles" >> _objType >> "removeoutput");
|
||||
if((count _selectedRemoveOutput) > 0) then {
|
||||
// Put items
|
||||
{
|
||||
_itemOut = _x select 0;
|
||||
_countOut = _x select 1;
|
||||
diag_log format["Removal Output: %1 %2", _itemOut,_countOut];
|
||||
|
||||
for "_x" from 1 to _countOut do {
|
||||
player addMagazine _itemOut;
|
||||
};
|
||||
|
||||
} forEach _selectedRemoveOutput;
|
||||
cutText ["De-constructed parts are now in your inventory.", "PLAIN DOWN"];
|
||||
};
|
||||
|
||||
} else {
|
||||
r_interrupt = false;
|
||||
[objNull, player, rSwitchMove,""] call RE;
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
private["_obj","_bag","_pos"];
|
||||
private["_obj"];
|
||||
_obj = _this select 3;
|
||||
_obj spawn player_packTent;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
private["_position","_tent","_location","_isOk","_backpack","_tentType","_trg","_key"];
|
||||
private ["_tent","_location","_isOk","_cancel","_location3","_location4","_location1","_location2","_counter","_pondPos","_isPond","_ppos","_hastentitem","_dir","_id","_building","_isBuilding","_playerPos","_item","_offset_x","_offset_y","_offset_z","_offset_z_attach","_config","_text","_tmpvault","_vault_location","_objectsPond"];
|
||||
//check if can pitch here
|
||||
|
||||
if(TradeInprogress) exitWith { cutText ["Vault pitching already in progress." , "PLAIN DOWN"]; };
|
||||
|
||||
@@ -1259,7 +1259,19 @@ class Citizen1; // External class reference
|
||||
transportFuel = 0;
|
||||
fuelCapacity = 10000;
|
||||
};
|
||||
|
||||
class V3S_Refuel_TK_GUE_EP1;
|
||||
class V3S_Refuel_TK_GUE_EP1_DZ: V3S_Refuel_TK_GUE_EP1
|
||||
{
|
||||
scope = 2;
|
||||
side = 2;
|
||||
crew = "";
|
||||
typicalCargo[] = {};
|
||||
hiddenSelections[] = {};
|
||||
class TransportMagazines{};
|
||||
class TransportWeapons{};
|
||||
transportFuel = 0;
|
||||
fuelCapacity = 10000;
|
||||
};
|
||||
|
||||
|
||||
};
|
||||
@@ -5,7 +5,7 @@ scriptName "Functions\misc\fn_damageActions.sqf";
|
||||
- [] call fnc_usec_damageActions;
|
||||
************************************************************/
|
||||
|
||||
private ["_weaponName","_action","_turret","_weapons","_assignedRole","_action1","_action2","_x","_vehicle","_unit","_vehType","_displayName","_ammoQty","_ammoSerial","_weapon","_magTypes","_type","_typeVeh","_index","_inventory","_unitTo","_isEngineer","_vehClose","_hasVehicle","_unconscious","_lowBlood","_injured","_inPain","_legsBroke","_armsBroke","_charID","_friendlies","_playerMagazines","_hasBandage","_hasEpi","_hasMorphine","_hasBlood","_hasToolbox","_hasJerry","_hasJerryE","_hasEtool","_hasWire","_hasPainkillers","_unconscious_crew","_patients","_crew","_menClose","_hasPatient","_inVehicle","_isClose","_bag","_classbag"];
|
||||
private ["_weaponName","_action","_turret","_weapons","_assignedRole","_action1","_action2","_x","_vehicle","_unit","_vehType","_displayName","_ammoQty","_ammoSerial","_weapon","_magTypes","_type","_typeVeh","_index","_inventory","_unitTo","_isEngineer","_vehClose","_hasVehicle","_unconscious","_lowBlood","_injured","_inPain","_legsBroke","_armsBroke","_charID","_friendlies","_playerMagazines","_hasBandage","_hasEpi","_hasMorphine","_hasBlood","_hasToolbox","_hasJerry","_hasJerryE","_hasEtool","_hasWire","_hasPainkillers","_unconscious_crew","_patients","_crew","_menClose","_hasPatient","_inVehicle","_isClose","_bag","_classbag","_isDisallowRefuel","_hasBarrel","_hasBarrelE"];
|
||||
_menClose = cursorTarget;
|
||||
_hasPatient = alive _menClose;
|
||||
_vehicle = vehicle player;
|
||||
@@ -41,6 +41,7 @@ if (_inVehicle) then {
|
||||
|
||||
if (_hasPatient and !r_drag_sqf and !r_action and !_inVehicle and !r_player_unconscious and _isClose) then {
|
||||
_unit = cursorTarget;
|
||||
_isDisallowRefuel = typeOf _unit in ["M240Nest_DZ"];
|
||||
player reveal _unit;
|
||||
_vehClose = (getPosATL player) nearEntities [["Car","Tank","Helicopter","Plane","StaticWeapon","Ship"],5]; //nearestObjects [player, ["Car","Tank","Helicopter","Plane","StaticWeapon","Ship"], 5];
|
||||
_hasVehicle = ({alive _x} count _vehClose > 0);
|
||||
@@ -120,7 +121,7 @@ if (_hasPatient and !r_drag_sqf and !r_action and !_inVehicle and !r_player_unco
|
||||
};
|
||||
|
||||
//Repairs
|
||||
if ((_unit isKindOf "AllVehicles") and !(_unit isKindOf "Man")) then {
|
||||
if ((_unit isKindOf "AllVehicles") and !(_unit isKindOf "Man") and !_isDisallowRefuel) then {
|
||||
_type = TypeOf(_unit);
|
||||
_typeVeh = getText(configFile >> "cfgVehicles" >> _type >> "displayName");
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ scriptName "Functions\misc\fn_selfActions.sqf";
|
||||
- Function
|
||||
- [] call fnc_usec_selfActions;
|
||||
************************************************************/
|
||||
private["_isPZombie","_vehicle","_inVehicle","_bag","_classbag","_isWater","_hasAntiB","_hasFuelE","_hasRawMeat","_hasKnife","_hasToolbox","_hasTent","_onLadder","_nearLight","_canPickLight","_canDo","_text","_isHarvested","_isVehicle","_isVehicletype","_isMan","_traderType","_ownerID","_isAnimal","_isDog","_isZombie","_isDestructable","_isTent","_isFuel","_isAlive","_canmove","_Unlock","_lock","_allFixed","_hitpoints","_damage","_part","_cmpt","_color","_string","_handle","_trader_id","_category","_buy","_buy2","_buy3","_buy1","_buy4","_buy5","_cantrader","_cantrader1","_buy6","_zparts1","_zparts2","_zparts3","_zparts4","_metals1","_metals2","_metals4","_metals3","_metals5","_dogHandle","_lieDown","_warn"];
|
||||
private ["_isPZombie","_vehicle","_inVehicle","_bag","_classbag","_isWater","_hasAntiB","_hasFuelE","_hasRawMeat","_hasKnife","_hasToolbox","_onLadder","_nearLight","_canPickLight","_canDo","_text","_isHarvested","_isVehicle","_isVehicletype","_isMan","_traderType","_ownerID","_isAnimal","_isDog","_isZombie","_isDestructable","_isTent","_isFuel","_isAlive","_canmove","_Unlock","_lock","_buy","_dogHandle","_lieDown","_warn","_hastinitem","_allowedDistance","_menu","_menu1","_humanity_logic","_low_high","_cancel","_metals_trader","_traderMenu","_isWreck","_isRemovable","_isDisallowRepair","_rawmeat","_humanity","_speed","_dog","_hasbottleitem","_isAir","_isShip"];
|
||||
|
||||
_vehicle = vehicle player;
|
||||
_isPZombie = player isKindOf "PZombie_VB";
|
||||
@@ -69,6 +69,12 @@ if(_isPZombie) then {
|
||||
if (s_player_pzombiesattack < 0) then {
|
||||
s_player_pzombiesattack = player addAction ["Attack", "\z\addons\dayz_code\actions\pzombie\pz_attack.sqf",cursorTarget, 6, true, false, "",""];
|
||||
};
|
||||
|
||||
if (s_player_pzombiesvision < 0) then {
|
||||
|
||||
player setVariable ["NV", ["OFF", 0.02]];
|
||||
s_player_pzombiesvision = player addAction ["Vision", "\z\addons\dayz_code\actions\pzombie\pz_vision.sqf", [], 0, false, true, "nightVision", "_this == _target"];
|
||||
};
|
||||
|
||||
if (!isNull cursorTarget and (player distance cursorTarget < 3)) then { //Has some kind of target
|
||||
_isAnimal = cursorTarget isKindOf "Animal";
|
||||
@@ -103,6 +109,8 @@ if (!isNull cursorTarget and !_inVehicle and !_isPZombie and (player distance cu
|
||||
_isHarvested = cursorTarget getVariable["meatHarvested",false];
|
||||
_isVehicle = cursorTarget isKindOf "AllVehicles";
|
||||
_isVehicletype = typeOf cursorTarget in ["ATV_US_EP1","ATV_CZ_EP1"];
|
||||
_isnewstorage = typeOf cursorTarget in ["OutHouse_DZ","Wooden_shed_DZ","WoodShack_DZ","StorageShed_DZ"];
|
||||
|
||||
_isMan = cursorTarget isKindOf "Man";
|
||||
_traderType = typeOf cursorTarget;
|
||||
_ownerID = cursorTarget getVariable ["characterID","0"];
|
||||
@@ -111,6 +119,9 @@ if (!isNull cursorTarget and !_inVehicle and !_isPZombie and (player distance cu
|
||||
_isZombie = cursorTarget isKindOf "zZombie_base";
|
||||
_isDestructable = cursorTarget isKindOf "BuiltItems";
|
||||
_isWreck = typeOf cursorTarget in ["SKODAWreck","HMMWVWreck","UralWreck","datsun01Wreck","hiluxWreck","datsun02Wreck","UAZWreck","Land_Misc_Garb_Heap_EP1","Fort_Barricade_EP1","Rubbish2"];
|
||||
_isRemovable = typeOf cursorTarget in ["Fence_corrugated_DZ"];
|
||||
_isDisallowRepair = typeOf cursorTarget in ["M240Nest_DZ"];
|
||||
|
||||
_isTent = cursorTarget isKindOf "TentStorage";
|
||||
_isFuel = false;
|
||||
_isAlive = alive cursorTarget;
|
||||
@@ -133,7 +144,7 @@ if (!isNull cursorTarget and !_inVehicle and !_isPZombie and (player distance cu
|
||||
// diag_log ("OWNERID = " + _ownerID + " CHARID = " + dayz_characterID + " " + str(_ownerID == dayz_characterID));
|
||||
|
||||
//Allow player to delete objects
|
||||
if((_isDestructable or _isWreck) and _hasToolbox and _canDo) then {
|
||||
if((_isDestructable or _isWreck or (_isRemovable and ("ItemCrowbar" in items player))) and _hasToolbox and _canDo) then {
|
||||
if (s_player_deleteBuild < 0) then {
|
||||
s_player_deleteBuild = player addAction [format[localize "str_actions_delete",_text], "\z\addons\dayz_code\actions\remove.sqf",cursorTarget, 1, true, true, "", ""];
|
||||
};
|
||||
@@ -185,7 +196,7 @@ if (!isNull cursorTarget and !_inVehicle and !_isPZombie and (player distance cu
|
||||
};
|
||||
*/
|
||||
|
||||
if((_isVehicle or _isTent or (cursorTarget isKindOf "VaultStorage")) and _isAlive and _canDo and !_isMan) then {
|
||||
if((_isVehicle or _isTent or (cursorTarget isKindOf "VaultStorage") or _isnewstorage) and _isAlive and _canDo and !_isMan) then {
|
||||
if (s_player_checkGear < 0) then {
|
||||
s_player_checkGear = player addAction ["Cargo Check", "\z\addons\dayz_code\actions\cargocheck.sqf",cursorTarget, 1, true, true, "", ""];
|
||||
};
|
||||
@@ -322,7 +333,7 @@ if (!isNull cursorTarget and !_inVehicle and !_isPZombie and (player distance cu
|
||||
|
||||
|
||||
//Repairing Vehicles
|
||||
if ((dayz_myCursorTarget != cursorTarget) and _isVehicle and !_isMan and _hasToolbox and (damage cursorTarget < 1)) then {
|
||||
if ((dayz_myCursorTarget != cursorTarget) and _isVehicle and !_isMan and _hasToolbox and (damage cursorTarget < 1) and !_isDisallowRepair) then {
|
||||
|
||||
if (s_player_repair_crtl < 0) then {
|
||||
|
||||
|
||||
@@ -2888,6 +2888,15 @@ class HeliCrash_No50s: Default {
|
||||
class land_marsh1: Residential {
|
||||
lootPos[] = {{3.76953,-5.73193,-3.95897},{-0.986816,-4.26074,-3.95897},{2.52637,0.376465,-3.95897},{4.78955,2.92969,-3.95897},{4.56543,6.82227,-3.95897},{-2.88184,4.24121,-4.01684}};
|
||||
};
|
||||
class land_molovabud1: Industrial {
|
||||
lootPos[] = {{-2.4458,2.20703,1.27995},{-4.68164,1.95508,1.27995},{-7.92822,6.29199,1.27995},{-1.81055,-1.29199,1.56745}};
|
||||
};
|
||||
class land_f_b1: Industrial {
|
||||
lootPos[] = {{-4.45996,-2.84619,-2.21533},{-1.81152,-5.01123,-2.21533},{-5.32227,-5.21875,-2.21533}};
|
||||
};
|
||||
class land_seb_bouda1: Residential {
|
||||
lootPos[] = {{2.49316,-2.44238,1.13067},{-0.645996,-2.44824,1.13067},{-0.924316,-0.460938,0.573963},{-2.89697,1.9043,0.571716},{2.80566,1.2334,-3.28989},{-2.38672,-0.893555,-3.28989},{-2.7666,2.41699,-3.28989}};
|
||||
};
|
||||
|
||||
|
||||
};
|
||||
|
||||
@@ -75,10 +75,6 @@ if (!isDedicated) then {
|
||||
player_reloadMag = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_reloadMags.sqf";
|
||||
player_loadCrate = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_loadCrate.sqf";
|
||||
player_craftItem = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_craftItem.sqf";
|
||||
player_craftItem1 = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_craftItem1.sqf";
|
||||
player_craftItem2 = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_craftItem2.sqf";
|
||||
player_craftItem3 = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_craftItem3.sqf";
|
||||
player_craftItem4 = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_craftItem4.sqf";
|
||||
player_tentPitch = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\tent_pitch.sqf";
|
||||
player_vaultPitch = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\vault_pitch.sqf";
|
||||
player_drink = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_drink.sqf";
|
||||
|
||||
@@ -231,6 +231,7 @@ dayz_resetSelfActions = {
|
||||
s_player_callzombies = -1;
|
||||
s_player_debuglootpos = -1;
|
||||
s_player_pzombiesattack = -1;
|
||||
s_player_pzombiesvision = -1;
|
||||
s_player_pzombiesfeed = -1;
|
||||
s_player_removeflare = -1;
|
||||
s_player_painkiller = -1;
|
||||
@@ -419,7 +420,7 @@ if(isNil "dayz_oldrefuel") then {
|
||||
dayz_updateObjects = ["Car", "Helicopter", "Motorcycle", "Ship", "TentStorage", "VaultStorage","M240Nest_DZ","OutHouse_DZ","Wooden_shed_DZ","WoodShack_DZ","StorageShed_DZ"];
|
||||
dayz_disallowedVault = ["TentStorage", "BuiltItems"];
|
||||
dayz_reveal = ["AllVehicles","WeaponHolder","TentStorage","VaultStorage","VaultStorageLocked","BuiltItems"];
|
||||
dayz_allowedObjects = ["TentStorage","TentStorageDomed", "VaultStorageLocked", "Hedgehog_DZ", "Sandbag1_DZ","TrapBear","Fort_RazorWire","WoodGate_DZ","Land_HBarrier1_DZ","Fence_corrugated_DZ","M240Nest_DZ","CanvasHut_DZ","ParkBench_DZ","MetalGate_DZ","OutHouse_DZ","Wooden_shed_DZ","WoodShack_DZ","StorageShed_DZ"];
|
||||
dayz_allowedObjects = ["TentStorage","TentStorageDomed", "VaultStorageLocked", "Hedgehog_DZ", "Sandbag1_DZ","TrapBear","Fort_RazorWire","WoodGate_DZ","Land_HBarrier1_DZ","Fence_corrugated_DZ","M240Nest_DZ","CanvasHut_DZ","ParkBench_DZ","MetalGate_DZ","OutHouse_DZ","Wooden_shed_DZ","WoodShack_DZ","StorageShed_DZ","Plastic_Pole_EP1_DZ"];
|
||||
|
||||
dayz_spawnPos = getPosATL player;
|
||||
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
// bleed.sqf
|
||||
|
||||
private ["_id","_unit"];
|
||||
_unit = (_this select 3) select 0;
|
||||
|
||||
_unit setVariable ["USEC_inPain", false, true];
|
||||
|
||||
Reference in New Issue
Block a user