diff --git a/SQF/dayz_code/Configs/CfgLoot/Groups/Buildings/Construction.hpp b/SQF/dayz_code/Configs/CfgLoot/Groups/Buildings/Construction.hpp index ea784e63c..b0826ce84 100644 --- a/SQF/dayz_code/Configs/CfgLoot/Groups/Buildings/Construction.hpp +++ b/SQF/dayz_code/Configs/CfgLoot/Groups/Buildings/Construction.hpp @@ -4,7 +4,8 @@ Construction[] = {Loot_MAGAZINE, 9, ItemPlank}, {Loot_MAGAZINE, 5, ItemStone}, // Used for crafting and vanilla buildables {Loot_MAGAZINE, 8, equip_nails}, - //{Loot_MAGAZINE, 9, equip_metal_sheet_rusted}, +// {Loot_MAGAZINE, 3, ItemScrews}, +// {Loot_MAGAZINE, 9, equip_metal_sheet_rusted}, {Loot_MAGAZINE, 9, equip_metal_sheet}, {Loot_MAGAZINE, 1, equip_lever}, {Loot_MAGAZINE, 1, ItemComboLock}, @@ -25,7 +26,6 @@ Construction[] = {Loot_MAGAZINE, 1, equip_brick}, {Loot_MAGAZINE, 3, equip_duct_tape}, {Loot_MAGAZINE, 2, equip_hose}, -// {Loot_MAGAZINE, 3, ItemScrews}, // {Loot_MAGAZINE, 1, equip_scrapelectronics}, {Loot_MAGAZINE, 2, equip_1inch_metal_pipe}, {Loot_MAGAZINE, 2, equip_2inch_metal_pipe}, diff --git a/SQF/dayz_code/actions/object_upgradebuilding.sqf b/SQF/dayz_code/actions/object_upgradebuilding.sqf index 870a483ed..0565fd596 100644 --- a/SQF/dayz_code/actions/object_upgradebuilding.sqf +++ b/SQF/dayz_code/actions/object_upgradebuilding.sqf @@ -1,17 +1,13 @@ /* - This script is not part of dayz permission must be given to use. r4z0r49@gmail.com or skype me R4Z0R49. - Simple class system to use this script. class Upgrade { requiredTools[] = {"ItemToolbox"}; requiredParts[] = {"equip_crate","PartWoodPile"}; create = "TentStorage1"; }; - - debugged by facoptere@gmail.com */ -private ["_cursorTarget","_type","_class","_requiredTools","_requiredParts","_upgradeType","_producedParts","_randomCreate", +private ["_nearByChoppers","_cursorTarget","_type","_class","_requiredTools","_requiredParts","_upgradeType","_producedParts","_randomCreate", "_upgradeClass","_onLadder","_isWater","_ok","_missing","_upgradeParts","_dis","_characterID","_objectID","_objectUID", "_ownerArray","_ownerPasscode","_dir","_vector","_object","_puid","_clanArray","_wh","_variables"]; @@ -23,6 +19,9 @@ if ((isNil "_cursorTarget") or {(isNull _cursorTarget)}) then { }; if (isNull _cursorTarget) exitWith {}; +_nearByChoppers = _cursorTarget nearObjects ["Helicopter", 10]; +if (count _nearByChoppers > 1) exitwith { localize "str_upgradevehctooClose" call dayz_rollingMessages; }; + _type = typeof _cursorTarget; _class = configFile >> "CfgVehicles" >> _type; _requiredTools = getArray (_class >> "Upgrade" >> "requiredTools"); diff --git a/SQF/dayz_code/compile/fence_handleDam.sqf b/SQF/dayz_code/compile/fence_handleDam.sqf index b4791d7b2..d5f10e7af 100644 --- a/SQF/dayz_code/compile/fence_handleDam.sqf +++ b/SQF/dayz_code/compile/fence_handleDam.sqf @@ -23,7 +23,7 @@ Metal Defaults - [Object,[High Explosive(0.5),Medium Explosive(0.25),Melee damag _damage = switch (1==1) do { case (((_this select 0) select 4) in ["PipeBomb"]): { (((_this select 0) select 1) select 0) }; //0.5 High explosive case (((_this select 0) select 4) in ["explosive_bolt"]): { (((_this select 0) select 1) select 1) }; //0.25 Medium explosive, maybe grenades and other such items. - case (((_this select 0) select 4) in ["Hatchet_Swing_Ammo","Crowbar_Swing_Ammo","Machete_Swing_Ammo"]): { (((_this select 0) select 2) + random(0.05) }; //0.00001 Melee damage, + case (((_this select 0) select 4) in ["Hatchet_Swing_Ammo","Crowbar_Swing_Ammo","Machete_Swing_Ammo"]): { ((_this select 0) select 2) }; //0.00001 Melee damage, //default { 0 }; }; @@ -75,10 +75,13 @@ _obj = ((_this select 0) select 0); _damage = switch (1==1) do { case (((_this select 0) select 4) in ["PipeBomb"]): { ((_this select 1) select 0) }; //0.5 High explosive case (((_this select 0) select 4) in ["explosive_bolt"]): { ((_this select 1) select 1) }; //0.25 Medium explosive, maybe grenades and other such items. - case (((_this select 0) select 4) in ["Hatchet_Swing_Ammo","Crowbar_Swing_Ammo","Machete_Swing_Ammo"]): { ((_this select 1) select 2) + random(0.0005) }; //0.00001 Melee damage, + case (((_this select 0) select 4) in ["Hatchet_Swing_Ammo","Crowbar_Swing_Ammo","Machete_Swing_Ammo"]): { ((_this select 1) select 2) }; //0.00001 Melee damage, //default { 0 }; }; +//Just incase damage from melee is 0 (higher tier fences have no melee damage) we return false +if (_damage == 0) then { _damage = false; }; + /* //Server running or client if (isServer) then { diff --git a/SQF/dayz_code/stringtable.xml b/SQF/dayz_code/stringtable.xml index b157739b9..0ab5aa5b9 100644 --- a/SQF/dayz_code/stringtable.xml +++ b/SQF/dayz_code/stringtable.xml @@ -1730,6 +1730,9 @@ Demontáž abbauen + + Unable to upgrade, too close to a vehicle. + Build %1 Построить %1