mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
ACE_Settings: replace all ACE_Options
This commit is contained in:
parent
981978d043
commit
96b7c0d30c
@ -3,13 +3,13 @@
|
|||||||
#define COLOUR 8.0
|
#define COLOUR 8.0
|
||||||
class CfgPatches {
|
class CfgPatches {
|
||||||
class ADDON {
|
class ADDON {
|
||||||
units[] = {};
|
units[] = {};
|
||||||
weapons[] = {};
|
weapons[] = {};
|
||||||
requiredVersion = REQUIRED_VERSION;
|
requiredVersion = REQUIRED_VERSION;
|
||||||
requiredAddons[] = {"ace_common"};
|
requiredAddons[] = {"ace_common"};
|
||||||
author[] = {"Garth 'L-H' de Wet"};
|
author[] = {"Garth 'L-H' de Wet"};
|
||||||
authorUrl = "http://garth.snakebiteink.co.za/";
|
authorUrl = "http://garth.snakebiteink.co.za/";
|
||||||
VERSION_CONFIG;
|
VERSION_CONFIG;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -243,10 +243,12 @@ class SniperCloud {
|
|||||||
ACE_Goggles_BulletCount = 1;
|
ACE_Goggles_BulletCount = 1;
|
||||||
};
|
};
|
||||||
|
|
||||||
class ACE_Options {
|
class ACE_Settings {
|
||||||
class GVAR(showInThirdPerson) {
|
class GVAR(showInThirdPerson) {
|
||||||
displayName = $STR_ACE_Goggles_ShowInThirdPerson;
|
value = 0;
|
||||||
default = 0;
|
typeName = "BOOL";
|
||||||
|
isClientSetable = 1;
|
||||||
|
displayName = "$STR_ACE_Goggles_ShowInThirdPerson;"
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -19,5 +19,5 @@
|
|||||||
|
|
||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
if ((missionNameSpace getVariable [QGVAR(showInThirdPerson), 0]) == 1) exitWith { false };
|
if (GVAR(showInThirdPerson)) exitWith { false };
|
||||||
(cameraView == "External")
|
(cameraView == "External")
|
||||||
|
@ -22,9 +22,11 @@ class CfgPatches {
|
|||||||
|
|
||||||
#include "CfgAmmo.hpp"
|
#include "CfgAmmo.hpp"
|
||||||
|
|
||||||
class ACE_Options {
|
class ACE_Settings {
|
||||||
class GVAR(Hearing_DisableEarRinging) {
|
class GVAR(DisableEarRinging) {
|
||||||
displayName = "$STR_ACE_Hearing_DisableEarRinging";
|
default = 1;
|
||||||
default = 0;
|
typeName = "BOOL";
|
||||||
};
|
isClientSetable = 1;
|
||||||
|
displayName = "$STR_ACE_Hearing_DisableEarRinging";
|
||||||
|
};
|
||||||
};
|
};
|
@ -25,7 +25,7 @@ GVAR(newStrength) = GVAR(newStrength) max _strength;
|
|||||||
if (missionNamespace getVariable [QGVAR(isEarRingingPlaying), false]) exitWith {};
|
if (missionNamespace getVariable [QGVAR(isEarRingingPlaying), false]) exitWith {};
|
||||||
|
|
||||||
|
|
||||||
if (profileNamespace getVariable [QGVAR(DisableEarRinging), false]) exitWith {};
|
if (QGVAR(DisableEarRinging)) exitWith {};
|
||||||
|
|
||||||
if (_strength > 0.75) exitWith {
|
if (_strength > 0.75) exitWith {
|
||||||
playSound "ACE_EarRinging_Heavy";
|
playSound "ACE_EarRinging_Heavy";
|
||||||
|
@ -41,7 +41,7 @@ GVAR(isOpeningDoor) = false;
|
|||||||
_exceptions = ["ACE_Drag_isNotDragging", "ACE_Medical_canTreat", "ACE_Interaction_isNotEscorting", "ACE_Interaction_isNotSwimming"];
|
_exceptions = ["ACE_Drag_isNotDragging", "ACE_Medical_canTreat", "ACE_Interaction_isNotEscorting", "ACE_Interaction_isNotSwimming"];
|
||||||
if !(_exceptions call EGVAR(common,canInteract)) exitWith {false};
|
if !(_exceptions call EGVAR(common,canInteract)) exitWith {false};
|
||||||
// Conditions: specific
|
// Conditions: specific
|
||||||
if !(!isNull (findDisplay 1713999) && {profileNamespace getVariable [QGVAR(AutoCloseMenu), 0] > 0}) exitWith {false};
|
if !(!isNull (findDisplay 1713999) && {QGVAR(AutoCloseMenu)}) exitWith {false};
|
||||||
|
|
||||||
// Statement
|
// Statement
|
||||||
if (GVAR(MenuType) mod 2 == 0) then {call FUNC(onButtonUp)};
|
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"];
|
_exceptions = ["ACE_Drag_isNotDragging", "ACE_Medical_canTreat", "ACE_Interaction_isNotEscorting", "ACE_Interaction_isNotSwimming"];
|
||||||
if !(_exceptions call EGVAR(common,canInteract)) exitWith {false};
|
if !(_exceptions call EGVAR(common,canInteract)) exitWith {false};
|
||||||
// Conditions: specific
|
// Conditions: specific
|
||||||
if !(!isNull (findDisplay 1713999) && {profileNamespace getVariable [QGVAR(AutoCloseMenu), 0] > 0}) exitWith {false};
|
if !(!isNull (findDisplay 1713999) && {QGVAR(AutoCloseMenu)}) exitWith {false};
|
||||||
|
|
||||||
// Statement
|
// Statement
|
||||||
if (GVAR(MenuType) mod 2 == 1) then {call FUNC(onButtonUp)};
|
if (GVAR(MenuType) mod 2 == 1) then {call FUNC(onButtonUp)};
|
||||||
|
@ -18,22 +18,25 @@ class CfgPatches {
|
|||||||
|
|
||||||
#include <Menu_Config.hpp>
|
#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 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) {
|
class GVAR(EnableTeamManagement) {
|
||||||
value = 1;
|
value = 1;
|
||||||
typeName = "BOOL";
|
typeName = "BOOL";
|
||||||
|
@ -66,7 +66,7 @@ _cacheIndices = _cache select 2;
|
|||||||
_statement = getText (_action >> "statement");
|
_statement = getText (_action >> "statement");
|
||||||
_statement = compile _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 {
|
_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];
|
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 {
|
} else {
|
||||||
|
@ -67,7 +67,7 @@ if (_this select 2) then {
|
|||||||
disableSerialization;
|
disableSerialization;
|
||||||
_dlgInteractionDialog = uiNamespace getVariable QGVAR(Dialog);
|
_dlgInteractionDialog = uiNamespace getVariable QGVAR(Dialog);
|
||||||
_ctrlInteractionDialog = _dlgInteractionDialog displayCtrl 3;
|
_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 {
|
if !(_subMenu) then {
|
||||||
_ctrlInteractionDialog ctrlSetText ([_target] call EFUNC(common,getName));
|
_ctrlInteractionDialog ctrlSetText ([_target] call EFUNC(common,getName));
|
||||||
} else {
|
} else {
|
||||||
|
@ -17,9 +17,11 @@ class CfgPatches {
|
|||||||
//#include "CfgInventoryGlobalVariable.hpp"
|
//#include "CfgInventoryGlobalVariable.hpp"
|
||||||
#include "CfgMoves.hpp"
|
#include "CfgMoves.hpp"
|
||||||
|
|
||||||
class ACE_Options {
|
class ACE_Settings {
|
||||||
class GVAR(useImperial) {
|
class GVAR(useImperial) {
|
||||||
|
value = 0;
|
||||||
|
typeName = "BOOL";
|
||||||
|
isClientSetable = 1;
|
||||||
displayName = "$STR_ACE_Movement_UseImperial";
|
displayName = "$STR_ACE_Movement_UseImperial";
|
||||||
default = 0;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -7,7 +7,7 @@ _unit = _this select 0;
|
|||||||
|
|
||||||
_weight = loadAbs _unit * 0.1;
|
_weight = loadAbs _unit * 0.1;
|
||||||
|
|
||||||
if (GETGVAR(useImperial, 0) == 1) then {
|
if (GVAR(useImperial)) then {
|
||||||
_weight = format ["%1lb", (round (_weight * 100)) / 100];
|
_weight = format ["%1lb", (round (_weight * 100)) / 100];
|
||||||
} else {
|
} else {
|
||||||
_weight = format ["%1kg", (round (_weight * FACTOR_POUND_TO_KILOGRAMM * 100)) / 100];
|
_weight = format ["%1kg", (round (_weight * FACTOR_POUND_TO_KILOGRAMM * 100)) / 100];
|
||||||
|
Loading…
Reference in New Issue
Block a user