2016-09-24 20:15:02 +00:00
|
|
|
/*
|
|
|
|
* Author: PabstMirror
|
2017-08-10 11:32:55 +00:00
|
|
|
* Modifies the base interaction point for repair items to show it's current damage.
|
2016-09-24 20:15:02 +00:00
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* 0: Target <OBJECT>
|
|
|
|
* 1: Player <OBJECT>
|
|
|
|
* 2: Args <Any>
|
|
|
|
* 3: Action Data <ARRAY>
|
|
|
|
*
|
|
|
|
* Return Value:
|
2017-06-08 13:31:51 +00:00
|
|
|
* None
|
2016-09-24 20:15:02 +00:00
|
|
|
*
|
|
|
|
* Example:
|
2017-08-10 11:32:55 +00:00
|
|
|
* [cursorObject, ace_player, [], []] call ace_repair_fnc_modifyInteraction;
|
2016-09-24 20:15:02 +00:00
|
|
|
*
|
|
|
|
* Public: No
|
|
|
|
*/
|
|
|
|
#include "script_component.hpp"
|
|
|
|
|
2018-04-19 17:31:00 +00:00
|
|
|
params ["_target", "", "", "_actionData"];
|
2016-09-24 20:15:02 +00:00
|
|
|
|
2017-06-08 13:31:51 +00:00
|
|
|
// Interaction dots numbered 0..8, white to red.
|
2016-09-24 20:15:02 +00:00
|
|
|
// 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])];
|
2018-04-19 17:31:00 +00:00
|
|
|
TRACE_2("modifyInteraction",_target,_fileName);
|
2016-09-24 20:15:02 +00:00
|
|
|
_actionData set [2, _fileName];
|