mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Tabs to spaces
This commit is contained in:
parent
612fa69c1c
commit
b0373de576
@ -14,17 +14,17 @@
|
||||
|
||||
// ACRE
|
||||
if (isClass (configFile >> "CfgPatches" >> "acre_main")) then {
|
||||
[-1] call acre_core_fnc_handleMultiPttKeyPressUp;
|
||||
[0] call acre_core_fnc_handleMultiPttKeyPressUp;
|
||||
[1] call acre_core_fnc_handleMultiPttKeyPressUp;
|
||||
[2] call acre_core_fnc_handleMultiPttKeyPressUp;
|
||||
[-1] call acre_core_fnc_handleMultiPttKeyPressUp;
|
||||
[0] call acre_core_fnc_handleMultiPttKeyPressUp;
|
||||
[1] call acre_core_fnc_handleMultiPttKeyPressUp;
|
||||
[2] call acre_core_fnc_handleMultiPttKeyPressUp;
|
||||
};
|
||||
|
||||
// TFAR
|
||||
if (isClass (configFile >> "CfgPatches" >> "task_force_radio")) then {
|
||||
call TFAR_fnc_onSwTangentReleased;
|
||||
call TFAR_fnc_onAdditionalSwTangentReleased;
|
||||
call TFAR_fnc_onLRTangentReleased;
|
||||
call TFAR_fnc_onAdditionalLRTangentReleased;
|
||||
call TFAR_fnc_onDDTangentReleased;
|
||||
call TFAR_fnc_onSwTangentReleased;
|
||||
call TFAR_fnc_onAdditionalSwTangentReleased;
|
||||
call TFAR_fnc_onLRTangentReleased;
|
||||
call TFAR_fnc_onAdditionalLRTangentReleased;
|
||||
call TFAR_fnc_onDDTangentReleased;
|
||||
};
|
||||
|
@ -1,8 +1,8 @@
|
||||
// by commy2
|
||||
/*
|
||||
usage:
|
||||
usage:
|
||||
|
||||
(configFile >> "CfgAmmo") call FUNC(exportConfig);
|
||||
(configFile >> "CfgAmmo") call FUNC(exportConfig);
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
|
@ -20,9 +20,9 @@ private "_gunner";
|
||||
_gunner = objNull;
|
||||
|
||||
{
|
||||
if (_weapon in (_vehicle weaponsTurret _x)) exitWith {
|
||||
_gunner = _vehicle turretUnit _x;
|
||||
};
|
||||
if (_weapon in (_vehicle weaponsTurret _x)) exitWith {
|
||||
_gunner = _vehicle turretUnit _x;
|
||||
};
|
||||
} forEach allTurrets _vehicle;
|
||||
|
||||
_gunner
|
||||
|
@ -23,33 +23,33 @@ _hitpoints = [];
|
||||
private "_hitpointClasses";
|
||||
_hitpointClasses = [_config >> "HitPoints"];
|
||||
{
|
||||
private "_class";
|
||||
_class = ([_config, _x] call FUNC(getTurretConfigPath)) >> "HitPoints";
|
||||
private "_class";
|
||||
_class = ([_config, _x] call FUNC(getTurretConfigPath)) >> "HitPoints";
|
||||
|
||||
if (isClass _class) then {
|
||||
_hitpointClasses pushBack _class;
|
||||
};
|
||||
if (isClass _class) then {
|
||||
_hitpointClasses pushBack _class;
|
||||
};
|
||||
|
||||
} forEach allTurrets _vehicle;
|
||||
|
||||
// iterate through all classes with hitpoints and their parents
|
||||
{
|
||||
private "_class";
|
||||
_class = _x;
|
||||
private "_class";
|
||||
_class = _x;
|
||||
|
||||
while {isClass _class} do {
|
||||
while {isClass _class} do {
|
||||
|
||||
for "_i" from 0 to (count _class - 1) do {
|
||||
private "_entry";
|
||||
_entry = configName (_class select _i);
|
||||
for "_i" from 0 to (count _class - 1) do {
|
||||
private "_entry";
|
||||
_entry = configName (_class select _i);
|
||||
|
||||
if (!(_entry in _hitpoints) && {!isNil {_vehicle getHitPointDamage _entry}}) then {
|
||||
_hitpoints pushBack _entry;
|
||||
};
|
||||
};
|
||||
if (!(_entry in _hitpoints) && {!isNil {_vehicle getHitPointDamage _entry}}) then {
|
||||
_hitpoints pushBack _entry;
|
||||
};
|
||||
};
|
||||
|
||||
_class = inheritsFrom _class;
|
||||
};
|
||||
_class = inheritsFrom _class;
|
||||
};
|
||||
|
||||
} forEach _hitpointClasses;
|
||||
|
||||
|
@ -24,36 +24,36 @@ _selections = [];
|
||||
private "_hitpointClasses";
|
||||
_hitpointClasses = [_config >> "HitPoints"];
|
||||
{
|
||||
private "_class";
|
||||
_class = ([_config, _x] call FUNC(getTurretConfigPath)) >> "HitPoints";
|
||||
private "_class";
|
||||
_class = ([_config, _x] call FUNC(getTurretConfigPath)) >> "HitPoints";
|
||||
|
||||
if (isClass _class) then {
|
||||
_hitpointClasses pushBack _class;
|
||||
};
|
||||
if (isClass _class) then {
|
||||
_hitpointClasses pushBack _class;
|
||||
};
|
||||
|
||||
} forEach allTurrets _vehicle;
|
||||
|
||||
// iterate through all classes with hitpoints and their parents
|
||||
{
|
||||
private "_class";
|
||||
_class = _x;
|
||||
private "_class";
|
||||
_class = _x;
|
||||
|
||||
while {isClass _class} do {
|
||||
while {isClass _class} do {
|
||||
|
||||
for "_i" from 0 to (count _class - 1) do {
|
||||
private ["_entry", "_selection"];
|
||||
for "_i" from 0 to (count _class - 1) do {
|
||||
private ["_entry", "_selection"];
|
||||
|
||||
_entry = configName (_class select _i);
|
||||
_selection = getText (_class select _i >> "name");
|
||||
_entry = configName (_class select _i);
|
||||
_selection = getText (_class select _i >> "name");
|
||||
|
||||
if (!(_selection in _selections) && {!isNil {_vehicle getHit _selection}}) then {
|
||||
_hitpoints pushBack _entry;
|
||||
_selections pushBack _selection;
|
||||
};
|
||||
};
|
||||
if (!(_selection in _selections) && {!isNil {_vehicle getHit _selection}}) then {
|
||||
_hitpoints pushBack _entry;
|
||||
_selections pushBack _selection;
|
||||
};
|
||||
};
|
||||
|
||||
_class = inheritsFrom _class;
|
||||
};
|
||||
_class = inheritsFrom _class;
|
||||
};
|
||||
|
||||
} forEach _hitpointClasses;
|
||||
|
||||
|
@ -9,18 +9,18 @@ _key = _this select 1;
|
||||
ERRORDATA(2);
|
||||
_val = nil;
|
||||
try {
|
||||
if(VALIDHASH(_hash)) then {
|
||||
_index = (_hash select 0) find _key;
|
||||
if(_index != -1) then {
|
||||
_val = (_hash select 1) select _index;
|
||||
if(IS_STRING(_val) && {_val == "ACREHASHREMOVEDONOTUSETHISVAL"}) then {
|
||||
_val = nil;
|
||||
};
|
||||
};
|
||||
} else {
|
||||
ERROR("Input hash is not valid");
|
||||
};
|
||||
if(VALIDHASH(_hash)) then {
|
||||
_index = (_hash select 0) find _key;
|
||||
if(_index != -1) then {
|
||||
_val = (_hash select 1) select _index;
|
||||
if(IS_STRING(_val) && {_val == "ACREHASHREMOVEDONOTUSETHISVAL"}) then {
|
||||
_val = nil;
|
||||
};
|
||||
};
|
||||
} else {
|
||||
ERROR("Input hash is not valid");
|
||||
};
|
||||
} catch {
|
||||
HANDLECATCH;
|
||||
HANDLECATCH;
|
||||
};
|
||||
_val
|
||||
|
@ -9,15 +9,15 @@ _key = _this select 1;
|
||||
ERRORDATA(2);
|
||||
_val = false;
|
||||
try {
|
||||
if(VALIDHASH(_hash)) then {
|
||||
_index = (_hash select 0) find _key;
|
||||
if(_index != -1) then {
|
||||
_val = true;
|
||||
};
|
||||
} else {
|
||||
ERROR("Input hash is not valid");
|
||||
};
|
||||
if(VALIDHASH(_hash)) then {
|
||||
_index = (_hash select 0) find _key;
|
||||
if(_index != -1) then {
|
||||
_val = true;
|
||||
};
|
||||
} else {
|
||||
ERROR("Input hash is not valid");
|
||||
};
|
||||
} catch {
|
||||
HANDLECATCH;
|
||||
HANDLECATCH;
|
||||
};
|
||||
_val
|
||||
|
@ -7,12 +7,12 @@ _hashList = _this select 0;
|
||||
ERRORDATA(1);
|
||||
_hashKeys = [];
|
||||
try {
|
||||
if(VALIDHASH(_hashList)) then {
|
||||
_hashKeys = (_hashList select 0);
|
||||
} else {
|
||||
ERROR("Input hashlist is not valid");
|
||||
};
|
||||
if(VALIDHASH(_hashList)) then {
|
||||
_hashKeys = (_hashList select 0);
|
||||
} else {
|
||||
ERROR("Input hashlist is not valid");
|
||||
};
|
||||
} catch {
|
||||
HANDLECATCH;
|
||||
HANDLECATCH;
|
||||
};
|
||||
[_hashKeys, []];
|
||||
|
@ -7,11 +7,11 @@ _hashList = _this select 0;
|
||||
_value = _this select 1;
|
||||
ERRORDATA(2);
|
||||
try {
|
||||
if(VALIDHASH(_hashList)) then {
|
||||
[_hashList, (count (_hashList select 1)), _value] call FUNC(hashListSet);
|
||||
} else {
|
||||
ERROR("Input hashlist in push not valid");
|
||||
};
|
||||
if(VALIDHASH(_hashList)) then {
|
||||
[_hashList, (count (_hashList select 1)), _value] call FUNC(hashListSet);
|
||||
} else {
|
||||
ERROR("Input hashlist in push not valid");
|
||||
};
|
||||
} catch {
|
||||
HANDLECATCH;
|
||||
HANDLECATCH;
|
||||
};
|
||||
|
@ -8,20 +8,20 @@ _index = _this select 1;
|
||||
ERRORDATA(2);
|
||||
_hash = nil;
|
||||
try {
|
||||
if(VALIDHASH(_hashList)) then {
|
||||
_keys = _hashList select 0;
|
||||
_hashes = _hashList select 1;
|
||||
if(_index < (count _hashes)) then {
|
||||
_values = _hashes select _index;
|
||||
if(VALIDHASH(_hashList)) then {
|
||||
_keys = _hashList select 0;
|
||||
_hashes = _hashList select 1;
|
||||
if(_index < (count _hashes)) then {
|
||||
_values = _hashes select _index;
|
||||
|
||||
_hash = [_keys, _values, 1];
|
||||
} else {
|
||||
ERROR("Index of hashlist is out of range");
|
||||
};
|
||||
} else {
|
||||
ERROR("Input hashlist is not valid");
|
||||
};
|
||||
_hash = [_keys, _values, 1];
|
||||
} else {
|
||||
ERROR("Index of hashlist is out of range");
|
||||
};
|
||||
} else {
|
||||
ERROR("Input hashlist is not valid");
|
||||
};
|
||||
} catch {
|
||||
HANDLECATCH;
|
||||
HANDLECATCH;
|
||||
};
|
||||
_hash;
|
||||
|
@ -8,17 +8,17 @@ _index = _this select 1;
|
||||
_value = _this select 2;
|
||||
ERRORDATA(3);
|
||||
try {
|
||||
if(VALIDHASH(_hashList)) then {
|
||||
if(VALIDHASH(_value)) then {
|
||||
_vals = _value select 1;
|
||||
|
||||
(_hashList select 1) set[_index, _vals];
|
||||
} else {
|
||||
ERROR("Set hash in hashlist is not valid");
|
||||
};
|
||||
} else {
|
||||
ERROR("Input hashlist is not valid");
|
||||
};
|
||||
if(VALIDHASH(_hashList)) then {
|
||||
if(VALIDHASH(_value)) then {
|
||||
_vals = _value select 1;
|
||||
|
||||
(_hashList select 1) set[_index, _vals];
|
||||
} else {
|
||||
ERROR("Set hash in hashlist is not valid");
|
||||
};
|
||||
} else {
|
||||
ERROR("Input hashlist is not valid");
|
||||
};
|
||||
} catch {
|
||||
HANDLECATCH;
|
||||
HANDLECATCH;
|
||||
};
|
||||
|
@ -8,23 +8,23 @@ _key = _this select 1;
|
||||
ERRORDATA(2);
|
||||
_val = nil;
|
||||
try {
|
||||
if(VALIDHASH(_hash)) then {
|
||||
_index = (_hash select 0) find _key;
|
||||
if(_index != -1) then {
|
||||
(_hash select 1) set[_index, "ACREHASHREMOVEDONOTUSETHISVAL"];
|
||||
// is this hash is not part of a hash list?
|
||||
// if it is we need to leave the keys intact.
|
||||
if((count _hash) == 2) then {
|
||||
// if this is a standalone hash then we can clean it up
|
||||
(_hash select 0) set[_index, "ACREHASHREMOVEDONOTUSETHISVAL"];
|
||||
_hash set[0, ((_hash select 0) - ["ACREHASHREMOVEDONOTUSETHISVAL"])];
|
||||
_hash set[1, ((_hash select 1) - ["ACREHASHREMOVEDONOTUSETHISVAL"])];
|
||||
};
|
||||
};
|
||||
} else {
|
||||
ERROR("Input hash is not valid");
|
||||
};
|
||||
if(VALIDHASH(_hash)) then {
|
||||
_index = (_hash select 0) find _key;
|
||||
if(_index != -1) then {
|
||||
(_hash select 1) set[_index, "ACREHASHREMOVEDONOTUSETHISVAL"];
|
||||
// is this hash is not part of a hash list?
|
||||
// if it is we need to leave the keys intact.
|
||||
if((count _hash) == 2) then {
|
||||
// if this is a standalone hash then we can clean it up
|
||||
(_hash select 0) set[_index, "ACREHASHREMOVEDONOTUSETHISVAL"];
|
||||
_hash set[0, ((_hash select 0) - ["ACREHASHREMOVEDONOTUSETHISVAL"])];
|
||||
_hash set[1, ((_hash select 1) - ["ACREHASHREMOVEDONOTUSETHISVAL"])];
|
||||
};
|
||||
};
|
||||
} else {
|
||||
ERROR("Input hash is not valid");
|
||||
};
|
||||
} catch {
|
||||
HANDLECATCH;
|
||||
HANDLECATCH;
|
||||
};
|
||||
true
|
||||
|
@ -9,19 +9,19 @@ _key = _this select 1;
|
||||
_val = _this select 2;
|
||||
ERRORDATA(3);
|
||||
try {
|
||||
if(VALIDHASH(_hash)) then {
|
||||
_index = (_hash select 0) find _key;
|
||||
if(_index == -1) then {
|
||||
_index = (_hash select 0) find "ACREHASHREMOVEDONOTUSETHISVAL";
|
||||
if(_index == -1) then {
|
||||
_index = (count (_hash select 0));
|
||||
};
|
||||
(_hash select 0) set[_index, _key];
|
||||
};
|
||||
(_hash select 1) set[_index, _val];
|
||||
} else {
|
||||
ERROR("Input hash is not valid");
|
||||
};
|
||||
if(VALIDHASH(_hash)) then {
|
||||
_index = (_hash select 0) find _key;
|
||||
if(_index == -1) then {
|
||||
_index = (_hash select 0) find "ACREHASHREMOVEDONOTUSETHISVAL";
|
||||
if(_index == -1) then {
|
||||
_index = (count (_hash select 0));
|
||||
};
|
||||
(_hash select 0) set[_index, _key];
|
||||
};
|
||||
(_hash select 1) set[_index, _val];
|
||||
} else {
|
||||
ERROR("Input hash is not valid");
|
||||
};
|
||||
} catch {
|
||||
HANDLECATCH;
|
||||
HANDLECATCH;
|
||||
};
|
||||
|
@ -4,7 +4,7 @@
|
||||
terminate (missionNamespace getVariable [QGVAR(waitForAnimationHandle), scriptNull]);
|
||||
|
||||
GVAR(waitForAnimationHandle) = _this spawn {
|
||||
waitUntil {!([_this select 0] call FUNC(inTransitionAnim))};
|
||||
waitUntil {!([_this select 0] call FUNC(inTransitionAnim))};
|
||||
|
||||
_this call FUNC(doAnimation);
|
||||
_this call FUNC(doAnimation);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user