From 490fb9030304fd1bcd03ee6fc2448880e99edfae Mon Sep 17 00:00:00 2001 From: icomrade Date: Wed, 18 Jan 2017 16:43:23 -0500 Subject: [PATCH] Disallow salvage in DZE_SafeZonePosArray locations by request of JohnnyBravo666 on the epoch forums --- CHANGE LOG 1.0.6.1.txt | 1 + SQF/dayz_code/actions/salvage.sqf | 7 ++++++- SQF/dayz_code/stringtable.xml | 9 +++++++++ SQF/dayz_code/system/BIS_Effects/init.sqf | 2 +- 4 files changed, 17 insertions(+), 2 deletions(-) diff --git a/CHANGE LOG 1.0.6.1.txt b/CHANGE LOG 1.0.6.1.txt index f92c70d81..32e669db9 100644 --- a/CHANGE LOG 1.0.6.1.txt +++ b/CHANGE LOG 1.0.6.1.txt @@ -15,6 +15,7 @@ [CHANGED] Added shadow to dayz_rollingMessages white text so it is visible on light colored backgrounds and looks like cutText. [CHANGED] Reverted pain to old violent shaking effect instead of subtle gun sway. #1839 @AirwavesMan @schwanzkopfhegel [CHANGED] Reverted lobby and player list background colors to A2OA default instead of dark grey +[CHANGED] Salvage vehicle actions are no longer allowed in positions defined in DZE_SafeZonePosArray [FIXED] Wrong texture for z_hunter zombie. #1805 @schwanzkopfhegel @ebayShopper [FIXED] Refuel with generator at gas station not working. #1806 @Helios27 @ebayShopper diff --git a/SQF/dayz_code/actions/salvage.sqf b/SQF/dayz_code/actions/salvage.sqf index cdbe3cb8a..e6b943edf 100644 --- a/SQF/dayz_code/actions/salvage.sqf +++ b/SQF/dayz_code/actions/salvage.sqf @@ -1,4 +1,4 @@ -private ["_array","_vehicle","_part","_hitpoint","_type","_isOK","_brokenPart","_started","_finished","_hasToolbox","_nameType","_namePart","_animState","_isMedic","_damage","_BreakableParts","_selection","_wpn","_classname","_ismelee"]; +private ["_array","_vehicle","_part","_hitpoint","_type","_isOK","_brokenPart","_cancel","_started","_finished","_hasToolbox","_nameType","_namePart","_animState","_isMedic","_damage","_BreakableParts","_selection","_wpn","_classname","_ismelee"]; if (dayz_salvageInProgress) exitWith { localize "str_salvage_inprogress" call dayz_rollingMessages; }; dayz_salvageInProgress = true; @@ -13,6 +13,7 @@ _brokenPart = false; _started = false; _finished = false; _hasToolbox = "ItemToolbox" in items player; +_cancel = false; _nameType = getText(configFile >> "cfgVehicles" >> _type >> "displayName"); _namePart = getText(configFile >> "cfgMagazines" >> _part >> "displayName"); @@ -22,6 +23,10 @@ s_player_repairActions = []; s_player_repair_crtl = 1; if (_hasToolbox) then { + { + if ((_vehicle distance (_x select 0)) < (_x select 1)) exitWith {_cancel = true;}; + } count DZE_SafeZonePosArray; + if (_cancel) exitWith { (localize "str_salvage_safezone") call dayz_rollingMessages;}; player playActionNow "Medic"; [player,"repair",0,false] call dayz_zombieSpeak; [player,50,true,(getPosATL player)] call player_alertZombies; diff --git a/SQF/dayz_code/stringtable.xml b/SQF/dayz_code/stringtable.xml index 1944c73b1..4966251c6 100644 --- a/SQF/dayz_code/stringtable.xml +++ b/SQF/dayz_code/stringtable.xml @@ -1177,6 +1177,15 @@ Vous devez avoir une boîte à outils pour retirer %1. Du brauchst einen Werkzeugkasten, um %1 abzubauen. + + You cannot salvage parts in a safe zone + No se pueden recuperar piezas en una zona segura + Вы не можете спасти детали в безопасной зоне + Vous ne pouvez pas récupérer des pièces dans une zone sécurisée + Nemůžete zachránit díly v bezpečné zóně + Sie können Teile in einer sicheren Zone nicht retten + Je kunt niet delen redden in een veilige zone + You didn't catch anything. Вы ничего не поймали. diff --git a/SQF/dayz_code/system/BIS_Effects/init.sqf b/SQF/dayz_code/system/BIS_Effects/init.sqf index 087de2f8f..f7488bf44 100644 --- a/SQF/dayz_code/system/BIS_Effects/init.sqf +++ b/SQF/dayz_code/system/BIS_Effects/init.sqf @@ -29,7 +29,7 @@ BIS_Effects_startEvent = { if (((vehicle player) == (_this select 0)) && {(vehicle player) != player} && {player in (crew (_This select 0))}) then { _cancel = false; { - if ((isInTraderCity || !canbuild) && {(player distance (_x select 0)) < (_x select 1)}) then {_cancel = true;}; + if ((isInTraderCity || !canbuild) && {(player distance (_x select 0)) < (_x select 1)}) exitWith {_cancel = true;}; } count DZE_SafeZonePosArray; player action ["getOut", (_this select 0)]; if (!_cancel && {!((_this select 0) iskindof "car")}) then {