-
Notifications
You must be signed in to change notification settings - Fork 740
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change "Remove Wheel" Action's Color Based on Damage (#5415)
* Change repair action's colors on wheels * Add dots.
- Loading branch information
Showing
16 changed files
with
41 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
addons/repair/functions/fnc_modifySelectionInteraction.sqf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/* | ||
* Author: 654wak654 | ||
* Modifies interaction color of vehicle selection to show it's current damage. | ||
* | ||
* Arguments: | ||
* 0: Target <OBJECT> | ||
* 1: Player <OBJECT> | ||
* 2: Args <Any> | ||
* 3: Action Data <ARRAY> | ||
* | ||
* Return Value: | ||
* None | ||
* | ||
* Example: | ||
* [cursorObject, ace_player, [], []] call ace_repair_fnc_modifySelectionInteraction; | ||
* | ||
* Public: No | ||
*/ | ||
#include "script_component.hpp" | ||
|
||
params ["_target", "_player", "_args", "_actionData"]; | ||
TRACE_4("params",_target,_player,_args,_actionData); | ||
|
||
// Interaction wrenches 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\repair_%1_ca.paa), | ||
ceil (linearConversion [0, 1, _target getHitPointDamage (_args select 0), 0, 8, true]) | ||
]; | ||
|
||
_actionData set [2, _fileName]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.