mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2026-02-23 00:20:50 +03:00
Fix undefined color error in repair_vehicle.sqf
Same color error as f92b751 .
Also same issue in salvage_vehicle.sqf as described in #1828
Added setVariable exceptions for tank hit points.
This commit is contained in:
@@ -17,15 +17,18 @@ _hitpoints = _vehicle call vehicle_getHitpoints;
|
||||
|
||||
_configVeh = configFile >> "cfgVehicles" >> "RepairParts" >> _x;
|
||||
_part = getText(_configVeh >> "part");
|
||||
if ((isNil "_part") || (_part == "")) then { _part = "PartGeneric"; };
|
||||
if (_part == "") then { _part = "PartGeneric"; };
|
||||
|
||||
// get every damaged part no matter how tiny damage is!
|
||||
_damagePercent = str(round(_damage * 100))+"% Damage";
|
||||
if (_damage > 0) then {
|
||||
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
|
||||
if ((_damage >= 0.76) and (_damage <= 1)) then {_color = "color='#ff0000'";}; //red
|
||||
_color = switch true do {
|
||||
case (_damage >= 0 && _damage <= 0.25): {"color='#00ff00'"}; //green
|
||||
case (_damage > 0.25 && _damage <= 0.50): {"color='#ffff00'"}; //yellow
|
||||
case (_damage > 0.50 && _damage <= 0.75): {"color='#ff8800'"}; //orange
|
||||
case (_damage > 0.75 && _damage <= 1): {"color='#ff0000'"}; //red
|
||||
};
|
||||
|
||||
_cmpt = format[localize "str_actions_medical_09",_cmpt,_damagePercent];
|
||||
|
||||
_string = format["<t %1>%2</t>",_color,_cmpt]; //Repair - Part
|
||||
|
||||
@@ -52,7 +52,7 @@ if (_is6WheelType) then {
|
||||
|
||||
_configVeh = configFile >> "cfgVehicles" >> "RepairParts" >> _x;
|
||||
_part = getText(_configVeh >> "part");
|
||||
if (isNil "_part") then { _part = "PartGeneric"; };
|
||||
if (_part == "") then { _part = "PartGeneric"; };
|
||||
|
||||
//get every damaged part no matter how tiny damage is!
|
||||
_damagePercent = str(round(_damage * 100))+"% Damage";
|
||||
|
||||
Reference in New Issue
Block a user