fix(optics): keep standalone air FLIR module independent
This commit is contained in:
@@ -8,16 +8,23 @@
|
|||||||
|
|
||||||
disableSerialization;
|
disableSerialization;
|
||||||
|
|
||||||
params ["_display"];
|
private _display = _this;
|
||||||
|
if (_display isEqualType []) then {
|
||||||
|
_display = _display param [0, displayNull];
|
||||||
|
};
|
||||||
|
|
||||||
|
if (isNull _display) exitWith {
|
||||||
|
systemChat "[BRAF FLIR] ERROR: initRSC received an invalid display.";
|
||||||
|
};
|
||||||
|
|
||||||
if (isNil "BRAF_fnc_flirControls") then {
|
if (isNil "BRAF_fnc_flirControls") then {
|
||||||
systemChat "[BRAF FLIR] WARNING: BRAF_fnc_flirControls is not loaded.";
|
systemChat "[BRAF FLIR] WARNING: BRAF_fnc_flirControls is not loaded.";
|
||||||
};
|
};
|
||||||
|
|
||||||
uiNamespace setVariable ["BRAF_FLIR_UI_Display", _display];
|
|
||||||
|
|
||||||
[] call BRAF_fnc_shutdownRSC;
|
[] call BRAF_fnc_shutdownRSC;
|
||||||
|
|
||||||
|
uiNamespace setVariable ["BRAF_FLIR_UI_Display", _display];
|
||||||
|
|
||||||
private _pfh = addMissionEventHandler ["EachFrame", {
|
private _pfh = addMissionEventHandler ["EachFrame", {
|
||||||
if (cameraView != "GUNNER") exitWith {};
|
if (cameraView != "GUNNER") exitWith {};
|
||||||
|
|
||||||
|
|||||||
@@ -25,8 +25,6 @@ class RscPicture;
|
|||||||
class RscOpticsText;
|
class RscOpticsText;
|
||||||
class RscOpticsValue;
|
class RscOpticsValue;
|
||||||
class RscIGProgress;
|
class RscIGProgress;
|
||||||
class RCWSOptics;
|
|
||||||
class Optics_Armored;
|
|
||||||
|
|
||||||
class CfgFunctions {
|
class CfgFunctions {
|
||||||
class BRAF {
|
class BRAF {
|
||||||
@@ -46,8 +44,8 @@ class RscInGameUI {
|
|||||||
controls[] = {"CA_Zeroing","CA_IGUI_elements_group","CA_VehicleToggles"};
|
controls[] = {"CA_Zeroing","CA_IGUI_elements_group","CA_VehicleToggles"};
|
||||||
class VScrollbar;
|
class VScrollbar;
|
||||||
class HScrollbar;
|
class HScrollbar;
|
||||||
onLoad = "[\"onLoad\",_this,\"RscUnitInfo\",'IGUI'] call (uiNamespace getVariable 'BIS_fnc_initDisplay'); _this call BRAF_fnc_initRSC;";
|
onLoad = "[""onLoad"",_this,""RscUnitInfo"",""IGUI""] call (uiNamespace getVariable ""BIS_fnc_initDisplay""); [_this select 0] call BRAF_fnc_initRSC;";
|
||||||
onUnload = "[\"onUnload\",_this,\"RscUnitInfo\",'IGUI'] call (uiNamespace getVariable 'BIS_fnc_initDisplay'); _this call BRAF_fnc_shutdownRSC;";
|
onUnload = "[""onUnload"",_this,""RscUnitInfo"",""IGUI""] call (uiNamespace getVariable ""BIS_fnc_initDisplay""); [_this select 0] call BRAF_fnc_shutdownRSC;";
|
||||||
|
|
||||||
class CA_IGUI_elements_group: RscControlsGroup {
|
class CA_IGUI_elements_group: RscControlsGroup {
|
||||||
idc = 170;
|
idc = 170;
|
||||||
@@ -380,48 +378,3 @@ class RscInGameUI {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
class BRAF_Air_FLIR_Gunner_Optics: Optics_Armored {
|
|
||||||
class Wide: RCWSOptics {
|
|
||||||
initFov = 0.5236;
|
|
||||||
minFov = 0.5236;
|
|
||||||
maxFov = 0.5236;
|
|
||||||
opticsDisplayName = "WFOV";
|
|
||||||
visionMode[] = {"Normal","TI"};
|
|
||||||
thermalMode[] = {0,1};
|
|
||||||
thermalNoise[] = {0.5,1.25,2.5,0.75,1,0,0,0.95};
|
|
||||||
gunnerOpticsModel = "\braf\braf_optics_air\StarSaphire\braf_StarSaphire_w.p3d";
|
|
||||||
gunnerOpticsEffect[] = {};
|
|
||||||
directionStabilized = 1;
|
|
||||||
};
|
|
||||||
|
|
||||||
class Medium: Wide {
|
|
||||||
opticsDisplayName = "MFOV";
|
|
||||||
gunnerOpticsModel = "\braf\braf_optics_air\StarSaphire\braf_StarSaphire_m.p3d";
|
|
||||||
initFov = 0.0593;
|
|
||||||
minFov = 0.0593;
|
|
||||||
maxFov = 0.0593;
|
|
||||||
};
|
|
||||||
|
|
||||||
class Narrow: Wide {
|
|
||||||
opticsDisplayName = "NFOV";
|
|
||||||
gunnerOpticsModel = "\braf\braf_optics_air\StarSaphire\braf_StarSaphire_n.p3d";
|
|
||||||
initFov = 0.0140;
|
|
||||||
minFov = 0.0140;
|
|
||||||
maxFov = 0.0140;
|
|
||||||
};
|
|
||||||
|
|
||||||
class Narrower: Narrow {
|
|
||||||
opticsDisplayName = "NFOV 2X";
|
|
||||||
initFov = 0.0070;
|
|
||||||
minFov = 0.0070;
|
|
||||||
maxFov = 0.0070;
|
|
||||||
};
|
|
||||||
|
|
||||||
class UltraNarrow: Narrow {
|
|
||||||
opticsDisplayName = "NFOV 4X";
|
|
||||||
initFov = 0.0035;
|
|
||||||
minFov = 0.0035;
|
|
||||||
maxFov = 0.0035;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|||||||
Reference in New Issue
Block a user