ACE_Settings: replace all ACE_Options

This commit is contained in:
Nicolás Badano 2015-01-30 19:19:45 -03:00
parent 981978d043
commit 96b7c0d30c
10 changed files with 48 additions and 39 deletions

View File

@ -3,13 +3,13 @@
#define COLOUR 8.0
class CfgPatches {
class ADDON {
units[] = {};
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_common"};
author[] = {"Garth 'L-H' de Wet"};
authorUrl = "http://garth.snakebiteink.co.za/";
VERSION_CONFIG;
units[] = {};
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_common"};
author[] = {"Garth 'L-H' de Wet"};
authorUrl = "http://garth.snakebiteink.co.za/";
VERSION_CONFIG;
};
};
@ -243,10 +243,12 @@ class SniperCloud {
ACE_Goggles_BulletCount = 1;
};
class ACE_Options {
class ACE_Settings {
class GVAR(showInThirdPerson) {
displayName = $STR_ACE_Goggles_ShowInThirdPerson;
default = 0;
value = 0;
typeName = "BOOL";
isClientSetable = 1;
displayName = "$STR_ACE_Goggles_ShowInThirdPerson;"
};
};

View File

@ -19,5 +19,5 @@
#include "script_component.hpp"
if ((missionNameSpace getVariable [QGVAR(showInThirdPerson), 0]) == 1) exitWith { false };
if (GVAR(showInThirdPerson)) exitWith { false };
(cameraView == "External")

View File

@ -22,9 +22,11 @@ class CfgPatches {
#include "CfgAmmo.hpp"
class ACE_Options {
class GVAR(Hearing_DisableEarRinging) {
displayName = "$STR_ACE_Hearing_DisableEarRinging";
default = 0;
};
class ACE_Settings {
class GVAR(DisableEarRinging) {
default = 1;
typeName = "BOOL";
isClientSetable = 1;
displayName = "$STR_ACE_Hearing_DisableEarRinging";
};
};

View File

@ -25,7 +25,7 @@ GVAR(newStrength) = GVAR(newStrength) max _strength;
if (missionNamespace getVariable [QGVAR(isEarRingingPlaying), false]) exitWith {};
if (profileNamespace getVariable [QGVAR(DisableEarRinging), false]) exitWith {};
if (QGVAR(DisableEarRinging)) exitWith {};
if (_strength > 0.75) exitWith {
playSound "ACE_EarRinging_Heavy";

View File

@ -41,7 +41,7 @@ GVAR(isOpeningDoor) = false;
_exceptions = ["ACE_Drag_isNotDragging", "ACE_Medical_canTreat", "ACE_Interaction_isNotEscorting", "ACE_Interaction_isNotSwimming"];
if !(_exceptions call EGVAR(common,canInteract)) exitWith {false};
// Conditions: specific
if !(!isNull (findDisplay 1713999) && {profileNamespace getVariable [QGVAR(AutoCloseMenu), 0] > 0}) exitWith {false};
if !(!isNull (findDisplay 1713999) && {QGVAR(AutoCloseMenu)}) exitWith {false};
// Statement
if (GVAR(MenuType) mod 2 == 0) then {call FUNC(onButtonUp)};
@ -77,7 +77,7 @@ GVAR(isOpeningDoor) = false;
_exceptions = ["ACE_Drag_isNotDragging", "ACE_Medical_canTreat", "ACE_Interaction_isNotEscorting", "ACE_Interaction_isNotSwimming"];
if !(_exceptions call EGVAR(common,canInteract)) exitWith {false};
// Conditions: specific
if !(!isNull (findDisplay 1713999) && {profileNamespace getVariable [QGVAR(AutoCloseMenu), 0] > 0}) exitWith {false};
if !(!isNull (findDisplay 1713999) && {QGVAR(AutoCloseMenu)}) exitWith {false};
// Statement
if (GVAR(MenuType) mod 2 == 1) then {call FUNC(onButtonUp)};

View File

@ -18,22 +18,25 @@ class CfgPatches {
#include <Menu_Config.hpp>
class ACE_Options {
class Interaction_FlowMenu {
displayName = "$STR_ACE_Interaction_FlowMenu";
default = 0;
};
class Interaction_AutoCloseMenu {
displayName = "$STR_ACE_Interaction_AutoCloseMenu";
default = 0;
};
class Interaction_AutoCenterCursor {
displayName = "$STR_ACE_Interaction_AutoCenterCursor";
default = 1;
};
};
class ACE_Settings {
class GVAR(FlowMenu) {
value = 0;
typeName = "BOOL";
isClientSetable = 1;
displayName = "$STR_ACE_Interaction_FlowMenu";
};
class GVAR(AutoCloseMenu) {
value = 0;
typeName = "BOOL";
isClientSetable = 1;
displayName = "$STR_ACE_Interaction_AutoCloseMenu";
};
class GVAR(AutoCenterCursor) {
value = 1;
typeName = "BOOL";
isClientSetable = 1;
displayName = "$STR_ACE_Interaction_AutoCenterCursor";
};
class GVAR(EnableTeamManagement) {
value = 1;
typeName = "BOOL";

View File

@ -66,7 +66,7 @@ _cacheIndices = _cache select 2;
_statement = getText (_action >> "statement");
_statement = compile _statement;
if (profileNamespace getVariable ["ACE_Interaction_FlowMenu", false]) then {
if (GVAR(FlowMenu)) then {
_statement = if (getText (_action >> "statement") == "" && {count _subMenu > 1}) then {
compile format [QUOTE( call FUNC(hideMenu);if(%2 == 1)then{['%1'] call FUNC(openSubMenuSelf);}else{['%1'] call FUNC(openSubMenu);}; ), _subMenu select 0, _subMenu select 1];
} else {

View File

@ -67,7 +67,7 @@ if (_this select 2) then {
disableSerialization;
_dlgInteractionDialog = uiNamespace getVariable QGVAR(Dialog);
_ctrlInteractionDialog = _dlgInteractionDialog displayCtrl 3;
if (profileNamespace getVariable [QGVAR(AutoCenterCursor), true]) then {setMousePosition [0.5, 0.5]};
if (GVAR(AutoCenterCursor)) then {setMousePosition [0.5, 0.5]};
if !(_subMenu) then {
_ctrlInteractionDialog ctrlSetText ([_target] call EFUNC(common,getName));
} else {

View File

@ -17,9 +17,11 @@ class CfgPatches {
//#include "CfgInventoryGlobalVariable.hpp"
#include "CfgMoves.hpp"
class ACE_Options {
class ACE_Settings {
class GVAR(useImperial) {
value = 0;
typeName = "BOOL";
isClientSetable = 1;
displayName = "$STR_ACE_Movement_UseImperial";
default = 0;
};
};

View File

@ -7,7 +7,7 @@ _unit = _this select 0;
_weight = loadAbs _unit * 0.1;
if (GETGVAR(useImperial, 0) == 1) then {
if (GVAR(useImperial)) then {
_weight = format ["%1lb", (round (_weight * 100)) / 100];
} else {
_weight = format ["%1kg", (round (_weight * FACTOR_POUND_TO_KILOGRAMM * 100)) / 100];