mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
filter hitpoints without selections, misc
This commit is contained in:
parent
1c90e2bb33
commit
b16267539c
@ -4,8 +4,9 @@
|
||||
class ACE_MainActions { \
|
||||
class GVAR(Repair) { \
|
||||
displayName = "$STR_ACE_Repair_Repair"; \
|
||||
condition = QUOTE([ARR_2(_player, _target)] call DFUNC(actionCanRepair)); \
|
||||
statement = QUOTE([ARR_2(_player, _target)] call DFUNC(actionRepair);); \
|
||||
condition = ""; \
|
||||
statement = "'show a hint with the hitpart damage'"; \
|
||||
runOnHover = 1; \
|
||||
showDisabled = 0; \
|
||||
priority = 2; \
|
||||
icon = "\A3\ui_f\data\igui\cfg\actions\repair_ca.paa"; \
|
||||
|
@ -2,8 +2,6 @@
|
||||
|
||||
ADDON = false;
|
||||
|
||||
PREP(actionCanRepair);
|
||||
PREP(actionRepair);
|
||||
PREP(addRepairActions);
|
||||
PREP(doRepair);
|
||||
PREP(getWheelHitPointsWithSelections);
|
||||
|
@ -1 +0,0 @@
|
||||
true
|
@ -1 +0,0 @@
|
||||
systemChat str _this
|
@ -26,7 +26,7 @@ if (_type in _initializedClasses) exitWith {};
|
||||
|
||||
// get all hitpoints
|
||||
private "_hitPoints";
|
||||
_hitPoints = [_vehicle] call EFUNC(common,getHitPoints);
|
||||
_hitPoints = [_vehicle] call EFUNC(common,getHitPointsWithSelections) select 0;
|
||||
|
||||
// get hitpoints of wheels with their selections
|
||||
private ["_wheelHitPointsWithSelections", "_wheelHitPoints", "_wheelHitPointSelections"];
|
||||
@ -88,6 +88,9 @@ _wheelHitPointSelections = _wheelHitPointsWithSelections select 1;
|
||||
[_type, 0, [_nameReplace], _nameReplace, _icon, _selection, _statement_replace, _condition_replace, 2] call EFUNC(interact_menu,addClassAction);
|
||||
|
||||
} else {
|
||||
// exit if the hitpoint is in the blacklist, e.g. glasses
|
||||
if (_x in IGNORED_HITPOINTS) exitWith {};
|
||||
|
||||
// add misc repair action
|
||||
|
||||
private ["_name", "_icon", "_selection"];
|
||||
|
@ -27,7 +27,7 @@ private ["_damage", "_time"];
|
||||
|
||||
_damage = _vehicle getHitPointDamage _hitPoint;
|
||||
|
||||
_time = 5 * _damage;
|
||||
_time = 5 + 10 * _damage;
|
||||
|
||||
// get string of the hitpoint
|
||||
private "_text";
|
||||
@ -41,3 +41,6 @@ if (isLocalized _text) then {
|
||||
|
||||
// open the loading bar
|
||||
[_time, [_vehicle, _hitPoint], DFUNC(doRepair), DFUNC(doRepair), _text, {true}, []] call EFUNC(common,progressBar);
|
||||
|
||||
// do animation
|
||||
[_unit] call EFUNC(common,goKneeling);
|
||||
|
@ -10,3 +10,6 @@
|
||||
#endif
|
||||
|
||||
#include "\z\ace\addons\main\script_macros.hpp"
|
||||
|
||||
|
||||
#define IGNORED_HITPOINTS ["HitGlass1","HitGlass2","HitGlass3","HitGlass4","HitGlass5","HitGlass6","HitGlass7","HitGlass8","HitGlass9","HitGlass10","HitGlass11","HitGlass12","HitGlass13","HitGlass14","HitGlass15","HitRGlass","HitLGlass"]
|
||||
|
Loading…
Reference in New Issue
Block a user