local -> private

This commit is contained in:
PabstMirror 2015-11-17 14:02:20 -06:00
parent 896615beb1
commit 5cbfe4f2a5
5 changed files with 20 additions and 20 deletions

View File

@ -40,7 +40,7 @@ _fnc_parseConfigForDisplayNames = {
if (_typeOf != "SCALAR") then { if (_typeOf != "SCALAR") then {
ACE_LOGWARNING_2("Setting [%1] has values[] but is not SCALAR (%2)", _name, _typeOf); ACE_LOGWARNING_2("Setting [%1] has values[] but is not SCALAR (%2)", _name, _typeOf);
} else { } else {
local _value = missionNamespace getVariable [_name, -1]; private _value = missionNamespace getVariable [_name, -1];
if ((_value < 0) || {_value >= (count _values)}) then { if ((_value < 0) || {_value >= (count _values)}) then {
ACE_LOGWARNING_3("Setting [%1] out of bounds %2 (values[] count is %3)(", _name, _value, count _values); ACE_LOGWARNING_3("Setting [%1] out of bounds %2 (values[] count is %3)(", _name, _value, count _values);
}; };

View File

@ -17,16 +17,16 @@
#include "script_component.hpp" #include "script_component.hpp"
//paramsArray is a normal variable not a command //paramsArray is a normal variable not a command
local _paramsArray = missionnamespace getvariable ["paramsArray", []]; private _paramsArray = missionnamespace getvariable ["paramsArray", []];
TRACE_1("Reading missionConfigFile params",_paramsArray); TRACE_1("Reading missionConfigFile params",_paramsArray);
{ {
local _config = (missionConfigFile >> "params") select _forEachIndex; private _config = (missionConfigFile >> "params") select _forEachIndex;
if ((getNumber (_config >> "ACE_setting")) > 0) then { if ((getNumber (_config >> "ACE_setting")) > 0) then {
local _settingName = configName _config; private _settingName = configName _config;
local _settingValue = _x; private _settingValue = _x;
local _title = getText (_config >> "title"); private _title = getText (_config >> "title");
TRACE_3("ace_setting",_title,_settingName,_settingValue); TRACE_3("ace_setting",_title,_settingName,_settingValue);
@ -35,7 +35,7 @@ TRACE_1("Reading missionConfigFile params",_paramsArray);
ACE_LOGERROR_1("readSettingsFromParamsArray - param [%1] is not an ace_setting", _settingName); ACE_LOGERROR_1("readSettingsFromParamsArray - param [%1] is not an ace_setting", _settingName);
}; };
local _settingData = [_settingName] call FUNC(getSettingData); private _settingData = [_settingName] call FUNC(getSettingData);
_settingData params ["", "_typeName", "", "", "", "", "_isForced"]; _settingData params ["", "_typeName", "", "", "", "", "_isForced"];
// Check if it's already forced and quit // Check if it's already forced and quit
@ -43,7 +43,7 @@ TRACE_1("Reading missionConfigFile params",_paramsArray);
// The setting is not forced, so update the value // The setting is not forced, so update the value
// Read entry and cast it to the correct type from the existing variable // Read entry and cast it to the correct type from the existing variable
local _validValue = false; private _validValue = false;
switch (true) do { switch (true) do {
case (_typeName == "SCALAR"): {_validValue = true;}; case (_typeName == "SCALAR"): {_validValue = true;};
case (_typeName == "BOOL"): { case (_typeName == "BOOL"): {

View File

@ -22,7 +22,7 @@
params ["_name", "_value", ["_force", false], ["_broadcastChanges", false]]; params ["_name", "_value", ["_force", false], ["_broadcastChanges", false]];
local _settingData = [_name] call FUNC(getSettingData); private _settingData = [_name] call FUNC(getSettingData);
// Exit if the setting does not exist // Exit if the setting does not exist
if (_settingData isEqualTo []) exitWith { if (_settingData isEqualTo []) exitWith {
@ -42,7 +42,7 @@ if ((missionNamespace getVariable [QEGVAR(modules,serverModulesRead), false]) &&
}; };
// If the type is not equal, try to cast it // If the type is not equal, try to cast it
local _failed = false; private _failed = false;
if (typeName _value != _settingData select 1) then { if (typeName _value != _settingData select 1) then {
_failed = true; _failed = true;
if ((_typeName == "BOOL") && {typeName _value == "SCALAR"}) then { if ((_typeName == "BOOL") && {typeName _value == "SCALAR"}) then {

View File

@ -26,14 +26,14 @@ if (!_activated || !isServer) exitWith {};
[_logic, QGVAR(interval), "interval"] call EFUNC(common,readSettingFromModule); [_logic, QGVAR(interval), "interval"] call EFUNC(common,readSettingFromModule);
//For default fallback colors, setting to empty ("") will not force on clients //For default fallback colors, setting to empty ("") will not force on clients
local _defaultLeadColor = _logic getVariable ["defaultLeadColor", ""]; private _defaultLeadColor = _logic getVariable ["defaultLeadColor", ""];
if (_defaultLeadColor != "") then { if (_defaultLeadColor != "") then {
_defaultLeadColor = call compile ("[" + _defaultLeadColor + "]"); _defaultLeadColor = call compile ("[" + _defaultLeadColor + "]");
if (!([_defaultLeadColor] call FUNC(isValidColorArray))) exitWith {ERROR("defaultLeadColor is not a valid color array.")}; if (!([_defaultLeadColor] call FUNC(isValidColorArray))) exitWith {ERROR("defaultLeadColor is not a valid color array.")};
[QGVAR(defaultLeadColor), _defaultLeadColor, true, true] call EFUNC(common,setSetting); [QGVAR(defaultLeadColor), _defaultLeadColor, true, true] call EFUNC(common,setSetting);
}; };
local _defaultColor = _logic getVariable ["defaultColor", ""]; private _defaultColor = _logic getVariable ["defaultColor", ""];
if (_defaultColor != "") then { if (_defaultColor != "") then {
_defaultColor = call compile ("[" + _defaultColor + "]"); _defaultColor = call compile ("[" + _defaultColor + "]");
if (!([_defaultColor] call FUNC(isValidColorArray))) exitWith {ERROR("defaultColor is not a valid color array.")}; if (!([_defaultColor] call FUNC(isValidColorArray))) exitWith {ERROR("defaultColor is not a valid color array.")};

View File

@ -5,22 +5,22 @@
// TODO This is a basic and limited implementation that mimics some of the functionality from the A3 module framework, but not all of it. // TODO This is a basic and limited implementation that mimics some of the functionality from the A3 module framework, but not all of it.
// We have to execute this in the postInit XEH because on object init, the parameters of the modules are not yet available. They are if we execute it at the start of postInit execution. // We have to execute this in the postInit XEH because on object init, the parameters of the modules are not yet available. They are if we execute it at the start of postInit execution.
local _uniqueModulesHandled = []; private _uniqueModulesHandled = [];
{ {
[_x] call { [_x] call {
params ["_logic"]; params ["_logic"];
local _logicType = typeof _logic; private _logicType = typeof _logic;
_logic hideobject true; _logic hideobject true;
if (_logic getvariable [QGVAR(initalized), false]) exitwith {}; if (_logic getvariable [QGVAR(initalized), false]) exitwith {};
local _config = (configFile >> "CfgVehicles" >> _logicType); private _config = (configFile >> "CfgVehicles" >> _logicType);
if !(isClass _config) exitwith {}; if !(isClass _config) exitwith {};
local _isGlobal = getNumber (_config >> "isGlobal") > 0; private _isGlobal = getNumber (_config >> "isGlobal") > 0;
local _isDisposable = getNumber (_config >> "isDisposable") > 0; private _isDisposable = getNumber (_config >> "isDisposable") > 0;
local _isPersistent = getNumber (_config >> "isPersistent") > 0 || getnumber (_config >> "isGlobal") > 1; private _isPersistent = getNumber (_config >> "isPersistent") > 0 || getnumber (_config >> "isGlobal") > 1;
local _isSingular = getNumber (_config >> "isSingular") > 0; private _isSingular = getNumber (_config >> "isSingular") > 0;
local _function = getText (_config >> "function"); private _function = getText (_config >> "function");
if (isnil _function) then { if (isnil _function) then {
_function = compile _function; _function = compile _function;
} else { } else {