ACE3/addons/medical_feedback/functions/fnc_effectBloodVolume.sqf
10Dozen b30f023c04
Adds Icon option for Low blood volume at Medical Feedback (#7507)
* Adds Icon option for Low blood volume at Medical Feedback

- Adds setting to switch Low blood volume effect with 3 options: Color fading, Icon, Color fading + Icon
- Adds icon to UI on low blood
- Adds icon PAA files

* Review fixes

- Added ACE tags to added controls
- Added defines for GUI position/size
- Added missing newline at EOF
- Updated fnc_effectBloodVolumeIcon (removed usage of uiNamespace and minor changes)
- CBA_fnc_addSetting is now used to init settings
- Icon path macro updated to return formatted path

* Review fixes vol.2

- Removed `disableSerialization` and added default value for indicator control and not null checks to effectBVI function
- Removed defines from RscInGameUI and used a3 defines instead
- Changed formatting of macroses

* Review fixes vol.3

- Fixed exec code of BV setting
- Removed ctrlCommit from eBVI function
- Changed initEffects function to be able to update pain and BV effects only
- Changed control name from `BloodVolumeInfoIndicator` to `bloodVolumeIndicator`
- Various formatting tweaks (spaces/lines/uppercase/periods)

* Review fixed vol.4

- Remove extra checks from eBVI func
- Restores contol's onLoad script using ARR_2(QQGVAR())
2020-02-22 14:42:59 -06:00

29 lines
653 B
Plaintext

#include "script_component.hpp"
/*
* Author: BaerMitUmlaut
* Handles the blood volume effect.
*
* Arguments:
* 0: Enable <BOOL>
* 1: Intensity <NUMBER>
*
* Return Value:
* None
*
* Example:
* [false, 0.5] call ace_medical_feedback_fnc_effectBloodVolume
*
* Public: No
*/
params ["_enable", "_intensity"];
if (isNil QGVAR(ppBloodVolume)) exitWith {};
if ((!_enable) || {_intensity == 0}) exitWith {
GVAR(ppBloodVolume) ppEffectEnable false;
};
GVAR(ppBloodVolume) ppEffectEnable true;
GVAR(ppBloodVolume) ppEffectAdjust [1, 1, 0, [0, 0, 0, 0], [1, 1, 1, 1 - _intensity], [0.2, 0.2, 0.2, 0]];
GVAR(ppBloodVolume) ppEffectCommit 1;