mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Show damage on repair items interaction point (#4448)
* Show damage on repair items interaction point * Fix dot size * Change scaling
This commit is contained in:
parent
bc520c7fe7
commit
9451716a44
@ -313,6 +313,11 @@ class CfgVehicles {
|
||||
class EventHandlers {
|
||||
class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers_base {};
|
||||
};
|
||||
class ACE_Actions {
|
||||
class ACE_MainActions {
|
||||
modifierFunction = QUOTE(_this call FUNC(modifyInteraction));
|
||||
};
|
||||
};
|
||||
|
||||
accuracy = 0.2;
|
||||
vehicleClass = "ACE_Logistics_Items";
|
||||
|
@ -23,6 +23,7 @@ PREP(isEngineer);
|
||||
PREP(isInRepairFacility);
|
||||
PREP(isNearRepairVehicle);
|
||||
PREP(isRepairVehicle);
|
||||
PREP(modifyInteraction);
|
||||
PREP(moduleAddSpareParts);
|
||||
PREP(moduleAssignEngineer);
|
||||
PREP(moduleAssignRepairVehicle);
|
||||
|
28
addons/repair/functions/fnc_modifyInteraction.sqf
Normal file
28
addons/repair/functions/fnc_modifyInteraction.sqf
Normal file
@ -0,0 +1,28 @@
|
||||
/*
|
||||
* Author: PabstMirror
|
||||
* Modifies the base interaction point for repair items to show it's current damage
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Target <OBJECT>
|
||||
* 1: Player <OBJECT>
|
||||
* 2: Args <Any>
|
||||
* 3: Action Data <ARRAY>
|
||||
*
|
||||
* Return Value:
|
||||
* Nothing
|
||||
*
|
||||
* Example:
|
||||
* [cursorObject, player, [], []] call ace_repair_fnc_modifyInteraction;
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_target", "_player", "_args", "_actionData"];
|
||||
TRACE_4("params",_target,_player,_args,_actionData);
|
||||
|
||||
// Interaction dots numbered 0..8, white to red.
|
||||
// Convert damage to number (rounding up), so that even slight damage can bee seen
|
||||
|
||||
private _fileName = format [QPATHTOF(ui\damage_%1_ca.paa), ceil (linearConversion [0, 1, damage _target, 0, 8, true])];
|
||||
_actionData set [2, _fileName];
|
BIN
addons/repair/ui/damage_0_ca.paa
Normal file
BIN
addons/repair/ui/damage_0_ca.paa
Normal file
Binary file not shown.
BIN
addons/repair/ui/damage_1_ca.paa
Normal file
BIN
addons/repair/ui/damage_1_ca.paa
Normal file
Binary file not shown.
BIN
addons/repair/ui/damage_2_ca.paa
Normal file
BIN
addons/repair/ui/damage_2_ca.paa
Normal file
Binary file not shown.
BIN
addons/repair/ui/damage_3_ca.paa
Normal file
BIN
addons/repair/ui/damage_3_ca.paa
Normal file
Binary file not shown.
BIN
addons/repair/ui/damage_4_ca.paa
Normal file
BIN
addons/repair/ui/damage_4_ca.paa
Normal file
Binary file not shown.
BIN
addons/repair/ui/damage_5_ca.paa
Normal file
BIN
addons/repair/ui/damage_5_ca.paa
Normal file
Binary file not shown.
BIN
addons/repair/ui/damage_6_ca.paa
Normal file
BIN
addons/repair/ui/damage_6_ca.paa
Normal file
Binary file not shown.
BIN
addons/repair/ui/damage_7_ca.paa
Normal file
BIN
addons/repair/ui/damage_7_ca.paa
Normal file
Binary file not shown.
BIN
addons/repair/ui/damage_8_ca.paa
Normal file
BIN
addons/repair/ui/damage_8_ca.paa
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user