mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
d6faac5881
* Initial IR flashlight tests * More experiments * Rewrite using engine IR lights * Rework ranges, fix bugs, add docs * Fix uncommented DISABLE_COMPILE_CACHE Co-authored-by: jonpas <jonpas33@gmail.com> * Markdown fixes Co-authored-by: jonpas <jonpas33@gmail.com> * Markdown fixes Co-authored-by: jonpas <jonpas33@gmail.com> * Markdown fixes Co-authored-by: jonpas <jonpas33@gmail.com> * Markdown fixes Co-authored-by: jonpas <jonpas33@gmail.com> * Markdown fixes Co-authored-by: jonpas <jonpas33@gmail.com> * Use baseWeapon instead of custom property * Add baseWeapon to SPIR --------- Co-authored-by: jonpas <jonpas33@gmail.com>
31 lines
921 B
Plaintext
31 lines
921 B
Plaintext
#include "script_component.hpp"
|
|
|
|
[] call FUNC(initItemContextMenu);
|
|
|
|
addUserActionEventHandler ["headlights", "Deactivate", FUNC(onLightToggled)];
|
|
|
|
["ACE3 Equipment", QGVAR(hold), LLSTRING(MomentarySwitch), {
|
|
ACE_player action ["GunLightOn", ACE_player];
|
|
ACE_player action ["IRLaserOn", ACE_player];
|
|
[] call FUNC(onLightToggled);
|
|
true
|
|
}, {
|
|
ACE_player action ["GunLightOff", ACE_player];
|
|
ACE_player action ["IRLaserOff", ACE_player];
|
|
[] call FUNC(onLightToggled);
|
|
true
|
|
}] call CBA_fnc_addKeybind;
|
|
|
|
["CBA_attachmentSwitched", {
|
|
params ["", "", "_item"];
|
|
|
|
private _substr = _item select [0, 8];
|
|
if (
|
|
ACE_player getVariable [QGVAR(isTurnedOn), false]
|
|
&& {_substr == "ACE_SPIR" || {_substr == "ACE_DBAL"}}
|
|
) then {
|
|
ACE_player action ["GunLightOn", ACE_player];
|
|
ACE_player action ["IRLaserOn", ACE_player];
|
|
};
|
|
}] call CBA_fnc_addEventHandler;
|