From e5e212bbc2fcffddbaa3a9b8546e66120c1ac035 Mon Sep 17 00:00:00 2001 From: ebaydayz Date: Fri, 9 Sep 2016 12:58:41 -0400 Subject: [PATCH] Add comment about salvage vehicle work around --- SQF/dayz_code/actions/repair_vehicle.sqf | 3 ++- SQF/dayz_code/actions/salvage.sqf | 2 +- SQF/dayz_code/actions/salvage_vehicle.sqf | 5 +++-- SQF/dayz_code/compile/fn_selfActions.sqf | 2 +- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/SQF/dayz_code/actions/repair_vehicle.sqf b/SQF/dayz_code/actions/repair_vehicle.sqf index b0edd0bff..a2ddf688d 100644 --- a/SQF/dayz_code/actions/repair_vehicle.sqf +++ b/SQF/dayz_code/actions/repair_vehicle.sqf @@ -36,7 +36,8 @@ _hitpoints = _vehicle call vehicle_getHitpoints; } forEach _hitpoints; if (count _hitpoints > 0) then { + // Localized in A2OA\Expansion\dta\languagecore _cancel = dayz_myCursorTarget addAction [localize "str_action_cancel_action", "\z\addons\dayz_code\actions\repair_cancel.sqf","repair", 0, true, false]; s_player_repairActions set [count s_player_repairActions,_cancel]; s_player_repair_crtl = 1; -}; +}; \ No newline at end of file diff --git a/SQF/dayz_code/actions/salvage.sqf b/SQF/dayz_code/actions/salvage.sqf index 49087bd97..acd6cc084 100644 --- a/SQF/dayz_code/actions/salvage.sqf +++ b/SQF/dayz_code/actions/salvage.sqf @@ -47,7 +47,7 @@ if (_hasToolbox) then { //Remove melee magazines (BIS_fnc_invAdd fix) {player removeMagazines _x} count MeleeMagazines; _damage = [_vehicle,_hitpoint] call object_getHit; - if (_damage < 1 && {_damage > 0}) then { + if (_damage < 1 && {_damage > 0}) then { //Tempfix for issue where certain hitpoints on some vehicles do not get damaged and allow infinite removal _BreakableParts = ["HitGlass1","HitGlass2","HitGlass3","HitGlass4","HitGlass5","HitGlass6","HitLGlass","HitRGlass","HitEngine","HitFuel","HitHRotor"]; if (_hitpoint in _BreakableParts) then { if ((random 1) < (_damage * 0.9)) then { //max 90% chance to break diff --git a/SQF/dayz_code/actions/salvage_vehicle.sqf b/SQF/dayz_code/actions/salvage_vehicle.sqf index 3209d1a91..0092686d8 100644 --- a/SQF/dayz_code/actions/salvage_vehicle.sqf +++ b/SQF/dayz_code/actions/salvage_vehicle.sqf @@ -55,7 +55,7 @@ if (_is6WheelType) then { //get every damaged part no matter how tiny damage is! _damagePercent = str(round(_damage * 100))+"% Damage"; - if (_damage < 1 && {_damage > 0}) then { + if (_damage < 1 && {_damage > 0}) then { //Tempfix for issue where certain hitpoints on some vehicles do not get damaged and allow infinite removal if ((_damage >= 0) and (_damage <= 0.25)) then {_color = "color='#00ff00'";}; //green if ((_damage >= 0.26) and (_damage <= 0.50)) then {_color = "color='#ffff00'";}; //yellow if ((_damage >= 0.51) and (_damage <= 0.75)) then {_color = "color='#ff8800'";}; //orange @@ -69,7 +69,8 @@ if (_is6WheelType) then { } forEach _hitpoints; if (count _hitpoints > 0 ) then { + // Localized in A2OA\Expansion\dta\languagecore _cancel = dayz_myCursorTarget addAction [localize "str_action_cancel_action", "\z\addons\dayz_code\actions\repair_cancel.sqf","repair", 0, true, false]; s_player_repairActions set [count s_player_repairActions,_cancel]; s_player_repair_crtl = 1; -}; +}; \ No newline at end of file diff --git a/SQF/dayz_code/compile/fn_selfActions.sqf b/SQF/dayz_code/compile/fn_selfActions.sqf index df74a8cc0..60779e902 100644 --- a/SQF/dayz_code/compile/fn_selfActions.sqf +++ b/SQF/dayz_code/compile/fn_selfActions.sqf @@ -553,7 +553,7 @@ if (!isNull _cursorTarget && !_inVehicle && !_isPZombie && (player distance _cur if (s_player_repair_crtl < 0) then { dayz_myCursorTarget = _cursorTarget; _menu = dayz_myCursorTarget addAction [localize "str_actions_repairveh", "\z\addons\dayz_code\actions\repair_vehicle.sqf",_cursorTarget, 0, true, false]; - if (!_isBicycle) then { + if (!_isBicycle) then { //Bike wheels should not give full size tires. Also model does not update to show removed wheels. 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];