mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 12:12:34 +03:00
Toggle for salvaging from locked vehicles (#1757)
* Toggle for salvaging from locked vehicles
This adds the ability to remove salvaging from locked vehicles which
helps avoid griefing
Fixes a spelling mistake for a localization string
Makes it possible to salvage 0% damaged items again, this was disabled
as per
3292d84b85
I've had this running on my server for a year or so with no issues (not
that it doesn't affect it, i've just never seen it)
* Toggle salvagable locked vehicles changers
@ebaydayz fixed
This commit is contained in:
@@ -552,10 +552,19 @@ if (!isNull _cursorTarget && !_inVehicle && !_isPZombie && (player distance _cur
|
||||
if (_isVehicle && {!_isMan} && {dayz_myCursorTarget != _cursorTarget} && {_hasToolbox} && {damage _cursorTarget < 1} && {_typeOfCursorTarget != "M240Nest_DZ"}) then {
|
||||
if (s_player_repair_crtl < 0) then {
|
||||
dayz_myCursorTarget = _cursorTarget;
|
||||
_menu = dayz_myCursorTarget addAction [localize "str_actions_rapairveh", "\z\addons\dayz_code\actions\repair_vehicle.sqf",_cursorTarget, 0, true, false];
|
||||
_menu1 = dayz_myCursorTarget addAction [localize "str_actions_salvageveh", "\z\addons\dayz_code\actions\salvage_vehicle.sqf",_cursorTarget, 0, true, false];
|
||||
_menu = dayz_myCursorTarget addAction [localize "str_actions_repairveh", "\z\addons\dayz_code\actions\repair_vehicle.sqf",_cursorTarget, 0, true, false];
|
||||
if (!_isBicycle) then {
|
||||
if (!DZE_salvageLocked) then {
|
||||
if (!locked _cursorTarget) then {
|
||||
_menu1 = dayz_myCursorTarget addAction [localize "str_actions_salvageveh", "\z\addons\dayz_code\actions\salvage_vehicle.sqf",_cursorTarget, 0, true, false];
|
||||
s_player_repairActions set [count s_player_repairActions,_menu1];
|
||||
};
|
||||
} else {
|
||||
_menu1 = dayz_myCursorTarget addAction [localize "str_actions_salvageveh", "\z\addons\dayz_code\actions\salvage_vehicle.sqf",_cursorTarget, 0, true, false];
|
||||
s_player_repairActions set [count s_player_repairActions,_menu1];
|
||||
};
|
||||
};
|
||||
s_player_repairActions set [count s_player_repairActions,_menu];
|
||||
s_player_repairActions set [count s_player_repairActions,_menu1];
|
||||
s_player_repair_crtl = 1;
|
||||
} else {
|
||||
{dayz_myCursorTarget removeAction _x} forEach s_player_repairActions;
|
||||
|
||||
Reference in New Issue
Block a user