From af309b937b24ad005458ac9020a6d9ff47a91e0c Mon Sep 17 00:00:00 2001 From: commy2 Date: Mon, 21 Sep 2015 21:25:18 +0200 Subject: [PATCH 1/8] add depracted warnings --- addons/common/functions/fnc_checkPBOs.sqf | 2 +- addons/common/functions/fnc_codeToLetter.sqf | 2 ++ addons/common/functions/fnc_getHitPoints.sqf | 2 ++ addons/common/functions/fnc_getHitPointsWithSelections.sqf | 2 ++ addons/common/functions/fnc_inheritsFrom.sqf | 2 ++ addons/common/functions/fnc_isAlive.sqf | 2 ++ addons/common/functions/fnc_isTurnedOut.sqf | 2 ++ addons/common/functions/fnc_letterToCode.sqf | 2 ++ addons/common/functions/fnc_sortAlphabeticallyBy.sqf | 2 ++ addons/common/functions/fnc_uniqueElementsOnly.sqf | 2 ++ addons/common/scripts/Version/script_component.hpp | 1 - addons/common/scripts/{Version => }/checkVersionNumber.sqf | 0 12 files changed, 19 insertions(+), 2 deletions(-) delete mode 100644 addons/common/scripts/Version/script_component.hpp rename addons/common/scripts/{Version => }/checkVersionNumber.sqf (100%) diff --git a/addons/common/functions/fnc_checkPBOs.sqf b/addons/common/functions/fnc_checkPBOs.sqf index 4c923899a1..9cb5ed4d61 100644 --- a/addons/common/functions/fnc_checkPBOs.sqf +++ b/addons/common/functions/fnc_checkPBOs.sqf @@ -92,5 +92,5 @@ if (!isServer) then { }; if (_checkAll) then { - 0 spawn COMPILE_FILE(scripts\Version\checkVersionNumber); // @todo + 0 spawn COMPILE_FILE(scripts\checkVersionNumber); // @todo }; diff --git a/addons/common/functions/fnc_codeToLetter.sqf b/addons/common/functions/fnc_codeToLetter.sqf index 0bfb1d465f..64d17be918 100644 --- a/addons/common/functions/fnc_codeToLetter.sqf +++ b/addons/common/functions/fnc_codeToLetter.sqf @@ -14,4 +14,6 @@ */ #include "script_component.hpp" +ACE_WARNINGFORMAT_3("%1 is deprecated. Support will be dropped in version %2. Replaced by %3","ace_common_fnc_codeToLetter","1.5","-"); + ["", "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 diff --git a/addons/common/functions/fnc_getHitPoints.sqf b/addons/common/functions/fnc_getHitPoints.sqf index 8b2f10728c..9d50ed7330 100644 --- a/addons/common/functions/fnc_getHitPoints.sqf +++ b/addons/common/functions/fnc_getHitPoints.sqf @@ -14,6 +14,8 @@ */ #include "script_component.hpp" +ACE_WARNINGFORMAT_3("%1 is deprecated. Support will be dropped in version %2. Replaced by %3","ace_common_fnc_getHitPoints","1.5","getAllHitPointsDamage"); + params ["_vehicle"]; (getAllHitPointsDamage _vehicle select 0) - [""] diff --git a/addons/common/functions/fnc_getHitPointsWithSelections.sqf b/addons/common/functions/fnc_getHitPointsWithSelections.sqf index 7b027d9efa..6a5b7a0ef5 100644 --- a/addons/common/functions/fnc_getHitPointsWithSelections.sqf +++ b/addons/common/functions/fnc_getHitPointsWithSelections.sqf @@ -15,6 +15,8 @@ */ #include "script_component.hpp" +ACE_WARNINGFORMAT_3("%1 is deprecated. Support will be dropped in version %2. Replaced by %3","ace_common_fnc_getHitPointsWithSelections","1.5","getAllHitPointsDamage"); + params ["_vehicle"]; private "_hitPointsWithSelections"; diff --git a/addons/common/functions/fnc_inheritsFrom.sqf b/addons/common/functions/fnc_inheritsFrom.sqf index 586a37847c..253a01d856 100644 --- a/addons/common/functions/fnc_inheritsFrom.sqf +++ b/addons/common/functions/fnc_inheritsFrom.sqf @@ -17,6 +17,8 @@ */ #include "script_component.hpp" +ACE_WARNINGFORMAT_3("%1 is deprecated. Support will be dropped in version %2. Replaced by %3","ace_common_fnc_inheritsFrom","1.5","inheritsFrom ARRAY"); + params ["_configEntry", "_configMatch"]; if (configName _configEntry == _configMatch) exitWith {true}; diff --git a/addons/common/functions/fnc_isAlive.sqf b/addons/common/functions/fnc_isAlive.sqf index 343466c00d..524d5739ee 100644 --- a/addons/common/functions/fnc_isAlive.sqf +++ b/addons/common/functions/fnc_isAlive.sqf @@ -14,6 +14,8 @@ */ #include "script_component.hpp" +ACE_WARNINGFORMAT_3("%1 is deprecated. Support will be dropped in version %2. Replaced by %3","ace_common_fnc_isAlive","1.5","alive"); + params ["_unit"]; !isNull _unit && {alive _unit} // return diff --git a/addons/common/functions/fnc_isTurnedOut.sqf b/addons/common/functions/fnc_isTurnedOut.sqf index 15861938b8..e11f971b4a 100644 --- a/addons/common/functions/fnc_isTurnedOut.sqf +++ b/addons/common/functions/fnc_isTurnedOut.sqf @@ -14,6 +14,8 @@ */ #include "script_component.hpp" +ACE_WARNINGFORMAT_3("%1 is deprecated. Support will be dropped in version %2. Replaced by %3","ace_common_fnc_isTurnedOut","1.5","isTurnedOut"); + params ["_unit"]; isTurnedOut _unit // return diff --git a/addons/common/functions/fnc_letterToCode.sqf b/addons/common/functions/fnc_letterToCode.sqf index 12e6cf72ce..f995a40168 100644 --- a/addons/common/functions/fnc_letterToCode.sqf +++ b/addons/common/functions/fnc_letterToCode.sqf @@ -14,4 +14,6 @@ */ #include "script_component.hpp" +ACE_WARNINGFORMAT_3("%1 is deprecated. Support will be dropped in version %2. Replaced by %3","ace_common_fnc_letterToCode","1.5","-"); + [-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 diff --git a/addons/common/functions/fnc_sortAlphabeticallyBy.sqf b/addons/common/functions/fnc_sortAlphabeticallyBy.sqf index 76082013ef..a6bd39f101 100644 --- a/addons/common/functions/fnc_sortAlphabeticallyBy.sqf +++ b/addons/common/functions/fnc_sortAlphabeticallyBy.sqf @@ -14,6 +14,8 @@ */ #include "script_component.hpp" +ACE_WARNINGFORMAT_3("%1 is deprecated. Support will be dropped in version %2. Replaced by %3","ace_common_fnc_sortAlphabeticallyBy","1.5","sort"); + params ["_array", "_elementN"]; private ["_elements", "_indexes", "_theElement", "_tmp", "_tempIndex", "_returnArray"]; diff --git a/addons/common/functions/fnc_uniqueElementsOnly.sqf b/addons/common/functions/fnc_uniqueElementsOnly.sqf index e8d469867e..3c6568c1c6 100644 --- a/addons/common/functions/fnc_uniqueElementsOnly.sqf +++ b/addons/common/functions/fnc_uniqueElementsOnly.sqf @@ -14,4 +14,6 @@ */ #include "script_component.hpp" +ACE_WARNINGFORMAT_3("%1 is deprecated. Support will be dropped in version %2. Replaced by %3","ace_common_fnc_uniqueElementsOnly","1.5","ace_common_fnc_uniqueElements"); + _this call FUNC(uniqueElements) diff --git a/addons/common/scripts/Version/script_component.hpp b/addons/common/scripts/Version/script_component.hpp deleted file mode 100644 index 23da62b05c..0000000000 --- a/addons/common/scripts/Version/script_component.hpp +++ /dev/null @@ -1 +0,0 @@ -#include "\z\ace\addons\common\script_component.hpp" \ No newline at end of file diff --git a/addons/common/scripts/Version/checkVersionNumber.sqf b/addons/common/scripts/checkVersionNumber.sqf similarity index 100% rename from addons/common/scripts/Version/checkVersionNumber.sqf rename to addons/common/scripts/checkVersionNumber.sqf From b1f79f0383ebf559460c76072dafc858b8cf9981 Mon Sep 17 00:00:00 2001 From: commy2 Date: Mon, 21 Sep 2015 21:39:45 +0200 Subject: [PATCH 2/8] fix broken log warning macro --- addons/main/script_macros.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/main/script_macros.hpp b/addons/main/script_macros.hpp index 130c7427d8..180ded8e21 100644 --- a/addons/main/script_macros.hpp +++ b/addons/main/script_macros.hpp @@ -132,7 +132,7 @@ #define ACE_LOGWARNING_7(message,arg1,arg2,arg3,arg4,arg5,arg6,arg7) ACE_LOGWARNING(FORMAT_7(message,arg1,arg2,arg3,arg4,arg5,arg6,arg7)) #define ACE_LOGWARNING_8(message,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8) ACE_LOGWARNING(FORMAT_8(message,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8)) -#define ACE_WARNINGFORMAT(message) ACE_LOGFORMAT(COMPONENT,"WARNING",message) +#define ACE_WARNINGFORMAT(message) ACE_LOG(COMPONENT,"WARNING",message) #define ACE_WARNINGFORMAT_1(message,arg1) ACE_WARNINGFORMAT(FORMAT_1(message,arg1)) #define ACE_WARNINGFORMAT_2(message,arg1,arg2) ACE_WARNINGFORMAT(FORMAT_2(message,arg1,arg2)) #define ACE_WARNINGFORMAT_3(message,arg1,arg2,arg3) ACE_WARNINGFORMAT(FORMAT_3(message,arg1,arg2,arg3)) From 441efcd65f93b28b288b9a7382d4c63d8af492c1 Mon Sep 17 00:00:00 2001 From: commy2 Date: Mon, 21 Sep 2015 21:48:18 +0200 Subject: [PATCH 3/8] change version number in deprecated log --- addons/common/functions/fnc_codeToLetter.sqf | 2 +- addons/common/functions/fnc_getHitPoints.sqf | 2 +- addons/common/functions/fnc_getHitPointsWithSelections.sqf | 2 +- addons/common/functions/fnc_inheritsFrom.sqf | 2 +- addons/common/functions/fnc_isAlive.sqf | 2 +- addons/common/functions/fnc_isTurnedOut.sqf | 2 +- addons/common/functions/fnc_letterToCode.sqf | 2 +- addons/common/functions/fnc_sortAlphabeticallyBy.sqf | 2 +- addons/common/functions/fnc_uniqueElementsOnly.sqf | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/addons/common/functions/fnc_codeToLetter.sqf b/addons/common/functions/fnc_codeToLetter.sqf index 64d17be918..8d33763e87 100644 --- a/addons/common/functions/fnc_codeToLetter.sqf +++ b/addons/common/functions/fnc_codeToLetter.sqf @@ -14,6 +14,6 @@ */ #include "script_component.hpp" -ACE_WARNINGFORMAT_3("%1 is deprecated. Support will be dropped in version %2. Replaced by %3","ace_common_fnc_codeToLetter","1.5","-"); +ACE_WARNINGFORMAT_3("%1 is deprecated. Support will be dropped in version %2. Replaced by: %3","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 diff --git a/addons/common/functions/fnc_getHitPoints.sqf b/addons/common/functions/fnc_getHitPoints.sqf index 9d50ed7330..23c297dc5b 100644 --- a/addons/common/functions/fnc_getHitPoints.sqf +++ b/addons/common/functions/fnc_getHitPoints.sqf @@ -14,7 +14,7 @@ */ #include "script_component.hpp" -ACE_WARNINGFORMAT_3("%1 is deprecated. Support will be dropped in version %2. Replaced by %3","ace_common_fnc_getHitPoints","1.5","getAllHitPointsDamage"); +ACE_WARNINGFORMAT_3("%1 is deprecated. Support will be dropped in version %2. Replaced by: %3","ace_common_fnc_getHitPoints","3.5.0","getAllHitPointsDamage"); params ["_vehicle"]; diff --git a/addons/common/functions/fnc_getHitPointsWithSelections.sqf b/addons/common/functions/fnc_getHitPointsWithSelections.sqf index 6a5b7a0ef5..38d5dd8785 100644 --- a/addons/common/functions/fnc_getHitPointsWithSelections.sqf +++ b/addons/common/functions/fnc_getHitPointsWithSelections.sqf @@ -15,7 +15,7 @@ */ #include "script_component.hpp" -ACE_WARNINGFORMAT_3("%1 is deprecated. Support will be dropped in version %2. Replaced by %3","ace_common_fnc_getHitPointsWithSelections","1.5","getAllHitPointsDamage"); +ACE_WARNINGFORMAT_3("%1 is deprecated. Support will be dropped in version %2. Replaced by: %3","ace_common_fnc_getHitPointsWithSelections","3.5.0","getAllHitPointsDamage"); params ["_vehicle"]; diff --git a/addons/common/functions/fnc_inheritsFrom.sqf b/addons/common/functions/fnc_inheritsFrom.sqf index 253a01d856..a139ed69c7 100644 --- a/addons/common/functions/fnc_inheritsFrom.sqf +++ b/addons/common/functions/fnc_inheritsFrom.sqf @@ -17,7 +17,7 @@ */ #include "script_component.hpp" -ACE_WARNINGFORMAT_3("%1 is deprecated. Support will be dropped in version %2. Replaced by %3","ace_common_fnc_inheritsFrom","1.5","inheritsFrom ARRAY"); +ACE_WARNINGFORMAT_3("%1 is deprecated. Support will be dropped in version %2. Replaced by: %3","ace_common_fnc_inheritsFrom","3.5.0","inheritsFrom ARRAY"); params ["_configEntry", "_configMatch"]; diff --git a/addons/common/functions/fnc_isAlive.sqf b/addons/common/functions/fnc_isAlive.sqf index 524d5739ee..dc58a42f75 100644 --- a/addons/common/functions/fnc_isAlive.sqf +++ b/addons/common/functions/fnc_isAlive.sqf @@ -14,7 +14,7 @@ */ #include "script_component.hpp" -ACE_WARNINGFORMAT_3("%1 is deprecated. Support will be dropped in version %2. Replaced by %3","ace_common_fnc_isAlive","1.5","alive"); +ACE_WARNINGFORMAT_3("%1 is deprecated. Support will be dropped in version %2. Replaced by: %3","ace_common_fnc_isAlive","3.5.0","alive"); params ["_unit"]; diff --git a/addons/common/functions/fnc_isTurnedOut.sqf b/addons/common/functions/fnc_isTurnedOut.sqf index e11f971b4a..d58073e90d 100644 --- a/addons/common/functions/fnc_isTurnedOut.sqf +++ b/addons/common/functions/fnc_isTurnedOut.sqf @@ -14,7 +14,7 @@ */ #include "script_component.hpp" -ACE_WARNINGFORMAT_3("%1 is deprecated. Support will be dropped in version %2. Replaced by %3","ace_common_fnc_isTurnedOut","1.5","isTurnedOut"); +ACE_WARNINGFORMAT_3("%1 is deprecated. Support will be dropped in version %2. Replaced by: %3","ace_common_fnc_isTurnedOut","3.5.0","isTurnedOut"); params ["_unit"]; diff --git a/addons/common/functions/fnc_letterToCode.sqf b/addons/common/functions/fnc_letterToCode.sqf index f995a40168..95dc168239 100644 --- a/addons/common/functions/fnc_letterToCode.sqf +++ b/addons/common/functions/fnc_letterToCode.sqf @@ -14,6 +14,6 @@ */ #include "script_component.hpp" -ACE_WARNINGFORMAT_3("%1 is deprecated. Support will be dropped in version %2. Replaced by %3","ace_common_fnc_letterToCode","1.5","-"); +ACE_WARNINGFORMAT_3("%1 is deprecated. Support will be dropped in version %2. Replaced by: %3","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 diff --git a/addons/common/functions/fnc_sortAlphabeticallyBy.sqf b/addons/common/functions/fnc_sortAlphabeticallyBy.sqf index a6bd39f101..4d9ef7ab8a 100644 --- a/addons/common/functions/fnc_sortAlphabeticallyBy.sqf +++ b/addons/common/functions/fnc_sortAlphabeticallyBy.sqf @@ -14,7 +14,7 @@ */ #include "script_component.hpp" -ACE_WARNINGFORMAT_3("%1 is deprecated. Support will be dropped in version %2. Replaced by %3","ace_common_fnc_sortAlphabeticallyBy","1.5","sort"); +ACE_WARNINGFORMAT_3("%1 is deprecated. Support will be dropped in version %2. Replaced by: %3","ace_common_fnc_sortAlphabeticallyBy","3.5.0","sort"); params ["_array", "_elementN"]; diff --git a/addons/common/functions/fnc_uniqueElementsOnly.sqf b/addons/common/functions/fnc_uniqueElementsOnly.sqf index 3c6568c1c6..5cfc527ac1 100644 --- a/addons/common/functions/fnc_uniqueElementsOnly.sqf +++ b/addons/common/functions/fnc_uniqueElementsOnly.sqf @@ -14,6 +14,6 @@ */ #include "script_component.hpp" -ACE_WARNINGFORMAT_3("%1 is deprecated. Support will be dropped in version %2. Replaced by %3","ace_common_fnc_uniqueElementsOnly","1.5","ace_common_fnc_uniqueElements"); +ACE_WARNINGFORMAT_3("%1 is deprecated. Support will be dropped in version %2. Replaced by: %3","ace_common_fnc_uniqueElementsOnly","3.5.0","ace_common_fnc_uniqueElements"); _this call FUNC(uniqueElements) From 020915a52a8400a078c48d6073f89a0f1b0a979f Mon Sep 17 00:00:00 2001 From: commy2 Date: Mon, 21 Sep 2015 21:51:05 +0200 Subject: [PATCH 4/8] Revert "fix broken log warning macro" This reverts commit b1f79f0383ebf559460c76072dafc858b8cf9981. --- addons/main/script_macros.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/main/script_macros.hpp b/addons/main/script_macros.hpp index 180ded8e21..130c7427d8 100644 --- a/addons/main/script_macros.hpp +++ b/addons/main/script_macros.hpp @@ -132,7 +132,7 @@ #define ACE_LOGWARNING_7(message,arg1,arg2,arg3,arg4,arg5,arg6,arg7) ACE_LOGWARNING(FORMAT_7(message,arg1,arg2,arg3,arg4,arg5,arg6,arg7)) #define ACE_LOGWARNING_8(message,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8) ACE_LOGWARNING(FORMAT_8(message,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8)) -#define ACE_WARNINGFORMAT(message) ACE_LOG(COMPONENT,"WARNING",message) +#define ACE_WARNINGFORMAT(message) ACE_LOGFORMAT(COMPONENT,"WARNING",message) #define ACE_WARNINGFORMAT_1(message,arg1) ACE_WARNINGFORMAT(FORMAT_1(message,arg1)) #define ACE_WARNINGFORMAT_2(message,arg1,arg2) ACE_WARNINGFORMAT(FORMAT_2(message,arg1,arg2)) #define ACE_WARNINGFORMAT_3(message,arg1,arg2,arg3) ACE_WARNINGFORMAT(FORMAT_3(message,arg1,arg2,arg3)) From f8676afca43619f9dcc3035f82510f5b3adfff0f Mon Sep 17 00:00:00 2001 From: commy2 Date: Mon, 21 Sep 2015 21:56:18 +0200 Subject: [PATCH 5/8] use correct macro for rpt writing --- addons/common/functions/fnc_codeToLetter.sqf | 2 +- addons/common/functions/fnc_getHitPoints.sqf | 2 +- addons/common/functions/fnc_getHitPointsWithSelections.sqf | 2 +- addons/common/functions/fnc_inheritsFrom.sqf | 2 +- addons/common/functions/fnc_isAlive.sqf | 2 +- addons/common/functions/fnc_isTurnedOut.sqf | 2 +- addons/common/functions/fnc_letterToCode.sqf | 2 +- addons/common/functions/fnc_sortAlphabeticallyBy.sqf | 2 +- addons/common/functions/fnc_uniqueElementsOnly.sqf | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/addons/common/functions/fnc_codeToLetter.sqf b/addons/common/functions/fnc_codeToLetter.sqf index 8d33763e87..ef71b60b1b 100644 --- a/addons/common/functions/fnc_codeToLetter.sqf +++ b/addons/common/functions/fnc_codeToLetter.sqf @@ -14,6 +14,6 @@ */ #include "script_component.hpp" -ACE_WARNINGFORMAT_3("%1 is deprecated. Support will be dropped in version %2. Replaced by: %3","ace_common_fnc_codeToLetter","3.5.0","-"); +ACE_LOGWARNING_3("%1 is deprecated. Support will be dropped in version %2. Replaced by: %3","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 diff --git a/addons/common/functions/fnc_getHitPoints.sqf b/addons/common/functions/fnc_getHitPoints.sqf index 23c297dc5b..a32cda7c1f 100644 --- a/addons/common/functions/fnc_getHitPoints.sqf +++ b/addons/common/functions/fnc_getHitPoints.sqf @@ -14,7 +14,7 @@ */ #include "script_component.hpp" -ACE_WARNINGFORMAT_3("%1 is deprecated. Support will be dropped in version %2. Replaced by: %3","ace_common_fnc_getHitPoints","3.5.0","getAllHitPointsDamage"); +ACE_LOGWARNING_3("%1 is deprecated. Support will be dropped in version %2. Replaced by: %3","ace_common_fnc_getHitPoints","3.5.0","getAllHitPointsDamage"); params ["_vehicle"]; diff --git a/addons/common/functions/fnc_getHitPointsWithSelections.sqf b/addons/common/functions/fnc_getHitPointsWithSelections.sqf index 38d5dd8785..f76391e593 100644 --- a/addons/common/functions/fnc_getHitPointsWithSelections.sqf +++ b/addons/common/functions/fnc_getHitPointsWithSelections.sqf @@ -15,7 +15,7 @@ */ #include "script_component.hpp" -ACE_WARNINGFORMAT_3("%1 is deprecated. Support will be dropped in version %2. Replaced by: %3","ace_common_fnc_getHitPointsWithSelections","3.5.0","getAllHitPointsDamage"); +ACE_LOGWARNING_3("%1 is deprecated. Support will be dropped in version %2. Replaced by: %3","ace_common_fnc_getHitPointsWithSelections","3.5.0","getAllHitPointsDamage"); params ["_vehicle"]; diff --git a/addons/common/functions/fnc_inheritsFrom.sqf b/addons/common/functions/fnc_inheritsFrom.sqf index a139ed69c7..f9e2882a37 100644 --- a/addons/common/functions/fnc_inheritsFrom.sqf +++ b/addons/common/functions/fnc_inheritsFrom.sqf @@ -17,7 +17,7 @@ */ #include "script_component.hpp" -ACE_WARNINGFORMAT_3("%1 is deprecated. Support will be dropped in version %2. Replaced by: %3","ace_common_fnc_inheritsFrom","3.5.0","inheritsFrom ARRAY"); +ACE_LOGWARNING_3("%1 is deprecated. Support will be dropped in version %2. Replaced by: %3","ace_common_fnc_inheritsFrom","3.5.0","inheritsFrom ARRAY"); params ["_configEntry", "_configMatch"]; diff --git a/addons/common/functions/fnc_isAlive.sqf b/addons/common/functions/fnc_isAlive.sqf index dc58a42f75..5505f5d46b 100644 --- a/addons/common/functions/fnc_isAlive.sqf +++ b/addons/common/functions/fnc_isAlive.sqf @@ -14,7 +14,7 @@ */ #include "script_component.hpp" -ACE_WARNINGFORMAT_3("%1 is deprecated. Support will be dropped in version %2. Replaced by: %3","ace_common_fnc_isAlive","3.5.0","alive"); +ACE_LOGWARNING_3("%1 is deprecated. Support will be dropped in version %2. Replaced by: %3","ace_common_fnc_isAlive","3.5.0","alive"); params ["_unit"]; diff --git a/addons/common/functions/fnc_isTurnedOut.sqf b/addons/common/functions/fnc_isTurnedOut.sqf index d58073e90d..87b261ed06 100644 --- a/addons/common/functions/fnc_isTurnedOut.sqf +++ b/addons/common/functions/fnc_isTurnedOut.sqf @@ -14,7 +14,7 @@ */ #include "script_component.hpp" -ACE_WARNINGFORMAT_3("%1 is deprecated. Support will be dropped in version %2. Replaced by: %3","ace_common_fnc_isTurnedOut","3.5.0","isTurnedOut"); +ACE_LOGWARNING_3("%1 is deprecated. Support will be dropped in version %2. Replaced by: %3","ace_common_fnc_isTurnedOut","3.5.0","isTurnedOut"); params ["_unit"]; diff --git a/addons/common/functions/fnc_letterToCode.sqf b/addons/common/functions/fnc_letterToCode.sqf index 95dc168239..83a0cea671 100644 --- a/addons/common/functions/fnc_letterToCode.sqf +++ b/addons/common/functions/fnc_letterToCode.sqf @@ -14,6 +14,6 @@ */ #include "script_component.hpp" -ACE_WARNINGFORMAT_3("%1 is deprecated. Support will be dropped in version %2. Replaced by: %3","ace_common_fnc_letterToCode","3.5.0","-"); +ACE_LOGWARNING_3("%1 is deprecated. Support will be dropped in version %2. Replaced by: %3","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 diff --git a/addons/common/functions/fnc_sortAlphabeticallyBy.sqf b/addons/common/functions/fnc_sortAlphabeticallyBy.sqf index 4d9ef7ab8a..ab43645768 100644 --- a/addons/common/functions/fnc_sortAlphabeticallyBy.sqf +++ b/addons/common/functions/fnc_sortAlphabeticallyBy.sqf @@ -14,7 +14,7 @@ */ #include "script_component.hpp" -ACE_WARNINGFORMAT_3("%1 is deprecated. Support will be dropped in version %2. Replaced by: %3","ace_common_fnc_sortAlphabeticallyBy","3.5.0","sort"); +ACE_LOGWARNING_3("%1 is deprecated. Support will be dropped in version %2. Replaced by: %3","ace_common_fnc_sortAlphabeticallyBy","3.5.0","sort"); params ["_array", "_elementN"]; diff --git a/addons/common/functions/fnc_uniqueElementsOnly.sqf b/addons/common/functions/fnc_uniqueElementsOnly.sqf index 5cfc527ac1..9c5bcdd1ba 100644 --- a/addons/common/functions/fnc_uniqueElementsOnly.sqf +++ b/addons/common/functions/fnc_uniqueElementsOnly.sqf @@ -14,6 +14,6 @@ */ #include "script_component.hpp" -ACE_WARNINGFORMAT_3("%1 is deprecated. Support will be dropped in version %2. Replaced by: %3","ace_common_fnc_uniqueElementsOnly","3.5.0","ace_common_fnc_uniqueElements"); +ACE_LOGWARNING_3("%1 is deprecated. Support will be dropped in version %2. Replaced by: %3","ace_common_fnc_uniqueElementsOnly","3.5.0","ace_common_fnc_uniqueElements"); _this call FUNC(uniqueElements) From 9996aa22ab5784c376e76fdce2fe3d57578f9958 Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Mon, 21 Sep 2015 15:03:34 -0500 Subject: [PATCH 6/8] Replace googles - isTurnedOut --- addons/goggles/functions/fnc_onEachFrame.sqf | 2 +- addons/goggles/functions/fnc_rainEffect.sqf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/goggles/functions/fnc_onEachFrame.sqf b/addons/goggles/functions/fnc_onEachFrame.sqf index 863046da7f..85692a0f57 100644 --- a/addons/goggles/functions/fnc_onEachFrame.sqf +++ b/addons/goggles/functions/fnc_onEachFrame.sqf @@ -17,7 +17,7 @@ if (isNull(ace_player)) exitWith {}; GVAR(FrameEvent) set [0, !(GVAR(FrameEvent) select 0)]; if (GVAR(FrameEvent) select 0) exitWith { - if (vehicle ace_player != ace_player && {!([ace_player] call EFUNC(common,isTurnedOut))}) exitWith {(GVAR(FrameEvent) select 1) set [0, false]; }; + if (vehicle ace_player != ace_player && {!isTurnedOut ACE_player}) exitWith {(GVAR(FrameEvent) select 1) set [0, false]; }; GVAR(FrameEvent) set [1, ([ace_player] call FUNC(isInRotorWash))]; }; private ["_rotorWash","_safe"]; diff --git a/addons/goggles/functions/fnc_rainEffect.sqf b/addons/goggles/functions/fnc_rainEffect.sqf index b5badef6f2..6f351f4002 100644 --- a/addons/goggles/functions/fnc_rainEffect.sqf +++ b/addons/goggles/functions/fnc_rainEffect.sqf @@ -19,7 +19,7 @@ if (isNull(ace_player) || {!(alive ace_player)}) exitWith {}; _fnc_underCover = { private ["_pos", "_unit"]; _unit = (_this select 0); - if (vehicle _unit != _unit && {!([_unit] call EFUNC(common,isTurnedOut))}) exitWith {true}; + if (vehicle _unit != _unit && {!isTurnedOut _unit}) exitWith {true}; _pos = eyePos _unit; ((positionCameraToWorld [0,0,1] select 2) < ((positionCameraToWorld [0,0,0] select 2) - 0.4)) || {(lineIntersects [_pos, _pos vectorAdd [0,0,15], _unit])} }; From f134a77e98062629b5cf811bc23db4b4759537c4 Mon Sep 17 00:00:00 2001 From: commy2 Date: Mon, 21 Sep 2015 22:09:54 +0200 Subject: [PATCH 7/8] add and use deprecated macro --- addons/common/functions/fnc_codeToLetter.sqf | 2 +- addons/common/functions/fnc_getHitPoints.sqf | 2 +- addons/common/functions/fnc_getHitPointsWithSelections.sqf | 2 +- addons/common/functions/fnc_inheritsFrom.sqf | 2 +- addons/common/functions/fnc_isAlive.sqf | 2 +- addons/common/functions/fnc_isTurnedOut.sqf | 2 +- addons/common/functions/fnc_letterToCode.sqf | 2 +- addons/common/functions/fnc_sortAlphabeticallyBy.sqf | 2 +- addons/common/functions/fnc_uniqueElementsOnly.sqf | 2 +- addons/main/script_macros.hpp | 2 ++ 10 files changed, 11 insertions(+), 9 deletions(-) diff --git a/addons/common/functions/fnc_codeToLetter.sqf b/addons/common/functions/fnc_codeToLetter.sqf index ef71b60b1b..80f6291d0f 100644 --- a/addons/common/functions/fnc_codeToLetter.sqf +++ b/addons/common/functions/fnc_codeToLetter.sqf @@ -14,6 +14,6 @@ */ #include "script_component.hpp" -ACE_LOGWARNING_3("%1 is deprecated. Support will be dropped in version %2. Replaced by: %3","ace_common_fnc_codeToLetter","3.5.0","-"); +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 diff --git a/addons/common/functions/fnc_getHitPoints.sqf b/addons/common/functions/fnc_getHitPoints.sqf index a32cda7c1f..6c0645007e 100644 --- a/addons/common/functions/fnc_getHitPoints.sqf +++ b/addons/common/functions/fnc_getHitPoints.sqf @@ -14,7 +14,7 @@ */ #include "script_component.hpp" -ACE_LOGWARNING_3("%1 is deprecated. Support will be dropped in version %2. Replaced by: %3","ace_common_fnc_getHitPoints","3.5.0","getAllHitPointsDamage"); +ACE_DEPRECATED("ace_common_fnc_getHitPoints","3.5.0","getAllHitPointsDamage"); params ["_vehicle"]; diff --git a/addons/common/functions/fnc_getHitPointsWithSelections.sqf b/addons/common/functions/fnc_getHitPointsWithSelections.sqf index f76391e593..36475672b9 100644 --- a/addons/common/functions/fnc_getHitPointsWithSelections.sqf +++ b/addons/common/functions/fnc_getHitPointsWithSelections.sqf @@ -15,7 +15,7 @@ */ #include "script_component.hpp" -ACE_LOGWARNING_3("%1 is deprecated. Support will be dropped in version %2. Replaced by: %3","ace_common_fnc_getHitPointsWithSelections","3.5.0","getAllHitPointsDamage"); +ACE_DEPRECATED("ace_common_fnc_getHitPointsWithSelections","3.5.0","getAllHitPointsDamage"); params ["_vehicle"]; diff --git a/addons/common/functions/fnc_inheritsFrom.sqf b/addons/common/functions/fnc_inheritsFrom.sqf index f9e2882a37..7f881ff746 100644 --- a/addons/common/functions/fnc_inheritsFrom.sqf +++ b/addons/common/functions/fnc_inheritsFrom.sqf @@ -17,7 +17,7 @@ */ #include "script_component.hpp" -ACE_LOGWARNING_3("%1 is deprecated. Support will be dropped in version %2. Replaced by: %3","ace_common_fnc_inheritsFrom","3.5.0","inheritsFrom ARRAY"); +ACE_DEPRECATED("ace_common_fnc_inheritsFrom","3.5.0","inheritsFrom ARRAY"); params ["_configEntry", "_configMatch"]; diff --git a/addons/common/functions/fnc_isAlive.sqf b/addons/common/functions/fnc_isAlive.sqf index 5505f5d46b..b9d94eed5d 100644 --- a/addons/common/functions/fnc_isAlive.sqf +++ b/addons/common/functions/fnc_isAlive.sqf @@ -14,7 +14,7 @@ */ #include "script_component.hpp" -ACE_LOGWARNING_3("%1 is deprecated. Support will be dropped in version %2. Replaced by: %3","ace_common_fnc_isAlive","3.5.0","alive"); +ACE_DEPRECATED("ace_common_fnc_isAlive","3.5.0","alive"); params ["_unit"]; diff --git a/addons/common/functions/fnc_isTurnedOut.sqf b/addons/common/functions/fnc_isTurnedOut.sqf index 87b261ed06..39eb460cc4 100644 --- a/addons/common/functions/fnc_isTurnedOut.sqf +++ b/addons/common/functions/fnc_isTurnedOut.sqf @@ -14,7 +14,7 @@ */ #include "script_component.hpp" -ACE_LOGWARNING_3("%1 is deprecated. Support will be dropped in version %2. Replaced by: %3","ace_common_fnc_isTurnedOut","3.5.0","isTurnedOut"); +ACE_DEPRECATED("ace_common_fnc_isTurnedOut","3.5.0","isTurnedOut"); params ["_unit"]; diff --git a/addons/common/functions/fnc_letterToCode.sqf b/addons/common/functions/fnc_letterToCode.sqf index 83a0cea671..7bbbcf4f3d 100644 --- a/addons/common/functions/fnc_letterToCode.sqf +++ b/addons/common/functions/fnc_letterToCode.sqf @@ -14,6 +14,6 @@ */ #include "script_component.hpp" -ACE_LOGWARNING_3("%1 is deprecated. Support will be dropped in version %2. Replaced by: %3","ace_common_fnc_letterToCode","3.5.0","-"); +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 diff --git a/addons/common/functions/fnc_sortAlphabeticallyBy.sqf b/addons/common/functions/fnc_sortAlphabeticallyBy.sqf index ab43645768..287c4566d5 100644 --- a/addons/common/functions/fnc_sortAlphabeticallyBy.sqf +++ b/addons/common/functions/fnc_sortAlphabeticallyBy.sqf @@ -14,7 +14,7 @@ */ #include "script_component.hpp" -ACE_LOGWARNING_3("%1 is deprecated. Support will be dropped in version %2. Replaced by: %3","ace_common_fnc_sortAlphabeticallyBy","3.5.0","sort"); +ACE_DEPRECATED("ace_common_fnc_sortAlphabeticallyBy","3.5.0","sort"); params ["_array", "_elementN"]; diff --git a/addons/common/functions/fnc_uniqueElementsOnly.sqf b/addons/common/functions/fnc_uniqueElementsOnly.sqf index 9c5bcdd1ba..9bdb6ff647 100644 --- a/addons/common/functions/fnc_uniqueElementsOnly.sqf +++ b/addons/common/functions/fnc_uniqueElementsOnly.sqf @@ -14,6 +14,6 @@ */ #include "script_component.hpp" -ACE_LOGWARNING_3("%1 is deprecated. Support will be dropped in version %2. Replaced by: %3","ace_common_fnc_uniqueElementsOnly","3.5.0","ace_common_fnc_uniqueElements"); +ACE_DEPRECATED("ace_common_fnc_uniqueElementsOnly","3.5.0","ace_common_fnc_uniqueElements"); _this call FUNC(uniqueElements) diff --git a/addons/main/script_macros.hpp b/addons/main/script_macros.hpp index 130c7427d8..2ad20a08c7 100644 --- a/addons/main/script_macros.hpp +++ b/addons/main/script_macros.hpp @@ -182,4 +182,6 @@ #define ACE_DEBUGFORMAT_7(message,arg1,arg2,arg3,arg4,arg5,arg6,arg7) ACE_DEBUGFORMAT(FORMAT_7(message,arg1,arg2,arg3,arg4,arg5,arg6,arg7)) #define ACE_DEBUGFORMAT_8(message,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8) ACE_DEBUGFORMAT(FORMAT_8(message,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8)) +#define ACE_DEPRECATED(arg1,arg2,arg3) ACE_LOGWARNING_3("%1 is deprecated. Support will be dropped in version %2. Replaced by: %3",arg1,arg2,arg3); + #include "script_debug.hpp" From f1abd4698f3815ddaf454dcfc123fb96e77f68a4 Mon Sep 17 00:00:00 2001 From: commy2 Date: Mon, 21 Sep 2015 22:12:17 +0200 Subject: [PATCH 8/8] remove superfluous ; --- addons/main/script_macros.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/main/script_macros.hpp b/addons/main/script_macros.hpp index 2ad20a08c7..f7ec3a3fa3 100644 --- a/addons/main/script_macros.hpp +++ b/addons/main/script_macros.hpp @@ -182,6 +182,6 @@ #define ACE_DEBUGFORMAT_7(message,arg1,arg2,arg3,arg4,arg5,arg6,arg7) ACE_DEBUGFORMAT(FORMAT_7(message,arg1,arg2,arg3,arg4,arg5,arg6,arg7)) #define ACE_DEBUGFORMAT_8(message,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8) ACE_DEBUGFORMAT(FORMAT_8(message,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8)) -#define ACE_DEPRECATED(arg1,arg2,arg3) ACE_LOGWARNING_3("%1 is deprecated. Support will be dropped in version %2. Replaced by: %3",arg1,arg2,arg3); +#define ACE_DEPRECATED(arg1,arg2,arg3) ACE_LOGWARNING_3("%1 is deprecated. Support will be dropped in version %2. Replaced by: %3",arg1,arg2,arg3) #include "script_debug.hpp"