mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Laserpointer - Block switching to unsupported visible lasers (#9416)
This commit is contained in:
parent
51e6134b71
commit
0b695be841
@ -30,8 +30,6 @@ if (_lightSource isKindOf "CAManBase") then {
|
||||
|
||||
private _flashlight = (_lightSource weaponAccessories _weapon) select 1;
|
||||
|
||||
if (getNumber (configFile >> "CfgWeapons" >> _flashlight >> "ACE_laserpointer") > 0) exitWith {}; // Red = 1, Green = 2
|
||||
|
||||
private _properties = [[_flashlight], FUNC(getLightPropertiesWeapon), uiNamespace, format [QEGVAR(cache,%1_%2), QUOTE(DFUNC(getLightPropertiesWeapon)), _flashlight], 1E11] call FUNC(cachedCall);
|
||||
//_properties = [_flashlight] call FUNC(getLightPropertiesWeapon);
|
||||
|
||||
|
@ -1,3 +1,8 @@
|
||||
class Extended_PreStart_EventHandlers {
|
||||
class ADDON {
|
||||
init = QUOTE(call COMPILE_SCRIPT(XEH_preStart));
|
||||
};
|
||||
};
|
||||
class Extended_PreInit_EventHandlers {
|
||||
class ADDON {
|
||||
init = QUOTE(call COMPILE_SCRIPT(XEH_preInit));
|
||||
|
@ -1,3 +1,8 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
{
|
||||
TRACE_1("blocking switching to unsupported laser mode",_x);
|
||||
[_x, { false }] call CBA_fnc_addAttachmentCondition;
|
||||
} forEach (keys (uiNamespace getVariable QGVAR(oldLasers)));
|
||||
|
||||
ADDON = true;
|
||||
|
5
addons/laserpointer/XEH_preStart.sqf
Normal file
5
addons/laserpointer/XEH_preStart.sqf
Normal file
@ -0,0 +1,5 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
private _lasers = ((toString {(getNumber (_x >> "ACE_laserpointer")) > 0}) configClasses (configFile >> "CfgWeapons")) apply {configName _x};
|
||||
if (_lasers isNotEqualTo []) then { WARNING_1("%1 attachements still using unsupported ACE_laserpointer config",count _lasers) };
|
||||
uiNamespace setVariable [QGVAR(oldLasers), compileFinal (_lasers createHashMapFromArray [])];
|
@ -76,7 +76,6 @@ ace_detonator
|
||||
ace_barrelTwist
|
||||
ace_twistDirection
|
||||
ace_barrelLength
|
||||
ace_laserpointer
|
||||
ace_nextmodeclass
|
||||
ace_modedescription
|
||||
ace_hearing_protection
|
||||
|
Loading…
Reference in New Issue
Block a user