From c0fd26f706da81a0f508c54522692cbb3fc47ea3 Mon Sep 17 00:00:00 2001 From: SilentSpike Date: Tue, 21 Jul 2015 15:15:31 +0100 Subject: [PATCH] Add new setting to module --- addons/spectator/CfgVehicles.hpp | 52 +++++++++++++++++++ .../functions/fnc_moduleSpectatorSettings.sqf | 2 + 2 files changed, 54 insertions(+) diff --git a/addons/spectator/CfgVehicles.hpp b/addons/spectator/CfgVehicles.hpp index 3796b0d3d1..30a9c85acf 100644 --- a/addons/spectator/CfgVehicles.hpp +++ b/addons/spectator/CfgVehicles.hpp @@ -59,6 +59,58 @@ class CfgVehicles { }; }; }; + class cameraModes { + displayName = CSTRING(modes_DisplayName); + description = CSTRING(modes_Description); + typeName = "NUMBER"; + class values { + class all { + name = CSTRING(modes_all); + value = 0; + default = 1; + }; + class unit { + name = CSTRING(modes_unit); + value = 1; + }; + class free { + name = CSTRING(modes_free); + value = 2; + }; + class internal { + name = CSTRING(modes_internal); + value = 3; + }; + class external { + name = CSTRING(modes_external); + value = 4; + }; + }; + }; + class visionModes { + displayName = CSTRING(visions_DisplayName); + description = CSTRING(visions_Description); + typeName = "NUMBER"; + class values { + class all { + name = CSTRING(modes_all); + value = 0; + default = 1; + }; + class nv { + name = CSTRING(visions_nv); + value = 1; + }; + class ti { + name = CSTRING(visions_ti); + value = 2; + }; + class none { + name = "$STR_Special_None"; + value = 3; + }; + }; + }; }; class ModuleDescription { description = CSTRING(Settings_Description); diff --git a/addons/spectator/functions/fnc_moduleSpectatorSettings.sqf b/addons/spectator/functions/fnc_moduleSpectatorSettings.sqf index 267dff0dd9..f934b95c35 100644 --- a/addons/spectator/functions/fnc_moduleSpectatorSettings.sqf +++ b/addons/spectator/functions/fnc_moduleSpectatorSettings.sqf @@ -22,3 +22,5 @@ if !(_activated) exitWith {}; [_logic, QGVAR(enabledSystem), "spectatorSystem"] call EFUNC(common,readSettingFromModule); [_logic, QGVAR(filterUnits), "spectatorUnits"] call EFUNC(common,readSettingFromModule); [_logic, QGVAR(filterSides), "spectatorSides"] call EFUNC(common,readSettingFromModule); +[_logic, QGVAR(restrictModes), "cameraModes"] call EFUNC(common,readSettingFromModule); +[_logic, QGVAR(restrictVisions), "visionModes"] call EFUNC(common,readSettingFromModule);