Merge pull request #3131 from acemod/removedep

remove deprecated functions
This commit is contained in:
commy2 2016-02-19 11:48:20 +01:00
commit 97008d8fc3
13 changed files with 4 additions and 273 deletions

View File

@ -21,7 +21,6 @@ PREP(changeProjectileDirection);
PREP(checkFiles);
PREP(checkPBOs);
PREP(claim);
PREP(codeToLetter);
PREP(codeToString);
PREP(createOrthonormalReference);
PREP(currentChannel);
@ -102,12 +101,9 @@ PREP(hasItem);
PREP(hasMagazine);
PREP(headBugFix);
PREP(hideUnit);
PREP(inheritsFrom);
PREP(insertionSort);
PREP(interpolateFromArray);
PREP(inTransitionAnim);
PREP(inWater);
PREP(isAlive);
PREP(isAutoWind);
PREP(isAwake);
PREP(isEngineer);
@ -116,9 +112,7 @@ PREP(isFeatureCameraActive);
PREP(isInBuilding);
PREP(isModLoaded);
PREP(isPlayer);
PREP(isTurnedOut);
PREP(isUnderwater);
PREP(letterToCode);
PREP(lightIntensityFromObject);
PREP(loadPerson);
PREP(loadPersonLocal);
@ -170,7 +164,6 @@ PREP(setSettingFromConfig);
PREP(setVariableJIP);
PREP(setVariablePublic);
PREP(setVolume);
PREP(sortAlphabeticallyBy);
PREP(showHud);
PREP(statusEffect_addType);
PREP(statusEffect_get);
@ -190,7 +183,6 @@ PREP(toHex);
PREP(toNumber);
PREP(unhideUnit);
PREP(uniqueElements);
PREP(uniqueElementsOnly);
PREP(unloadPerson);
PREP(unloadPersonLocal);
PREP(unmuteUnit);
@ -217,8 +209,6 @@ PREP(getWeaponMuzzles);
PREP(getConfigTypeObject);
PREP(getConfigGunner);
PREP(getConfigCommander);
PREP(getHitPoints);
PREP(getHitPointsWithSelections);
PREP(getSelectionsWithoutHitPoints);
PREP(getReflectorsWithSelections);
PREP(getLightProperties);

View File

@ -1,19 +0,0 @@
/*
* Author: commy2
* Converts some keys to an Arma Dik Code.
*
* Arguments:
* 0: Key <STRING>
*
* Return Value:
* Dik Code <NUMBER>
*
* Public: Yes
*
* Deprecated
*/
#include "script_component.hpp"
ACE_DEPRECATED("ace_common_fnc_codeToLetter","3.5.0","-");
["", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"] select ([2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 30, 48, 46, 32, 18, 33, 34, 35, 23, 36, 37, 38, 50, 49, 24, 25, 16, 19, 31, 20, 22, 47, 17, 45, 44, 21] find (_this select 0)) + 1

View File

@ -17,6 +17,8 @@
*/
#include "script_component.hpp"
ACE_DEPRECATED("ace_common_fnc_execPersistentFnc","3.7.0","ace_common_fnc_globalEvent");
GVAR(remoteFnc) = _this;
params ["_arguments", "_function", "_unit", "_name"];

View File

@ -20,6 +20,8 @@
*/
#include "script_component.hpp"
ACE_DEPRECATED("ace_common_fnc_execRemoteFnc","3.7.0","ace_common_fnc_globalEvent");
GVAR(remoteFnc) = _this;
params ["_arguments", "_function", ["_unit", 2]];

View File

@ -1,28 +0,0 @@
/*
* Author: commy2
* Returns all hitpoints and their selections of any vehicle. Might contain duplicates if the turrets contain non unique hitpoints with different selection names.
*
* Arguments:
* 0: Vehicle <OBJECT>
*
* Return Value:
* Hitpoints <ARRAY>
*
* Public: Yes
*
* Deprecated
*/
#include "script_component.hpp"
ACE_DEPRECATED("ace_common_fnc_getHitPoints","3.5.0","getAllHitPointsDamage");
params ["_vehicle"];
private _hitPointsWithSelections = getAllHitPointsDamage _vehicle;
// get correct format on vehicles without any hitpoints
if (_hitPointsWithSelections isEqualTo []) then {
_hitPointsWithSelections = [[],[],[]];
};
(_hitPointsWithSelections select 0) - [""]

View File

@ -1,31 +0,0 @@
/*
* Author: commy2
* Returns all hitpoints and their respective selections of any vehicle. Might contain duplicates for non unique hitpoints in turrets.
*
* Arguments:
* 0: Vehicle <OBJECT>
*
* Return Value:
* 0: Hitpoints <ARRAY>
* 1: Selections <ARRAY>
*
* Public: Yes
*
* Deprecated
*/
#include "script_component.hpp"
ACE_DEPRECATED("ace_common_fnc_getHitPointsWithSelections","3.5.0","getAllHitPointsDamage");
params ["_vehicle"];
private _hitPointsWithSelections = getAllHitPointsDamage _vehicle;
// get correct format on vehicles without any hitpoints
if (_hitPointsWithSelections isEqualTo []) then {
_hitPointsWithSelections = [[],[],[]];
};
_hitPointsWithSelections resize 2;
_hitPointsWithSelections

View File

@ -1,19 +0,0 @@
/*
* Author: Glowbal
* Check if unit's head is underwater
*
* Arguments:
* 0: Unit <OBJECT>
*
* Return Value:
* If unit's head is underwater <BOOL>
*
* Public: Yes
*
* Deprecated
*/
#include "script_component.hpp"
ACE_DEPRECATED("ace_common_fnc_inWater","3.5.0","ace_common_fnc_isUnderwater");
_this call FUNC(isUnderwater)

View File

@ -1,37 +0,0 @@
/*
* Author: Ruthberg
* Checks whether a given configuration name appears in the inheritance tree of a specific configuration entry.
*
* Arguments:
* 0: configEntry (CONFIG)
* 1: configname (STING)
*
* Return Value:
* BOOLEAN
*
* Public: Yes
*
* Note: Not to be confused with the inheritsFrom scripting command.
*
* Deprecated
*/
#include "script_component.hpp"
ACE_DEPRECATED("ace_common_fnc_inheritsFrom","3.5.0","inheritsFrom ARRAY");
params ["_configEntry", "_configMatch"];
if (configName _configEntry == _configMatch) exitWith {true};
if (configName _configEntry == ",") exitWith {false};
private _match = false;
while {configName _configEntry != ""} do {
if (configName _configEntry == _configMatch) exitWith {
_match = true;
};
_configEntry = inheritsFrom _configEntry;
};
_match

View File

@ -1,21 +0,0 @@
/*
* Author: commy2
* Check if the object still exists and is alive. This function exists because 'alive objNull' actually returns true.
*
* Argument:
* 0: Any object <OBJECT>
*
* Return value:
* The object exists and is alive <BOOL>.
*
* Public: Yes
*
* Deprecated
*/
#include "script_component.hpp"
ACE_DEPRECATED("ace_common_fnc_isAlive","3.5.0","alive");
params ["_unit"];
!isNull _unit && {alive _unit} // return

View File

@ -1,21 +0,0 @@
/*
* Author: commy2
* Check if the unit is in a vehicle and turned out.
*
* Arguments:
* 0: Unit, not the vehicle <OBJECT>
*
* Return Value:
* Is the unit turned out or not? Will return false if there is no option to turn out in the first place. <BOOL>
*
* Public: Yes
*
* Deprecated
*/
#include "script_component.hpp"
ACE_DEPRECATED("ace_common_fnc_isTurnedOut","3.5.0","isTurnedOut");
params ["_unit"];
isTurnedOut _unit // return

View File

@ -1,19 +0,0 @@
/*
* Author: commy2
* Converts some Arma Dik Codes to a key.
*
* Arguments:
* 0: Dik Code <NUMBER>
*
* Return Value:
* Key <STRING>
*
* Public: Yes
*
* Deprecated
*/
#include "script_component.hpp"
ACE_DEPRECATED("ace_common_fnc_letterToCode","3.5.0","-");
[-1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 30, 48, 46, 32, 18, 33, 34, 35, 23, 36, 37, 38, 50, 49, 24, 25, 16, 19, 31, 20, 22, 47, 17, 45, 44, 21] select (["1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"] find toUpper (_this select 0)) + 1

View File

@ -1,49 +0,0 @@
/*
* Author: Glowbal
* ?
*
* Arguments:
* ?
*
* Return Value:
* ?
*
* Public: Yes
*
* Deprecated
*/
#include "script_component.hpp"
ACE_DEPRECATED("ace_common_fnc_sortAlphabeticallyBy","3.5.0","sort");
params ["_array", "_elementN"];
private _indices = [];
private _elements = [];
{
private _theElement = toArray (_x select _elementN);
_indices pushBack _forEachIndex;
_elements pushBack _theElement;
} forEach _array;
for "_i" from 1 to (count _elements) - 1 do {
private _tmp = _elements select _i;
private _tempIndex = _indices select _i;
_j = _i;
while {_j >= 1 && {_tmp < _elements select (_j - 1)}} do {
_elements set [_j, _elements select (_j - 1)];
_indices set [_j, _indices select (_j - 1)];
_j = _j - 1;
};
_elements set[_j, _tmp];
_indices set [_j, _tempIndex];
};
private _returnArray = [];
{
_returnArray pushBack (_array select _x);
} forEach _indices;
_returnArray

View File

@ -1,19 +0,0 @@
/*
* Author: Glowbal
* Make a copy of an array with only the unique elements.
*
* Arguments:
* 0: array <ARRAY>
*
* Return Value:
* Copy of original array <ARRAY>
*
* Public: Yes
*
* Deprecated
*/
#include "script_component.hpp"
ACE_DEPRECATED("ace_common_fnc_uniqueElementsOnly","3.5.0","ace_common_fnc_uniqueElements");
_this call FUNC(uniqueElements)