fix typeOf capitalization

This commit is contained in:
commy2 2015-11-30 17:19:57 +01:00
parent 34d351c652
commit d9b90258bc
11 changed files with 17 additions and 17 deletions

View File

@ -17,4 +17,4 @@
params ["_object"];
_object getVariable [QGVAR(space), getNumber (configFile >> "CfgVehicles" >> typeof _object >> QGVAR(space))]
_object getVariable [QGVAR(space), getNumber (configFile >> "CfgVehicles" >> typeOf _object >> QGVAR(space))]

View File

@ -24,7 +24,7 @@ if (_vehicle == _unit) exitWith {false};
if (speed _vehicle > 1 || getPos _vehicle select 2 > 2) exitWith {false};
private "_emptyPos";
_emptyPos = (getPos _vehicle) findEmptyPosition [0, 10, typeof _unit]; // @todo to small?
_emptyPos = (getPos _vehicle) findEmptyPosition [0, 10, typeOf _unit]; // @todo to small?
if (count _emptyPos == 0) exitWith {false};

View File

@ -27,7 +27,7 @@ if (_vehicle isKindOf "Ship") then {
TRACE_1("SHIP Ground Check",getPos _vehicle);
_emptyPos = (ASLToAGL getPosASL _vehicle) findEmptyPosition [0, 13, typeof _unit]; // TODO: if spot is underwater pick another spot.
_emptyPos = (ASLToAGL getPosASL _vehicle) findEmptyPosition [0, 13, typeOf _unit]; // TODO: if spot is underwater pick another spot.
} else {
if (_vehicle isKindOf "Air") then {
if (speed _vehicle > 1 || {isTouchingGround _vehicle}) then {
@ -45,7 +45,7 @@ if (_vehicle isKindOf "Ship") then {
TRACE_1("Vehicle Ground Check", isTouchingGround _vehicle);
_emptyPos = (ASLToAGL getPosASL _vehicle) findEmptyPosition [0, 13, typeof _unit];
_emptyPos = (ASLToAGL getPosASL _vehicle) findEmptyPosition [0, 13, typeOf _unit];
};
};

View File

@ -39,7 +39,7 @@ _totalWeight = 0;
];
// add Weight of create to totalWeight
_totalWeight = _totalWeight + (getNumber (configFile >> "CfgVehicles" >> typeof _object >> "mass"));
_totalWeight = _totalWeight + (getNumber (configFile >> "CfgVehicles" >> typeOf _object >> "mass"));
// Mass in Arma isn't an exact amount but rather a volume/weight value. This attempts to work around that by making it a usable value. (sort of).
_totalWeight * 0.5

View File

@ -30,10 +30,10 @@ _result = true;
if (!_ignoreRange && {(_unit distance (_item select 0)) > _range}) exitWith {TRACE_1("out of range",_range); false};
if (getNumber (ConfigFile >> "CfgAmmo" >> typeof (_item select 0) >> "TriggerWhenDestroyed") == 0) then {
if (getNumber (ConfigFile >> "CfgAmmo" >> typeOf (_item select 0) >> "TriggerWhenDestroyed") == 0) then {
private ["_exp", "_previousExp"];
_previousExp = _item select 0;
_exp = getText (ConfigFile >> "CfgAmmo" >> typeof (_previousExp) >> "ACE_Explosive");
_exp = getText (ConfigFile >> "CfgAmmo" >> typeOf (_previousExp) >> "ACE_Explosive");
if (_exp != "") then {
_exp = createVehicle [_exp, [0,0,15001], [], 0, "NONE"];
_exp setDir (getDir _previousExp);

View File

@ -1,6 +1,6 @@
/*
* Author: PabstMirror
* Checks if object is a fence. Should work on any fence type, even (typeof == "").
* Checks if object is a fence. Should work on any fence type, even (typeOf == "").
* Call is fairly expensive because of all of the string checking.
*
* Arguments:

View File

@ -20,12 +20,12 @@ params ["_oldBody", "_caller"];
if (alive _oldBody) exitWith {_oldBody}; // we only want to do this for dead bodies
_name = _oldBody getvariable ["ACE_name", "unknown"];
_class = typeof _oldBody;
_class = typeOf _oldBody;
_side = side _caller;
_group = createGroup _side;
_position = getPos _oldBody;
_newUnit = _group createUnit [typeof _oldBody, _position, [], 0, "NONE"];
_newUnit = _group createUnit [typeOf _oldBody, _position, [], 0, "NONE"];
_newUnit setVariable ["ACE_name", _name, true];
_newUnit disableAI "TARGET";

View File

@ -9,7 +9,7 @@
{
[_x] call {
params ["_logic"];
private _logicType = typeof _logic;
private _logicType = typeOf _logic;
_logic hideobject true;
if (_logic getvariable [QGVAR(initalized), false]) exitWith {};

View File

@ -85,7 +85,7 @@ if (_activated) then {
case 1: {
_addonsList = [];
{
_addonsList = _addonsList + (unitaddons typeof _x);
_addonsList = _addonsList + (unitaddons typeOf _x);
} foreach (entities "all");
removeallcuratoraddons _logic;
_logic addcuratoraddons _addonsList;
@ -210,7 +210,7 @@ if (_activated) then {
//--- Activated all future addons
_addons = [];
{
if (typeof _x == "ModuleCuratorAddAddons_F") then {
if (typeOf _x == "ModuleCuratorAddAddons_F") then {
_paramAddons = call compile ("[" + (_x getvariable ["addons",""]) + "]");
{
if !(_x in _addons) then {_addons set [count _addons,_x];};

View File

@ -21,7 +21,7 @@ _units = _this select 1;
_activated = _this select 2;
if (_activated) then {
_explosive = gettext (configfile >> "CfgVehicles" >> typeof _logic >> "explosive");
_explosive = gettext (configfile >> "CfgVehicles" >> typeOf _logic >> "explosive");
if (_explosive != "") then {
_explosive = createvehicle [_explosive,position _logic,[],0,"none"];
_explosive attachto [_logic];

View File

@ -39,11 +39,11 @@ if ({local _x} count (objectcurators _logic) > 0) then {
if !(isserver) exitWith {};
if (_activated) then {
_ammo = _logic getvariable ["type",gettext (configfile >> "CfgVehicles" >> typeof _logic >> "ammo")];
_ammo = _logic getvariable ["type",gettext (configfile >> "CfgVehicles" >> typeOf _logic >> "ammo")];
if (_ammo != "") then {
_CfgAmmo = configfile >> "CfgAmmo" >> _ammo;
//if !(isclass _CfgAmmo) exitWith {["CfgAmmo class '%1' not found.",_ammo] call bis_fnc_error;};
_dirVar = _fnc_scriptname + typeof _logic;
_dirVar = _fnc_scriptname + typeOf _logic;
_logic setdir (missionnamespace getvariable [_dirVar,direction _logic]); //--- Restore custom direction
_pos = getposatl _logic;
_posAmmo = +_pos;
@ -194,6 +194,6 @@ if (_activated) then {
deletevehicle _logic;
};
} else {
["Cannot create projectile, 'ammo' config attribute is missing in %1",typeof _logic] call bis_fnc_error;
["Cannot create projectile, 'ammo' config attribute is missing in %1",typeOf _logic] call bis_fnc_error;
};
};