Disallow salvage in DZE_SafeZonePosArray locations

by request of JohnnyBravo666 on the epoch forums
This commit is contained in:
icomrade
2017-01-18 16:43:23 -05:00
parent 0d2f96b299
commit 490fb90303
4 changed files with 17 additions and 2 deletions

View File

@@ -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

View File

@@ -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;

View File

@@ -1177,6 +1177,15 @@
<French>Vous devez avoir une boîte à outils pour retirer %1.</French>
<German>Du brauchst einen Werkzeugkasten, um %1 abzubauen.</German>
</Key>
<Key ID="str_salvage_safezone">
<English>You cannot salvage parts in a safe zone</English>
<Spanish>No se pueden recuperar piezas en una zona segura</Spanish>
<Russian>Вы не можете спасти детали в безопасной зоне</Russian>
<French>Vous ne pouvez pas récupérer des pièces dans une zone sécurisée</French>
<Czech>Nemůžete zachránit díly v bezpečné zóně</Czech>
<German>Sie können Teile in einer sicheren Zone nicht retten</German>
<Dutch>Je kunt niet delen redden in een veilige zone</Dutch>
</Key>
<Key ID="str_fishing_failed">
<English>You didn&apos;t catch anything.</English>
<Russian>Вы ничего не поймали.</Russian>

View File

@@ -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 {