+ formatting for damage percentage for repair and salvage.
+ Chance to break part when salvaging damaged parts.
+ Potential fix for purchased vehicle damage handler.
+ added check when cracking vault to exit when toolbox is broken
+ Potential fix for glitched extra crack vault options and no delay.
+ 1.7.5.1
This commit is contained in:
vbawol
2013-02-05 07:56:39 -06:00
parent d60007afc9
commit ca32bcbf71
14 changed files with 184 additions and 50 deletions

View File

@@ -43,13 +43,17 @@ _hitpoints = _vehicle call vehicle_getHitpoints;
};
// allow removal of any lightly damaged parts
if (_damage < 0.25) then {
if (_damage < 1) then {
// Do not allow removal of engine or fueltanks
if( _part == "PartGlass" or _part == "PartWheel" ) then {
_color = "color='#ff0000'"; //red
_string = format["<t %2>Remove%1</t>",_cmpt,_color]; //Remove - Part
_color = "color='#ffff00'"; //yellow
if (_damage >= 0.5) then {_color = "color='#ff8800'";}; //orange
if (_damage >= 0.9) then {_color = "color='#ff0000'";}; //red
_percent = round(_damage*100);
_string = format["<t %2>Remove%1 (%3%)</t>",_cmpt,_color,_percent]; //Remove - Part
_handle = dayz_myCursorTarget addAction [_string, "\z\addons\dayz_code\actions\salvage.sqf",[_vehicle,_part,_x], 0, false, true, "",""];
s_player_repairActions set [count s_player_repairActions,_handle];
};