#1123 - Added CheckPBOs to ACE_Settings

This commit is contained in:
jonpas 2015-05-16 00:54:01 +02:00
parent a872b8b9e5
commit cccc741a16
3 changed files with 24 additions and 3 deletions

View File

@ -41,6 +41,7 @@ class CfgVehicles {
class Action {
displayName = "$STR_ACE_Common_CheckPBO_Action_DisplayName";
description = "$STR_ACE_Common_CheckPBO_Action_Description";
typeName = "NUMBER";
class values {
class WarnOnce {
default = 1;

View File

@ -88,6 +88,22 @@ class ACE_Settings {
value = 0;
typeName = "BOOL";
};
class GVAR(checkPBOsAction) {
value = 0;
typeName = "SCALAR";
isClientSettable = 0;
values[] = {"$STR_ACE_Common_CheckPBO_Action_WarnOnce", "$STR_ACE_Common_CheckPBO_Action_WarnPerm", "$STR_ACE_Common_CheckPBO_Action_Kick"};
};
class GVAR(checkPBOsCheckAll) {
value = 0;
typeName = "BOOL";
isClientSettable = 0;
};
class GVAR(checkPBOsWhitelist) {
value = "[]";
typeName = "STRING";
isClientSettable = 0;
};
/*class GVAR(enableNumberHotkeys) {
value = 1;
typeName = "BOOL";

View File

@ -17,9 +17,13 @@ private ["_mode", "_checkAll", "_whitelist"];
if !(_activated) exitWith {};
_mode = parseNumber (_logic getVariable "Action");
_checkAll = _logic getVariable ["CheckAll", false];
_whitelist = call compile (_logic getVariable ["Whitelist", "[]"]);
[_logic, QGVAR(checkPBOsAction), "Action" ] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(checkPBOsCheckAll), "CheckAll" ] call EFUNC(common,readSettingFromModule);
[_logic, QGVAR(checkPBOsWhitelist), "Whitelist" ] call EFUNC(common,readSettingFromModule);
_mode = GVAR(checkPBOsAction);
_checkAll = GVAR(checkPBOsCheckAll);
_whitelist = call compile GVAR(checkPBOsWhitelist);
if (isNil "_whitelist") then {
_whitelist = [];