From 380b4d740e9a59bc6f4756c4f6d2b53714081753 Mon Sep 17 00:00:00 2001 From: 3Mydlo3 Date: Fri, 13 Dec 2024 13:22:40 +0100 Subject: [PATCH 01/47] Copy common functions --- addons/common/XEH_PREP.hpp | 4 ++-- .../common/functions/fn_getGroupVehicles.sqf | 18 ++++++++++++++ addons/common/functions/fn_isEngineer.sqf | 17 +++++++++++++ addons/common/functions/fnc_isEmptyString.sqf | 22 ----------------- addons/common/functions/fnc_systemChat.sqf | 24 ------------------- 5 files changed, 37 insertions(+), 48 deletions(-) create mode 100644 addons/common/functions/fn_getGroupVehicles.sqf create mode 100644 addons/common/functions/fn_isEngineer.sqf delete mode 100644 addons/common/functions/fnc_isEmptyString.sqf delete mode 100644 addons/common/functions/fnc_systemChat.sqf diff --git a/addons/common/XEH_PREP.hpp b/addons/common/XEH_PREP.hpp index cde2f95..86d4ff6 100644 --- a/addons/common/XEH_PREP.hpp +++ b/addons/common/XEH_PREP.hpp @@ -1,2 +1,2 @@ -PREP(isEmptyString); -PREP(systemChat); +PREP(getGroupVehicles); +PREP(isEngineer); diff --git a/addons/common/functions/fn_getGroupVehicles.sqf b/addons/common/functions/fn_getGroupVehicles.sqf new file mode 100644 index 0000000..c761bd1 --- /dev/null +++ b/addons/common/functions/fn_getGroupVehicles.sqf @@ -0,0 +1,18 @@ +#include "script_component.hpp" +/* + * Author: 3Mydlo3 + * Returns all vehicles in possesion of given group. + * + * Arguments: + * 0: Group + * + * Return Value: + * List of unique vehicles > + * + * Public: No + */ + +params ["_group"]; + +private _groupVehicles = units _group apply { vehicle _x } select {_x isKindOf "AllVehicles"}; +_groupVehicles arrayIntersect _groupVehicles diff --git a/addons/common/functions/fn_isEngineer.sqf b/addons/common/functions/fn_isEngineer.sqf new file mode 100644 index 0000000..03f7d1c --- /dev/null +++ b/addons/common/functions/fn_isEngineer.sqf @@ -0,0 +1,17 @@ +#include "script_component.hpp" +/* + * Author: 3Mydlo3 + * Checks if given unit is an engineer. + * + * Arguments: + * 0: Unit + * + * Return Value: + * True if unit is an engineer + * + * Public: No + */ + +params ["_unit"]; + +_unit getUnitTrait "Engineer" isEqualTo 1 || {[_unit] call ACE_repair_fnc_isEngineer} diff --git a/addons/common/functions/fnc_isEmptyString.sqf b/addons/common/functions/fnc_isEmptyString.sqf deleted file mode 100644 index 1e73e85..0000000 --- a/addons/common/functions/fnc_isEmptyString.sqf +++ /dev/null @@ -1,22 +0,0 @@ -#include "script_component.hpp" -/* - * Author: 3Mydlo3 - * Example function checking if string is empty. - * - * Arguments: - * 0: String to check - * - * Return Value: - * True if string is null or empty - * - * Example: - * [nil] call afwg_common_fnc_isEmptyString - * - * Public: No - */ - -params [["_string", ""]]; - -if (_string isEqualTo "") exitWith { true }; - -false diff --git a/addons/common/functions/fnc_systemChat.sqf b/addons/common/functions/fnc_systemChat.sqf deleted file mode 100644 index 8cbe320..0000000 --- a/addons/common/functions/fnc_systemChat.sqf +++ /dev/null @@ -1,24 +0,0 @@ -#include "script_component.hpp" -/* - * Author: 3Mydlo3 - * Example function printing sytemChat message. - * - * Arguments: - * 0: Actual message - * - * Return Value: - * True if message was printed - * - * Example: - * ["Test message"] call afwg_common_fnc_systemChat - * - * Public: No - */ - -params [["_message", ""]]; - -if (_message call FUNC(isEmptyString)) exitWith { false }; - -sytemChat _message; - -true From a6c3075ede4b23b6871e51f6a6bfe14aae62b6ca Mon Sep 17 00:00:00 2001 From: 3Mydlo3 Date: Sun, 15 Dec 2024 22:35:34 +0100 Subject: [PATCH 02/47] Move functions and some init --- addons/_eventHandlers/$PBOPREFIX$ | 1 + addons/_eventHandlers/CfgEventHandlers.hpp | 15 +++ addons/_eventHandlers/XEH_PREP.hpp | 8 ++ addons/_eventHandlers/XEH_postInit.sqf | 4 + addons/_eventHandlers/XEH_preInit.sqf | 8 ++ addons/_eventHandlers/XEH_preStart.sqf | 2 + addons/_eventHandlers/config.cpp | 17 +++ .../functions/fn_curatorObjectDeleted.sqf | 16 +++ addons/_eventHandlers/functions/fn_draw3D.sqf | 77 +++++++++++ addons/_eventHandlers/functions/fn_fired.sqf | 23 ++++ .../functions/fn_handleDamage.sqf | 41 ++++++ .../functions/fn_handleDamageMan.sqf | 19 +++ .../_eventHandlers/functions/fn_hitPart.sqf | 54 ++++++++ .../functions/fn_knowsAboutChanged.sqf | 39 ++++++ .../_eventHandlers/functions/fn_musicStop.sqf | 17 +++ .../functions/script_component.hpp | 1 + addons/_eventHandlers/script_component.hpp | 14 ++ addons/_eventHandlers/stringtable.xml | 17 +++ addons/_keyHandlers/$PBOPREFIX$ | 1 + addons/_keyHandlers/CfgEventHandlers.hpp | 15 +++ addons/_keyHandlers/XEH_PREP.hpp | 1 + addons/_keyHandlers/XEH_postInit.sqf | 16 +++ addons/_keyHandlers/XEH_preInit.sqf | 8 ++ addons/_keyHandlers/XEH_preStart.sqf | 2 + addons/_keyHandlers/config.cpp | 17 +++ .../_keyHandlers/functions/fn_keyUnitInfo.sqf | 24 ++++ .../functions/script_component.hpp | 1 + addons/_keyHandlers/script_component.hpp | 14 ++ addons/_keyHandlers/stringtable.xml | 17 +++ addons/_settings/$PBOPREFIX$ | 1 + addons/_settings/CfgEventHandlers.hpp | 15 +++ addons/_settings/XEH_PREP.hpp | 2 + addons/_settings/XEH_postInit.sqf | 1 + addons/_settings/XEH_preInit.sqf | 12 ++ addons/_settings/XEH_preStart.sqf | 2 + addons/_settings/config.cpp | 17 +++ .../functions/fn_initClientSettings.sqf | 58 ++++++++ .../functions/fn_initGlobalSettings.sqf | 66 +++++++++ .../_settings/functions/script_component.hpp | 1 + addons/_settings/script_component.hpp | 14 ++ addons/_settings/stringtable.xml | 17 +++ addons/common/script_component.hpp | 4 - addons/common/stringtable.xml | 4 +- addons/damage/$PBOPREFIX$ | 1 + addons/damage/CfgEventHandlers.hpp | 15 +++ addons/damage/XEH_PREP.hpp | 7 + addons/damage/XEH_postInit.sqf | 15 +++ addons/damage/XEH_preInit.sqf | 8 ++ addons/damage/XEH_preStart.sqf | 2 + addons/damage/config.cpp | 17 +++ addons/damage/functions/fn_applyDamage.sqf | 58 ++++++++ .../functions/fn_calculateAndApplyDamage.sqf | 98 ++++++++++++++ addons/damage/functions/fn_getHitDir.sqf | 57 ++++++++ addons/damage/functions/fn_heDamage.sqf | 39 ++++++ addons/damage/functions/fn_healDamage.sqf | 32 +++++ addons/damage/functions/fn_heatDamage.sqf | 26 ++++ addons/damage/functions/fn_keDamage.sqf | 33 +++++ addons/damage/functions/script_component.hpp | 1 + addons/damage/script_component.hpp | 14 ++ addons/damage/stringtable.xml | 17 +++ addons/debug/$PBOPREFIX$ | 1 + addons/debug/CfgEventHandlers.hpp | 15 +++ addons/debug/XEH_PREP.hpp | 2 + addons/debug/XEH_postInit.sqf | 1 + addons/debug/XEH_preInit.sqf | 10 ++ addons/debug/XEH_preStart.sqf | 2 + addons/debug/config.cpp | 17 +++ addons/debug/functions/fn_drawHitDebug.sqf | 38 ++++++ addons/debug/functions/fn_initDebug.sqf | 22 +++ addons/debug/functions/script_component.hpp | 1 + addons/debug/script_component.hpp | 14 ++ addons/debug/stringtable.xml | 17 +++ addons/deployment/$PBOPREFIX$ | 1 + addons/deployment/CfgEventHandlers.hpp | 15 +++ addons/deployment/XEH_PREP.hpp | 1 + addons/deployment/XEH_postInit.sqf | 50 +++++++ addons/deployment/XEH_preInit.sqf | 8 ++ addons/deployment/XEH_preStart.sqf | 2 + addons/deployment/config.cpp | 17 +++ .../deployment/functions/fn_deployVehicle.sqf | 43 ++++++ .../deployment/functions/script_component.hpp | 1 + addons/deployment/script_component.hpp | 14 ++ addons/deployment/stringtable.xml | 29 ++++ addons/experience/$PBOPREFIX$ | 1 + addons/experience/CfgEventHandlers.hpp | 15 +++ addons/experience/XEH_PREP.hpp | 1 + addons/experience/XEH_postInit.sqf | 15 +++ addons/experience/XEH_preInit.sqf | 8 ++ addons/experience/XEH_preStart.sqf | 2 + addons/experience/config.cpp | 17 +++ .../functions/fn_addExperienceForKill.sqf | 44 ++++++ .../experience/functions/script_component.hpp | 1 + addons/experience/script_component.hpp | 14 ++ addons/experience/stringtable.xml | 21 +++ addons/hud/$PBOPREFIX$ | 1 + addons/hud/CfgEventHandlers.hpp | 15 +++ addons/hud/XEH_PREP.hpp | 2 + addons/hud/XEH_postInit.sqf | 8 ++ addons/hud/XEH_preInit.sqf | 8 ++ addons/hud/XEH_preStart.sqf | 2 + addons/hud/config.cpp | 17 +++ .../hud/functions/fn_initHitpointsDisplay.sqf | 42 ++++++ .../functions/fn_updateHitpointsDisplay.sqf | 57 ++++++++ addons/hud/functions/script_component.hpp | 1 + addons/hud/script_component.hpp | 14 ++ addons/hud/stringtable.xml | 17 +++ addons/icons/$PBOPREFIX$ | 1 + addons/icons/CfgEventHandlers.hpp | 15 +++ addons/icons/XEH_PREP.hpp | 11 ++ addons/icons/XEH_postInit.sqf | 1 + addons/icons/XEH_preInit.sqf | 8 ++ addons/icons/XEH_preStart.sqf | 2 + addons/icons/config.cpp | 18 +++ ...eateVehicleInfoForNonConfiguredVehicle.sqf | 28 ++++ addons/icons/functions/fn_currentHpString.sqf | 27 ++++ addons/icons/functions/fn_drawIcon.sqf | 61 +++++++++ addons/icons/functions/fn_getAmmoInfo.sqf | 127 ++++++++++++++++++ addons/icons/functions/fn_getIconPath.sqf | 31 +++++ .../functions/fn_getVehicleDisplayName.sqf | 30 +++++ addons/icons/functions/fn_getVehicleInfo.sqf | 60 +++++++++ addons/icons/functions/fn_isReconVehicle.sqf | 17 +++ .../functions/fn_shouldStillBeVisible.sqf | 19 +++ addons/icons/functions/fn_showUnitInfo.sqf | 67 +++++++++ .../functions/fn_visibilityCheckLoop.sqf | 40 ++++++ addons/icons/functions/script_component.hpp | 1 + addons/icons/script_component.hpp | 14 ++ addons/icons/stringtable.xml | 17 +++ addons/init/$PBOPREFIX$ | 1 + addons/init/CfgEventHandlers.hpp | 15 +++ addons/init/XEH_PREP.hpp | 3 + addons/init/XEH_postInit.sqf | 10 ++ addons/init/XEH_preInit.sqf | 8 ++ addons/init/XEH_preStart.sqf | 2 + addons/init/config.cpp | 17 +++ addons/init/functions/fn_manInit.sqf | 18 +++ addons/init/functions/fn_vehicleInit.sqf | 62 +++++++++ .../init/functions/fn_vehicleSpawnerInit.sqf | 28 ++++ addons/init/functions/script_component.hpp | 1 + addons/init/script_component.hpp | 14 ++ addons/init/stringtable.xml | 17 +++ addons/main/stringtable.xml | 76 ++++++++++- addons/markers/$PBOPREFIX$ | 1 + addons/markers/CfgEventHandlers.hpp | 15 +++ addons/markers/XEH_PREP.hpp | 3 + addons/markers/XEH_postInit.sqf | 12 ++ addons/markers/XEH_preInit.sqf | 8 ++ addons/markers/XEH_preStart.sqf | 2 + addons/markers/config.cpp | 17 +++ .../functions/fn_createVehicleMarker.sqf | 31 +++++ .../markers/functions/fn_enemyMarkersLoop.sqf | 38 ++++++ .../functions/fn_removeVehicleMarker.sqf | 21 +++ addons/markers/functions/script_component.hpp | 1 + addons/markers/script_component.hpp | 14 ++ addons/markers/stringtable.xml | 17 +++ addons/music/$PBOPREFIX$ | 1 + addons/music/CfgEventHandlers.hpp | 15 +++ addons/music/XEH_PREP.hpp | 4 + addons/music/XEH_postInit.sqf | 5 + addons/music/XEH_preInit.sqf | 8 ++ addons/music/XEH_preStart.sqf | 2 + addons/music/config.cpp | 19 +++ addons/music/functions/fn_addToMusicQueue.sqf | 31 +++++ addons/music/functions/fn_isMusicPlaying.sqf | 15 +++ .../music/functions/fn_isMusicQueueEmpty.sqf | 15 +++ addons/music/functions/fn_playNextMusic.sqf | 20 +++ addons/music/functions/script_component.hpp | 1 + addons/music/script_component.hpp | 14 ++ addons/music/stringtable.xml | 17 +++ addons/rearm/$PBOPREFIX$ | 1 + addons/rearm/CfgEventHandlers.hpp | 15 +++ addons/rearm/XEH_PREP.hpp | 5 + addons/rearm/XEH_postInit.sqf | 5 + addons/rearm/XEH_preInit.sqf | 8 ++ addons/rearm/XEH_preStart.sqf | 2 + addons/rearm/config.cpp | 17 +++ addons/rearm/functions/fn_addRearmAction.sqf | 33 +++++ addons/rearm/functions/fn_canRearm.sqf | 22 +++ addons/rearm/functions/fn_completeRearm.sqf | 18 +++ .../rearm/functions/fn_interruptedRearm.sqf | 22 +++ addons/rearm/functions/fn_rearmVehicle.sqf | 18 +++ addons/rearm/functions/script_component.hpp | 1 + addons/rearm/script_component.hpp | 14 ++ addons/rearm/stringtable.xml | 25 ++++ addons/refuel/$PBOPREFIX$ | 1 + addons/refuel/CfgEventHandlers.hpp | 15 +++ addons/refuel/XEH_PREP.hpp | 7 + addons/refuel/XEH_postInit.sqf | 5 + addons/refuel/XEH_preInit.sqf | 8 ++ addons/refuel/XEH_preStart.sqf | 2 + addons/refuel/config.cpp | 17 +++ .../refuel/functions/fn_addRefuelAction.sqf | 32 +++++ addons/refuel/functions/fn_canRefuel.sqf | 23 ++++ addons/refuel/functions/fn_completeRefuel.sqf | 17 +++ .../refuel/functions/fn_interruptedRefuel.sqf | 24 ++++ addons/refuel/functions/fn_progressRefuel.sqf | 35 +++++ addons/refuel/functions/fn_refuelVehicle.sqf | 18 +++ addons/refuel/functions/fn_startRefuel.sqf | 38 ++++++ addons/refuel/functions/script_component.hpp | 1 + addons/refuel/script_component.hpp | 14 ++ addons/refuel/stringtable.xml | 29 ++++ addons/repair/$PBOPREFIX$ | 1 + addons/repair/CfgEventHandlers.hpp | 15 +++ addons/repair/XEH_PREP.hpp | 6 + addons/repair/XEH_postInit.sqf | 1 + addons/repair/XEH_preInit.sqf | 8 ++ addons/repair/XEH_preStart.sqf | 2 + addons/repair/config.cpp | 17 +++ .../repair/functions/fn_addRepairAction.sqf | 32 +++++ addons/repair/functions/fn_canRepair.sqf | 23 ++++ addons/repair/functions/fn_completeRepair.sqf | 17 +++ .../repair/functions/fn_interruptedRepair.sqf | 25 ++++ addons/repair/functions/fn_progressRepair.sqf | 36 +++++ addons/repair/functions/fn_startRepair.sqf | 36 +++++ addons/repair/functions/script_component.hpp | 1 + addons/repair/script_component.hpp | 14 ++ addons/repair/stringtable.xml | 29 ++++ addons/stats/$PBOPREFIX$ | 1 + addons/stats/CfgEventHandlers.hpp | 15 +++ addons/stats/XEH_PREP.hpp | 6 + addons/stats/XEH_postInit.sqf | 5 + addons/stats/XEH_preInit.sqf | 8 ++ addons/stats/XEH_preStart.sqf | 2 + addons/stats/config.cpp | 17 +++ addons/stats/functions/fn_getPlayerStats.sqf | 26 ++++ addons/stats/functions/fn_loadAllStats.sqf | 25 ++++ addons/stats/functions/fn_loadPlayerStats.sqf | 40 ++++++ addons/stats/functions/fn_playerKilled.sqf | 42 ++++++ addons/stats/functions/fn_saveAllStats.sqf | 16 +++ addons/stats/functions/fn_showPlayerStats.sqf | 44 ++++++ addons/stats/functions/script_component.hpp | 1 + addons/stats/script_component.hpp | 14 ++ addons/stats/stringtable.xml | 17 +++ 232 files changed, 4025 insertions(+), 10 deletions(-) create mode 100644 addons/_eventHandlers/$PBOPREFIX$ create mode 100644 addons/_eventHandlers/CfgEventHandlers.hpp create mode 100644 addons/_eventHandlers/XEH_PREP.hpp create mode 100644 addons/_eventHandlers/XEH_postInit.sqf create mode 100644 addons/_eventHandlers/XEH_preInit.sqf create mode 100644 addons/_eventHandlers/XEH_preStart.sqf create mode 100644 addons/_eventHandlers/config.cpp create mode 100644 addons/_eventHandlers/functions/fn_curatorObjectDeleted.sqf create mode 100644 addons/_eventHandlers/functions/fn_draw3D.sqf create mode 100644 addons/_eventHandlers/functions/fn_fired.sqf create mode 100644 addons/_eventHandlers/functions/fn_handleDamage.sqf create mode 100644 addons/_eventHandlers/functions/fn_handleDamageMan.sqf create mode 100644 addons/_eventHandlers/functions/fn_hitPart.sqf create mode 100644 addons/_eventHandlers/functions/fn_knowsAboutChanged.sqf create mode 100644 addons/_eventHandlers/functions/fn_musicStop.sqf create mode 100644 addons/_eventHandlers/functions/script_component.hpp create mode 100644 addons/_eventHandlers/script_component.hpp create mode 100644 addons/_eventHandlers/stringtable.xml create mode 100644 addons/_keyHandlers/$PBOPREFIX$ create mode 100644 addons/_keyHandlers/CfgEventHandlers.hpp create mode 100644 addons/_keyHandlers/XEH_PREP.hpp create mode 100644 addons/_keyHandlers/XEH_postInit.sqf create mode 100644 addons/_keyHandlers/XEH_preInit.sqf create mode 100644 addons/_keyHandlers/XEH_preStart.sqf create mode 100644 addons/_keyHandlers/config.cpp create mode 100644 addons/_keyHandlers/functions/fn_keyUnitInfo.sqf create mode 100644 addons/_keyHandlers/functions/script_component.hpp create mode 100644 addons/_keyHandlers/script_component.hpp create mode 100644 addons/_keyHandlers/stringtable.xml create mode 100644 addons/_settings/$PBOPREFIX$ create mode 100644 addons/_settings/CfgEventHandlers.hpp create mode 100644 addons/_settings/XEH_PREP.hpp create mode 100644 addons/_settings/XEH_postInit.sqf create mode 100644 addons/_settings/XEH_preInit.sqf create mode 100644 addons/_settings/XEH_preStart.sqf create mode 100644 addons/_settings/config.cpp create mode 100644 addons/_settings/functions/fn_initClientSettings.sqf create mode 100644 addons/_settings/functions/fn_initGlobalSettings.sqf create mode 100644 addons/_settings/functions/script_component.hpp create mode 100644 addons/_settings/script_component.hpp create mode 100644 addons/_settings/stringtable.xml create mode 100644 addons/damage/$PBOPREFIX$ create mode 100644 addons/damage/CfgEventHandlers.hpp create mode 100644 addons/damage/XEH_PREP.hpp create mode 100644 addons/damage/XEH_postInit.sqf create mode 100644 addons/damage/XEH_preInit.sqf create mode 100644 addons/damage/XEH_preStart.sqf create mode 100644 addons/damage/config.cpp create mode 100644 addons/damage/functions/fn_applyDamage.sqf create mode 100644 addons/damage/functions/fn_calculateAndApplyDamage.sqf create mode 100644 addons/damage/functions/fn_getHitDir.sqf create mode 100644 addons/damage/functions/fn_heDamage.sqf create mode 100644 addons/damage/functions/fn_healDamage.sqf create mode 100644 addons/damage/functions/fn_heatDamage.sqf create mode 100644 addons/damage/functions/fn_keDamage.sqf create mode 100644 addons/damage/functions/script_component.hpp create mode 100644 addons/damage/script_component.hpp create mode 100644 addons/damage/stringtable.xml create mode 100644 addons/debug/$PBOPREFIX$ create mode 100644 addons/debug/CfgEventHandlers.hpp create mode 100644 addons/debug/XEH_PREP.hpp create mode 100644 addons/debug/XEH_postInit.sqf create mode 100644 addons/debug/XEH_preInit.sqf create mode 100644 addons/debug/XEH_preStart.sqf create mode 100644 addons/debug/config.cpp create mode 100644 addons/debug/functions/fn_drawHitDebug.sqf create mode 100644 addons/debug/functions/fn_initDebug.sqf create mode 100644 addons/debug/functions/script_component.hpp create mode 100644 addons/debug/script_component.hpp create mode 100644 addons/debug/stringtable.xml create mode 100644 addons/deployment/$PBOPREFIX$ create mode 100644 addons/deployment/CfgEventHandlers.hpp create mode 100644 addons/deployment/XEH_PREP.hpp create mode 100644 addons/deployment/XEH_postInit.sqf create mode 100644 addons/deployment/XEH_preInit.sqf create mode 100644 addons/deployment/XEH_preStart.sqf create mode 100644 addons/deployment/config.cpp create mode 100644 addons/deployment/functions/fn_deployVehicle.sqf create mode 100644 addons/deployment/functions/script_component.hpp create mode 100644 addons/deployment/script_component.hpp create mode 100644 addons/deployment/stringtable.xml create mode 100644 addons/experience/$PBOPREFIX$ create mode 100644 addons/experience/CfgEventHandlers.hpp create mode 100644 addons/experience/XEH_PREP.hpp create mode 100644 addons/experience/XEH_postInit.sqf create mode 100644 addons/experience/XEH_preInit.sqf create mode 100644 addons/experience/XEH_preStart.sqf create mode 100644 addons/experience/config.cpp create mode 100644 addons/experience/functions/fn_addExperienceForKill.sqf create mode 100644 addons/experience/functions/script_component.hpp create mode 100644 addons/experience/script_component.hpp create mode 100644 addons/experience/stringtable.xml create mode 100644 addons/hud/$PBOPREFIX$ create mode 100644 addons/hud/CfgEventHandlers.hpp create mode 100644 addons/hud/XEH_PREP.hpp create mode 100644 addons/hud/XEH_postInit.sqf create mode 100644 addons/hud/XEH_preInit.sqf create mode 100644 addons/hud/XEH_preStart.sqf create mode 100644 addons/hud/config.cpp create mode 100644 addons/hud/functions/fn_initHitpointsDisplay.sqf create mode 100644 addons/hud/functions/fn_updateHitpointsDisplay.sqf create mode 100644 addons/hud/functions/script_component.hpp create mode 100644 addons/hud/script_component.hpp create mode 100644 addons/hud/stringtable.xml create mode 100644 addons/icons/$PBOPREFIX$ create mode 100644 addons/icons/CfgEventHandlers.hpp create mode 100644 addons/icons/XEH_PREP.hpp create mode 100644 addons/icons/XEH_postInit.sqf create mode 100644 addons/icons/XEH_preInit.sqf create mode 100644 addons/icons/XEH_preStart.sqf create mode 100644 addons/icons/config.cpp create mode 100644 addons/icons/functions/fn_createVehicleInfoForNonConfiguredVehicle.sqf create mode 100644 addons/icons/functions/fn_currentHpString.sqf create mode 100644 addons/icons/functions/fn_drawIcon.sqf create mode 100644 addons/icons/functions/fn_getAmmoInfo.sqf create mode 100644 addons/icons/functions/fn_getIconPath.sqf create mode 100644 addons/icons/functions/fn_getVehicleDisplayName.sqf create mode 100644 addons/icons/functions/fn_getVehicleInfo.sqf create mode 100644 addons/icons/functions/fn_isReconVehicle.sqf create mode 100644 addons/icons/functions/fn_shouldStillBeVisible.sqf create mode 100644 addons/icons/functions/fn_showUnitInfo.sqf create mode 100644 addons/icons/functions/fn_visibilityCheckLoop.sqf create mode 100644 addons/icons/functions/script_component.hpp create mode 100644 addons/icons/script_component.hpp create mode 100644 addons/icons/stringtable.xml create mode 100644 addons/init/$PBOPREFIX$ create mode 100644 addons/init/CfgEventHandlers.hpp create mode 100644 addons/init/XEH_PREP.hpp create mode 100644 addons/init/XEH_postInit.sqf create mode 100644 addons/init/XEH_preInit.sqf create mode 100644 addons/init/XEH_preStart.sqf create mode 100644 addons/init/config.cpp create mode 100644 addons/init/functions/fn_manInit.sqf create mode 100644 addons/init/functions/fn_vehicleInit.sqf create mode 100644 addons/init/functions/fn_vehicleSpawnerInit.sqf create mode 100644 addons/init/functions/script_component.hpp create mode 100644 addons/init/script_component.hpp create mode 100644 addons/init/stringtable.xml create mode 100644 addons/markers/$PBOPREFIX$ create mode 100644 addons/markers/CfgEventHandlers.hpp create mode 100644 addons/markers/XEH_PREP.hpp create mode 100644 addons/markers/XEH_postInit.sqf create mode 100644 addons/markers/XEH_preInit.sqf create mode 100644 addons/markers/XEH_preStart.sqf create mode 100644 addons/markers/config.cpp create mode 100644 addons/markers/functions/fn_createVehicleMarker.sqf create mode 100644 addons/markers/functions/fn_enemyMarkersLoop.sqf create mode 100644 addons/markers/functions/fn_removeVehicleMarker.sqf create mode 100644 addons/markers/functions/script_component.hpp create mode 100644 addons/markers/script_component.hpp create mode 100644 addons/markers/stringtable.xml create mode 100644 addons/music/$PBOPREFIX$ create mode 100644 addons/music/CfgEventHandlers.hpp create mode 100644 addons/music/XEH_PREP.hpp create mode 100644 addons/music/XEH_postInit.sqf create mode 100644 addons/music/XEH_preInit.sqf create mode 100644 addons/music/XEH_preStart.sqf create mode 100644 addons/music/config.cpp create mode 100644 addons/music/functions/fn_addToMusicQueue.sqf create mode 100644 addons/music/functions/fn_isMusicPlaying.sqf create mode 100644 addons/music/functions/fn_isMusicQueueEmpty.sqf create mode 100644 addons/music/functions/fn_playNextMusic.sqf create mode 100644 addons/music/functions/script_component.hpp create mode 100644 addons/music/script_component.hpp create mode 100644 addons/music/stringtable.xml create mode 100644 addons/rearm/$PBOPREFIX$ create mode 100644 addons/rearm/CfgEventHandlers.hpp create mode 100644 addons/rearm/XEH_PREP.hpp create mode 100644 addons/rearm/XEH_postInit.sqf create mode 100644 addons/rearm/XEH_preInit.sqf create mode 100644 addons/rearm/XEH_preStart.sqf create mode 100644 addons/rearm/config.cpp create mode 100644 addons/rearm/functions/fn_addRearmAction.sqf create mode 100644 addons/rearm/functions/fn_canRearm.sqf create mode 100644 addons/rearm/functions/fn_completeRearm.sqf create mode 100644 addons/rearm/functions/fn_interruptedRearm.sqf create mode 100644 addons/rearm/functions/fn_rearmVehicle.sqf create mode 100644 addons/rearm/functions/script_component.hpp create mode 100644 addons/rearm/script_component.hpp create mode 100644 addons/rearm/stringtable.xml create mode 100644 addons/refuel/$PBOPREFIX$ create mode 100644 addons/refuel/CfgEventHandlers.hpp create mode 100644 addons/refuel/XEH_PREP.hpp create mode 100644 addons/refuel/XEH_postInit.sqf create mode 100644 addons/refuel/XEH_preInit.sqf create mode 100644 addons/refuel/XEH_preStart.sqf create mode 100644 addons/refuel/config.cpp create mode 100644 addons/refuel/functions/fn_addRefuelAction.sqf create mode 100644 addons/refuel/functions/fn_canRefuel.sqf create mode 100644 addons/refuel/functions/fn_completeRefuel.sqf create mode 100644 addons/refuel/functions/fn_interruptedRefuel.sqf create mode 100644 addons/refuel/functions/fn_progressRefuel.sqf create mode 100644 addons/refuel/functions/fn_refuelVehicle.sqf create mode 100644 addons/refuel/functions/fn_startRefuel.sqf create mode 100644 addons/refuel/functions/script_component.hpp create mode 100644 addons/refuel/script_component.hpp create mode 100644 addons/refuel/stringtable.xml create mode 100644 addons/repair/$PBOPREFIX$ create mode 100644 addons/repair/CfgEventHandlers.hpp create mode 100644 addons/repair/XEH_PREP.hpp create mode 100644 addons/repair/XEH_postInit.sqf create mode 100644 addons/repair/XEH_preInit.sqf create mode 100644 addons/repair/XEH_preStart.sqf create mode 100644 addons/repair/config.cpp create mode 100644 addons/repair/functions/fn_addRepairAction.sqf create mode 100644 addons/repair/functions/fn_canRepair.sqf create mode 100644 addons/repair/functions/fn_completeRepair.sqf create mode 100644 addons/repair/functions/fn_interruptedRepair.sqf create mode 100644 addons/repair/functions/fn_progressRepair.sqf create mode 100644 addons/repair/functions/fn_startRepair.sqf create mode 100644 addons/repair/functions/script_component.hpp create mode 100644 addons/repair/script_component.hpp create mode 100644 addons/repair/stringtable.xml create mode 100644 addons/stats/$PBOPREFIX$ create mode 100644 addons/stats/CfgEventHandlers.hpp create mode 100644 addons/stats/XEH_PREP.hpp create mode 100644 addons/stats/XEH_postInit.sqf create mode 100644 addons/stats/XEH_preInit.sqf create mode 100644 addons/stats/XEH_preStart.sqf create mode 100644 addons/stats/config.cpp create mode 100644 addons/stats/functions/fn_getPlayerStats.sqf create mode 100644 addons/stats/functions/fn_loadAllStats.sqf create mode 100644 addons/stats/functions/fn_loadPlayerStats.sqf create mode 100644 addons/stats/functions/fn_playerKilled.sqf create mode 100644 addons/stats/functions/fn_saveAllStats.sqf create mode 100644 addons/stats/functions/fn_showPlayerStats.sqf create mode 100644 addons/stats/functions/script_component.hpp create mode 100644 addons/stats/script_component.hpp create mode 100644 addons/stats/stringtable.xml diff --git a/addons/_eventHandlers/$PBOPREFIX$ b/addons/_eventHandlers/$PBOPREFIX$ new file mode 100644 index 0000000..abfafb6 --- /dev/null +++ b/addons/_eventHandlers/$PBOPREFIX$ @@ -0,0 +1 @@ +z\afwg\addons\common \ No newline at end of file diff --git a/addons/_eventHandlers/CfgEventHandlers.hpp b/addons/_eventHandlers/CfgEventHandlers.hpp new file mode 100644 index 0000000..2a3f71f --- /dev/null +++ b/addons/_eventHandlers/CfgEventHandlers.hpp @@ -0,0 +1,15 @@ +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); + }; +}; +class Extended_PreInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); + }; +}; +class Extended_PostInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); + }; +}; diff --git a/addons/_eventHandlers/XEH_PREP.hpp b/addons/_eventHandlers/XEH_PREP.hpp new file mode 100644 index 0000000..d03b488 --- /dev/null +++ b/addons/_eventHandlers/XEH_PREP.hpp @@ -0,0 +1,8 @@ +PREP(curatorObjectDeleted); +PREP(draw3D); +PREP(fired); +PREP(handleDamage); +PREP(handleDamageMan); +PREP(hitPart); +PREP(knowsAboutChanged); +PREP(musicStop); diff --git a/addons/_eventHandlers/XEH_postInit.sqf b/addons/_eventHandlers/XEH_postInit.sqf new file mode 100644 index 0000000..32a30f8 --- /dev/null +++ b/addons/_eventHandlers/XEH_postInit.sqf @@ -0,0 +1,4 @@ +#include "script_component.hpp" + +// TODO: Move to music componet and change function name (or better, remove it as a function) +call FUNC(musicStop); diff --git a/addons/_eventHandlers/XEH_preInit.sqf b/addons/_eventHandlers/XEH_preInit.sqf new file mode 100644 index 0000000..ecb5d0c --- /dev/null +++ b/addons/_eventHandlers/XEH_preInit.sqf @@ -0,0 +1,8 @@ +#include "script_component.hpp" +ADDON = false; + +PREP_RECOMPILE_START; +#include "XEH_PREP.hpp" +PREP_RECOMPILE_END; + +ADDON = true; diff --git a/addons/_eventHandlers/XEH_preStart.sqf b/addons/_eventHandlers/XEH_preStart.sqf new file mode 100644 index 0000000..a51262a --- /dev/null +++ b/addons/_eventHandlers/XEH_preStart.sqf @@ -0,0 +1,2 @@ +#include "script_component.hpp" +#include "XEH_PREP.hpp" diff --git a/addons/_eventHandlers/config.cpp b/addons/_eventHandlers/config.cpp new file mode 100644 index 0000000..d821136 --- /dev/null +++ b/addons/_eventHandlers/config.cpp @@ -0,0 +1,17 @@ +#include "script_component.hpp" + +class CfgPatches { + class ADDON { + name = COMPONENT_NAME; + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = { + "afwg_main" + }; + author = "ArmaForces"; + VERSION_CONFIG; + }; +}; + +#include "CfgEventHandlers.hpp" diff --git a/addons/_eventHandlers/functions/fn_curatorObjectDeleted.sqf b/addons/_eventHandlers/functions/fn_curatorObjectDeleted.sqf new file mode 100644 index 0000000..89afbc7 --- /dev/null +++ b/addons/_eventHandlers/functions/fn_curatorObjectDeleted.sqf @@ -0,0 +1,16 @@ +#include "..\script_component.hpp" +/* + * Author: 3Mydlo3 + * Removes marker of an entity that has been deleted by curator. + * + * Arguments: + * None + * + * Return Value: + * None + * + * Public: No + */ + +params ["_curator", "_entity"]; +[_entity] call FUNC(removeVehicleMarker); diff --git a/addons/_eventHandlers/functions/fn_draw3D.sqf b/addons/_eventHandlers/functions/fn_draw3D.sqf new file mode 100644 index 0000000..a5754e3 --- /dev/null +++ b/addons/_eventHandlers/functions/fn_draw3D.sqf @@ -0,0 +1,77 @@ +#include "..\script_component.hpp" +/* + * Author: 3Mydlo3, veteran29 + * Draws unit icons in Draw3D MissionEventHandler. + * + * Arguments: + * None + * + * Return Value: + * None + * + * Public: No + */ + +#ifdef DEV_DEBUG +call FUNC(drawHitDebug); +#endif + +// Always draw icon for cursor object +// Not using cursorTarget to avoid issues with knowledge that might be lagging +private _cursorObject = cursorObject; +private _vehiclesWithIcons = if ( + side effectiveCommander _cursorObject isEqualTo playerSide || { + (_cursorObject getVariable ["MDL_IsVisible", false] + && {side effectiveCommander _cursorObject isNotEqualTo sideUnknown}) +}) then { + [[_cursorObject, true]] +} else { [] }; + +switch (GVAR(unitIconMode)) do { + // Friendly and enemy + case 0: { + _vehiclesWithIcons append (vehicles select {( + side effectiveCommander _x isEqualTo playerSide + ) || { + _x getVariable ["MDL_IsVisible", false] + && {side effectiveCommander _x isEqualTo EAST} + } + }); + }; + // Enemy only + case 1: { + _vehiclesWithIcons append (vehicles select { + _x getVariable ["MDL_IsVisible", false] + && {side effectiveCommander _x isEqualTo EAST} + }); + }; + default {}; +}; + +// curator icons +if (!isNull findDisplay 312) then { + curatorMouseOver params ["_type", "_entity", "_index"]; + if (_type isEqualTo "OBJECT") then { + _vehiclesWithIcons pushBackUnique [_entity, true]; + }; + if (_type isEqualTo "GROUP") then { + { + _vehiclesWithIcons pushBackUnique [_x, true]; + } forEach ([_entity] call FUNC(getGroupVehicles)); + }; + + curatorSelected params ["_objects", "_groups"]; + { + _vehiclesWithIcons pushBackUnique [_x, true]; + } forEach _objects; + { + { + _vehiclesWithIcons pushBackUnique [_x, true]; + } forEach ([_x] call FUNC(getGroupVehicles)); + } forEach _groups; +}; + +// Draws icons. Might draw an icon twice for one object if it's targeted/highlighted. +{ + _x call FUNC(drawIcon); +} forEach _vehiclesWithIcons; diff --git a/addons/_eventHandlers/functions/fn_fired.sqf b/addons/_eventHandlers/functions/fn_fired.sqf new file mode 100644 index 0000000..e9a2250 --- /dev/null +++ b/addons/_eventHandlers/functions/fn_fired.sqf @@ -0,0 +1,23 @@ +#include "..\script_component.hpp" +/* + * Author: 3Mydlo3 + * + * + * Arguments: + * "Fired" EH params + * + * Return Value: + * None + * + * Public: No + */ + +params ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_gunner"]; + +// if (!local _unit) exitWith {}; +_projectile setVariable ["MDL_initialVelocity", velocity _projectile]; + +// We don't care about AIs +if !(isPlayer _unit) exitWith {}; + +_unit setVariable ["MDL_lastCombatActive", CBA_missionTime]; diff --git a/addons/_eventHandlers/functions/fn_handleDamage.sqf b/addons/_eventHandlers/functions/fn_handleDamage.sqf new file mode 100644 index 0000000..7e9a87a --- /dev/null +++ b/addons/_eventHandlers/functions/fn_handleDamage.sqf @@ -0,0 +1,41 @@ +#include "..\script_component.hpp" +/* + * Author: 3Mydlo3 + * Overrides damage handler to ignore default engine damage handling. + * + * Arguments: + * "HandleDamage" EH params + * + * Return Value: + * Damage taken by the unit if overriden + * + * Public: No + */ + +params ["_unit", "_selection", "_damage", "_source", "_projectile", "_hitIndex", "_instigator", "_hitPoint", "_directHit", "_context"]; + +// Exclude total damage info (_context == 0), FakeHeadHit (3) and TotalDamageBeforeBleeding (4) +if (_context isEqualTo 0 || {_context > 2}) exitWith { damage _unit }; + +// Most likely a collision so let the engine handle it +if (_projectile isEqualTo "" && {isNull _instigator}) exitWith {}; +// TODO: Consider changing HP afterwards somehow + +#ifdef DEV_DEBUG +diag_log format ["WARGAY DEBUG HANDLE DAMAGE [%1]: %2", diag_tickTime, str _this]; +#endif + +private _selectionHitpointName = getText (configOf _unit >> "Hitpoints" >> _hitPoint >> "name"); +private _modelHitpointPosition = _unit selectionPosition _selectionHitpointName; + +#ifdef DEV_DEBUG +diag_log format ["WARGAY DEBUG HANDLE DAMAGE [%1]: Model hitpoint name '%2' and position %3", diag_tickTime, _selectionHitpointName, str _modelHitpointPosition]; +#endif + +if (_modelHitpointPosition isEqualTo [0, 0, 0]) exitWith { damage _unit }; + +#ifdef DEV_DEBUG +HitpointHits pushBackUnique (_unit modelToWorld _modelHitpointPosition); +#endif + +0 \ No newline at end of file diff --git a/addons/_eventHandlers/functions/fn_handleDamageMan.sqf b/addons/_eventHandlers/functions/fn_handleDamageMan.sqf new file mode 100644 index 0000000..5581bab --- /dev/null +++ b/addons/_eventHandlers/functions/fn_handleDamageMan.sqf @@ -0,0 +1,19 @@ +#include "..\script_component.hpp" +/* + * Author: 3Mydlo3 + * Overrides damage handler to ignore default engine damage handling. + * + * Arguments: + * "HandleDamage" EH params + * + * Return Value: + * Damage taken by the unit if overriden + * + * Public: No + */ + +params ["_unit", "_selection", "_damage", "_source", "_projectile", "_hitIndex", "_instigator", "_hitPoint", "_directHit", "_context"]; + +if (vehicle _unit isEqualTo _unit) exitWith {}; + +damage _unit diff --git a/addons/_eventHandlers/functions/fn_hitPart.sqf b/addons/_eventHandlers/functions/fn_hitPart.sqf new file mode 100644 index 0000000..f7c543d --- /dev/null +++ b/addons/_eventHandlers/functions/fn_hitPart.sqf @@ -0,0 +1,54 @@ +#include "..\script_component.hpp" +/* + * Author: 3Mydlo3 + * + * + * Arguments: + * "HitPart" EH params + * + * Return Value: + * None + * + * Public: No + */ + +(_this select 0) params ["_target", "_shooter", "_projectile", "_position", "_velocity", "_selection", "_ammo", "_vector", "_radius", "_surfaceType", "_isDirect", "_instigator"]; + +#ifdef DEV_DEBUG +private _i = 0; +{ + diag_log format ["WARGAY DEBUG HIT PART [%1]: All [%2]: %3", diag_tickTime, _i, str _x]; + _i = _i + 1; +} forEach _this; +diag_log format ["WARGAY DEBUG HIT PART [%1]: Projectile relative position: %2 | Hit relative position: %3", diag_tickTime, str (_target worldToModel getPosATL _projectile), str (_target worldToModel ASLToAGL _position)]; +#endif + +if (!alive _target) exitWith { + _target removeEventHandler [_thisEvent, _thisEventHandler]; +}; + +private _isHandledForTarget = _projectile getVariable [str _target, false]; + +if (_isHandledForTarget) exitWith {}; + +#ifdef DEV_DEBUG +diag_log format ["WARGAY DEBUG HIT PART [%1]: Selection: %2 Vector: %3, Velocity: %4", diag_tickTime, str _selection, str _vector, str _velocity]; +#endif + +// Do not handle projectiles coming at a surface at extreme angles +private _velocityAndSurfaceProduct = vectorNormalized _velocity vectorDotProduct _vector; +if (_velocity isNotEqualTo [0, 0, 0] && {_velocityAndSurfaceProduct < 0.15 && {_velocityAndSurfaceProduct > -0.15}}) exitWith {}; + +private _hitDir = [_target, _vector, _velocity, _projectile] call FUNC(getHitDir); + +#ifdef DEV_DEBUG +PositionHits pushBack (_position); +SurfaceVectors pushBack ([_position, _vector]); +VelocityVectors pushBack ([_position, _velocity]); +#endif + +_projectile setVariable [str _target, true]; + +private _hitPosition = if (_isDirect) then { [] } else { getPosATL _projectile }; + +[_target, _shooter, _hitDir, _hitPosition, _velocity, _projectile, _ammo] call FUNC(calculateAndApplyDamage); diff --git a/addons/_eventHandlers/functions/fn_knowsAboutChanged.sqf b/addons/_eventHandlers/functions/fn_knowsAboutChanged.sqf new file mode 100644 index 0000000..7eae680 --- /dev/null +++ b/addons/_eventHandlers/functions/fn_knowsAboutChanged.sqf @@ -0,0 +1,39 @@ +#include "..\script_component.hpp" +/* + * Author: 3Mydlo3 + * Checks if new unit is spotted and propagates info so that the icon can be drawn for target. + * + * Arguments: + * 0: Group changing knowledge + * 1: Target that the knowledge concerns + * 2: New KnowsAbout value + * 3: Old KnowsAbout value + * + * Return Value: + * None + * + * Public: No + */ + +params ["_group", "_targetUnit", "_newKnowsAbout", "_oldKnowsAbout"]; + +if (side _targetUnit isNotEqualTo EAST) exitWith {}; +if (isObjectHidden leader _group) exitWith {}; + +if (GVAR(onlyReconCanSpot) && {!([_group] call FUNC(isReconVehicle))}) exitWith {}; + +#ifdef DEV_DEBUG +diag_log format ["WARGAY DEBUG KNOWS ABOUT CHANGED [%1]: Group: %2, Target: %3, KnowsAbout: %4 -> %5", diag_tickTime, _group, _targetUnit, _oldKnowsAbout, _newKnowsAbout]; +#endif + +private _isRevealed = _targetUnit getVariable ["MDL_IsVisible", false]; + +if (_newKnowsAbout > 0.75 && {!_isRevealed}) then { + + _targetUnit setVariable ["MDL_IsVisible", true, true]; + #ifdef DEV_DEBUG + diag_log format ["WARGAY DEBUG KNOWS ABOUT CHANGED [%1]: Revealing Target: %3 detected by Group: %2", diag_tickTime, _group, _targetUnit, _oldKnowsAbout, _newKnowsAbout]; + #endif + _group reveal _targetUnit; + ["MDL_unitSpotted", [_targetUnit]] call CBA_fnc_globalEvent; +}; diff --git a/addons/_eventHandlers/functions/fn_musicStop.sqf b/addons/_eventHandlers/functions/fn_musicStop.sqf new file mode 100644 index 0000000..54b4c3d --- /dev/null +++ b/addons/_eventHandlers/functions/fn_musicStop.sqf @@ -0,0 +1,17 @@ +#include "..\script_component.hpp" +/* + * Author: 3Mydlo3 + * + * + * Arguments: + * None + * + * Return Value: + * None + * + * Public: No + */ + +addMusicEventHandler ["MusicStop", { + [FUNC(playNextMusic), [], random 15] call CBA_fnc_waitAndExecute; +}]; diff --git a/addons/_eventHandlers/functions/script_component.hpp b/addons/_eventHandlers/functions/script_component.hpp new file mode 100644 index 0000000..6686d96 --- /dev/null +++ b/addons/_eventHandlers/functions/script_component.hpp @@ -0,0 +1 @@ +#include "\z\afwg\addons\common\script_component.hpp" diff --git a/addons/_eventHandlers/script_component.hpp b/addons/_eventHandlers/script_component.hpp new file mode 100644 index 0000000..0f429bd --- /dev/null +++ b/addons/_eventHandlers/script_component.hpp @@ -0,0 +1,14 @@ +#define COMPONENT common +#include "\z\afwg\addons\main\script_mod.hpp" + +// #define DEBUG_MODE_FULL +// #define DISABLE_COMPILE_CACHE + +#ifdef DEBUG_ENABLED_COMMON + #define DEBUG_MODE_FULL +#endif + #ifdef DEBUG_SETTINGS_COMMON + #define DEBUG_SETTINGS DEBUG_SETTINGS_COMMON +#endif + +#include "\z\afwg\addons\main\script_macros.hpp" diff --git a/addons/_eventHandlers/stringtable.xml b/addons/_eventHandlers/stringtable.xml new file mode 100644 index 0000000..2b43f32 --- /dev/null +++ b/addons/_eventHandlers/stringtable.xml @@ -0,0 +1,17 @@ + + + + + ArmaForces Wargame - Common + ArmaForces Wargame - Common + + + Enable component + Włącz komponent + + + Controls whether this component is active. + Pozwala kontrolować czy komponent jest włączony. + + + diff --git a/addons/_keyHandlers/$PBOPREFIX$ b/addons/_keyHandlers/$PBOPREFIX$ new file mode 100644 index 0000000..abfafb6 --- /dev/null +++ b/addons/_keyHandlers/$PBOPREFIX$ @@ -0,0 +1 @@ +z\afwg\addons\common \ No newline at end of file diff --git a/addons/_keyHandlers/CfgEventHandlers.hpp b/addons/_keyHandlers/CfgEventHandlers.hpp new file mode 100644 index 0000000..2a3f71f --- /dev/null +++ b/addons/_keyHandlers/CfgEventHandlers.hpp @@ -0,0 +1,15 @@ +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); + }; +}; +class Extended_PreInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); + }; +}; +class Extended_PostInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); + }; +}; diff --git a/addons/_keyHandlers/XEH_PREP.hpp b/addons/_keyHandlers/XEH_PREP.hpp new file mode 100644 index 0000000..b789598 --- /dev/null +++ b/addons/_keyHandlers/XEH_PREP.hpp @@ -0,0 +1 @@ +PREP(keyUnitInfo); diff --git a/addons/_keyHandlers/XEH_postInit.sqf b/addons/_keyHandlers/XEH_postInit.sqf new file mode 100644 index 0000000..838b9ad --- /dev/null +++ b/addons/_keyHandlers/XEH_postInit.sqf @@ -0,0 +1,16 @@ +#include "script_component.hpp" + +if (isServer) exitWith {}; + +// Register a simple keypress to an action +#include "\a3\ui_f\hpp\defineDIKCodes.inc" + +// Handle "Info" button +[ + "MDL Wargay", + "MDL_WG_UnitInfo", + ["Unit Info", "Opens info popup of targeted unit"], + FUNC(keyUnitInfo), + {}, + [DIK_TAB, [false, false, false]] +] call CBA_fnc_addKeybind; diff --git a/addons/_keyHandlers/XEH_preInit.sqf b/addons/_keyHandlers/XEH_preInit.sqf new file mode 100644 index 0000000..ecb5d0c --- /dev/null +++ b/addons/_keyHandlers/XEH_preInit.sqf @@ -0,0 +1,8 @@ +#include "script_component.hpp" +ADDON = false; + +PREP_RECOMPILE_START; +#include "XEH_PREP.hpp" +PREP_RECOMPILE_END; + +ADDON = true; diff --git a/addons/_keyHandlers/XEH_preStart.sqf b/addons/_keyHandlers/XEH_preStart.sqf new file mode 100644 index 0000000..a51262a --- /dev/null +++ b/addons/_keyHandlers/XEH_preStart.sqf @@ -0,0 +1,2 @@ +#include "script_component.hpp" +#include "XEH_PREP.hpp" diff --git a/addons/_keyHandlers/config.cpp b/addons/_keyHandlers/config.cpp new file mode 100644 index 0000000..d821136 --- /dev/null +++ b/addons/_keyHandlers/config.cpp @@ -0,0 +1,17 @@ +#include "script_component.hpp" + +class CfgPatches { + class ADDON { + name = COMPONENT_NAME; + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = { + "afwg_main" + }; + author = "ArmaForces"; + VERSION_CONFIG; + }; +}; + +#include "CfgEventHandlers.hpp" diff --git a/addons/_keyHandlers/functions/fn_keyUnitInfo.sqf b/addons/_keyHandlers/functions/fn_keyUnitInfo.sqf new file mode 100644 index 0000000..0a0943a --- /dev/null +++ b/addons/_keyHandlers/functions/fn_keyUnitInfo.sqf @@ -0,0 +1,24 @@ +#include "..\script_component.hpp" +/* + * Author: 3Mydlo3 + * Checks if TAB is pressed and shows targeted unit info. + * + * Arguments: + * 0: Main display + * 1: Key pressed + * 2: Is SHIFT pressed + * 3: Is CTRL pressed + * 4: Is ALT pressed + * + * Return Value: + * None + * + * Public: No + */ + +params ["_displayOrControl", "_key", "_shift", "_ctrl", "_alt"]; + +private _cursorTarget = cursorTarget; +if (_cursorTarget isEqualTo objNull) exitWith {}; + +[_cursorTarget] call FUNC(showUnitInfo); diff --git a/addons/_keyHandlers/functions/script_component.hpp b/addons/_keyHandlers/functions/script_component.hpp new file mode 100644 index 0000000..6686d96 --- /dev/null +++ b/addons/_keyHandlers/functions/script_component.hpp @@ -0,0 +1 @@ +#include "\z\afwg\addons\common\script_component.hpp" diff --git a/addons/_keyHandlers/script_component.hpp b/addons/_keyHandlers/script_component.hpp new file mode 100644 index 0000000..0f429bd --- /dev/null +++ b/addons/_keyHandlers/script_component.hpp @@ -0,0 +1,14 @@ +#define COMPONENT common +#include "\z\afwg\addons\main\script_mod.hpp" + +// #define DEBUG_MODE_FULL +// #define DISABLE_COMPILE_CACHE + +#ifdef DEBUG_ENABLED_COMMON + #define DEBUG_MODE_FULL +#endif + #ifdef DEBUG_SETTINGS_COMMON + #define DEBUG_SETTINGS DEBUG_SETTINGS_COMMON +#endif + +#include "\z\afwg\addons\main\script_macros.hpp" diff --git a/addons/_keyHandlers/stringtable.xml b/addons/_keyHandlers/stringtable.xml new file mode 100644 index 0000000..2b43f32 --- /dev/null +++ b/addons/_keyHandlers/stringtable.xml @@ -0,0 +1,17 @@ + + + + + ArmaForces Wargame - Common + ArmaForces Wargame - Common + + + Enable component + Włącz komponent + + + Controls whether this component is active. + Pozwala kontrolować czy komponent jest włączony. + + + diff --git a/addons/_settings/$PBOPREFIX$ b/addons/_settings/$PBOPREFIX$ new file mode 100644 index 0000000..abfafb6 --- /dev/null +++ b/addons/_settings/$PBOPREFIX$ @@ -0,0 +1 @@ +z\afwg\addons\common \ No newline at end of file diff --git a/addons/_settings/CfgEventHandlers.hpp b/addons/_settings/CfgEventHandlers.hpp new file mode 100644 index 0000000..2a3f71f --- /dev/null +++ b/addons/_settings/CfgEventHandlers.hpp @@ -0,0 +1,15 @@ +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); + }; +}; +class Extended_PreInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); + }; +}; +class Extended_PostInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); + }; +}; diff --git a/addons/_settings/XEH_PREP.hpp b/addons/_settings/XEH_PREP.hpp new file mode 100644 index 0000000..57454c8 --- /dev/null +++ b/addons/_settings/XEH_PREP.hpp @@ -0,0 +1,2 @@ +PREP(initClientSettings); +PREP(initGlobalSettings); diff --git a/addons/_settings/XEH_postInit.sqf b/addons/_settings/XEH_postInit.sqf new file mode 100644 index 0000000..421c54b --- /dev/null +++ b/addons/_settings/XEH_postInit.sqf @@ -0,0 +1 @@ +#include "script_component.hpp" diff --git a/addons/_settings/XEH_preInit.sqf b/addons/_settings/XEH_preInit.sqf new file mode 100644 index 0000000..81fa580 --- /dev/null +++ b/addons/_settings/XEH_preInit.sqf @@ -0,0 +1,12 @@ +#include "script_component.hpp" +ADDON = false; + +PREP_RECOMPILE_START; +#include "XEH_PREP.hpp" +PREP_RECOMPILE_END; + +// TODO: Consider spliting settings per component and dropping `settings` component entirely +call FUNC(initClientSettings); +call FUNC(initGlobalSettings); + +ADDON = true; diff --git a/addons/_settings/XEH_preStart.sqf b/addons/_settings/XEH_preStart.sqf new file mode 100644 index 0000000..a51262a --- /dev/null +++ b/addons/_settings/XEH_preStart.sqf @@ -0,0 +1,2 @@ +#include "script_component.hpp" +#include "XEH_PREP.hpp" diff --git a/addons/_settings/config.cpp b/addons/_settings/config.cpp new file mode 100644 index 0000000..d821136 --- /dev/null +++ b/addons/_settings/config.cpp @@ -0,0 +1,17 @@ +#include "script_component.hpp" + +class CfgPatches { + class ADDON { + name = COMPONENT_NAME; + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = { + "afwg_main" + }; + author = "ArmaForces"; + VERSION_CONFIG; + }; +}; + +#include "CfgEventHandlers.hpp" diff --git a/addons/_settings/functions/fn_initClientSettings.sqf b/addons/_settings/functions/fn_initClientSettings.sqf new file mode 100644 index 0000000..02f2dea --- /dev/null +++ b/addons/_settings/functions/fn_initClientSettings.sqf @@ -0,0 +1,58 @@ +#include "..\script_component.hpp" +/* + * Author: 3Mydlo3 + * Initializes clientside settings. + * + * Arguments: + * None + * + * Return Value: + * None + * + * Public: No + */ + +[ + QGVAR(damageAlarmEnabled), + "CHECKBOX", + [LSTRING(DamageAlarmEnabled), LSTRING(DamageAlarmEnabled_Description)], + [LSTRING(Settings_DisplayNameClient)], + true, + false +] call CBA_fnc_addSetting; + +[ + QGVAR(unitIconSizeDependsOnDistance), + "CHECKBOX", + [LSTRING(UnitIconSizeDependsOnDistance), LSTRING(UnitIconSizeDependsOnDistance_Description)], + [LSTRING(Settings_DisplayNameClient), LSTRING(UnitIconsSize)], + true, + false +] call CBA_fnc_addSetting; + +[ + QGVAR(unitIconSizeMultiplier), + "SLIDER", + [LSTRING(UnitIconSizeMultiplier), LSTRING(UnitIconSizeMultiplier_Description)], + [LSTRING(Settings_DisplayNameClient), LSTRING(UnitIconsSize)], + [0, 10, 1, 0], + false +] call CBA_fnc_addSetting; + +[ + QGVAR(unitIconTextSizeMultiplier), + "SLIDER", + [LSTRING(UnitIconTextSizeMultiplier), LSTRING(UnitIconTextSizeMultiplier_Description)], + [LSTRING(Settings_DisplayNameClient), LSTRING(UnitIconsSize)], + [0, 10, 1, 0], + false +] call CBA_fnc_addSetting; + +[ + QGVAR(showDamageFeedback), + "CHECKBOX", + [LSTRING(ShowDamageFeedback), LSTRING(ShowDamageFeedback_Description)], + [LSTRING(Settings_DisplayNameClient)], + true, + false +] call CBA_fnc_addSetting; diff --git a/addons/_settings/functions/fn_initGlobalSettings.sqf b/addons/_settings/functions/fn_initGlobalSettings.sqf new file mode 100644 index 0000000..5422601 --- /dev/null +++ b/addons/_settings/functions/fn_initGlobalSettings.sqf @@ -0,0 +1,66 @@ +#include "..\script_component.hpp" +/* + * Author: 3Mydlo3, veteran29 + * Initializes global scenario settings. + * + * Arguments: + * None + * + * Return Value: + * None + * + * Public: No + */ + +[ + QGVAR(unitIconMode), + "LIST", + ["Unit icon mode", ""], + [LSTRING(Settings_DisplayName), LSTRING(UnitIcons)], + [[0, 1], ["All", "Enemy only"]], + true +] call CBA_fnc_addSetting; + +[ + QGVAR(enemyMarkersEnabled), + "CHECKBOX", + ["Enable map markers enemies", "If enabled, map markers will be show for spotted enemy units (icons might look different on map vs in-game)."], + [LSTRING(Settings_DisplayName), LSTRING(UnitIcons)], + true, + true +] call CBA_fnc_addSetting; + +[ + QGVAR(enemyMarkersRefreshRate), + "TIME", + ["Refresh rate for enemy markers", "Controls how often map markers for enemies should refresh."], + [LSTRING(Settings_DisplayName), LSTRING(UnitIcons)], + [0, 60, 5], + true +] call CBA_fnc_addSetting; + +[ + QGVAR(onlyReconCanSpot), + "CHECKBOX", + ["Only recon can spot", "If enabled, only recon units can spot enemies to be visible for other units"], + [LSTRING(Settings_DisplayName)], + false, + true +] call CBA_fnc_addSetting; + +[ + QGVAR(repairMinNoCombatTime), + "TIME", + ["Minimum no combat time", "Vehicle must be out of combat for long enough to be able to be repaired"], + [LSTRING(Settings_DisplayName), localize "str_state_repair"], + [0, 900, 60], + true +] call CBA_fnc_addSetting; + +GVAR(iconWidth) = getNumber (configFile >> "CfgInGameUI" >> "Cursor" >> "activeWidth"); +GVAR(westIconColor) = getArray (missionConfigFile >> "CfgWargay" >> "westMarkerColor"); +GVAR(westAiIconColor) = getArray (missionConfigFile >> "CfgWargay" >> "westAiMarkerColor"); +GVAR(eastIconColor) = getArray (missionConfigFile >> "CfgWargay" >> "eastMarkerColor"); +GVAR(filledHpColor) = getArray (missionConfigFile >> "CfgWargay" >> "filledHpColor"); +GVAR(missingHpColor) = getArray (missionConfigFile >> "CfgWargay" >> "missingHpColor"); +GVAR(fuelConsumptionMultiplier) = 4; diff --git a/addons/_settings/functions/script_component.hpp b/addons/_settings/functions/script_component.hpp new file mode 100644 index 0000000..6686d96 --- /dev/null +++ b/addons/_settings/functions/script_component.hpp @@ -0,0 +1 @@ +#include "\z\afwg\addons\common\script_component.hpp" diff --git a/addons/_settings/script_component.hpp b/addons/_settings/script_component.hpp new file mode 100644 index 0000000..0f429bd --- /dev/null +++ b/addons/_settings/script_component.hpp @@ -0,0 +1,14 @@ +#define COMPONENT common +#include "\z\afwg\addons\main\script_mod.hpp" + +// #define DEBUG_MODE_FULL +// #define DISABLE_COMPILE_CACHE + +#ifdef DEBUG_ENABLED_COMMON + #define DEBUG_MODE_FULL +#endif + #ifdef DEBUG_SETTINGS_COMMON + #define DEBUG_SETTINGS DEBUG_SETTINGS_COMMON +#endif + +#include "\z\afwg\addons\main\script_macros.hpp" diff --git a/addons/_settings/stringtable.xml b/addons/_settings/stringtable.xml new file mode 100644 index 0000000..2b43f32 --- /dev/null +++ b/addons/_settings/stringtable.xml @@ -0,0 +1,17 @@ + + + + + ArmaForces Wargame - Common + ArmaForces Wargame - Common + + + Enable component + Włącz komponent + + + Controls whether this component is active. + Pozwala kontrolować czy komponent jest włączony. + + + diff --git a/addons/common/script_component.hpp b/addons/common/script_component.hpp index 5921328..0f429bd 100644 --- a/addons/common/script_component.hpp +++ b/addons/common/script_component.hpp @@ -1,10 +1,6 @@ #define COMPONENT common #include "\z\afwg\addons\main\script_mod.hpp" -#include "\a3\ui_f\hpp\defineCommonGrids.inc" -#include "\a3\ui_f\hpp\defineResincl.inc" -#include "\a3\ui_f\hpp\defineResinclDesign.inc" - // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE diff --git a/addons/common/stringtable.xml b/addons/common/stringtable.xml index cee4bc5..2b43f32 100644 --- a/addons/common/stringtable.xml +++ b/addons/common/stringtable.xml @@ -2,8 +2,8 @@ - ArmaForces - Common - ArmaForces - Common + ArmaForces Wargame - Common + ArmaForces Wargame - Common Enable component diff --git a/addons/damage/$PBOPREFIX$ b/addons/damage/$PBOPREFIX$ new file mode 100644 index 0000000..2f072d2 --- /dev/null +++ b/addons/damage/$PBOPREFIX$ @@ -0,0 +1 @@ +z\afwg\addons\damage \ No newline at end of file diff --git a/addons/damage/CfgEventHandlers.hpp b/addons/damage/CfgEventHandlers.hpp new file mode 100644 index 0000000..2a3f71f --- /dev/null +++ b/addons/damage/CfgEventHandlers.hpp @@ -0,0 +1,15 @@ +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); + }; +}; +class Extended_PreInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); + }; +}; +class Extended_PostInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); + }; +}; diff --git a/addons/damage/XEH_PREP.hpp b/addons/damage/XEH_PREP.hpp new file mode 100644 index 0000000..7703aac --- /dev/null +++ b/addons/damage/XEH_PREP.hpp @@ -0,0 +1,7 @@ +PREP(applyDamage); +PREP(calculateAndApplyDamage); +PREP(getHitDir); +PREP(healDamage); +PREP(heatDamage); +PREP(heDamage); +PREP(keDamage); diff --git a/addons/damage/XEH_postInit.sqf b/addons/damage/XEH_postInit.sqf new file mode 100644 index 0000000..918f0cb --- /dev/null +++ b/addons/damage/XEH_postInit.sqf @@ -0,0 +1,15 @@ +#include "script_component.hpp" + +if (isServer) exitWith {}; + +["MDL_applyDamage", { + params ["_unit"]; + + if (GVAR(damageAlarmEnabled) && {_unit isEqualTo vehicle player} && {!GVAR(isSoundPlaying)}) then { + GVAR(isSoundPlaying) = true; + playSound ["MDL_Wargay_Alarm", 2]; + [{ + GVAR(isSoundPlaying) = false; + }, [], 4] call CBA_fnc_waitAndExecute; + }; +}] call CBA_fnc_addEventHandler; diff --git a/addons/damage/XEH_preInit.sqf b/addons/damage/XEH_preInit.sqf new file mode 100644 index 0000000..ecb5d0c --- /dev/null +++ b/addons/damage/XEH_preInit.sqf @@ -0,0 +1,8 @@ +#include "script_component.hpp" +ADDON = false; + +PREP_RECOMPILE_START; +#include "XEH_PREP.hpp" +PREP_RECOMPILE_END; + +ADDON = true; diff --git a/addons/damage/XEH_preStart.sqf b/addons/damage/XEH_preStart.sqf new file mode 100644 index 0000000..a51262a --- /dev/null +++ b/addons/damage/XEH_preStart.sqf @@ -0,0 +1,2 @@ +#include "script_component.hpp" +#include "XEH_PREP.hpp" diff --git a/addons/damage/config.cpp b/addons/damage/config.cpp new file mode 100644 index 0000000..2949b60 --- /dev/null +++ b/addons/damage/config.cpp @@ -0,0 +1,17 @@ +#include "script_component.hpp" + +class CfgPatches { + class ADDON { + name = COMPONENT_NAME; + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = { + "afwg_common" + }; + author = "ArmaForces"; + VERSION_CONFIG; + }; +}; + +#include "CfgEventHandlers.hpp" diff --git a/addons/damage/functions/fn_applyDamage.sqf b/addons/damage/functions/fn_applyDamage.sqf new file mode 100644 index 0000000..4fd3f91 --- /dev/null +++ b/addons/damage/functions/fn_applyDamage.sqf @@ -0,0 +1,58 @@ +#include "script_component.hpp" +/* + * Author: 3Mydlo3 + * Applies damage to unit + * + * Arguments: + * 0: Unit to damage + * 1: Damage amount + * 2: Unit shooting + * + * Return Value: + * None + * + * Public: No + */ + +params ["_unit", "_damage", "_shooter"]; + +private _currentHp = _unit getVariable ["MDL_currentHp", 10]; +private _newHp = _currentHp - _damage; + +// Check if this is a kill +if (_newHp <= 0) exitWith { + // Add experience for players first + if (isPlayer _shooter) then { + if ([side _shooter, side _unit] call BIS_fnc_sideIsEnemy) then { + [_shooter, _unit] call FUNC(addExperienceForKill); + } else { + // TODO: Handle friendly-fire + // TODO: Consider removing XP for damaging friendly units too + }; + }; + + if (_unit getVariable ["MDL_deployedVehicle", false]) then { + ["MDL_unitLost", [_unit]] call CBA_fnc_globalEvent; + }; + + _unit setVariable ["MDL_currentHp", 0, true]; + ["MDL_showCurrentHp", [_unit], crew _unit] call CBA_fnc_targetEvent; + {_x setDamage 1} forEach crew _unit; + _unit setDamage 1; + _unit setVariable ["MDL_IsVisible", false, true]; +}; + +#ifdef DEV_DEBUG +systemChat format ["Remaining HP: %1/10", _newHp]; +#endif + +private _maxHp = _unit getVariable ["MDL_maxHp", MAX_HP]; +_unit setVariable ["MDL_currentHp", _newHp, true]; +// Limit to 0.8 to avoid explosions when hull or fuel are almost destroyed +_unit setDamage (((1 - _newHp)/_maxHp) min 0.8); +["MDL_showCurrentHp", [_unit], crew _unit] call CBA_fnc_targetEvent; + +if (isPlayer _unit) then { + // Need to publicize it as this function runs on server + _unit setVariable ["MDL_lastCombatActive", CBA_missionTime, true]; +}; diff --git a/addons/damage/functions/fn_calculateAndApplyDamage.sqf b/addons/damage/functions/fn_calculateAndApplyDamage.sqf new file mode 100644 index 0000000..e0d6f63 --- /dev/null +++ b/addons/damage/functions/fn_calculateAndApplyDamage.sqf @@ -0,0 +1,98 @@ +#include "script_component.hpp" +/* + * Author: 3Mydlo3 + * Handles damage calculation and applying using HitPart EH data. + * + * Arguments: + * 0: Targeted object + * + * Return Value: + * None + * + * Public: No + */ + +params ["_unit", "_shooter", "_hitDir", "_hitPositionAGL", "_velocity", "_projectile", "_ammo"]; +_ammo params ["_hitValue", "_indirectHitValue", "_indirectHitRange", "_explosiveDamage", "_ammoClassName"]; + +#ifdef DEV_DEBUG +diag_log format ["WARGAY DEBUG CALCULATE DAMAGE [%1]: %2", diag_tickTime, str _this]; +#endif + +private _unitType = VehicleTypes getOrDefault [toUpper typeOf _unit, []]; +private _unitArmor = if (_unitType isEqualTo []) then { NO_ARMOR } else { + _unitType getOrDefault ["armor", NO_ARMOR] +}; + +private _armor = switch (_hitDir) do { + case "FRONT": { _unitArmor select 0 }; + case "SIDE": { _unitArmor select 1 }; + case "REAR": { _unitArmor select 2 }; + case "TOP": { _unitArmor select 3 }; + default { 0 }; +}; + +private _ammoInfo = AmmoTypes getOrDefault [toUpper _ammoClassName, []]; +if (_ammoInfo isEqualTo []) then { + // Try to recover for small arms as I was lazy and didn't want to copy all the ammo classes + private _isSmallArms = getNumber (configFile >> "CfgAmmo" >> _ammoClassName >> "caliber") < 1; + if (_isSmallArms) then { + private _hashMap = AmmoTypes get "SMALL_ARMS"; + AmmoTypes set [toUpper _ammoClassName, _hashMap]; + }; +}; +if (_ammoInfo isEqualTo []) exitWith { + #ifdef DEV_DEBUG + private _infoMsg = format ["Unknown ammunition '%1' used, ignoring calculations",_ammoClassName]; + systemChat _infoMsg; + diag_log _infoMsg; + #endif +}; + +private _ammoDamage = _ammoInfo getOrDefault ["damage", 0]; +if (_ammoDamage isEqualTo 0) exitWith {}; + +private _isUnknownAmmoType = false; +private _ammoType = _ammoInfo getOrDefault ["type", "NONE"]; +private _damage = switch (_ammoType) do { + case "AP": { + private _initialVelocity = _projectile getVariable ["MDL_initialVelocity", [0, 0, 0]]; + [_armor, _ammoDamage, _velocity, _initialVelocity] call FUNC(keDamage) + }; + case "HEAT": { + // Ignore no velocity HEAT as this is most likely some splash and we don't want that + if (_velocity isEqualTo [0, 0, 0]) exitWith {}; + [_armor, _ammoDamage] call FUNC(heatDamage) + }; + case "HE" : { + private _distanceToTarget = if (_hitPositionAGL isEqualTo []) then { 0 } else { getPosATL _unit distance _hitPositionAGL }; + [_armor, _ammoDamage, _distanceToTarget] call FUNC(heDamage) + }; + default { _isUnknownAmmoType = true; 0 }; +}; + +if (_isUnknownAmmoType) exitWith { + #ifdef DEV_DEBUG + private _infoMsg = format ["Unknown ammunition type '%1' used, ignoring calculations",_ammoType]; + systemChat _infoMsg; + diag_log _infoMsg; + #endif +}; + +if (GVAR(showDamageFeedback)) then { + private _infoMsg = format ["Potential damage: %1 %2, Hit armor: %3 %4, Actual damage: %5", _ammoDamage, _ammoType, _hitDir, _armor, _damage]; + systemChat _infoMsg; + #ifdef DEV_DEBUG + diag_log _infoMsg; + #endif +}; + +#ifdef DEV_DEBUG +private _infoMsg = format ["Potential damage: %1 %2, Hit armor: %3 %4, Actual damage: %5", _ammoDamage, _ammoType, _hitDir, _armor, _damage]; +systemChat _infoMsg; +diag_log _infoMsg; +#endif + +if (_damage isEqualTo 0) exitWith {}; + +["MDL_applyDamage", [_unit, _damage, _shooter]] call CBA_fnc_serverEvent; diff --git a/addons/damage/functions/fn_getHitDir.sqf b/addons/damage/functions/fn_getHitDir.sqf new file mode 100644 index 0000000..f6040e0 --- /dev/null +++ b/addons/damage/functions/fn_getHitDir.sqf @@ -0,0 +1,57 @@ +#include "script_component.hpp" +/* + * Author: 3Mydlo3 + * Returns direction [FRONT/SIDE/REAR/TOP] of the armor that was hit. + * + * Arguments: + * 0: Target hit + * 1: Vector prependicular to surface hit + * 2: Velocity vector of a projectile + * 3: Projectile + * + * Return Value: + * Hit direction one of: FRONT/SIDE/REAR/TOP + * + * Public: No + */ + +params ["_target", "_surfaceVector", "_velocity", "_projectile"]; + +private _hitDirVectorNormalized = if (_velocity isEqualTo [0, 0, 0]) then { + #ifdef DEV_DEBUG + HitpointHits pushBack getPosATL _projectile; + #endif + getPosATL _target vectorDiff getPosATL _projectile vectorMultiply -1 +} else { + vectorNormalized _surfaceVector +}; + +#ifdef DEV_DEBUG +diag_log format ["WARGAY DEBUG GET HIT DIR [%1]: Target position: %2 Projectile position: %3", diag_tickTime, getPosATL _target, getPosATL _projectile]; +SurfaceVectors pushBack [getPosASL _target vectorAdd [0, 0, 1], getPosATL _target vectorDiff getPosATL _projectile vectorMultiply -1]; +ProjectileRelPosVectors pushBack [getPosATL _target vectorAdd [0, 0, 1], _hitDirVectorNormalized]; + +diag_log format ["WARGAY DEBUG GET HIT DIR [%1]: Target: %2, Vector: %3, Velocity: %4, HitVector: %5", diag_tickTime, _target, _surfaceVector, _velocity, _hitDirVectorNormalized]; +#endif + +private _targetDir = vectorDir _target; +#ifdef DEV_DEBUG +TargetDirVectors pushBack [getPosATL _target vectorAdd [0, 0, 1], _targetDir]; +#endif + +private _dotProduct = _targetDir vectorDotProduct _hitDirVectorNormalized; +private _topHitDir = _surfaceVector#2 atan2 sqrt (_surfaceVector#0^2 + _surfaceVector#1^2); + +private _hitDir = if (_topHitDir > 70) then { + "TOP" +} else { + if (_dotProduct > 0.5) exitWith { "FRONT" }; + if (_dotProduct < -0.5) exitWith { "REAR" }; + "SIDE" +}; + +#ifdef DEV_DEBUG +diag_log format ["WARGAY DEBUG GET HIT DIR [%1]: Target Dir: %2, Dot product: %3, Top='%4'", diag_tickTime, _targetDir, _dotProduct, _topHitDir]; +#endif + +_hitDir diff --git a/addons/damage/functions/fn_heDamage.sqf b/addons/damage/functions/fn_heDamage.sqf new file mode 100644 index 0000000..a8e1b1c --- /dev/null +++ b/addons/damage/functions/fn_heDamage.sqf @@ -0,0 +1,39 @@ +#include "script_component.hpp" +/* + * Author: 3Mydlo3 + * Calculates HE damage. + * + * Arguments: + * 0: Armor value + * 1: Ammo base damage + * 2: Distance to target + * + * Return Value: + * Damage + * + * Public: No + */ + +params ["_armor", "_ammoBaseDamage", "_distanceToTarget"]; + +#ifdef DEV_DEBUG +diag_log format ["WARGAY DEBUG HE DAMAGE [%1]: %2 AV, %3 HE, %4 m to target", diag_tickTime, _armor, _ammoBaseDamage, _distanceToTarget]; +#endif + +fnc_damagePerHe = { + params ["_armor"]; + + if (_armor < 2) exitWith {1}; + if (_armor isEqualTo 2) exitWith {0.4}; + if (_armor isEqualTo 3) exitWith {0.3}; + if (_armor isEqualTo 4) exitWith {0.2}; + if (_armor isEqualTo 5) exitWith {0.15}; + if (_armor < 8) exitWith {0.1}; + if (_armor < 14) exitWith {0.05}; + 0.01 +}; + +private _damage = _ammoBaseDamage * ([_armor] call fnc_damagePerHe); +private _maxDistanceToTarget = _ammoBaseDamage^2 + 1; +private _calculatedDamage = _damage * ((_maxDistanceToTarget - _distanceToTarget)/_maxDistanceToTarget); +0 max _calculatedDamage diff --git a/addons/damage/functions/fn_healDamage.sqf b/addons/damage/functions/fn_healDamage.sqf new file mode 100644 index 0000000..829bc6c --- /dev/null +++ b/addons/damage/functions/fn_healDamage.sqf @@ -0,0 +1,32 @@ +#include "script_component.hpp" +/* + * Author: 3Mydlo3 + * Heals damage of unit + * + * Arguments: + * 0: Unit to heal + * 1: Heal amount (Default: full heal) + * + * Return Value: + * None + * + * Public: No + */ + +params ["_unit", ["_healAmount", MAX_HP]]; + +if (_healAmount isEqualTo MAX_HP) exitWith { + private _maxHp = _unit getVariable ["MDL_maxHp", MAX_HP]; + _unit setVariable ["MDL_currentHp", _maxHp, true]; + _unit setDamage 0; + // Heal crew + {_x setDamage 0} forEach crew _unit; +}; + +private _maxHp = _unit getVariable ["MDL_maxHp", MAX_HP]; +private _currentHp = _unit getVariable ["MDL_currentHp", MAX_HP]; +private _newHp = (_currentHp + 0.5) min 10; +_unit setVariable ["MDL_currentHp", _newHp, true]; +_unit setDamage (((1 - _newHp)/_maxHp) min 0.8); + +["MDL_showCurrentHp", [_unit], crew _unit] call CBA_fnc_targetEvent; diff --git a/addons/damage/functions/fn_heatDamage.sqf b/addons/damage/functions/fn_heatDamage.sqf new file mode 100644 index 0000000..5f657b4 --- /dev/null +++ b/addons/damage/functions/fn_heatDamage.sqf @@ -0,0 +1,26 @@ +#include "script_component.hpp" +/* + * Author: 3Mydlo3 + * Calculates damage of a HEAT projectile based on armor and ammo base damage. + * HEAT always does at least 1 dmg. + * + * Arguments: + * 0: Armor value + * 1: Ammo base damage + * + * Return Value: + * Damage + * + * Public: No + */ + +params ["_armor", "_ammoBaseDamage"]; + +if (_armor isEqualTo 0) exitWith { _ammoBaseDamage * 2 }; +private _standardDamage = ((_ammoBaseDamage - _armor)/2) + 1; + +// 1 dmg for each 1 AP above 10 difference from armor value (e.g., 13 AP vs 2 AV = 1 dmg) +private _extraDamage = 0 max (_ammoBaseDamage - _armor - 10); + +// HEAT always does at least 1 dmg +1 max (_standardDamage + _extraDamage) diff --git a/addons/damage/functions/fn_keDamage.sqf b/addons/damage/functions/fn_keDamage.sqf new file mode 100644 index 0000000..cf78bd4 --- /dev/null +++ b/addons/damage/functions/fn_keDamage.sqf @@ -0,0 +1,33 @@ +#include "script_component.hpp" +/* + * Author: 3Mydlo3 + * Wargame Red Dragon KE formula reverse engineered. + * Not using distance as velocity seems to fit better. + * + * Arguments: + * 0: Armor value + * 1: Ammo base damage + * 2: Projectile velocity + * 3: Projectile initial velocity + * + * Return Value: + * Damage + * + * Public: No + */ + +#define VELOCITY_STEP 125 + +params ["_armor", "_ammoBaseDamage", "_velocity", "_initialVelocity"]; + +if (_ammoBaseDamage isEqualTo 0.1) exitWith { + if (_armor isEqualTo 0) then { _ammoBaseDamage } else { 0 }; +}; + +private _damageFromVelocity = _ammoBaseDamage - ((vectorMagnitude _initialVelocity - vectorMagnitude _velocity) / VELOCITY_STEP); +if (_armor isEqualTo 0) exitWith { 2 * (_ammoBaseDamage max _damageFromVelocity) }; +if (_armor isEqualTo 1) exitWith { (_ammoBaseDamage max _damageFromVelocity) }; +if (_damageFromVelocity < 0) exitWith { 0 }; + +// Half for 2 armor, decreasing .5 for every additional armor point +_damageFromVelocity - (_damageFromVelocity/2) - (_armor - 2) * 0.5 diff --git a/addons/damage/functions/script_component.hpp b/addons/damage/functions/script_component.hpp new file mode 100644 index 0000000..0e7955a --- /dev/null +++ b/addons/damage/functions/script_component.hpp @@ -0,0 +1 @@ +#include "\z\afwg\addons\damage\script_component.hpp" diff --git a/addons/damage/script_component.hpp b/addons/damage/script_component.hpp new file mode 100644 index 0000000..5d00009 --- /dev/null +++ b/addons/damage/script_component.hpp @@ -0,0 +1,14 @@ +#define COMPONENT damage +#include "\z\afwg\addons\main\script_mod.hpp" + +// #define DEBUG_MODE_FULL +// #define DISABLE_COMPILE_CACHE + +#ifdef DEBUG_ENABLED_DAMAGE + #define DEBUG_MODE_FULL +#endif + #ifdef DEBUG_SETTINGS_DAMAGE + #define DEBUG_SETTINGS DEBUG_SETTINGS_DAMAGE +#endif + +#include "\z\afwg\addons\main\script_macros.hpp" diff --git a/addons/damage/stringtable.xml b/addons/damage/stringtable.xml new file mode 100644 index 0000000..d6ef232 --- /dev/null +++ b/addons/damage/stringtable.xml @@ -0,0 +1,17 @@ + + + + + ArmaForces Wargame - Damage + ArmaForces Wargame - Damage + + + Enable component + Włącz komponent + + + Controls whether this component is active. + Pozwala kontrolować czy komponent jest włączony. + + + diff --git a/addons/debug/$PBOPREFIX$ b/addons/debug/$PBOPREFIX$ new file mode 100644 index 0000000..956fb9d --- /dev/null +++ b/addons/debug/$PBOPREFIX$ @@ -0,0 +1 @@ +z\afwg\addons\debug \ No newline at end of file diff --git a/addons/debug/CfgEventHandlers.hpp b/addons/debug/CfgEventHandlers.hpp new file mode 100644 index 0000000..2a3f71f --- /dev/null +++ b/addons/debug/CfgEventHandlers.hpp @@ -0,0 +1,15 @@ +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); + }; +}; +class Extended_PreInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); + }; +}; +class Extended_PostInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); + }; +}; diff --git a/addons/debug/XEH_PREP.hpp b/addons/debug/XEH_PREP.hpp new file mode 100644 index 0000000..958cd2c --- /dev/null +++ b/addons/debug/XEH_PREP.hpp @@ -0,0 +1,2 @@ +PREP(drawHitDebug); +PREP(initDebug); diff --git a/addons/debug/XEH_postInit.sqf b/addons/debug/XEH_postInit.sqf new file mode 100644 index 0000000..421c54b --- /dev/null +++ b/addons/debug/XEH_postInit.sqf @@ -0,0 +1 @@ +#include "script_component.hpp" diff --git a/addons/debug/XEH_preInit.sqf b/addons/debug/XEH_preInit.sqf new file mode 100644 index 0000000..ea4a0a8 --- /dev/null +++ b/addons/debug/XEH_preInit.sqf @@ -0,0 +1,10 @@ +#include "script_component.hpp" +ADDON = false; + +PREP_RECOMPILE_START; +#include "XEH_PREP.hpp" +PREP_RECOMPILE_END; + +call FUNC(initDebug); + +ADDON = true; diff --git a/addons/debug/XEH_preStart.sqf b/addons/debug/XEH_preStart.sqf new file mode 100644 index 0000000..a51262a --- /dev/null +++ b/addons/debug/XEH_preStart.sqf @@ -0,0 +1,2 @@ +#include "script_component.hpp" +#include "XEH_PREP.hpp" diff --git a/addons/debug/config.cpp b/addons/debug/config.cpp new file mode 100644 index 0000000..d821136 --- /dev/null +++ b/addons/debug/config.cpp @@ -0,0 +1,17 @@ +#include "script_component.hpp" + +class CfgPatches { + class ADDON { + name = COMPONENT_NAME; + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = { + "afwg_main" + }; + author = "ArmaForces"; + VERSION_CONFIG; + }; +}; + +#include "CfgEventHandlers.hpp" diff --git a/addons/debug/functions/fn_drawHitDebug.sqf b/addons/debug/functions/fn_drawHitDebug.sqf new file mode 100644 index 0000000..c78b422 --- /dev/null +++ b/addons/debug/functions/fn_drawHitDebug.sqf @@ -0,0 +1,38 @@ +#include "script_component.hpp" +/* + * Author: 3Mydlo3 + * Draws debug hits data. + * + * Arguments: + * None + * + * Return Value: + * None + * + * Public: No + */ + +#ifdef DEV_DEBUG +{ + drawIcon3D ["#(argb,8,8,3)color(1,0,0,1)", [1,1,1,1], _x, 0.25, 0.25, 0, "Hit", 0, 0.03]; +} forEach HitpointHits; +{ + drawIcon3D ["#(argb,8,8,3)color(0,0,1,1)", [1,1,1,1], ASLToAGL _x, 0.25, 0.25, 0, "Hit", 0, 0.03]; +} forEach PositionHits; +{ + _x params ["_position", "_vector"]; + drawLine3D [ASLToAGL _position, ASLToAGL _position vectorAdd vectorNormalized _vector, [0,1,0,1]]; +} forEach SurfaceVectors; +{ + _x params ["_position", "_vector"]; + drawLine3D [ASLToAGL _position, ASLToAGL _position vectorAdd vectorNormalized _vector, [0,0,1,1]]; +} forEach VelocityVectors; +{ + _x params ["_position", "_vector"]; + drawLine3D [_position, _position vectorAdd vectorNormalized _vector, [1,1,0,1]]; +} forEach ProjectileRelPosVectors; +{ + _x params ["_position", "_vector"]; + drawLine3D [_position, _position vectorAdd vectorNormalized _vector, [0,1,1,1]]; +} forEach TargetDirVectors; +#endif diff --git a/addons/debug/functions/fn_initDebug.sqf b/addons/debug/functions/fn_initDebug.sqf new file mode 100644 index 0000000..efc39a1 --- /dev/null +++ b/addons/debug/functions/fn_initDebug.sqf @@ -0,0 +1,22 @@ +#include "script_component.hpp" +/* + * Author: 3Mydlo3 + * Initializes things for debugging if enabled. + * + * Arguments: + * None + * + * Return Value: + * None + * + * Public: No + */ + +#ifdef DEV_DEBUG +HitpointHits = []; +PositionHits = []; +TargetDirVectors = []; +ProjectileRelPosVectors = []; +SurfaceVectors = []; +VelocityVectors = []; +#endif diff --git a/addons/debug/functions/script_component.hpp b/addons/debug/functions/script_component.hpp new file mode 100644 index 0000000..83fd66e --- /dev/null +++ b/addons/debug/functions/script_component.hpp @@ -0,0 +1 @@ +#include "\z\afwg\addons\debug\script_component.hpp" diff --git a/addons/debug/script_component.hpp b/addons/debug/script_component.hpp new file mode 100644 index 0000000..957918c --- /dev/null +++ b/addons/debug/script_component.hpp @@ -0,0 +1,14 @@ +#define COMPONENT debug +#include "\z\afwg\addons\main\script_mod.hpp" + +// #define DEBUG_MODE_FULL +// #define DISABLE_COMPILE_CACHE + +#ifdef DEBUG_ENABLED_DEBUG + #define DEBUG_MODE_FULL +#endif + #ifdef DEBUG_SETTINGS_DEBUG + #define DEBUG_SETTINGS DEBUG_SETTINGS_DEBUG +#endif + +#include "\z\afwg\addons\main\script_macros.hpp" diff --git a/addons/debug/stringtable.xml b/addons/debug/stringtable.xml new file mode 100644 index 0000000..9284154 --- /dev/null +++ b/addons/debug/stringtable.xml @@ -0,0 +1,17 @@ + + + + + ArmaForces Wargame - Debug + ArmaForces Wargame - Debug + + + Enable component + Włącz komponent + + + Controls whether this component is active. + Pozwala kontrolować czy komponent jest włączony. + + + diff --git a/addons/deployment/$PBOPREFIX$ b/addons/deployment/$PBOPREFIX$ new file mode 100644 index 0000000..491a3c4 --- /dev/null +++ b/addons/deployment/$PBOPREFIX$ @@ -0,0 +1 @@ +z\afwg\addons\deployment \ No newline at end of file diff --git a/addons/deployment/CfgEventHandlers.hpp b/addons/deployment/CfgEventHandlers.hpp new file mode 100644 index 0000000..2a3f71f --- /dev/null +++ b/addons/deployment/CfgEventHandlers.hpp @@ -0,0 +1,15 @@ +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); + }; +}; +class Extended_PreInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); + }; +}; +class Extended_PostInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); + }; +}; diff --git a/addons/deployment/XEH_PREP.hpp b/addons/deployment/XEH_PREP.hpp new file mode 100644 index 0000000..347e965 --- /dev/null +++ b/addons/deployment/XEH_PREP.hpp @@ -0,0 +1 @@ +PREP(deployVehicle); diff --git a/addons/deployment/XEH_postInit.sqf b/addons/deployment/XEH_postInit.sqf new file mode 100644 index 0000000..7f386a8 --- /dev/null +++ b/addons/deployment/XEH_postInit.sqf @@ -0,0 +1,50 @@ +#include "script_component.hpp" + +if (isServer) exitWith {}; + +["MDL_createVehicleFailed", { + systemChat LLSTRING(DeploymentFailure); +}] call CBA_fnc_addEventHandler; + +["MDL_vehicleDeployment", { + params ["_vehicleClassName", "_caller", "_vehicle"]; + + if (_caller isEqualTo player) then { + player moveInDriver _vehicle; + }; + + private _vehicleInfo = VehicleTypes getOrDefault [toUpper _vehicleClassName, ""]; + private _vehicleName = if (_vehicleInfo isNotEqualTo "") then { + [_vehicleInfo] call FUNC(getVehicleDisplayName) + } else { + _vehicleClassName + }; + + [WEST, "HQ"] sideChat format [LLSTRING(DeploymentOfVehicle), _vehicleName, name _caller]; +}] call CBA_fnc_addEventHandler; + +["MDL_vehicleDeploymentNoLongerPossible", { + params ["_vehicleClassName"]; + private _vehicleInfo = VehicleTypes getOrDefault [toUpper _vehicleClassName, ""]; + private _vehicleName = if (_vehicleInfo isNotEqualTo "") then { + [_vehicleInfo] call FUNC(getVehicleDisplayName) + } else { + _vehicleClassName + }; + + [WEST, "HQ"] sideChat format [LLSTRING(DeploymentOfVehicleNoLongerPossible), _vehicleName]; +}] call CBA_fnc_addEventHandler; + +// TODO: Consider where to put this event +["MDL_unitLost", { + params ["_unit"]; + private _vehicleDisplayName = [_unit] call FUNC(getVehicleDisplayName); + private _crew = crew _unit; + private _crewNames = if (_crew isEqualTo []) then { + "" + } else { + format ["%1: %2", groupId group leader effectiveCommander _unit, _crew] + }; + + [WEST, "HQ"] sideChat format [LLSTRING(UnitLost), _vehicleDisplayName, _crewNames] +}] call CBA_fnc_addEventHandler; diff --git a/addons/deployment/XEH_preInit.sqf b/addons/deployment/XEH_preInit.sqf new file mode 100644 index 0000000..ecb5d0c --- /dev/null +++ b/addons/deployment/XEH_preInit.sqf @@ -0,0 +1,8 @@ +#include "script_component.hpp" +ADDON = false; + +PREP_RECOMPILE_START; +#include "XEH_PREP.hpp" +PREP_RECOMPILE_END; + +ADDON = true; diff --git a/addons/deployment/XEH_preStart.sqf b/addons/deployment/XEH_preStart.sqf new file mode 100644 index 0000000..a51262a --- /dev/null +++ b/addons/deployment/XEH_preStart.sqf @@ -0,0 +1,2 @@ +#include "script_component.hpp" +#include "XEH_PREP.hpp" diff --git a/addons/deployment/config.cpp b/addons/deployment/config.cpp new file mode 100644 index 0000000..d821136 --- /dev/null +++ b/addons/deployment/config.cpp @@ -0,0 +1,17 @@ +#include "script_component.hpp" + +class CfgPatches { + class ADDON { + name = COMPONENT_NAME; + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = { + "afwg_main" + }; + author = "ArmaForces"; + VERSION_CONFIG; + }; +}; + +#include "CfgEventHandlers.hpp" diff --git a/addons/deployment/functions/fn_deployVehicle.sqf b/addons/deployment/functions/fn_deployVehicle.sqf new file mode 100644 index 0000000..d259f27 --- /dev/null +++ b/addons/deployment/functions/fn_deployVehicle.sqf @@ -0,0 +1,43 @@ +#include "script_component.hpp" +/* + * Author: 3Mydlo3 + * Serverside handling of new vehicle deployment. + * + * Arguments: + * 0: Vehicle class to create + * 1: Person deploying vehicle + * 2: Vehicle used for spawning + * + * Return Value: + * None + * + * Public: No + */ + +params ["_vehicleClassName", "_caller", "_spawner"]; + +private _remainingSpawns = GVAR(spawnableVehicles) getOrDefault [_vehicleClassName, 0]; + +if (_remainingSpawns < 1) exitWith { + ["MDL_vehicleDeploymentNoLongerPossible", [_vehicleClassName], _caller] call CBA_fnc_targetEvent; +}; + +private _vehicle = createVehicle [_vehicleClassName, getMarkerPos "sys_marker_spawner_1", ["sys_marker_spawner_1", "sys_marker_spawner_2", "sys_marker_spawner_3"]]; +_vehicle setVariable ["MDL_deployedVehicle", true, true]; + +{ + _x addCuratorEditableObjects [[_vehicle], true]; +} forEach allCurators; + +if (_vehicle isEqualTo objNull) exitWith { + ["MDL_createVehicleFailed", [], _caller] call CBA_fnc_targetEvent; +}; + +["MDL_vehicleDeployment", [_vehicleClassName, _caller, _vehicle]] call CBA_fnc_globalEvent; + +private _newRemainingSpawns = _remainingSpawns - 1; +GVAR(spawnableVehicles) set [_vehicleClassName, _newRemainingSpawns]; +if (_newRemainingSpawns isEqualTo 0) then { + ["MDL_vehicleDeploymentNoLongerPossible", [_vehicleClassName]] call CBA_fnc_globalEvent; + deleteVehicle _spawner; +}; diff --git a/addons/deployment/functions/script_component.hpp b/addons/deployment/functions/script_component.hpp new file mode 100644 index 0000000..a041db3 --- /dev/null +++ b/addons/deployment/functions/script_component.hpp @@ -0,0 +1 @@ +#include "\z\afwg\addons\deployment\script_component.hpp" diff --git a/addons/deployment/script_component.hpp b/addons/deployment/script_component.hpp new file mode 100644 index 0000000..939f78c --- /dev/null +++ b/addons/deployment/script_component.hpp @@ -0,0 +1,14 @@ +#define COMPONENT deployment +#include "\z\afwg\addons\main\script_mod.hpp" + +// #define DEBUG_MODE_FULL +// #define DISABLE_COMPILE_CACHE + +#ifdef DEBUG_ENABLED_DEPLOYMENT + #define DEBUG_MODE_FULL +#endif + #ifdef DEBUG_SETTINGS_DEPLOYMENT + #define DEBUG_SETTINGS DEBUG_SETTINGS_DEPLOYMENT +#endif + +#include "\z\afwg\addons\main\script_macros.hpp" diff --git a/addons/deployment/stringtable.xml b/addons/deployment/stringtable.xml new file mode 100644 index 0000000..658d045 --- /dev/null +++ b/addons/deployment/stringtable.xml @@ -0,0 +1,29 @@ + + + + + ArmaForces Wargame - Deployment + ArmaForces Wargame - Deployment + + + Enable component + Włącz komponent + + + Controls whether this component is active. + Pozwala kontrolować czy komponent jest włączony. + + + Failed deploying vehicle + Nie udało się rozmieścić pojazdu + + + %2 deployed new '%1' vehicle. + %2 rozmieścił nowy pojazd '%1'. + + + Deployment of new '%1' vehicle is no longer possible. + Rozmieszczenie nowych pojazdów '%1' już nie jest możliwe. + + + diff --git a/addons/experience/$PBOPREFIX$ b/addons/experience/$PBOPREFIX$ new file mode 100644 index 0000000..d494ee3 --- /dev/null +++ b/addons/experience/$PBOPREFIX$ @@ -0,0 +1 @@ +z\afwg\addons\experience \ No newline at end of file diff --git a/addons/experience/CfgEventHandlers.hpp b/addons/experience/CfgEventHandlers.hpp new file mode 100644 index 0000000..2a3f71f --- /dev/null +++ b/addons/experience/CfgEventHandlers.hpp @@ -0,0 +1,15 @@ +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); + }; +}; +class Extended_PreInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); + }; +}; +class Extended_PostInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); + }; +}; diff --git a/addons/experience/XEH_PREP.hpp b/addons/experience/XEH_PREP.hpp new file mode 100644 index 0000000..c3bd43c --- /dev/null +++ b/addons/experience/XEH_PREP.hpp @@ -0,0 +1 @@ +PREP(addExperienceForKill); diff --git a/addons/experience/XEH_postInit.sqf b/addons/experience/XEH_postInit.sqf new file mode 100644 index 0000000..cfd69e3 --- /dev/null +++ b/addons/experience/XEH_postInit.sqf @@ -0,0 +1,15 @@ +#include "script_component.hpp" + +if (isServer) exitWith {}; + +["MDL_xpReceived", { + params ["_receivedXp", "_newLifeXp", "_newTotalXp"]; + + systemChat format [LLSTRING(XpReceived), _receivedXp, _newLifeXp, _newTotalXp]; +}] call CBA_fnc_addEventHandler; + +["MDL_showXp", { + params ["_currentXp", "_totalXp"]; + + systemChat format [LLSTRING(CurrentAndTotalXp), _currentXp, _totalXp]; +}] call CBA_fnc_addEventHandler; diff --git a/addons/experience/XEH_preInit.sqf b/addons/experience/XEH_preInit.sqf new file mode 100644 index 0000000..ecb5d0c --- /dev/null +++ b/addons/experience/XEH_preInit.sqf @@ -0,0 +1,8 @@ +#include "script_component.hpp" +ADDON = false; + +PREP_RECOMPILE_START; +#include "XEH_PREP.hpp" +PREP_RECOMPILE_END; + +ADDON = true; diff --git a/addons/experience/XEH_preStart.sqf b/addons/experience/XEH_preStart.sqf new file mode 100644 index 0000000..a51262a --- /dev/null +++ b/addons/experience/XEH_preStart.sqf @@ -0,0 +1,2 @@ +#include "script_component.hpp" +#include "XEH_PREP.hpp" diff --git a/addons/experience/config.cpp b/addons/experience/config.cpp new file mode 100644 index 0000000..d821136 --- /dev/null +++ b/addons/experience/config.cpp @@ -0,0 +1,17 @@ +#include "script_component.hpp" + +class CfgPatches { + class ADDON { + name = COMPONENT_NAME; + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = { + "afwg_main" + }; + author = "ArmaForces"; + VERSION_CONFIG; + }; +}; + +#include "CfgEventHandlers.hpp" diff --git a/addons/experience/functions/fn_addExperienceForKill.sqf b/addons/experience/functions/fn_addExperienceForKill.sqf new file mode 100644 index 0000000..c49f936 --- /dev/null +++ b/addons/experience/functions/fn_addExperienceForKill.sqf @@ -0,0 +1,44 @@ +#include "..\script_component.hpp" +/* + * Author: 3Mydlo3 + * Adds experience for kill to crew of shooting vehicle + * + * Arguments: + * 0: Unit shooting + * 1: Killed unit + * + * Return Value: + * None + * + * Public: No + */ + +params ["_shooter", "_unit"]; + +private _vehicleInfo = VehicleTypes getOrDefault [toUpper typeOf _unit, objNull]; +private _xpAmount = if (_vehicleInfo isEqualTo objNull) then { 5 } else { _vehicleInfo get "pointCost" }; + +{ + private _playerStats = [getPlayerUID _x] call FUNC(getPlayerStats); + + // TODO: Consider keeping list of killed units + private _killedUnits = _x getVariable ["MDL_killedUnits", []]; + _killedUnits pushBack typeOf _unit; + _x setVariable ["MDL_killedUnits", _killedUnits, true]; + + private _currentXp = _playerStats getOrDefault ["Current XP", 0]; + private _newXp = _currentXp + _xpAmount; + _playerStats set ["Current XP", _newXp]; + + private _currentTotalXp = _playerStats getOrDefault ["Total XP", 0]; + private _newTotalXp = _currentTotalXp + _xpAmount; + _playerStats set ["Total XP", _newTotalXp]; + + private _currentKills = _playerStats getOrDefault ["Kills", 0]; + private _newKills = _currentKills + _xpAmount; + _playerStats set ["Kills", _currentKills + _xpAmount]; + + _x setVariable ["MDL_playerStats", _playerStats, true]; + + ["MDL_xpReceived", [_xpAmount, _newXp, _newTotalXp], _x] call CBA_fnc_targetEvent; +} forEach crew vehicle _shooter; diff --git a/addons/experience/functions/script_component.hpp b/addons/experience/functions/script_component.hpp new file mode 100644 index 0000000..550ab69 --- /dev/null +++ b/addons/experience/functions/script_component.hpp @@ -0,0 +1 @@ +#include "\z\afwg\addons\experience\script_component.hpp" diff --git a/addons/experience/script_component.hpp b/addons/experience/script_component.hpp new file mode 100644 index 0000000..3eaec08 --- /dev/null +++ b/addons/experience/script_component.hpp @@ -0,0 +1,14 @@ +#define COMPONENT experience +#include "\z\afwg\addons\main\script_mod.hpp" + +// #define DEBUG_MODE_FULL +// #define DISABLE_COMPILE_CACHE + +#ifdef DEBUG_ENABLED_EXPERIENCE + #define DEBUG_MODE_FULL +#endif + #ifdef DEBUG_SETTINGS_EXPERIENCE + #define DEBUG_SETTINGS DEBUG_SETTINGS_EXPERIENCE +#endif + +#include "\z\afwg\addons\main\script_macros.hpp" diff --git a/addons/experience/stringtable.xml b/addons/experience/stringtable.xml new file mode 100644 index 0000000..bcb0351 --- /dev/null +++ b/addons/experience/stringtable.xml @@ -0,0 +1,21 @@ + + + + + ArmaForces Wargame - Experience + ArmaForces Wargame - Experience + + + Enable component + Włącz komponent + + + Controls whether this component is active. + Pozwala kontrolować czy komponent jest włączony. + + + Received %1 XP. New total from last death: %2 XP. Grand total: %3 XP + Otrzymano %1 PD. Całkowite PD od ostatniej śmierci: %2. PD w kampanii: %3 XP + + + diff --git a/addons/hud/$PBOPREFIX$ b/addons/hud/$PBOPREFIX$ new file mode 100644 index 0000000..5a652ce --- /dev/null +++ b/addons/hud/$PBOPREFIX$ @@ -0,0 +1 @@ +z\afwg\addons\hud \ No newline at end of file diff --git a/addons/hud/CfgEventHandlers.hpp b/addons/hud/CfgEventHandlers.hpp new file mode 100644 index 0000000..2a3f71f --- /dev/null +++ b/addons/hud/CfgEventHandlers.hpp @@ -0,0 +1,15 @@ +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); + }; +}; +class Extended_PreInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); + }; +}; +class Extended_PostInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); + }; +}; diff --git a/addons/hud/XEH_PREP.hpp b/addons/hud/XEH_PREP.hpp new file mode 100644 index 0000000..812db28 --- /dev/null +++ b/addons/hud/XEH_PREP.hpp @@ -0,0 +1,2 @@ +PREP(initHitpointsDisplay); +PREP(updateHitpointsDisplay); diff --git a/addons/hud/XEH_postInit.sqf b/addons/hud/XEH_postInit.sqf new file mode 100644 index 0000000..f95ff0c --- /dev/null +++ b/addons/hud/XEH_postInit.sqf @@ -0,0 +1,8 @@ +#include "script_component.hpp" + +if (isServer) exitWith {}; + +["MDL_showCurrentHp", { + if (vehicle player isEqualTo player) exitWith {}; + call FUNC(updateHitpointsDisplay); +}] call CBA_fnc_addEventHandler; diff --git a/addons/hud/XEH_preInit.sqf b/addons/hud/XEH_preInit.sqf new file mode 100644 index 0000000..ecb5d0c --- /dev/null +++ b/addons/hud/XEH_preInit.sqf @@ -0,0 +1,8 @@ +#include "script_component.hpp" +ADDON = false; + +PREP_RECOMPILE_START; +#include "XEH_PREP.hpp" +PREP_RECOMPILE_END; + +ADDON = true; diff --git a/addons/hud/XEH_preStart.sqf b/addons/hud/XEH_preStart.sqf new file mode 100644 index 0000000..a51262a --- /dev/null +++ b/addons/hud/XEH_preStart.sqf @@ -0,0 +1,2 @@ +#include "script_component.hpp" +#include "XEH_PREP.hpp" diff --git a/addons/hud/config.cpp b/addons/hud/config.cpp new file mode 100644 index 0000000..d821136 --- /dev/null +++ b/addons/hud/config.cpp @@ -0,0 +1,17 @@ +#include "script_component.hpp" + +class CfgPatches { + class ADDON { + name = COMPONENT_NAME; + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = { + "afwg_main" + }; + author = "ArmaForces"; + VERSION_CONFIG; + }; +}; + +#include "CfgEventHandlers.hpp" diff --git a/addons/hud/functions/fn_initHitpointsDisplay.sqf b/addons/hud/functions/fn_initHitpointsDisplay.sqf new file mode 100644 index 0000000..42ac008 --- /dev/null +++ b/addons/hud/functions/fn_initHitpointsDisplay.sqf @@ -0,0 +1,42 @@ +#include "..\script_component.hpp" +/* + * Author: veteran29 + * Initializes Wargay-like HP HUD display in vehicle. + * + * Arguments: + * 0: Vehicle HUD display + * + * Return Value: + * None + * + * Public: No + */ + +#define IDC_HITZONES 111 + +params ["_display"]; + +private _hitZonesCtrl = _display displayCtrl IDC_HITZONES; +// ignore HUDs without HitZones +if (isNull _hitZonesCtrl) exitWith { + // systemChat "Unable to init custom HUD"; +}; + +#ifdef DEV_DEBUG +systemChat "Initializing custom HUD"; +#endif + +// create container for hit points squares +private _ctrlContainer = _display ctrlCreate ["RscControlsGroupNoScrollbars", -1]; +_ctrlContainer ctrlSetPosition ctrlPosition _hitZonesCtrl; +_ctrlContainer ctrlCommit 0; +// hide original hitzones ctrl +_hitZonesCtrl ctrlShow false; + +uiNamespace setVariable ["MDL_hitpointsContainer", _ctrlContainer]; + +/* + cameraOn setVariable ["my_hitpoints", 2]; + [] call fnc_renderHitpoints; + */ +call FUNC(updateHitpointsDisplay); diff --git a/addons/hud/functions/fn_updateHitpointsDisplay.sqf b/addons/hud/functions/fn_updateHitpointsDisplay.sqf new file mode 100644 index 0000000..f1d5423 --- /dev/null +++ b/addons/hud/functions/fn_updateHitpointsDisplay.sqf @@ -0,0 +1,57 @@ +#include "..\script_component.hpp" +/* + * Author: veteran29 + * Updates Wargay-like HP HUD display. + * + * Arguments: + * None + * + * Return Value: + * None + * + * Public: No + */ + +private _ctrlContainer = uiNamespace getVariable ["MDL_hitpointsContainer", controlNull]; +if (isNull _ctrlContainer) exitWith {}; + +private _display = ctrlParent _ctrlContainer; + + +{ctrlDelete _x} forEach (_ctrlContainer getVariable ["MDL_hitpointsContainer_indicators", []]); + +private _totalHitPoints = vehicle cameraOn getVariable ["MDL_maxHp", MAX_HP]; +private _exactHitPoints = vehicle cameraOn getVariable ["MDL_currentHp", MAX_HP]; +private _hitPoints = ceil _exactHitPoints; +// calculate size of the hitzone squares +ctrlPosition _ctrlContainer params ["", "", "_w"]; +private _hpW = _w / _totalHitPoints; +private _gutterW = _hpW / 4; + +// render hitpoint squares +private _indicators = []; +for "_i" from 0 to (_totalHitPoints-1) do { + private _hpCtrl = _display ctrlCreate ["RscText", -1, _ctrlContainer]; + _hpCtrl ctrlSetBackgroundColor ([ + GVAR(missingHpColor), + GVAR(filledHpColor) + ] select (_i < _hitPoints)); + + _hpCtrl ctrlSetPosition [ + _hpW * _i, + pixelH * 4, + _hpW - _gutterW, + _hpW + ]; + _hpCtrl ctrlCommit 0; + + _indicators pushBack _hpCtrl; +}; + +if (_exactHitPoints isNotEqualTo _hitPoints) then { + private _partialHpCtrl = _indicators select (_hitPoints - 1); + _partialHpCtrl ctrlSetFade (_hitPoints - _exactHitPoints); + _partialHpCtrl ctrlCommit 0; +}; + +_ctrlContainer setVariable ["MDL_hitpointsContainer_indicators", _indicators]; \ No newline at end of file diff --git a/addons/hud/functions/script_component.hpp b/addons/hud/functions/script_component.hpp new file mode 100644 index 0000000..ae35276 --- /dev/null +++ b/addons/hud/functions/script_component.hpp @@ -0,0 +1 @@ +#include "\z\afwg\addons\hud\script_component.hpp" diff --git a/addons/hud/script_component.hpp b/addons/hud/script_component.hpp new file mode 100644 index 0000000..94e0555 --- /dev/null +++ b/addons/hud/script_component.hpp @@ -0,0 +1,14 @@ +#define COMPONENT hud +#include "\z\afwg\addons\main\script_mod.hpp" + +// #define DEBUG_MODE_FULL +// #define DISABLE_COMPILE_CACHE + +#ifdef DEBUG_ENABLED_HUD + #define DEBUG_MODE_FULL +#endif + #ifdef DEBUG_SETTINGS_HUD + #define DEBUG_SETTINGS DEBUG_SETTINGS_HUD +#endif + +#include "\z\afwg\addons\main\script_macros.hpp" diff --git a/addons/hud/stringtable.xml b/addons/hud/stringtable.xml new file mode 100644 index 0000000..f659d38 --- /dev/null +++ b/addons/hud/stringtable.xml @@ -0,0 +1,17 @@ + + + + + ArmaForces Wargame - Hud + ArmaForces Wargame - Hud + + + Enable component + Włącz komponent + + + Controls whether this component is active. + Pozwala kontrolować czy komponent jest włączony. + + + diff --git a/addons/icons/$PBOPREFIX$ b/addons/icons/$PBOPREFIX$ new file mode 100644 index 0000000..74fa5f0 --- /dev/null +++ b/addons/icons/$PBOPREFIX$ @@ -0,0 +1 @@ +z\afwg\addons\icons \ No newline at end of file diff --git a/addons/icons/CfgEventHandlers.hpp b/addons/icons/CfgEventHandlers.hpp new file mode 100644 index 0000000..2a3f71f --- /dev/null +++ b/addons/icons/CfgEventHandlers.hpp @@ -0,0 +1,15 @@ +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); + }; +}; +class Extended_PreInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); + }; +}; +class Extended_PostInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); + }; +}; diff --git a/addons/icons/XEH_PREP.hpp b/addons/icons/XEH_PREP.hpp new file mode 100644 index 0000000..457c2fd --- /dev/null +++ b/addons/icons/XEH_PREP.hpp @@ -0,0 +1,11 @@ +PREP(createVehicleInfoForNonConfiguredVehicle); +PREP(currentHpString); +PREP(drawIcon); +PREP(getAmmoInfo); +PREP(getIconPath); +PREP(getVehicleDisplayName); +PREP(getVehicleInfo); +PREP(isReconVehicle); +PREP(shouldStillBeVisible); +PREP(showUnitInfo); +PREP(visibilityCheckLoop); diff --git a/addons/icons/XEH_postInit.sqf b/addons/icons/XEH_postInit.sqf new file mode 100644 index 0000000..421c54b --- /dev/null +++ b/addons/icons/XEH_postInit.sqf @@ -0,0 +1 @@ +#include "script_component.hpp" diff --git a/addons/icons/XEH_preInit.sqf b/addons/icons/XEH_preInit.sqf new file mode 100644 index 0000000..ecb5d0c --- /dev/null +++ b/addons/icons/XEH_preInit.sqf @@ -0,0 +1,8 @@ +#include "script_component.hpp" +ADDON = false; + +PREP_RECOMPILE_START; +#include "XEH_PREP.hpp" +PREP_RECOMPILE_END; + +ADDON = true; diff --git a/addons/icons/XEH_preStart.sqf b/addons/icons/XEH_preStart.sqf new file mode 100644 index 0000000..a51262a --- /dev/null +++ b/addons/icons/XEH_preStart.sqf @@ -0,0 +1,2 @@ +#include "script_component.hpp" +#include "XEH_PREP.hpp" diff --git a/addons/icons/config.cpp b/addons/icons/config.cpp new file mode 100644 index 0000000..a07d0d4 --- /dev/null +++ b/addons/icons/config.cpp @@ -0,0 +1,18 @@ +#include "script_component.hpp" + +class CfgPatches { + class ADDON { + name = COMPONENT_NAME; + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = { + "afwg_main" + }; + author = "ArmaForces"; + VERSION_CONFIG; + }; +}; + +#include "CfgEventHandlers.hpp" +// TODO: Add unit icons/markers diff --git a/addons/icons/functions/fn_createVehicleInfoForNonConfiguredVehicle.sqf b/addons/icons/functions/fn_createVehicleInfoForNonConfiguredVehicle.sqf new file mode 100644 index 0000000..f764f6c --- /dev/null +++ b/addons/icons/functions/fn_createVehicleInfoForNonConfiguredVehicle.sqf @@ -0,0 +1,28 @@ +#include "..\script_component.hpp" +/* + * Author: 3Mydlo3 + * Creates configuration hashmap for given vehicle. + * Includes className and display name. + * + * Arguments: + * 0: Vehicle to create hashmap for + * + * Return Value: + * Created hashmap with base properties + * + * Public: No + */ + +params ["_vehicle"]; + +private _newVehicleInfo = createHashMapFromArray [ + [CLASS_NAME_PROPERTY, toUpper typeOf _vehicle], + [DISPLAY_NAME_PROPERTY, getText (configOf _vehicle >> DISPLAY_NAME_PROPERTY)], + ["iconPath", "\A3\ui_f\data\map\markers\nato\b_unknown.paa"], + ["markerType", "b_unknown"], + ["pointCost", 5] +]; + +VehicleTypes set [toUpper typeOf _vehicle, _newVehicleInfo]; + +_newVehicleInfo \ No newline at end of file diff --git a/addons/icons/functions/fn_currentHpString.sqf b/addons/icons/functions/fn_currentHpString.sqf new file mode 100644 index 0000000..eded43a --- /dev/null +++ b/addons/icons/functions/fn_currentHpString.sqf @@ -0,0 +1,27 @@ +#include "..\script_component.hpp" +/* + * Author: 3Mydlo3, veteran29 + * Returns the unit HP in [ ] string representation. + * Allows specifying optional character for non-damaged squares in case whitespace characters are removed and result doesn't look satisfying. + * + * Arguments: + * 0: Unit + * 1: Optional character for non-damaged squares + * + * Return Value: + * None + * + * Public: No + */ + +params ["_unit"]; + +private _currentHp = _unit getVariable ["MDL_currentHp", 0]; +private _maxHp = _unit getVariable ["MDL_maxHp", MAX_HP]; +private _missingHp = _maxHp - _currentHp; + +private _string = []; +_string resize [_currentHp, "[ ]"]; +_string resize [_maxHp, "[X]"]; + +_string joinString "" // return diff --git a/addons/icons/functions/fn_drawIcon.sqf b/addons/icons/functions/fn_drawIcon.sqf new file mode 100644 index 0000000..dcca8db --- /dev/null +++ b/addons/icons/functions/fn_drawIcon.sqf @@ -0,0 +1,61 @@ +#include "..\script_component.hpp" +/* + * Author: 3Mydlo3, veteran29 + * Draws 3D icon above given unit. + * + * Arguments: + * 0: Alive unit to draw an icon for + * 1: Include unit name and HP text (Optional, default false) + * + * Return Value: + * None + * + * Public: No + */ + +#define ABOVE_UNIT [0, 0, 1.5] + +params ["_target", ["_includeText", false]]; + +if (!alive _target || {_target getVariable ["MDL_currentHp", 0] isEqualTo 0}) exitWith {}; + +private _worldPos = _target modelToWorldVisual ABOVE_UNIT; + +private _screenPosition = worldToScreen _worldPos; +if (_screenPosition isEqualTo []) exitWith {}; + +private _iconDescription = if (_includeText) then { + format ["%1 - %2", [_target] call FUNC(getVehicleDisplayName), _target call FUNC(currentHpString)] +} else { "" }; + +private _iconPath = [_target] call FUNC(getIconPath); +private _iconSize = (GVAR(unitIconSizeMultiplier) * 0.01 * safeZoneW) / GVAR(iconWidth); +private _effectiveCommander = effectiveCommander _target; +private _sideColor = if (side _effectiveCommander isEqualTo WEST) then { + [GVAR(westAiIconColor), GVAR(westIconColor)] select isPlayer _effectiveCommander +} else { GVAR(eastIconColor) }; +// #ifdef DEV_DEBUG +// private _icon3DParams = [_iconPath, [_sideColor, [1,1,1,1]], _worldPos, _iconSize, _iconHeight, 0, _iconDescription, 0, 0.02, "EtelkaMonospacePro"]; +// diag_log format ["WARGAY DEBUG ICON3D [%1]: Params: %2", diag_tickTime, str _icon3DParams]; +// #endif + +if (GVAR(unitIconSizeDependsOnDistance)) then { + // BUG: Distance should be from camera? + private _distance = (player distance _worldPos) + 0.001; // Adding fraction to ensure it's positive in case someone ends up perfectly aligned (not gonna happen) + private _factor = (3 - (log _distance)/1.5) min 2 max 0.55; + // private _factor = 2 min (1 max ((_distance - 300) * 0.0014)); + _iconSize = _iconSize * _factor; +}; + +drawIcon3D [ + _iconPath, + [_sideColor, [1,1,1,1]], + _worldPos, + _iconSize, + _iconSize, + 0, + _iconDescription, + _includeText, // True = outline, False = nothing + GVAR(unitIconTextSizeMultiplier) * 0.02, + "EtelkaMonospacePro" +]; diff --git a/addons/icons/functions/fn_getAmmoInfo.sqf b/addons/icons/functions/fn_getAmmoInfo.sqf new file mode 100644 index 0000000..1b68b19 --- /dev/null +++ b/addons/icons/functions/fn_getAmmoInfo.sqf @@ -0,0 +1,127 @@ +#include "..\script_component.hpp" +/* + * Author: 3Mydlo3 + * Retrieves vehicle info hashmap for given unit or group (leader vehicle) if available. + * + * Arguments: + * 0: Unit or group to get its vehicle + * 1: Unit info key (Optional, if empty whole hashmap is returned) + * 2: Default value if key or unit info doesn't exist + * + * Return Value: + * Unit info or retrieved or default value + * + * Public: No + */ + +params ["_unitOrGroup"/*, ["_key", ""], ["_defaultValue", objNull]*/]; + +private _vehicle = if (_unitOrGroup isEqualType objNull) then { + vehicle _unitOrGroup +} else { + vehicle leader _unitOrGroup +}; + +private _vehicleInfo = [_vehicle] call FUNC(getVehicleInfo); + +private _ammoInfo = _vehicleInfo getOrDefault [AMMO_PROPERTY, objNull]; +if (_ammoInfo isEqualTo objNull) then { + private _vehicleClassName = _vehicleInfo get CLASS_NAME_PROPERTY; + + // diag_log format ["DDd %1", _vehicleClassName]; + + private _magazines = getArray (configFile >> "CfgVehicles" >> _vehicleClassName >> "Turrets" >> "MainTurret" >> "magazines"); + _magazines = _magazines arrayIntersect _magazines; + + // diag_log format ["Ddd mags: %1", str _magazines]; + + private _ammo = _magazines apply { + MagazineTypes getOrDefault [toUpper _x, objNull] + } + select {_x isNotEqualTo objNull} + apply { + [_x get CLASS_NAME_PROPERTY, _x getOrDefault [AMMO_PROPERTY, objNull]] + } + select {_x select 1 isNotEqualTo objNull} + apply { + (_x select 1) set ["displayNameShort", getText (configFile >> "CfgMagazines" >> (_x select 0) >> "displayNameShort")]; + _x select 1 + }; + + // diag_log ["Ddd ammo: %1", str _ammo]; + + private _ammoInfo = createHashMap; + { + _ammoInfo set [_x get CLASS_NAME_PROPERTY, _x]; + } forEach _ammo; + + // diag_log ["Ddd ammo info: %1", str _ammoInfo]; + + _vehicleInfo set [AMMO_PROPERTY, _ammoInfo]; + // diag_log ["Ddd vehicle info: %1", str _vehicleInfo]; +}; + +_ammoInfo + + +/* + +private _unitClassName = toUpper typeOf _unit; + +private _ammoInfo = AmmoTypes getOrDefault [_unitClassName, objNull]; + +// Handle classes that have a parent configured +if (_ammoInfo isEqualTo objNull) then { + + private _parentClassNames = [configOf _unit, true] call BIS_fnc_returnParents; + + LOG_3("Not found info for '%1'. Found %2 parents: %3",_unitClassName,count _parentClassNames,str _parentClassNames); + + while {_ammoInfo isEqualTo objNull && {count _parentClassNames > 0}} do { + private _parent = _parentClassNames deleteAt 0; + _ammoInfo = VehicleTypes getOrDefault [toUpper _parent, objNull]; + }; + + if (_ammoInfo isNotEqualTo objNull) then { + LOG_3("Found matching parent '%1' for '%2' with vehicle info: %3",_ammoInfo get CLASS_NAME_PROPERTY,_unitClassName,str _ammoInfo); + + _ammoInfo set [CLASS_NAME_PROPERTY, _unitClassName]; + _ammoInfo set [DISPLAY_NAME_PROPERTY, getText (configFile >> "CfgVehicles" >> _unitClassName >> DISPLAY_NAME_PROPERTY)]; + VehicleTypes set [_unitClassName, _ammoInfo]; + + LOG_1("Saved vehicle info: '%1'",str _ammoInfo); + } else { + _ammoInfo = [_unit] call FUNC(createVehicleInfoForNonConfiguredVehicle); + LOG_2("Parent not found for '%1', created dummy info: %2",_unitClassName,str _ammoInfo); + }; +}; + +LOG_2("Found vehicle info for '%1': %2",_unitClassName,str _ammoInfo); + +/*if (_key isEqualTo "") exitWith { _ammoInfo }; + +_ammoInfo getOrDefault [_key, _defaultValue]*/ + + +// _hashMap set [DISPLAY_NAME_PROPERTY, getText (configFile >> "CfgAmmo" >> configName _x >> DISPLAY_NAME_PROPERTY)]; + +/* + private _vehicle = get3DENSelected "Object" select 0; +_vehicle = vehicle player; + +private _magazines = getArray (configOf _vehicle >> "Turrets" >> "MainTurret" >> "magazines"); +_magazines = _magazines arrayIntersect _magazines; + +private _ammo = _magazines apply { + [_x, getText (configFile >> "CfgMagazines" >> _x >> "ammo")] +}; + +_ammo apply { + [_x select 0, AmmoTypes getOrDefault [toUpper (_x select 1), objNull]]; +} select {_x select 1 isNotEqualTo objNull} +apply { + (_x select 1) set ["displayNameShort", getText (configFile >> "CfgMagazines" >> (_x select 0) >> "displayNameShort")]; + _x select 1 +} + + */ \ No newline at end of file diff --git a/addons/icons/functions/fn_getIconPath.sqf b/addons/icons/functions/fn_getIconPath.sqf new file mode 100644 index 0000000..58d1ffb --- /dev/null +++ b/addons/icons/functions/fn_getIconPath.sqf @@ -0,0 +1,31 @@ +#include "..\script_component.hpp" +/* + * Author: 3Mydlo3, veteran29 + * Returns path to icon corresponding to given vehicle type. + * + * Arguments: + * 0: Vehicle + * + * Return Value: + * None + * + * Public: No + */ + +params ["_vehicle"]; + +private _iconType = _vehicle getVariable ["MDL_iconPath", ""]; + +if (_iconType isNotEqualTo "") exitWith { _iconType }; + +private _vehicleInfo = [_vehicle] call FUNC(getVehicleInfo); + +private _iconPath = _vehicleInfo getOrDefault [ + "iconPath", + "\A3\gui_f\data\map\markers\nato\b_unknown.paa", + true +]; + +_vehicle setVariable ["MDL_iconPath", _iconPath]; + +_iconPath diff --git a/addons/icons/functions/fn_getVehicleDisplayName.sqf b/addons/icons/functions/fn_getVehicleDisplayName.sqf new file mode 100644 index 0000000..31a3042 --- /dev/null +++ b/addons/icons/functions/fn_getVehicleDisplayName.sqf @@ -0,0 +1,30 @@ +#include "..\script_component.hpp" +/* + * Author: 3Mydlo3, veteran29 + * Returns displayNameShort for given vehicle type. + * + * Arguments: + * 0: Vehicle or unit info + * + * Return Value: + * Short display name of a vehicle type + * + * Public: No + */ + +params ["_vehicleOrInfo"]; + +if ( + _vehicleOrInfo isEqualType objNull + && {!(_vehicleOrInfo isKindOf "AllVehicles")} +) exitWith { "" }; + +if (_vehicleOrInfo isEqualType objNull) then { + _vehicleOrInfo = [_vehicleOrInfo] call FUNC(getVehicleInfo); +}; + +_vehicleOrInfo getOrDefaultCall [ + DISPLAY_NAME_PROPERTY, + {getText (configFile >> "CfgVehicles" >> (_vehicleOrInfo get CLASS_NAME_PROPERTY) >> DISPLAY_NAME_PROPERTY)}, + true +] // return diff --git a/addons/icons/functions/fn_getVehicleInfo.sqf b/addons/icons/functions/fn_getVehicleInfo.sqf new file mode 100644 index 0000000..94e1676 --- /dev/null +++ b/addons/icons/functions/fn_getVehicleInfo.sqf @@ -0,0 +1,60 @@ +#include "..\script_component.hpp" +/* + * Author: 3Mydlo3 + * Retrieves vehicle info hashmap for given unit or group (leader vehicle) if available. + * + * Arguments: + * 0: Unit or group to get its vehicle + * 1: Unit info key (Optional, if empty whole hashmap is returned) + * 2: Default value if key or unit info doesn't exist + * + * Return Value: + * Unit info or retrieved or default value + * + * Public: No + */ + +params ["_unitOrGroup", ["_key", ""], ["_defaultValue", objNull]]; + +private _unit = if (_unitOrGroup isEqualType objNull) then { + vehicle _unitOrGroup +} else { + vehicle leader _unitOrGroup +}; + +private _unitClassName = toUpper typeOf _unit; + +private _vehicleInfo = VehicleTypes getOrDefault [_unitClassName, objNull]; + +// Handle classes that have a parent configured +if (_vehicleInfo isEqualTo objNull) then { + + private _parentClassNames = [configOf _unit, true] call BIS_fnc_returnParents; + + LOG_3("Not found info for '%1'. Found %2 parents: %3",_unitClassName,count _parentClassNames,str _parentClassNames); + + while {_vehicleInfo isEqualTo objNull && {count _parentClassNames > 0}} do { + private _parent = _parentClassNames deleteAt 0; + _vehicleInfo = VehicleTypes getOrDefault [toUpper _parent, objNull]; + }; + + if (_vehicleInfo isNotEqualTo objNull) then { + LOG_3("Found matching parent '%1' for '%2' with vehicle info: %3",_vehicleInfo get CLASS_NAME_PROPERTY,_unitClassName,str _vehicleInfo); + + // BUG:? It might replace value in original hashmap + _vehicleInfo set [CLASS_NAME_PROPERTY, _unitClassName]; + _vehicleInfo set [DISPLAY_NAME_PROPERTY, getText (configFile >> "CfgVehicles" >> _unitClassName >> DISPLAY_NAME_PROPERTY)]; + VehicleTypes set [_unitClassName, _vehicleInfo]; + + LOG_1("Saved vehicle info: '%1'",str _vehicleInfo); + } else { + _vehicleInfo = [_unit] call FUNC(createVehicleInfoForNonConfiguredVehicle); + LOG_2("Parent not found for '%1', created dummy info: %2",_unitClassName,str _vehicleInfo); + }; +}; + +LOG_2("Found vehicle info for '%1': %2",_unitClassName,str _vehicleInfo); + +if (_key isEqualTo "") exitWith { _vehicleInfo }; + +_vehicleInfo getOrDefault [_key, _defaultValue] diff --git a/addons/icons/functions/fn_isReconVehicle.sqf b/addons/icons/functions/fn_isReconVehicle.sqf new file mode 100644 index 0000000..347300b --- /dev/null +++ b/addons/icons/functions/fn_isReconVehicle.sqf @@ -0,0 +1,17 @@ +#include "..\script_component.hpp" +/* + * Author: 3Mydlo3 + * Checks if given unit or group is recon. + * + * Arguments: + * 0: Unit or group to check if it's recon + * + * Return Value: + * True if vehicle of a unit (or his leader) is recon + * + * Public: No + */ + +params ["_unitOrGroup"]; + +[_unitOrGroup, "isRecon", false] call FUNC(getVehicleInfo) isEqualTo 1 diff --git a/addons/icons/functions/fn_shouldStillBeVisible.sqf b/addons/icons/functions/fn_shouldStillBeVisible.sqf new file mode 100644 index 0000000..778b353 --- /dev/null +++ b/addons/icons/functions/fn_shouldStillBeVisible.sqf @@ -0,0 +1,19 @@ +#include "..\script_component.hpp" +/* + * Author: 3Mydlo3 + * Checks if given target is known to at least one unit. + * + * Arguments: + * 0: Object to check if anyone knows about it + * + * Return Value: + * True if at least one unit knows about the target + * + * Public: No + */ + +params ["_target", ["_side", WEST]]; + +private _anyoneKnowsAbout = groups _side findIf {leader _x targetKnowledge _target select 0} != -1; + +_anyoneKnowsAbout diff --git a/addons/icons/functions/fn_showUnitInfo.sqf b/addons/icons/functions/fn_showUnitInfo.sqf new file mode 100644 index 0000000..8149e9e --- /dev/null +++ b/addons/icons/functions/fn_showUnitInfo.sqf @@ -0,0 +1,67 @@ +#include "..\script_component.hpp" +/* + * Author: 3Mydlo3 + * Shows targeted unit info to local player. + * Works only for objects of kind "AllVehicles". + * + * Arguments: + * 0: Targeted object + * + * Return Value: + * None + * + * Public: No + */ + +params ["_unit"]; + +if !(_unit isKindOf "AllVehicles") exitWith {}; + +private _unitInfo = [_unit] call FUNC(getVehicleInfo); + +if (_unitInfo isEqualTo objNull) exitWith {}; + +private _messageParts = [ + [_unitInfo] call FUNC(getVehicleDisplayName), + lineBreak, + lineBreak, + format ["Points cost: %1", _unitInfo getOrDefault ["pointCost", 5]], + lineBreak, + lineBreak +]; + +// Get ammo and its damage +private _ammoInfo = [_unit] call FUNC(getAmmoInfo); +if (_ammoInfo isNotEqualTo objNull) then { + private _ammoInfoText = keys _ammoInfo apply { + private _displayName = _ammoInfo get _x get DISPLAY_NAME_PROPERTY; + private _damage = _ammoInfo get _x get DAMAGE_PROPERTY; + private _damageType = _ammoInfo get _x get TYPE_PROPERTY; + if (_damage isEqualTo 0 || {_damageType isEqualTo "NONE"}) then { "" } else { + format ["%1: %2 %3", _displayName, _damage, _damageType]; + }; + } select {_x isNotEqualTo ""}; + + if (_ammoInfoText isNotEqualTo []) then { + _messageParts pushBack "Ammo:"; + _messageParts pushBack lineBreak; + + { + _messageParts pushBack _x; + _messageParts pushBack lineBreak; + } forEach _ammoInfoText; + + _messageParts pushBack lineBreak; + }; +}; + +private _armorInfoParts = [ + "Armor [Front/Sides/Back/Top]:", + lineBreak, + _unitInfo getOrDefault ["armor", NO_ARMOR] joinString "/" +]; + +_messageParts append _armorInfoParts; + +private _text = composeText _messageParts; +hint _text; \ No newline at end of file diff --git a/addons/icons/functions/fn_visibilityCheckLoop.sqf b/addons/icons/functions/fn_visibilityCheckLoop.sqf new file mode 100644 index 0000000..c2150bb --- /dev/null +++ b/addons/icons/functions/fn_visibilityCheckLoop.sqf @@ -0,0 +1,40 @@ +#include "..\script_component.hpp" +/* + * Author: 3Mydlo3 + * Loop checking all enemy units one by one. + * Switches off icons for units that no friendly unit knows about anymore. + * + * Arguments: + * 0: Targeted object + * + * Return Value: + * None + * + * Public: No + */ + +params [["_targetsToCheck", []]]; + +if (_targetsToCheck isEqualTo []) then { + _targetsToCheck = vehicles select {side effectiveCommander _x isEqualTo EAST}; +}; +if (_targetsToCheck isEqualTo []) exitWith { + [FUNC(visibilityCheckLoop), [], 5] call CBA_fnc_waitAndExecute; +}; + +private _target = _targetsToCheck deleteAt (count _targetsToCheck - 1); + +#ifdef DEV_DEBUG +diag_log format ["WARGAY DEBUG VISIBILITY CHECK [%1]: Checking Target %2", diag_tickTime, _target]; +#endif + +private _shouldBeVisible = [_target] call FUNC(shouldStillBeVisible); +private _isVisible = _target getVariable ["MDL_IsVisible", false]; +if (_isVisible && {!_shouldBeVisible}) then { + #ifdef DEV_DEBUG + diag_log format ["WARGAY DEBUG VISIBILITY CHECK [%1]: Making Target %2 not visible", diag_tickTime, _target]; + #endif + _target setVariable ["MDL_IsVisible", false, false]; +}; + +[FUNC(visibilityCheckLoop), [_targetsToCheck], 1] call CBA_fnc_waitAndExecute; diff --git a/addons/icons/functions/script_component.hpp b/addons/icons/functions/script_component.hpp new file mode 100644 index 0000000..e8f4801 --- /dev/null +++ b/addons/icons/functions/script_component.hpp @@ -0,0 +1 @@ +#include "\z\afwg\addons\icons\script_component.hpp" diff --git a/addons/icons/script_component.hpp b/addons/icons/script_component.hpp new file mode 100644 index 0000000..33c7dc1 --- /dev/null +++ b/addons/icons/script_component.hpp @@ -0,0 +1,14 @@ +#define COMPONENT icons +#include "\z\afwg\addons\main\script_mod.hpp" + +// #define DEBUG_MODE_FULL +// #define DISABLE_COMPILE_CACHE + +#ifdef DEBUG_ENABLED_ICONS + #define DEBUG_MODE_FULL +#endif + #ifdef DEBUG_SETTINGS_ICONS + #define DEBUG_SETTINGS DEBUG_SETTINGS_ICONS +#endif + +#include "\z\afwg\addons\main\script_macros.hpp" diff --git a/addons/icons/stringtable.xml b/addons/icons/stringtable.xml new file mode 100644 index 0000000..fc75cdd --- /dev/null +++ b/addons/icons/stringtable.xml @@ -0,0 +1,17 @@ + + + + + ArmaForces Wargame - Icons + ArmaForces Wargame - Icons + + + Enable component + Włącz komponent + + + Controls whether this component is active. + Pozwala kontrolować czy komponent jest włączony. + + + diff --git a/addons/init/$PBOPREFIX$ b/addons/init/$PBOPREFIX$ new file mode 100644 index 0000000..b48ece6 --- /dev/null +++ b/addons/init/$PBOPREFIX$ @@ -0,0 +1 @@ +z\afwg\addons\init \ No newline at end of file diff --git a/addons/init/CfgEventHandlers.hpp b/addons/init/CfgEventHandlers.hpp new file mode 100644 index 0000000..2a3f71f --- /dev/null +++ b/addons/init/CfgEventHandlers.hpp @@ -0,0 +1,15 @@ +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); + }; +}; +class Extended_PreInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); + }; +}; +class Extended_PostInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); + }; +}; diff --git a/addons/init/XEH_PREP.hpp b/addons/init/XEH_PREP.hpp new file mode 100644 index 0000000..39b4b28 --- /dev/null +++ b/addons/init/XEH_PREP.hpp @@ -0,0 +1,3 @@ +PREP(manInit); +PREP(vehicleInit); +PREP(vehicleSpawnerInit); diff --git a/addons/init/XEH_postInit.sqf b/addons/init/XEH_postInit.sqf new file mode 100644 index 0000000..f9987bf --- /dev/null +++ b/addons/init/XEH_postInit.sqf @@ -0,0 +1,10 @@ +#include "script_component.hpp" + +// TODO: Move whole init.sqf +// TODO: Move whole initServer.sqf +// TODO: Move onPlayerKilled.sqf +// TODO: Move and split CfgWargay.hpp + +if (isServer) exitWith {}; + +addMissionEventHandler ["Draw3D", FUNC(draw3D)]; diff --git a/addons/init/XEH_preInit.sqf b/addons/init/XEH_preInit.sqf new file mode 100644 index 0000000..ecb5d0c --- /dev/null +++ b/addons/init/XEH_preInit.sqf @@ -0,0 +1,8 @@ +#include "script_component.hpp" +ADDON = false; + +PREP_RECOMPILE_START; +#include "XEH_PREP.hpp" +PREP_RECOMPILE_END; + +ADDON = true; diff --git a/addons/init/XEH_preStart.sqf b/addons/init/XEH_preStart.sqf new file mode 100644 index 0000000..a51262a --- /dev/null +++ b/addons/init/XEH_preStart.sqf @@ -0,0 +1,2 @@ +#include "script_component.hpp" +#include "XEH_PREP.hpp" diff --git a/addons/init/config.cpp b/addons/init/config.cpp new file mode 100644 index 0000000..d821136 --- /dev/null +++ b/addons/init/config.cpp @@ -0,0 +1,17 @@ +#include "script_component.hpp" + +class CfgPatches { + class ADDON { + name = COMPONENT_NAME; + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = { + "afwg_main" + }; + author = "ArmaForces"; + VERSION_CONFIG; + }; +}; + +#include "CfgEventHandlers.hpp" diff --git a/addons/init/functions/fn_manInit.sqf b/addons/init/functions/fn_manInit.sqf new file mode 100644 index 0000000..3dca1dd --- /dev/null +++ b/addons/init/functions/fn_manInit.sqf @@ -0,0 +1,18 @@ +#include "..\script_component.hpp" +/* + * Author: 3Mydlo3 + * Initializes infantry units to work with custom damage model. + * Prevents taking damage when in vehicle + * + * Arguments: + * Nonede + * + * Return Value: + * None + * + * Public: No + */ + +params ["_entity"]; + +_entity addEventHandler ["HandleDamage", FUNC(handleDamageMan)]; diff --git a/addons/init/functions/fn_vehicleInit.sqf b/addons/init/functions/fn_vehicleInit.sqf new file mode 100644 index 0000000..b99e73b --- /dev/null +++ b/addons/init/functions/fn_vehicleInit.sqf @@ -0,0 +1,62 @@ +#include "..\script_component.hpp" +/* + * Author: 3Mydlo3 + * Initializes vehicles to work with custom damage model. + * + * Arguments: + * None + * + * Return Value: + * None + * + * Public: No + */ + +params ["_entity"]; + +#ifdef DEV_DEBUG +diag_log format ["WARGAY DEBUG Init [%1]: Entity: %2, Type: %3", diag_tickTime, _entity, typeOf _entity]; +#endif + +private _vehicleHitpoints = [_entity, "hitpoints"] call FUNC(getVehicleInfo); +if (_vehicleHitpoints isEqualTo objNull) then { + private _defaultHitpoints = 10; + _vehicleHitpoints = _defaultHitpoints; + diag_log format ["WARGAY WARNING Hitpoints not defined for %1. Setting default hitpoints %2", typeof _entity, _defaultHitpoints]; +} else { + diag_log format ["WARGAY DEBUG Hitpoints %1", str _vehicleHitpoints]; +}; + +_entity setVariable ["MDL_currentHp", _vehicleHitpoints]; +_entity setVariable ["MDL_maxHp", _vehicleHitpoints]; + +_entity addEventHandler ["HandleDamage", { + _this call FUNC(handleDamage); +}]; +_entity addEventHandler ["HitPart", FUNC(hitPart)]; +_entity addEventHandler ["Fired", FUNC(fired)]; + +// Increase fuel consumption for players +if (_entity getVariable ["MDL_deployedVehicle", false]) then { + private _fuelCoef = if (_entity isKindOf "Air") then { + GVAR(fuelConsumptionMultiplier)/2 + } else { + GVAR(fuelConsumptionMultiplier) + }; + + _entity setFuelConsumptionCoef _fuelCoef; +}; + +_entity allowCrewInImmobile true; + +if (hasInterface) then { + // TODO: Consider allowing repair only near supply vehicles + // TODO: Consider repair/rearm/refuel for all eligible vehicles in some radius (e.g., via some deployable) + [_entity] call FUNC(addRepairAction); + [_entity] call FUNC(addRearmAction); + [_entity] call FUNC(addRefuelAction); + + if (_entity getVariable ["MDL_isSpawner", false]) then { + [_entity] call FUNC(vehicleSpawnerInit); + }; +}; diff --git a/addons/init/functions/fn_vehicleSpawnerInit.sqf b/addons/init/functions/fn_vehicleSpawnerInit.sqf new file mode 100644 index 0000000..903c5bd --- /dev/null +++ b/addons/init/functions/fn_vehicleSpawnerInit.sqf @@ -0,0 +1,28 @@ +#include "..\script_component.hpp" +/* + * Author: 3Mydlo3 + * Initializes spawner for given vehicle. + * + * Arguments: + * 0: Vehicle with spawn action + * + * Return Value: + * None + * + * Public: No + */ + +params ["_spawner"]; + +private _vehicleClass = typeOf _spawner; +private _vehicleName = [_spawner] call FUNC(getVehicleDisplayName); + +_spawner addAction [ + _vehicleName, + { + params ["_target", "_caller", "", "_arguments"]; + + ["MDL_deployVehicle", [_arguments select 0, _caller, _target]] call CBA_fnc_serverEvent; + }, + [_vehicleClass] +]; diff --git a/addons/init/functions/script_component.hpp b/addons/init/functions/script_component.hpp new file mode 100644 index 0000000..7dcac22 --- /dev/null +++ b/addons/init/functions/script_component.hpp @@ -0,0 +1 @@ +#include "\z\afwg\addons\init\script_component.hpp" diff --git a/addons/init/script_component.hpp b/addons/init/script_component.hpp new file mode 100644 index 0000000..90f3182 --- /dev/null +++ b/addons/init/script_component.hpp @@ -0,0 +1,14 @@ +#define COMPONENT init +#include "\z\afwg\addons\main\script_mod.hpp" + +// #define DEBUG_MODE_FULL +// #define DISABLE_COMPILE_CACHE + +#ifdef DEBUG_ENABLED_INIT + #define DEBUG_MODE_FULL +#endif + #ifdef DEBUG_SETTINGS_INIT + #define DEBUG_SETTINGS DEBUG_SETTINGS_INIT +#endif + +#include "\z\afwg\addons\main\script_macros.hpp" diff --git a/addons/init/stringtable.xml b/addons/init/stringtable.xml new file mode 100644 index 0000000..8d99057 --- /dev/null +++ b/addons/init/stringtable.xml @@ -0,0 +1,17 @@ + + + + + ArmaForces Wargame - Init + ArmaForces Wargame - Init + + + Enable component + Włącz komponent + + + Controls whether this component is active. + Pozwala kontrolować czy komponent jest włączony. + + + diff --git a/addons/main/stringtable.xml b/addons/main/stringtable.xml index 2d0c603..24c1906 100644 --- a/addons/main/stringtable.xml +++ b/addons/main/stringtable.xml @@ -2,17 +2,85 @@ - ArmaForces Attributes - Atrybuty ArmaForces + ArmaForces Wargame Attributes + Atrybuty Wargame ArmaForces - ArmaForces + ArmaForces Wargame - ArmaForces + ArmaForces Wargame Wiki + + Damage alarm + Alarm o uszkodzeniach + + + Audible alarm when your vehicle gets damaged. + Alarm dźwiękowy gdy Twój pojazd zostanie uszkodzony. + + + Damage received + Otrzymano uszkodzenia + + + Mydlana Kampania Wargay + Mydlana Kampania Wargay + + + Mydlana Kampania Wargay - Klient + Mydlana Kampania Wargay - Client + + + Show Damage Feedback + Informacja zwrotna o obrażeniach + + + Adds feedback message with dealt damage information - potential damage, armor hit and actual damage. + Dodaje informację zwrotną o zadanych obrażeniach - obrażenia potencjalne, trafiony pancerz i faktycznie zadane obrażenia. + + + Unit Icons + Znaczniki jednostek + + + Icon size multiplier + Mnożnik rozmiaru znaczników + + + Icon size depending on distance + Rozmiar znaczników zależny od odległości + + + Enables autoscaling of icon size depending on the distance to the unit. The closer the unit is, the bigger the icon gets (up to 2x the standard size when it's 50 m or closer). + Włącza skalowanie rozmiaru znaczników w zależności od odległości do jednostki. Im bliżej jest jednostka, tym większy będzie jej znacznik (do 2x normalnego rozmiaru jeżeli jest w odległości do 50 m). + + + Icon size multiplier + Mnożnik rozmiaru znaczników + + + Allows adjusting size of icons shown above known units + Pozwala dostosować rozmiar znaczników wyświetlanych nad znanymi jednostkami + + + Icon text size multiplier + Mnożnik rozmiaru tekstu znaczników + + + Allows adjusting size of text shown above targeted unit + Pozwala dostosować rozmiar tekstu wyświetlanego nad namierzoną jednostką + + + Lost %1 %2 + Utracono %1 %2 + + + Action interrupted, vehicle is in combat. + Akcja przerwana, pojazd uczestniczy w walce. + diff --git a/addons/markers/$PBOPREFIX$ b/addons/markers/$PBOPREFIX$ new file mode 100644 index 0000000..5cd41e8 --- /dev/null +++ b/addons/markers/$PBOPREFIX$ @@ -0,0 +1 @@ +z\afwg\addons\markers \ No newline at end of file diff --git a/addons/markers/CfgEventHandlers.hpp b/addons/markers/CfgEventHandlers.hpp new file mode 100644 index 0000000..2a3f71f --- /dev/null +++ b/addons/markers/CfgEventHandlers.hpp @@ -0,0 +1,15 @@ +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); + }; +}; +class Extended_PreInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); + }; +}; +class Extended_PostInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); + }; +}; diff --git a/addons/markers/XEH_PREP.hpp b/addons/markers/XEH_PREP.hpp new file mode 100644 index 0000000..adc2683 --- /dev/null +++ b/addons/markers/XEH_PREP.hpp @@ -0,0 +1,3 @@ +PREP(createVehicleMarker); +PREP(enemyMarkersLoop); +PREP(removeVehicleMarker); diff --git a/addons/markers/XEH_postInit.sqf b/addons/markers/XEH_postInit.sqf new file mode 100644 index 0000000..d7b4289 --- /dev/null +++ b/addons/markers/XEH_postInit.sqf @@ -0,0 +1,12 @@ +#include "script_component.hpp" + +if (isServer) exitWith {}; + +[FUNC(enemyMarkersLoop)] call afm_common_fnc_runAfterSettingsInit; + +// TODO: Consider moving this to the same component that triggers the event +["MDL_unitSpotted", { + params ["_unit"]; + if (_unit isKindOf "Man") exitWith {}; + [_unit] call FUNC(createVehicleMarker); +}] call CBA_fnc_addEventHandler; diff --git a/addons/markers/XEH_preInit.sqf b/addons/markers/XEH_preInit.sqf new file mode 100644 index 0000000..ecb5d0c --- /dev/null +++ b/addons/markers/XEH_preInit.sqf @@ -0,0 +1,8 @@ +#include "script_component.hpp" +ADDON = false; + +PREP_RECOMPILE_START; +#include "XEH_PREP.hpp" +PREP_RECOMPILE_END; + +ADDON = true; diff --git a/addons/markers/XEH_preStart.sqf b/addons/markers/XEH_preStart.sqf new file mode 100644 index 0000000..a51262a --- /dev/null +++ b/addons/markers/XEH_preStart.sqf @@ -0,0 +1,2 @@ +#include "script_component.hpp" +#include "XEH_PREP.hpp" diff --git a/addons/markers/config.cpp b/addons/markers/config.cpp new file mode 100644 index 0000000..d821136 --- /dev/null +++ b/addons/markers/config.cpp @@ -0,0 +1,17 @@ +#include "script_component.hpp" + +class CfgPatches { + class ADDON { + name = COMPONENT_NAME; + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = { + "afwg_main" + }; + author = "ArmaForces"; + VERSION_CONFIG; + }; +}; + +#include "CfgEventHandlers.hpp" diff --git a/addons/markers/functions/fn_createVehicleMarker.sqf b/addons/markers/functions/fn_createVehicleMarker.sqf new file mode 100644 index 0000000..95a97e3 --- /dev/null +++ b/addons/markers/functions/fn_createVehicleMarker.sqf @@ -0,0 +1,31 @@ +#include "..\script_component.hpp" +/* + * Author: 3Mydlo3 + * + * + * Arguments: + * + * + * Return Value: + * None + * + * Public: No + */ + +params ["_vehicle"]; + +_markerName = format ["MDL_EnemyVehicle_%1", str _vehicle]; +createMarkerLocal [_markerName, getPosATL _vehicle]; +_vehicle setVariable ["MDL_marker", _markerName]; + +_markerName setMarkerColorLocal "ColorEAST"; +_markerName setMarkerSizeLocal [0.7, 0.7]; + +private _markerType = _vehicle getVariable ["MDL_markerType", ""]; +if (_markerType isEqualTo "") then { + _markerType = [_vehicle, "markerType"] call FUNC(getVehicleInfo); + _vehicle setVariable ["MDL_markerType", _markerType]; +}; +_markerName setMarkerTypeLocal _markerType; + +_markerName diff --git a/addons/markers/functions/fn_enemyMarkersLoop.sqf b/addons/markers/functions/fn_enemyMarkersLoop.sqf new file mode 100644 index 0000000..f9d5cc2 --- /dev/null +++ b/addons/markers/functions/fn_enemyMarkersLoop.sqf @@ -0,0 +1,38 @@ +#include "..\script_component.hpp" +/* + * Author: 3Mydlo3 + * + * + * Arguments: + * + * + * Return Value: + * None + * + * Public: No + */ + +if (!GVAR(enemyMarkersEnabled)) exitWith { + [FUNC(enemyMarkersLoop), [], GVAR(enemyMarkersRefreshRate)] call CBA_fnc_waitAndExecute; +}; + +private _vehiclesWithMarkers = vehicles select {_x getVariable ["MDL_IsVisible", false] + && {side effectiveCommander _x isEqualTo EAST}}; + +private _vehiclesToRemoveMarkers = vehicles select {(_x getVariable ["MDL_marker", ""] isNotEqualTo "") + && {!(_x getVariable ["MDL_IsVisible", false])}}; + +{ + private _markerName = _x getVariable ["MDL_marker", ""]; + if (_markerName isEqualTo "") then { + [_x] call FUNC(createVehicleMarker); + } else { + _markerName setMarkerPosLocal (getPosASL _x); + }; +} forEach _vehiclesWithMarkers; + +{ + [_x] call FUNC(removeVehicleMarker); +} forEach _vehiclesToRemoveMarkers; + +[FUNC(enemyMarkersLoop), [], GVAR(enemyMarkersRefreshRate)] call CBA_fnc_waitAndExecute; \ No newline at end of file diff --git a/addons/markers/functions/fn_removeVehicleMarker.sqf b/addons/markers/functions/fn_removeVehicleMarker.sqf new file mode 100644 index 0000000..a3108b0 --- /dev/null +++ b/addons/markers/functions/fn_removeVehicleMarker.sqf @@ -0,0 +1,21 @@ +#include "..\script_component.hpp" +/* + * Author: 3Mydlo3 + * + * + * Arguments: + * + * + * Return Value: + * None + * + * Public: No + */ + +params ["_vehicle"]; + +private _markerName = _vehicle getVariable ["MDL_marker", ""]; +if (_markerName isEqualTo "") exitWith {}; + +deleteMarkerLocal _markerName; +_vehicle setVariable ["MDL_marker", nil]; diff --git a/addons/markers/functions/script_component.hpp b/addons/markers/functions/script_component.hpp new file mode 100644 index 0000000..348e9c8 --- /dev/null +++ b/addons/markers/functions/script_component.hpp @@ -0,0 +1 @@ +#include "\z\afwg\addons\markers\script_component.hpp" diff --git a/addons/markers/script_component.hpp b/addons/markers/script_component.hpp new file mode 100644 index 0000000..4c8b16f --- /dev/null +++ b/addons/markers/script_component.hpp @@ -0,0 +1,14 @@ +#define COMPONENT markers +#include "\z\afwg\addons\main\script_mod.hpp" + +// #define DEBUG_MODE_FULL +// #define DISABLE_COMPILE_CACHE + +#ifdef DEBUG_ENABLED_MARKERS + #define DEBUG_MODE_FULL +#endif + #ifdef DEBUG_SETTINGS_MARKERS + #define DEBUG_SETTINGS DEBUG_SETTINGS_MARKERS +#endif + +#include "\z\afwg\addons\main\script_macros.hpp" diff --git a/addons/markers/stringtable.xml b/addons/markers/stringtable.xml new file mode 100644 index 0000000..83fb694 --- /dev/null +++ b/addons/markers/stringtable.xml @@ -0,0 +1,17 @@ + + + + + ArmaForces Wargame - Markers + ArmaForces Wargame - Markers + + + Enable component + Włącz komponent + + + Controls whether this component is active. + Pozwala kontrolować czy komponent jest włączony. + + + diff --git a/addons/music/$PBOPREFIX$ b/addons/music/$PBOPREFIX$ new file mode 100644 index 0000000..20d4283 --- /dev/null +++ b/addons/music/$PBOPREFIX$ @@ -0,0 +1 @@ +z\afwg\addons\music \ No newline at end of file diff --git a/addons/music/CfgEventHandlers.hpp b/addons/music/CfgEventHandlers.hpp new file mode 100644 index 0000000..2a3f71f --- /dev/null +++ b/addons/music/CfgEventHandlers.hpp @@ -0,0 +1,15 @@ +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); + }; +}; +class Extended_PreInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); + }; +}; +class Extended_PostInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); + }; +}; diff --git a/addons/music/XEH_PREP.hpp b/addons/music/XEH_PREP.hpp new file mode 100644 index 0000000..09a55e4 --- /dev/null +++ b/addons/music/XEH_PREP.hpp @@ -0,0 +1,4 @@ +PREP(addToMusicQueue); +PREP(isMusicPlaying); +PREP(isMusicQueueEmpty); +PREP(playNextMusic); diff --git a/addons/music/XEH_postInit.sqf b/addons/music/XEH_postInit.sqf new file mode 100644 index 0000000..7e300dc --- /dev/null +++ b/addons/music/XEH_postInit.sqf @@ -0,0 +1,5 @@ +#include "script_component.hpp" + +if (isServer) exitWith {}; + +GVAR(isSoundPlaying) = false; diff --git a/addons/music/XEH_preInit.sqf b/addons/music/XEH_preInit.sqf new file mode 100644 index 0000000..ecb5d0c --- /dev/null +++ b/addons/music/XEH_preInit.sqf @@ -0,0 +1,8 @@ +#include "script_component.hpp" +ADDON = false; + +PREP_RECOMPILE_START; +#include "XEH_PREP.hpp" +PREP_RECOMPILE_END; + +ADDON = true; diff --git a/addons/music/XEH_preStart.sqf b/addons/music/XEH_preStart.sqf new file mode 100644 index 0000000..a51262a --- /dev/null +++ b/addons/music/XEH_preStart.sqf @@ -0,0 +1,2 @@ +#include "script_component.hpp" +#include "XEH_PREP.hpp" diff --git a/addons/music/config.cpp b/addons/music/config.cpp new file mode 100644 index 0000000..fb4df7f --- /dev/null +++ b/addons/music/config.cpp @@ -0,0 +1,19 @@ +#include "script_component.hpp" + +class CfgPatches { + class ADDON { + name = COMPONENT_NAME; + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = { + "afwg_main" + }; + author = "ArmaForces"; + VERSION_CONFIG; + }; +}; + +#include "CfgEventHandlers.hpp" +// TODO: Add wargay music oggs +// TOOD: Add Wargay alarm sound diff --git a/addons/music/functions/fn_addToMusicQueue.sqf b/addons/music/functions/fn_addToMusicQueue.sqf new file mode 100644 index 0000000..ae65ef5 --- /dev/null +++ b/addons/music/functions/fn_addToMusicQueue.sqf @@ -0,0 +1,31 @@ +#include "..\script_component.hpp" +/* + * Author: 3Mydlo3 + * Adds given music to the queue. + * Allows forcing to play it immediately. + * + * Arguments: + * 0: Class(es) of the music to add > + * 1: Force playing now (Default: false) + * + * Return Value: + * None + * + * Public: No + */ + +params ["_music", ["_forceNow", false]]; + +if (!isServer) exitWith {}; + +if (_forceNow) exitWith { + _music remoteExec ["playMusic", 0]; +}; + +if (_music isEqualType "") then { + GVAR(musicQueue) pushBack _music; +} else { + GVAR(musicQueue) append _music; +}; + +[FUNC(playNextMusic)] call CBA_fnc_execNextFrame; diff --git a/addons/music/functions/fn_isMusicPlaying.sqf b/addons/music/functions/fn_isMusicPlaying.sqf new file mode 100644 index 0000000..e2bf1ae --- /dev/null +++ b/addons/music/functions/fn_isMusicPlaying.sqf @@ -0,0 +1,15 @@ +#include "..\script_component.hpp" +/* + * Author: 3Mydlo3 + * Checks whether there is currently music playing. + * + * Arguments: + * None + * + * Return Value: + * True if music is playing + * + * Public: No + */ + +getMusicPlayedTime isNotEqualTo 0 diff --git a/addons/music/functions/fn_isMusicQueueEmpty.sqf b/addons/music/functions/fn_isMusicQueueEmpty.sqf new file mode 100644 index 0000000..7211e9c --- /dev/null +++ b/addons/music/functions/fn_isMusicQueueEmpty.sqf @@ -0,0 +1,15 @@ +#include "..\script_component.hpp" +/* + * Author: 3Mydlo3 + * Checks whether play queue is empty. + * + * Arguments: + * None + * + * Return Value: + * True if nothing is queued to be played. + * + * Public: No + */ + +count GVAR(musicQueue) isEqualTo 0 diff --git a/addons/music/functions/fn_playNextMusic.sqf b/addons/music/functions/fn_playNextMusic.sqf new file mode 100644 index 0000000..84258bc --- /dev/null +++ b/addons/music/functions/fn_playNextMusic.sqf @@ -0,0 +1,20 @@ +#include "..\script_component.hpp" +/* + * Author: 3Mydlo3 + * Plays next music from the queue. + * + * Arguments: + * None + * + * Return Value: + * None + * + * Public: No + */ + +if (!isServer) exitWith {}; + +if (call FUNC(isMusicQueueEmpty) || FUNC(isMusicPlaying)) exitWith {}; + +private _nextTrack = GVAR(musicQueue) deleteAt 0; +_nextTrack remoteExec ["playMusic", 0]; diff --git a/addons/music/functions/script_component.hpp b/addons/music/functions/script_component.hpp new file mode 100644 index 0000000..2ba53f0 --- /dev/null +++ b/addons/music/functions/script_component.hpp @@ -0,0 +1 @@ +#include "\z\afwg\addons\music\script_component.hpp" diff --git a/addons/music/script_component.hpp b/addons/music/script_component.hpp new file mode 100644 index 0000000..f0e78ae --- /dev/null +++ b/addons/music/script_component.hpp @@ -0,0 +1,14 @@ +#define COMPONENT music +#include "\z\afwg\addons\main\script_mod.hpp" + +// #define DEBUG_MODE_FULL +// #define DISABLE_COMPILE_CACHE + +#ifdef DEBUG_ENABLED_MUSIC + #define DEBUG_MODE_FULL +#endif + #ifdef DEBUG_SETTINGS_MUSIC + #define DEBUG_SETTINGS DEBUG_SETTINGS_MUSIC +#endif + +#include "\z\afwg\addons\main\script_macros.hpp" diff --git a/addons/music/stringtable.xml b/addons/music/stringtable.xml new file mode 100644 index 0000000..2ae2e2d --- /dev/null +++ b/addons/music/stringtable.xml @@ -0,0 +1,17 @@ + + + + + ArmaForces Wargame - Music + ArmaForces Wargame - Music + + + Enable component + Włącz komponent + + + Controls whether this component is active. + Pozwala kontrolować czy komponent jest włączony. + + + diff --git a/addons/rearm/$PBOPREFIX$ b/addons/rearm/$PBOPREFIX$ new file mode 100644 index 0000000..36a5e65 --- /dev/null +++ b/addons/rearm/$PBOPREFIX$ @@ -0,0 +1 @@ +z\afwg\addons\rearm \ No newline at end of file diff --git a/addons/rearm/CfgEventHandlers.hpp b/addons/rearm/CfgEventHandlers.hpp new file mode 100644 index 0000000..2a3f71f --- /dev/null +++ b/addons/rearm/CfgEventHandlers.hpp @@ -0,0 +1,15 @@ +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); + }; +}; +class Extended_PreInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); + }; +}; +class Extended_PostInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); + }; +}; diff --git a/addons/rearm/XEH_PREP.hpp b/addons/rearm/XEH_PREP.hpp new file mode 100644 index 0000000..54ccb41 --- /dev/null +++ b/addons/rearm/XEH_PREP.hpp @@ -0,0 +1,5 @@ +PREP(addRearmAction); +PREP(canRearm); +PREP(completeRearm); +PREP(interruptedRearm); +PREP(rearmVehicle); diff --git a/addons/rearm/XEH_postInit.sqf b/addons/rearm/XEH_postInit.sqf new file mode 100644 index 0000000..320473f --- /dev/null +++ b/addons/rearm/XEH_postInit.sqf @@ -0,0 +1,5 @@ +#include "script_component.hpp" + +if (isServer) exitWith {}; + +["MDL_rearmVehicle", FUNC(rearmVehicle)] call CBA_fnc_addEventHandler; diff --git a/addons/rearm/XEH_preInit.sqf b/addons/rearm/XEH_preInit.sqf new file mode 100644 index 0000000..ecb5d0c --- /dev/null +++ b/addons/rearm/XEH_preInit.sqf @@ -0,0 +1,8 @@ +#include "script_component.hpp" +ADDON = false; + +PREP_RECOMPILE_START; +#include "XEH_PREP.hpp" +PREP_RECOMPILE_END; + +ADDON = true; diff --git a/addons/rearm/XEH_preStart.sqf b/addons/rearm/XEH_preStart.sqf new file mode 100644 index 0000000..a51262a --- /dev/null +++ b/addons/rearm/XEH_preStart.sqf @@ -0,0 +1,2 @@ +#include "script_component.hpp" +#include "XEH_PREP.hpp" diff --git a/addons/rearm/config.cpp b/addons/rearm/config.cpp new file mode 100644 index 0000000..d821136 --- /dev/null +++ b/addons/rearm/config.cpp @@ -0,0 +1,17 @@ +#include "script_component.hpp" + +class CfgPatches { + class ADDON { + name = COMPONENT_NAME; + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = { + "afwg_main" + }; + author = "ArmaForces"; + VERSION_CONFIG; + }; +}; + +#include "CfgEventHandlers.hpp" diff --git a/addons/rearm/functions/fn_addRearmAction.sqf b/addons/rearm/functions/fn_addRearmAction.sqf new file mode 100644 index 0000000..5e324d9 --- /dev/null +++ b/addons/rearm/functions/fn_addRearmAction.sqf @@ -0,0 +1,33 @@ +#include "..\script_component.hpp" +/* + * Author: 3Mydlo3 + * Creates rearm action for given entity. + * + * Arguments: + * 0: Unit to add rearm action to + * + * Return Value: + * None + * + * Public: No + */ + +params ["_entity"]; + +// TODO For never: Rearming one by one/mag by mag +[ + _entity, + localize "str_state_rearm", + "\A3\ui_f\data\igui\cfg\simpleTasks\types\rearm_ca.paa", + "\A3\ui_f\data\igui\cfg\simpleTasks\types\rearm_ca.paa", + QUOTE([ARR_2(_this,_target)] call FUNC(canRearm)), // Condition show + QUOTE([ARR_2(_this,_target)] call FUNC(canRearm)), // Condition progress + {}, // Code start + {}, // Code progress + FUNC(completeRearm), // Code completed + FUNC(interruptedRearm), // Code interrupted, + [], // Arguments + 20, // Duration (will be changed by codeStart) + 299, // Priority + false // Remove completed +] call BIS_fnc_holdActionAdd; diff --git a/addons/rearm/functions/fn_canRearm.sqf b/addons/rearm/functions/fn_canRearm.sqf new file mode 100644 index 0000000..8e636b7 --- /dev/null +++ b/addons/rearm/functions/fn_canRearm.sqf @@ -0,0 +1,22 @@ +#include "..\script_component.hpp" +/* + * Author: 3Mydlo3 + * Checks if caller can rearm target. + * + * Arguments: + * 0: Unit + * + * Return Value: + * True if unit is an engineer + * + * Public: No + */ + +params ["_caller", "_target"]; + +alive _target && { + _caller call FUNC(isEngineer) && { + vehicle _caller isEqualTo _caller && { + _caller distance _target < 5 && { + ((_target getVariable ["MDL_lastCombatActive", -GVAR(repairMinNoCombatTime)]) + GVAR(repairMinNoCombatTime)) < CBA_missionTime +}}}} diff --git a/addons/rearm/functions/fn_completeRearm.sqf b/addons/rearm/functions/fn_completeRearm.sqf new file mode 100644 index 0000000..ecb3071 --- /dev/null +++ b/addons/rearm/functions/fn_completeRearm.sqf @@ -0,0 +1,18 @@ +#include "..\script_component.hpp" +/* + * Author: 3Mydlo3 + * Completes repair fully repairing vehicle + * + * Arguments: + * 0: Unit being repaired + * + * Return Value: + * None + * + * Public: No + */ + +params ["_target"]; + +["MDL_rearmVehicle", [_target, 1]] call CBA_fnc_globalEvent; +systemChat LLSTRING(RearmFinished); diff --git a/addons/rearm/functions/fn_interruptedRearm.sqf b/addons/rearm/functions/fn_interruptedRearm.sqf new file mode 100644 index 0000000..56f921e --- /dev/null +++ b/addons/rearm/functions/fn_interruptedRearm.sqf @@ -0,0 +1,22 @@ +#include "..\script_component.hpp" +/* + * Author: 3Mydlo3 + * Handles rearm process interruption. + * + * Arguments: + * 0: Unit being rearmed (not anymore) + * + * Return Value: + * None + * + * Public: No + */ + +params ["_target"]; + +private _lastCombatActive = _target getVariable ["MDL_lastCombatActive", -GVAR(repairMinNoCombatTime)]; +if (_lastCombatActive + GVAR(repairMinNoCombatTime) > CBA_missionTime) exitWith { + systemChat LLSTRING(VehicleInCombat); +}; + +systemChat LLSTRING(RearmInterrupted); diff --git a/addons/rearm/functions/fn_rearmVehicle.sqf b/addons/rearm/functions/fn_rearmVehicle.sqf new file mode 100644 index 0000000..e6c8f13 --- /dev/null +++ b/addons/rearm/functions/fn_rearmVehicle.sqf @@ -0,0 +1,18 @@ +#include "..\script_component.hpp" +/* + * Author: 3Mydlo3 + * Handles rearming vehicle. + * + * Arguments: + * 0: Vehicle to rearm + * 1: New ammo amount 0-1 + * + * Return Value: + * None + * + * Public: No + */ + +params ["_vehicle", ["_ammo", 1]]; + +_vehicle setVehicleAmmo _ammo; diff --git a/addons/rearm/functions/script_component.hpp b/addons/rearm/functions/script_component.hpp new file mode 100644 index 0000000..18831a1 --- /dev/null +++ b/addons/rearm/functions/script_component.hpp @@ -0,0 +1 @@ +#include "\z\afwg\addons\rearm\script_component.hpp" diff --git a/addons/rearm/script_component.hpp b/addons/rearm/script_component.hpp new file mode 100644 index 0000000..2316d1d --- /dev/null +++ b/addons/rearm/script_component.hpp @@ -0,0 +1,14 @@ +#define COMPONENT rearm +#include "\z\afwg\addons\main\script_mod.hpp" + +// #define DEBUG_MODE_FULL +// #define DISABLE_COMPILE_CACHE + +#ifdef DEBUG_ENABLED_REARM + #define DEBUG_MODE_FULL +#endif + #ifdef DEBUG_SETTINGS_REARM + #define DEBUG_SETTINGS DEBUG_SETTINGS_REARM +#endif + +#include "\z\afwg\addons\main\script_macros.hpp" diff --git a/addons/rearm/stringtable.xml b/addons/rearm/stringtable.xml new file mode 100644 index 0000000..c9108e6 --- /dev/null +++ b/addons/rearm/stringtable.xml @@ -0,0 +1,25 @@ + + + + + ArmaForces Wargame - Rearm + ArmaForces Wargame - Rearm + + + Enable component + Włącz komponent + + + Controls whether this component is active. + Pozwala kontrolować czy komponent jest włączony. + + + Rearm finished + Przezbrojenie zakończone + + + Rearm interrupted + Przezbrojenie przerwane + + + diff --git a/addons/refuel/$PBOPREFIX$ b/addons/refuel/$PBOPREFIX$ new file mode 100644 index 0000000..a68b92c --- /dev/null +++ b/addons/refuel/$PBOPREFIX$ @@ -0,0 +1 @@ +z\afwg\addons\refuel \ No newline at end of file diff --git a/addons/refuel/CfgEventHandlers.hpp b/addons/refuel/CfgEventHandlers.hpp new file mode 100644 index 0000000..2a3f71f --- /dev/null +++ b/addons/refuel/CfgEventHandlers.hpp @@ -0,0 +1,15 @@ +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); + }; +}; +class Extended_PreInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); + }; +}; +class Extended_PostInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); + }; +}; diff --git a/addons/refuel/XEH_PREP.hpp b/addons/refuel/XEH_PREP.hpp new file mode 100644 index 0000000..21b5a2b --- /dev/null +++ b/addons/refuel/XEH_PREP.hpp @@ -0,0 +1,7 @@ +PREP(addRefuelAction); +PREP(canRefuel); +PREP(completeRefuel); +PREP(interruptedRefuel); +PREP(progressRefuel); +PREP(refuelVehicle); +PREP(startRefuel); diff --git a/addons/refuel/XEH_postInit.sqf b/addons/refuel/XEH_postInit.sqf new file mode 100644 index 0000000..0ff39e0 --- /dev/null +++ b/addons/refuel/XEH_postInit.sqf @@ -0,0 +1,5 @@ +#include "script_component.hpp" + +if (isServer) exitWith {}; + +["MDL_refuelVehicle", FUNC(refuelVehicle)] call CBA_fnc_addEventHandler; diff --git a/addons/refuel/XEH_preInit.sqf b/addons/refuel/XEH_preInit.sqf new file mode 100644 index 0000000..ecb5d0c --- /dev/null +++ b/addons/refuel/XEH_preInit.sqf @@ -0,0 +1,8 @@ +#include "script_component.hpp" +ADDON = false; + +PREP_RECOMPILE_START; +#include "XEH_PREP.hpp" +PREP_RECOMPILE_END; + +ADDON = true; diff --git a/addons/refuel/XEH_preStart.sqf b/addons/refuel/XEH_preStart.sqf new file mode 100644 index 0000000..a51262a --- /dev/null +++ b/addons/refuel/XEH_preStart.sqf @@ -0,0 +1,2 @@ +#include "script_component.hpp" +#include "XEH_PREP.hpp" diff --git a/addons/refuel/config.cpp b/addons/refuel/config.cpp new file mode 100644 index 0000000..d821136 --- /dev/null +++ b/addons/refuel/config.cpp @@ -0,0 +1,17 @@ +#include "script_component.hpp" + +class CfgPatches { + class ADDON { + name = COMPONENT_NAME; + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = { + "afwg_main" + }; + author = "ArmaForces"; + VERSION_CONFIG; + }; +}; + +#include "CfgEventHandlers.hpp" diff --git a/addons/refuel/functions/fn_addRefuelAction.sqf b/addons/refuel/functions/fn_addRefuelAction.sqf new file mode 100644 index 0000000..15b4b21 --- /dev/null +++ b/addons/refuel/functions/fn_addRefuelAction.sqf @@ -0,0 +1,32 @@ +#include "..\script_component.hpp" +/* + * Author: 3Mydlo3 + * Creates refuel action for given entity. + * + * Arguments: + * 0: Unit to add refuel action to + * + * Return Value: + * None + * + * Public: No + */ + +params ["_entity"]; + +[ + _entity, + localize "str_state_refuel", + "\a3\ui_f_oldman\data\IGUI\Cfg\holdactions\refuel_ca.paa", + "\a3\ui_f_oldman\data\IGUI\Cfg\holdactions\refuel_ca.paa", + QUOTE([ARR_2(_this,_target)] call FUNC(canRefuel)), // Condition show + QUOTE([ARR_2(_this,_target)] call FUNC(canRefuel)), // Condition progress + FUNC(startRefuel), // Code start + FUNC(progressRefuel), // Code progress + FUNC(completeRefuel), // Code completed + FUNC(interruptedRefuel), // Code interrupted, + [], // Arguments + 1, // Duration (will be changed by codeStart) + 298, // Priority + false // Remove completed +] call BIS_fnc_holdActionAdd; diff --git a/addons/refuel/functions/fn_canRefuel.sqf b/addons/refuel/functions/fn_canRefuel.sqf new file mode 100644 index 0000000..401d58c --- /dev/null +++ b/addons/refuel/functions/fn_canRefuel.sqf @@ -0,0 +1,23 @@ +#include "..\script_component.hpp" +/* + * Author: 3Mydlo3 + * Checks if caller can repair target. + * + * Arguments: + * 0: Unit + * + * Return Value: + * True if unit is an engineer + * + * Public: No + */ + +params ["_caller", "_target"]; + +alive _target && { + _caller call FUNC(isEngineer) && { + vehicle _caller isEqualTo _caller && { + _caller distance _target < 5 && { + fuel _target < 1 && { + ((_target getVariable ["MDL_lastCombatActive", -GVAR(repairMinNoCombatTime)]) + GVAR(repairMinNoCombatTime)) < CBA_missionTime +}}}}} \ No newline at end of file diff --git a/addons/refuel/functions/fn_completeRefuel.sqf b/addons/refuel/functions/fn_completeRefuel.sqf new file mode 100644 index 0000000..1944376 --- /dev/null +++ b/addons/refuel/functions/fn_completeRefuel.sqf @@ -0,0 +1,17 @@ +#include "..\script_component.hpp" +/* + * Author: 3Mydlo3 + * Completes refueling fully fueling vehicle + * + * Arguments: + * 0: Unit being refueled + * + * Return Value: + * None + * + * Public: No + */ + +params ["_target"]; +["MDL_refuelVehicle", [_target, 1]] call CBA_fnc_globalEvent; +systemChat LLSTRING(RefuelFinished); diff --git a/addons/refuel/functions/fn_interruptedRefuel.sqf b/addons/refuel/functions/fn_interruptedRefuel.sqf new file mode 100644 index 0000000..9cb2bc6 --- /dev/null +++ b/addons/refuel/functions/fn_interruptedRefuel.sqf @@ -0,0 +1,24 @@ +#include "..\script_component.hpp" +/* + * Author: 3Mydlo3 + * Handles refuel process interruption. + * + * Arguments: + * 0: Unit being refueled (not anymore) + * + * Return Value: + * None + * + * Public: No + */ + +params ["_target"]; + +private _currentFuel = fuel _target * 100; + +private _lastCombatActive = _target getVariable ["MDL_lastCombatActive", -GVAR(repairMinNoCombatTime)]; +if (_lastCombatActive + GVAR(repairMinNoCombatTime) > CBA_missionTime) exitWith { + systemChat LLSTRING(VehicleInCombat); +}; + +systemChat format [LLSTRING(RefuelInterrupted), _currentFuel]; diff --git a/addons/refuel/functions/fn_progressRefuel.sqf b/addons/refuel/functions/fn_progressRefuel.sqf new file mode 100644 index 0000000..3d4525e --- /dev/null +++ b/addons/refuel/functions/fn_progressRefuel.sqf @@ -0,0 +1,35 @@ +#include "..\script_component.hpp" +/* + * Author: 3Mydlo3 + * Handles refuel progress + * + * Arguments: + * 0: Unit being refueled + * 1: Unit commencing refueling + * 4: Current progress frame + * 5: Max progress frame (should be 24) + * + * Return Value: + * None + * + * Public: No + */ + +params ["_target", "_caller", "_actionId", "_arguments", "_frame", "_maxFrame"]; + +private _stepsWithRefuel = _target getVariable ["MDL_refuelAtSteps", []]; +if (_stepsWithRefuel isEqualTo []) exitWith {}; + +private _nextRefuelStep = _stepsWithRefuel select (count _stepsWithRefuel - 1); + +if (_frame > _nextRefuelStep) then { + // For display purposes only + private _newFuel = fuel _target + REFUEL_AMOUNT; + private _newFuelPercent = (_newFuel*100) min 100; + systemChat format [LLSTRING(RefuelProgress), _newFuelPercent]; + + // Actual refueling + ["MDL_refuelVehicle", [_target, _newFuel]] call CBA_fnc_globalEvent; + + _stepsWithRefuel deleteAt (count _stepsWithRefuel - 1); +}; diff --git a/addons/refuel/functions/fn_refuelVehicle.sqf b/addons/refuel/functions/fn_refuelVehicle.sqf new file mode 100644 index 0000000..e7688fd --- /dev/null +++ b/addons/refuel/functions/fn_refuelVehicle.sqf @@ -0,0 +1,18 @@ +#include "..\script_component.hpp" +/* + * Author: 3Mydlo3 + * Handles refueling vehicle. + * + * Arguments: + * 0: Vehicle to refuel + * 1: New fuel amount 0-1 + * + * Return Value: + * None + * + * Public: No + */ + +params ["_vehicle", ["_fuel", 1]]; + +_vehicle setFuel _fuel; diff --git a/addons/refuel/functions/fn_startRefuel.sqf b/addons/refuel/functions/fn_startRefuel.sqf new file mode 100644 index 0000000..fd979a3 --- /dev/null +++ b/addons/refuel/functions/fn_startRefuel.sqf @@ -0,0 +1,38 @@ +#include "..\script_component.hpp" +/* + * Author: 3Mydlo3 + * Handles repair start. + * + * Arguments: + * 0: Unit being repaired + * + * Return Value: + * None + * + * Public: No + */ + +params ["_target"]; + +private _currentFuel = fuel _target; +private _actualDuration = (1 - _currentFuel) * REFUEL_SECONDS_FULL; +// TODO: Shorten duration based on unit skill +// TODO: Check acutal fuel capacity + +// Please forgive me for magically changing variable from unknown outer scope +_duration = _actualDuration; + +// Determine at which steps we want to repair +#define MAX_FRAME 24 +private _stepsToFullRefuel = ceil ((1 - _currentFuel)/REFUEL_AMOUNT); +private _refuelEvery = MAX_FRAME / _stepsToFullRefuel; +private _lastRefuel = MAX_FRAME; +private _stepsWithRefuel = []; + +systemChat format ["Duration: %1, Refuel every: %2", _duration, _refuelEvery]; +while {(_stepsToFullRefuel - 1) > count _stepsWithRefuel} do { + _lastRefuel = _lastRefuel - _refuelEvery; + _stepsWithRefuel pushBack (_lastRefuel); +}; + +_target setVariable ["MDL_refuelAtSteps", _stepsWithRefuel]; diff --git a/addons/refuel/functions/script_component.hpp b/addons/refuel/functions/script_component.hpp new file mode 100644 index 0000000..8b0430e --- /dev/null +++ b/addons/refuel/functions/script_component.hpp @@ -0,0 +1 @@ +#include "\z\afwg\addons\refuel\script_component.hpp" diff --git a/addons/refuel/script_component.hpp b/addons/refuel/script_component.hpp new file mode 100644 index 0000000..01c9bcf --- /dev/null +++ b/addons/refuel/script_component.hpp @@ -0,0 +1,14 @@ +#define COMPONENT refuel +#include "\z\afwg\addons\main\script_mod.hpp" + +// #define DEBUG_MODE_FULL +// #define DISABLE_COMPILE_CACHE + +#ifdef DEBUG_ENABLED_REFUEL + #define DEBUG_MODE_FULL +#endif + #ifdef DEBUG_SETTINGS_REFUEL + #define DEBUG_SETTINGS DEBUG_SETTINGS_REFUEL +#endif + +#include "\z\afwg\addons\main\script_macros.hpp" diff --git a/addons/refuel/stringtable.xml b/addons/refuel/stringtable.xml new file mode 100644 index 0000000..f6266d0 --- /dev/null +++ b/addons/refuel/stringtable.xml @@ -0,0 +1,29 @@ + + + + + ArmaForces Wargame - Refuel + ArmaForces Wargame - Refuel + + + Enable component + Włącz komponent + + + Controls whether this component is active. + Pozwala kontrolować czy komponent jest włączony. + + + Refuel interrupted %1 percent + Tankowanie przerwane %1 procent + + + Refuel progress %1 percent + Postęp tankowania %1 procent + + + Refuel finished + Tankowanie zakończone + + + diff --git a/addons/repair/$PBOPREFIX$ b/addons/repair/$PBOPREFIX$ new file mode 100644 index 0000000..9181fb5 --- /dev/null +++ b/addons/repair/$PBOPREFIX$ @@ -0,0 +1 @@ +z\afwg\addons\repair \ No newline at end of file diff --git a/addons/repair/CfgEventHandlers.hpp b/addons/repair/CfgEventHandlers.hpp new file mode 100644 index 0000000..2a3f71f --- /dev/null +++ b/addons/repair/CfgEventHandlers.hpp @@ -0,0 +1,15 @@ +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); + }; +}; +class Extended_PreInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); + }; +}; +class Extended_PostInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); + }; +}; diff --git a/addons/repair/XEH_PREP.hpp b/addons/repair/XEH_PREP.hpp new file mode 100644 index 0000000..5fc37cc --- /dev/null +++ b/addons/repair/XEH_PREP.hpp @@ -0,0 +1,6 @@ +PREP(addRepairAction); +PREP(canRepair); +PREP(completeRepair); +PREP(interruptedRepair); +PREP(progressRepair); +PREP(startRepair); diff --git a/addons/repair/XEH_postInit.sqf b/addons/repair/XEH_postInit.sqf new file mode 100644 index 0000000..421c54b --- /dev/null +++ b/addons/repair/XEH_postInit.sqf @@ -0,0 +1 @@ +#include "script_component.hpp" diff --git a/addons/repair/XEH_preInit.sqf b/addons/repair/XEH_preInit.sqf new file mode 100644 index 0000000..ecb5d0c --- /dev/null +++ b/addons/repair/XEH_preInit.sqf @@ -0,0 +1,8 @@ +#include "script_component.hpp" +ADDON = false; + +PREP_RECOMPILE_START; +#include "XEH_PREP.hpp" +PREP_RECOMPILE_END; + +ADDON = true; diff --git a/addons/repair/XEH_preStart.sqf b/addons/repair/XEH_preStart.sqf new file mode 100644 index 0000000..a51262a --- /dev/null +++ b/addons/repair/XEH_preStart.sqf @@ -0,0 +1,2 @@ +#include "script_component.hpp" +#include "XEH_PREP.hpp" diff --git a/addons/repair/config.cpp b/addons/repair/config.cpp new file mode 100644 index 0000000..d821136 --- /dev/null +++ b/addons/repair/config.cpp @@ -0,0 +1,17 @@ +#include "script_component.hpp" + +class CfgPatches { + class ADDON { + name = COMPONENT_NAME; + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = { + "afwg_main" + }; + author = "ArmaForces"; + VERSION_CONFIG; + }; +}; + +#include "CfgEventHandlers.hpp" diff --git a/addons/repair/functions/fn_addRepairAction.sqf b/addons/repair/functions/fn_addRepairAction.sqf new file mode 100644 index 0000000..54a165e --- /dev/null +++ b/addons/repair/functions/fn_addRepairAction.sqf @@ -0,0 +1,32 @@ +#include "..\script_component.hpp" +/* + * Author: 3Mydlo3 + * Creates repair action for given entity. + * + * Arguments: + * 0: Unit to add repair action to + * + * Return Value: + * None + * + * Public: No + */ + +params ["_entity"]; + +[ + _entity, + localize "str_state_repair", + "\a3\ui_f_oldman\data\IGUI\Cfg\holdactions\repair_ca.paa", + "\a3\ui_f_oldman\data\IGUI\Cfg\holdactions\repair_ca.paa", + QUOTE([ARR_2(_this,_target)] call FUNC(canRepair)), // Condition show + QUOTE([ARR_2(_this,_target)] call FUNC(canRepair)), // Condition progress + FUNC(startRepair), // Code start + FUNC(progressRepair), // Code progress + FUNC(completeRepair), // Code completed + FUNC(interruptedRepair), // Code interrupted, + [], // Arguments + 1, // Duration (will be changed by codeStart) + 300, // Priority + false // Remove completed +] call BIS_fnc_holdActionAdd; diff --git a/addons/repair/functions/fn_canRepair.sqf b/addons/repair/functions/fn_canRepair.sqf new file mode 100644 index 0000000..ecae1a1 --- /dev/null +++ b/addons/repair/functions/fn_canRepair.sqf @@ -0,0 +1,23 @@ +#include "..\script_component.hpp" +/* + * Author: 3Mydlo3 + * Checks if caller can repair target. + * + * Arguments: + * 0: Unit + * + * Return Value: + * True if unit is an engineer + * + * Public: No + */ + +params ["_caller", "_target"]; + +alive _target && { + _caller call FUNC(isEngineer) && { + vehicle _caller isEqualTo _caller && { + _caller distance _target < 5 && { + (_target getVariable ['MDL_currentHp', 0]) < (_target getVariable ['MDL_maxHp', 0]) && { + ((_target getVariable ["MDL_lastCombatActive", -GVAR(repairMinNoCombatTime)]) + GVAR(repairMinNoCombatTime)) < CBA_missionTime +}}}}} \ No newline at end of file diff --git a/addons/repair/functions/fn_completeRepair.sqf b/addons/repair/functions/fn_completeRepair.sqf new file mode 100644 index 0000000..8a42a87 --- /dev/null +++ b/addons/repair/functions/fn_completeRepair.sqf @@ -0,0 +1,17 @@ +#include "..\script_component.hpp" +/* + * Author: 3Mydlo3 + * Completes repair fully repairing vehicle + * + * Arguments: + * 0: Unit being repaired + * + * Return Value: + * None + * + * Public: No + */ + +params ["_target"]; +["MDL_healDamage", [_target]] call CBA_fnc_serverEvent; +systemChat LLSTRING(RepairFinished); diff --git a/addons/repair/functions/fn_interruptedRepair.sqf b/addons/repair/functions/fn_interruptedRepair.sqf new file mode 100644 index 0000000..1df3572 --- /dev/null +++ b/addons/repair/functions/fn_interruptedRepair.sqf @@ -0,0 +1,25 @@ +#include "..\script_component.hpp" +/* + * Author: 3Mydlo3 + * Handles repair process interruption. + * + * Arguments: + * 0: Unit being repaired (not anymore) + * + * Return Value: + * None + * + * Public: No + */ + +params ["_target"]; + +private _maxHp = _target getVariable ["MDL_maxHp", MAX_HP]; +private _currentHp = _target getVariable ["MDL_currentHp", MAX_HP]; + +private _lastCombatActive = _target getVariable ["MDL_lastCombatActive", -1]; +if (_lastCombatActive + GVAR(repairMinNoCombatTime) > CBA_missionTime) exitWith { + systemChat LLSTRING(VehicleInCombat); +}; + +systemChat format [LLSTRING(RepairInterrupted), _currentHp, _maxHp]; diff --git a/addons/repair/functions/fn_progressRepair.sqf b/addons/repair/functions/fn_progressRepair.sqf new file mode 100644 index 0000000..6dc658a --- /dev/null +++ b/addons/repair/functions/fn_progressRepair.sqf @@ -0,0 +1,36 @@ +#include "..\script_component.hpp" +/* + * Author: 3Mydlo3 + * Handles repair progress + * + * Arguments: + * 0: Unit being repaired + * 1: Unit commencing repairs + * 4: Current progress frame + * 5: Max progress frame (should be 24) + * + * Return Value: + * None + * + * Public: No + */ + +params ["_target", "_caller", "_actionId", "_arguments", "_frame", "_maxFrame"]; + +private _stepsWithRepair = _target getVariable ["MDL_repairAtSteps", []]; +if (_stepsWithRepair isEqualTo []) exitWith {}; + +private _nextRepairStep = _stepsWithRepair select (count _stepsWithRepair - 1); + +if (_frame > _nextRepairStep) then { + // For display purposes only + private _maxHp = _target getVariable ["MDL_maxHp", MAX_HP]; + private _currentHp = _target getVariable ["MDL_currentHp", MAX_HP]; + private _newHp = (_currentHp + HEAL_AMOUNT) min 10; + systemChat format [LLSTRING(RepairProgress), _newHp, _maxHp]; + + // Actual healing + ["MDL_healDamage", [_target, HEAL_AMOUNT]] call CBA_fnc_serverEvent; + + _stepsWithRepair deleteAt (count _stepsWithRepair - 1); +}; diff --git a/addons/repair/functions/fn_startRepair.sqf b/addons/repair/functions/fn_startRepair.sqf new file mode 100644 index 0000000..a24af75 --- /dev/null +++ b/addons/repair/functions/fn_startRepair.sqf @@ -0,0 +1,36 @@ +#include "..\script_component.hpp" +/* + * Author: 3Mydlo3 + * Handles repair start. + * + * Arguments: + * 0: Unit being repaired + * + * Return Value: + * None + * + * Public: No + */ + +params ["_target"]; + +private _currentHp = _target getVariable ["MDL_currentHp", 0]; +private _maxHp = _target getVariable ["MDL_maxHp", MAX_HP]; +private _actualDuration = (_maxHp - _currentHp) * HEAL_SECONDS_PER_POINT; +// TODO: Shorten duration based on unit skill + +// Please forgive me for magically changing variable from unknown outer scope +_duration = _actualDuration; + +// Determine at which steps we want to repair +#define MAX_FRAME 24 +private _stepsToHeal = ceil ((_maxHp - _currentHp)/HEAL_AMOUNT); +private _healEvery = MAX_FRAME / _stepsToHeal; +private _lastHeal = MAX_FRAME; +private _stepsWithRepair = []; +while {(_stepsToHeal - 1) > count _stepsWithRepair} do { + _lastHeal = _lastHeal - _healEvery; + _stepsWithRepair pushBack (_lastHeal); +}; + +_target setVariable ["MDL_repairAtSteps", _stepsWithRepair]; diff --git a/addons/repair/functions/script_component.hpp b/addons/repair/functions/script_component.hpp new file mode 100644 index 0000000..fa232ce --- /dev/null +++ b/addons/repair/functions/script_component.hpp @@ -0,0 +1 @@ +#include "\z\afwg\addons\repair\script_component.hpp" diff --git a/addons/repair/script_component.hpp b/addons/repair/script_component.hpp new file mode 100644 index 0000000..fba1bdf --- /dev/null +++ b/addons/repair/script_component.hpp @@ -0,0 +1,14 @@ +#define COMPONENT repair +#include "\z\afwg\addons\main\script_mod.hpp" + +// #define DEBUG_MODE_FULL +// #define DISABLE_COMPILE_CACHE + +#ifdef DEBUG_ENABLED_REPAIR + #define DEBUG_MODE_FULL +#endif + #ifdef DEBUG_SETTINGS_REPAIR + #define DEBUG_SETTINGS DEBUG_SETTINGS_REPAIR +#endif + +#include "\z\afwg\addons\main\script_macros.hpp" diff --git a/addons/repair/stringtable.xml b/addons/repair/stringtable.xml new file mode 100644 index 0000000..98f1da1 --- /dev/null +++ b/addons/repair/stringtable.xml @@ -0,0 +1,29 @@ + + + + + ArmaForces Wargame - Repair + ArmaForces Wargame - Repair + + + Enable component + Włącz komponent + + + Controls whether this component is active. + Pozwala kontrolować czy komponent jest włączony. + + + Repair finished + Naprawa zakończona + + + Repair progress %1/%2 HP + Postęp naprawy %1/%2 PŻ + + + Repair interrupted %1/%2 HP + Naprawa przerwana %1/%2 PŻ + + + diff --git a/addons/stats/$PBOPREFIX$ b/addons/stats/$PBOPREFIX$ new file mode 100644 index 0000000..646a820 --- /dev/null +++ b/addons/stats/$PBOPREFIX$ @@ -0,0 +1 @@ +z\afwg\addons\stats \ No newline at end of file diff --git a/addons/stats/CfgEventHandlers.hpp b/addons/stats/CfgEventHandlers.hpp new file mode 100644 index 0000000..2a3f71f --- /dev/null +++ b/addons/stats/CfgEventHandlers.hpp @@ -0,0 +1,15 @@ +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); + }; +}; +class Extended_PreInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); + }; +}; +class Extended_PostInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); + }; +}; diff --git a/addons/stats/XEH_PREP.hpp b/addons/stats/XEH_PREP.hpp new file mode 100644 index 0000000..f59a368 --- /dev/null +++ b/addons/stats/XEH_PREP.hpp @@ -0,0 +1,6 @@ +PREP(getPlayerStats); +PREP(loadAllStats); +PREP(loadPlayerStats); +PREP(playerKilled); +PREP(saveAllStats); +PREP(showPlayerStats); diff --git a/addons/stats/XEH_postInit.sqf b/addons/stats/XEH_postInit.sqf new file mode 100644 index 0000000..8a6cdd3 --- /dev/null +++ b/addons/stats/XEH_postInit.sqf @@ -0,0 +1,5 @@ +#include "script_component.hpp" + +if (isServer) exitWith {}; + +call FUNC(loadPlayerStats); diff --git a/addons/stats/XEH_preInit.sqf b/addons/stats/XEH_preInit.sqf new file mode 100644 index 0000000..ecb5d0c --- /dev/null +++ b/addons/stats/XEH_preInit.sqf @@ -0,0 +1,8 @@ +#include "script_component.hpp" +ADDON = false; + +PREP_RECOMPILE_START; +#include "XEH_PREP.hpp" +PREP_RECOMPILE_END; + +ADDON = true; diff --git a/addons/stats/XEH_preStart.sqf b/addons/stats/XEH_preStart.sqf new file mode 100644 index 0000000..a51262a --- /dev/null +++ b/addons/stats/XEH_preStart.sqf @@ -0,0 +1,2 @@ +#include "script_component.hpp" +#include "XEH_PREP.hpp" diff --git a/addons/stats/config.cpp b/addons/stats/config.cpp new file mode 100644 index 0000000..d821136 --- /dev/null +++ b/addons/stats/config.cpp @@ -0,0 +1,17 @@ +#include "script_component.hpp" + +class CfgPatches { + class ADDON { + name = COMPONENT_NAME; + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = { + "afwg_main" + }; + author = "ArmaForces"; + VERSION_CONFIG; + }; +}; + +#include "CfgEventHandlers.hpp" diff --git a/addons/stats/functions/fn_getPlayerStats.sqf b/addons/stats/functions/fn_getPlayerStats.sqf new file mode 100644 index 0000000..10ac030 --- /dev/null +++ b/addons/stats/functions/fn_getPlayerStats.sqf @@ -0,0 +1,26 @@ + +#include "..\script_component.hpp" +/* + * Author: 3Mydlo3 + * Retrieves player stats. + * + * Arguments: + * 0: Player UID + * + * Return Value: + * None + * + * Public: No + */ + +params ["_uid"]; + +if (_uid isEqualTo "") exitWith {}; + +if (isServer) then { + GVAR(allPlayersStats) getOrDefaultCall [_uid, {createHashMap}, true] +} else { + private _playerData = player get ["MDL_playerStats", []]; + if (_playerData isEqualTo []) then { _playerData = createHashMap }; + _playerData +} diff --git a/addons/stats/functions/fn_loadAllStats.sqf b/addons/stats/functions/fn_loadAllStats.sqf new file mode 100644 index 0000000..4cb5cd7 --- /dev/null +++ b/addons/stats/functions/fn_loadAllStats.sqf @@ -0,0 +1,25 @@ + +#include "..\script_component.hpp" +/* + * Author: 3Mydlo3 + * Loads all stats from previous missions. + * + * Arguments: + * None + * + * Return Value: + * Stats of all players + * + * Public: No + */ + +params ["_uid"]; + +private _wargayProgress = profileNamespace getVariable ["MDL_WG_Progress", []]; + +if (_wargayProgress isEqualTo []) then { + _wargayProgress = createHashMap; + profileNamespace setVariable ["MDL_WG_Progress", _wargayProgress]; +}; + +_wargayProgress getOrDefaultCall ["Players", {createHashMap}, true] diff --git a/addons/stats/functions/fn_loadPlayerStats.sqf b/addons/stats/functions/fn_loadPlayerStats.sqf new file mode 100644 index 0000000..ebbc1eb --- /dev/null +++ b/addons/stats/functions/fn_loadPlayerStats.sqf @@ -0,0 +1,40 @@ + +#include "..\script_component.hpp" +/* + * Author: 3Mydlo3 + * Loads player's stats from previous mission. + * If ran on client, requests stats to be saved into player's unit namespace. + * + * Arguments: + * 0: Player unit + * + * Return Value: + * True if loaded successfully + * + * Public: No + */ + +params [["_unit", player]]; + +if (!isServer) exitWith { + ["MDL_loadPlayerStats", [player]] call CBA_fnc_serverEvent; +}; + +private _uid = getPlayerUID _unit; + +if (_uid isEqualTo "") exitWith { false }; + +private _playerData = [_uid] call FUNC(getPlayerStats); + +private _index = GVAR(loadedPlayers) pushBackUnique _uid; +if (_index isEqualTo -1) then { + private _playedMissions = _playerData getOrDefault ["Missions", 0, true]; + _playerData set ["Missions", _playedMissions + 1]; +}; + +_unit setVariable ["MDL_playerStats", _playerData, true]; + +// BUG: probably doesn't work +["MDL_showStats", [_playerData], _unit] call CBA_fnc_targetEvent; + +true diff --git a/addons/stats/functions/fn_playerKilled.sqf b/addons/stats/functions/fn_playerKilled.sqf new file mode 100644 index 0000000..8c51dd1 --- /dev/null +++ b/addons/stats/functions/fn_playerKilled.sqf @@ -0,0 +1,42 @@ + +#include "..\script_component.hpp" +/* + * Author: 3Mydlo3 + * Handles player death. Updates his stats. + * + * Arguments: + * 0: Player UID + * 1: Player unit + * 2: Veehicle player was in when dying + * + * Return Value: + * None + * + * Public: No + */ + +params ["_playerUid", ["_playerUnit", objNull], ["_vehicle", objNull]]; + +if (!isServer) exitWith {}; + +private _playerStats = [_playerUid] call FUNC(getPlayerStats); + +_playerStats set ["Current XP", 0]; +private _currentDeaths = _playerStats getOrDefault ["Deaths", 0]; +_playerStats set ["Deaths", _currentDeaths + 1]; + +// If outside vehicle or vehicle still lives, do not count as a loss + +if (isNull _vehicle || {alive _vehicle}) exitWith { + _playerUnit setVariable ["MDL_playerStats", _playerStats, true]; +}; + +private _vehicleInfo = VehicleTypes getOrDefault [toUpper typeOf _vehicle, objNull]; +private _pointCost = if (_vehicleInfo isEqualTo objNull) then { 5 } else { _vehicleInfo get "pointCost" }; + +private _currentLosses = _playerStats getOrDefault ["Losses", 0]; +_playerStats set ["Losses", _currentLosses + _pointCost]; + +_playerUnit setVariable ["MDL_playerStats", _playerStats, true]; + +nil diff --git a/addons/stats/functions/fn_saveAllStats.sqf b/addons/stats/functions/fn_saveAllStats.sqf new file mode 100644 index 0000000..ea8a73e --- /dev/null +++ b/addons/stats/functions/fn_saveAllStats.sqf @@ -0,0 +1,16 @@ + +#include "..\script_component.hpp" +/* + * Author: 3Mydlo3 + * Saves all stats to profile namespace. + * Runs on server only. + * + * Arguments: + * 0: Player unit + * + * Public: No + */ + +if (GVAR(isTest) || {!isServer}) exitWith {}; + +saveProfileNamespace diff --git a/addons/stats/functions/fn_showPlayerStats.sqf b/addons/stats/functions/fn_showPlayerStats.sqf new file mode 100644 index 0000000..3ca0626 --- /dev/null +++ b/addons/stats/functions/fn_showPlayerStats.sqf @@ -0,0 +1,44 @@ + +#include "..\script_component.hpp" +/* + * Author: 3Mydlo3 + * Shows all player stats from whole campaign. + * Runs clientside only. + * + * Arguments: + * 0: Player unit + * + * Public: No + */ + +params [["_unit", player]]; + +if (!hasInterface) exitWith {}; + +private _playerData = [getPlayerUID _unit] call FUNC(getPlayerStats); + +private _currentXp = _playerData getOrDefault ["Current XP", 0]; +private _totalXp = _playerData getOrDefault ["Total XP", 0]; +private _deaths = _playerData getOrDefault ["Deaths", 0]; +private _kills = _playerData getOrDefault ["Kills", 0]; +private _losses = _playerData getOrDefault ["Losses", 0]; +private _playedMissions = _playerData getOrDefault ["Missions", 0]; + +private _messageParts = [ + format ["Player: %1", name _unit], + lineBreak, + lineBreak, + format ["XP: %1", _currentXp], + lineBreak, + format ["XP Total: %2", _totalXp], + lineBreak, + lineBreak, + format ["Played missions: %1", _playedMissions], + format ["Deaths: %1", _deaths], + format ["Kills: %1", _kills], + format ["Losses: %1", _losses], + format ["K/L ratio: %1", _kills/_losses] +]; + +private _text = composeText _messageParts; +hint _text; diff --git a/addons/stats/functions/script_component.hpp b/addons/stats/functions/script_component.hpp new file mode 100644 index 0000000..2baa40f --- /dev/null +++ b/addons/stats/functions/script_component.hpp @@ -0,0 +1 @@ +#include "\z\afwg\addons\stats\script_component.hpp" diff --git a/addons/stats/script_component.hpp b/addons/stats/script_component.hpp new file mode 100644 index 0000000..d686621 --- /dev/null +++ b/addons/stats/script_component.hpp @@ -0,0 +1,14 @@ +#define COMPONENT stats +#include "\z\afwg\addons\main\script_mod.hpp" + +// #define DEBUG_MODE_FULL +// #define DISABLE_COMPILE_CACHE + +#ifdef DEBUG_ENABLED_STATS + #define DEBUG_MODE_FULL +#endif + #ifdef DEBUG_SETTINGS_STATS + #define DEBUG_SETTINGS DEBUG_SETTINGS_STATS +#endif + +#include "\z\afwg\addons\main\script_macros.hpp" diff --git a/addons/stats/stringtable.xml b/addons/stats/stringtable.xml new file mode 100644 index 0000000..6d35f8e --- /dev/null +++ b/addons/stats/stringtable.xml @@ -0,0 +1,17 @@ + + + + + ArmaForces Wargame - Stats + ArmaForces Wargame - Stats + + + Enable component + Włącz komponent + + + Controls whether this component is active. + Pozwala kontrolować czy komponent jest włączony. + + + From ec23eea52a9e84ced244aa774e9e135ab6a341e0 Mon Sep 17 00:00:00 2001 From: 3Mydlo3 Date: Sun, 15 Dec 2024 22:41:36 +0100 Subject: [PATCH 03/47] Replace tabs with spaces --- .../_eventHandlers/functions/fn_hitPart.sqf | 8 +-- .../functions/fn_knowsAboutChanged.sqf | 2 +- .../_eventHandlers/functions/fn_musicStop.sqf | 4 +- addons/damage/functions/fn_getHitDir.sqf | 14 ++-- addons/damage/functions/fn_heDamage.sqf | 2 +- addons/damage/functions/fn_healDamage.sqf | 4 +- addons/damage/functions/fn_keDamage.sqf | 2 +- .../deployment/functions/fn_deployVehicle.sqf | 8 +-- .../functions/fn_addExperienceForKill.sqf | 32 ++++----- .../functions/fn_updateHitpointsDisplay.sqf | 14 ++-- ...eateVehicleInfoForNonConfiguredVehicle.sqf | 12 ++-- addons/icons/functions/fn_getAmmoInfo.sqf | 72 +++++++++---------- .../functions/fn_visibilityCheckLoop.sqf | 6 +- addons/music/functions/fn_addToMusicQueue.sqf | 6 +- addons/rearm/functions/fn_canRearm.sqf | 8 +-- .../rearm/functions/fn_interruptedRearm.sqf | 2 +- addons/refuel/functions/fn_canRefuel.sqf | 12 ++-- .../refuel/functions/fn_interruptedRefuel.sqf | 2 +- addons/repair/functions/fn_canRepair.sqf | 12 ++-- .../repair/functions/fn_interruptedRepair.sqf | 2 +- addons/stats/functions/fn_getPlayerStats.sqf | 8 +-- addons/stats/functions/fn_loadAllStats.sqf | 4 +- addons/stats/functions/fn_loadPlayerStats.sqf | 6 +- addons/stats/functions/fn_playerKilled.sqf | 4 +- addons/stats/functions/fn_showPlayerStats.sqf | 26 +++---- 25 files changed, 136 insertions(+), 136 deletions(-) diff --git a/addons/_eventHandlers/functions/fn_hitPart.sqf b/addons/_eventHandlers/functions/fn_hitPart.sqf index f7c543d..6f100de 100644 --- a/addons/_eventHandlers/functions/fn_hitPart.sqf +++ b/addons/_eventHandlers/functions/fn_hitPart.sqf @@ -1,7 +1,7 @@ #include "..\script_component.hpp" /* * Author: 3Mydlo3 - * + * * * Arguments: * "HitPart" EH params @@ -17,14 +17,14 @@ #ifdef DEV_DEBUG private _i = 0; { - diag_log format ["WARGAY DEBUG HIT PART [%1]: All [%2]: %3", diag_tickTime, _i, str _x]; - _i = _i + 1; + diag_log format ["WARGAY DEBUG HIT PART [%1]: All [%2]: %3", diag_tickTime, _i, str _x]; + _i = _i + 1; } forEach _this; diag_log format ["WARGAY DEBUG HIT PART [%1]: Projectile relative position: %2 | Hit relative position: %3", diag_tickTime, str (_target worldToModel getPosATL _projectile), str (_target worldToModel ASLToAGL _position)]; #endif if (!alive _target) exitWith { - _target removeEventHandler [_thisEvent, _thisEventHandler]; + _target removeEventHandler [_thisEvent, _thisEventHandler]; }; private _isHandledForTarget = _projectile getVariable [str _target, false]; diff --git a/addons/_eventHandlers/functions/fn_knowsAboutChanged.sqf b/addons/_eventHandlers/functions/fn_knowsAboutChanged.sqf index 7eae680..4a1843f 100644 --- a/addons/_eventHandlers/functions/fn_knowsAboutChanged.sqf +++ b/addons/_eventHandlers/functions/fn_knowsAboutChanged.sqf @@ -30,7 +30,7 @@ private _isRevealed = _targetUnit getVariable ["MDL_IsVisible", false]; if (_newKnowsAbout > 0.75 && {!_isRevealed}) then { - _targetUnit setVariable ["MDL_IsVisible", true, true]; + _targetUnit setVariable ["MDL_IsVisible", true, true]; #ifdef DEV_DEBUG diag_log format ["WARGAY DEBUG KNOWS ABOUT CHANGED [%1]: Revealing Target: %3 detected by Group: %2", diag_tickTime, _group, _targetUnit, _oldKnowsAbout, _newKnowsAbout]; #endif diff --git a/addons/_eventHandlers/functions/fn_musicStop.sqf b/addons/_eventHandlers/functions/fn_musicStop.sqf index 54b4c3d..9d6268e 100644 --- a/addons/_eventHandlers/functions/fn_musicStop.sqf +++ b/addons/_eventHandlers/functions/fn_musicStop.sqf @@ -1,7 +1,7 @@ #include "..\script_component.hpp" /* * Author: 3Mydlo3 - * + * * * Arguments: * None @@ -13,5 +13,5 @@ */ addMusicEventHandler ["MusicStop", { - [FUNC(playNextMusic), [], random 15] call CBA_fnc_waitAndExecute; + [FUNC(playNextMusic), [], random 15] call CBA_fnc_waitAndExecute; }]; diff --git a/addons/damage/functions/fn_getHitDir.sqf b/addons/damage/functions/fn_getHitDir.sqf index f6040e0..4896bba 100644 --- a/addons/damage/functions/fn_getHitDir.sqf +++ b/addons/damage/functions/fn_getHitDir.sqf @@ -18,12 +18,12 @@ params ["_target", "_surfaceVector", "_velocity", "_projectile"]; private _hitDirVectorNormalized = if (_velocity isEqualTo [0, 0, 0]) then { - #ifdef DEV_DEBUG - HitpointHits pushBack getPosATL _projectile; - #endif - getPosATL _target vectorDiff getPosATL _projectile vectorMultiply -1 + #ifdef DEV_DEBUG + HitpointHits pushBack getPosATL _projectile; + #endif + getPosATL _target vectorDiff getPosATL _projectile vectorMultiply -1 } else { - vectorNormalized _surfaceVector + vectorNormalized _surfaceVector }; #ifdef DEV_DEBUG @@ -43,11 +43,11 @@ private _dotProduct = _targetDir vectorDotProduct _hitDirVectorNormalized; private _topHitDir = _surfaceVector#2 atan2 sqrt (_surfaceVector#0^2 + _surfaceVector#1^2); private _hitDir = if (_topHitDir > 70) then { - "TOP" + "TOP" } else { if (_dotProduct > 0.5) exitWith { "FRONT" }; if (_dotProduct < -0.5) exitWith { "REAR" }; - "SIDE" + "SIDE" }; #ifdef DEV_DEBUG diff --git a/addons/damage/functions/fn_heDamage.sqf b/addons/damage/functions/fn_heDamage.sqf index a8e1b1c..7f7b8e4 100644 --- a/addons/damage/functions/fn_heDamage.sqf +++ b/addons/damage/functions/fn_heDamage.sqf @@ -30,7 +30,7 @@ fnc_damagePerHe = { if (_armor isEqualTo 5) exitWith {0.15}; if (_armor < 8) exitWith {0.1}; if (_armor < 14) exitWith {0.05}; - 0.01 + 0.01 }; private _damage = _ammoBaseDamage * ([_armor] call fnc_damagePerHe); diff --git a/addons/damage/functions/fn_healDamage.sqf b/addons/damage/functions/fn_healDamage.sqf index 829bc6c..d0bcfcc 100644 --- a/addons/damage/functions/fn_healDamage.sqf +++ b/addons/damage/functions/fn_healDamage.sqf @@ -19,8 +19,8 @@ if (_healAmount isEqualTo MAX_HP) exitWith { private _maxHp = _unit getVariable ["MDL_maxHp", MAX_HP]; _unit setVariable ["MDL_currentHp", _maxHp, true]; _unit setDamage 0; - // Heal crew - {_x setDamage 0} forEach crew _unit; + // Heal crew + {_x setDamage 0} forEach crew _unit; }; private _maxHp = _unit getVariable ["MDL_maxHp", MAX_HP]; diff --git a/addons/damage/functions/fn_keDamage.sqf b/addons/damage/functions/fn_keDamage.sqf index cf78bd4..5c14257 100644 --- a/addons/damage/functions/fn_keDamage.sqf +++ b/addons/damage/functions/fn_keDamage.sqf @@ -21,7 +21,7 @@ params ["_armor", "_ammoBaseDamage", "_velocity", "_initialVelocity"]; if (_ammoBaseDamage isEqualTo 0.1) exitWith { - if (_armor isEqualTo 0) then { _ammoBaseDamage } else { 0 }; + if (_armor isEqualTo 0) then { _ammoBaseDamage } else { 0 }; }; private _damageFromVelocity = _ammoBaseDamage - ((vectorMagnitude _initialVelocity - vectorMagnitude _velocity) / VELOCITY_STEP); diff --git a/addons/deployment/functions/fn_deployVehicle.sqf b/addons/deployment/functions/fn_deployVehicle.sqf index d259f27..6a373d8 100644 --- a/addons/deployment/functions/fn_deployVehicle.sqf +++ b/addons/deployment/functions/fn_deployVehicle.sqf @@ -19,14 +19,14 @@ params ["_vehicleClassName", "_caller", "_spawner"]; private _remainingSpawns = GVAR(spawnableVehicles) getOrDefault [_vehicleClassName, 0]; if (_remainingSpawns < 1) exitWith { - ["MDL_vehicleDeploymentNoLongerPossible", [_vehicleClassName], _caller] call CBA_fnc_targetEvent; + ["MDL_vehicleDeploymentNoLongerPossible", [_vehicleClassName], _caller] call CBA_fnc_targetEvent; }; private _vehicle = createVehicle [_vehicleClassName, getMarkerPos "sys_marker_spawner_1", ["sys_marker_spawner_1", "sys_marker_spawner_2", "sys_marker_spawner_3"]]; _vehicle setVariable ["MDL_deployedVehicle", true, true]; { - _x addCuratorEditableObjects [[_vehicle], true]; + _x addCuratorEditableObjects [[_vehicle], true]; } forEach allCurators; if (_vehicle isEqualTo objNull) exitWith { @@ -38,6 +38,6 @@ if (_vehicle isEqualTo objNull) exitWith { private _newRemainingSpawns = _remainingSpawns - 1; GVAR(spawnableVehicles) set [_vehicleClassName, _newRemainingSpawns]; if (_newRemainingSpawns isEqualTo 0) then { - ["MDL_vehicleDeploymentNoLongerPossible", [_vehicleClassName]] call CBA_fnc_globalEvent; - deleteVehicle _spawner; + ["MDL_vehicleDeploymentNoLongerPossible", [_vehicleClassName]] call CBA_fnc_globalEvent; + deleteVehicle _spawner; }; diff --git a/addons/experience/functions/fn_addExperienceForKill.sqf b/addons/experience/functions/fn_addExperienceForKill.sqf index c49f936..293c05f 100644 --- a/addons/experience/functions/fn_addExperienceForKill.sqf +++ b/addons/experience/functions/fn_addExperienceForKill.sqf @@ -19,26 +19,26 @@ private _vehicleInfo = VehicleTypes getOrDefault [toUpper typeOf _unit, objNull] private _xpAmount = if (_vehicleInfo isEqualTo objNull) then { 5 } else { _vehicleInfo get "pointCost" }; { - private _playerStats = [getPlayerUID _x] call FUNC(getPlayerStats); + private _playerStats = [getPlayerUID _x] call FUNC(getPlayerStats); - // TODO: Consider keeping list of killed units - private _killedUnits = _x getVariable ["MDL_killedUnits", []]; - _killedUnits pushBack typeOf _unit; - _x setVariable ["MDL_killedUnits", _killedUnits, true]; + // TODO: Consider keeping list of killed units + private _killedUnits = _x getVariable ["MDL_killedUnits", []]; + _killedUnits pushBack typeOf _unit; + _x setVariable ["MDL_killedUnits", _killedUnits, true]; - private _currentXp = _playerStats getOrDefault ["Current XP", 0]; - private _newXp = _currentXp + _xpAmount; - _playerStats set ["Current XP", _newXp]; + private _currentXp = _playerStats getOrDefault ["Current XP", 0]; + private _newXp = _currentXp + _xpAmount; + _playerStats set ["Current XP", _newXp]; - private _currentTotalXp = _playerStats getOrDefault ["Total XP", 0]; - private _newTotalXp = _currentTotalXp + _xpAmount; - _playerStats set ["Total XP", _newTotalXp]; + private _currentTotalXp = _playerStats getOrDefault ["Total XP", 0]; + private _newTotalXp = _currentTotalXp + _xpAmount; + _playerStats set ["Total XP", _newTotalXp]; - private _currentKills = _playerStats getOrDefault ["Kills", 0]; - private _newKills = _currentKills + _xpAmount; - _playerStats set ["Kills", _currentKills + _xpAmount]; + private _currentKills = _playerStats getOrDefault ["Kills", 0]; + private _newKills = _currentKills + _xpAmount; + _playerStats set ["Kills", _currentKills + _xpAmount]; - _x setVariable ["MDL_playerStats", _playerStats, true]; + _x setVariable ["MDL_playerStats", _playerStats, true]; - ["MDL_xpReceived", [_xpAmount, _newXp, _newTotalXp], _x] call CBA_fnc_targetEvent; + ["MDL_xpReceived", [_xpAmount, _newXp, _newTotalXp], _x] call CBA_fnc_targetEvent; } forEach crew vehicle _shooter; diff --git a/addons/hud/functions/fn_updateHitpointsDisplay.sqf b/addons/hud/functions/fn_updateHitpointsDisplay.sqf index f1d5423..3b78fee 100644 --- a/addons/hud/functions/fn_updateHitpointsDisplay.sqf +++ b/addons/hud/functions/fn_updateHitpointsDisplay.sqf @@ -32,18 +32,18 @@ private _gutterW = _hpW / 4; private _indicators = []; for "_i" from 0 to (_totalHitPoints-1) do { private _hpCtrl = _display ctrlCreate ["RscText", -1, _ctrlContainer]; - _hpCtrl ctrlSetBackgroundColor ([ + _hpCtrl ctrlSetBackgroundColor ([ GVAR(missingHpColor), - GVAR(filledHpColor) + GVAR(filledHpColor) ] select (_i < _hitPoints)); - - _hpCtrl ctrlSetPosition [ + + _hpCtrl ctrlSetPosition [ _hpW * _i, pixelH * 4, _hpW - _gutterW, - _hpW + _hpW ]; - _hpCtrl ctrlCommit 0; + _hpCtrl ctrlCommit 0; _indicators pushBack _hpCtrl; }; @@ -54,4 +54,4 @@ if (_exactHitPoints isNotEqualTo _hitPoints) then { _partialHpCtrl ctrlCommit 0; }; -_ctrlContainer setVariable ["MDL_hitpointsContainer_indicators", _indicators]; \ No newline at end of file +_ctrlContainer setVariable ["MDL_hitpointsContainer_indicators", _indicators]; diff --git a/addons/icons/functions/fn_createVehicleInfoForNonConfiguredVehicle.sqf b/addons/icons/functions/fn_createVehicleInfoForNonConfiguredVehicle.sqf index f764f6c..a489594 100644 --- a/addons/icons/functions/fn_createVehicleInfoForNonConfiguredVehicle.sqf +++ b/addons/icons/functions/fn_createVehicleInfoForNonConfiguredVehicle.sqf @@ -17,12 +17,12 @@ params ["_vehicle"]; private _newVehicleInfo = createHashMapFromArray [ [CLASS_NAME_PROPERTY, toUpper typeOf _vehicle], - [DISPLAY_NAME_PROPERTY, getText (configOf _vehicle >> DISPLAY_NAME_PROPERTY)], - ["iconPath", "\A3\ui_f\data\map\markers\nato\b_unknown.paa"], - ["markerType", "b_unknown"], - ["pointCost", 5] + [DISPLAY_NAME_PROPERTY, getText (configOf _vehicle >> DISPLAY_NAME_PROPERTY)], + ["iconPath", "\A3\ui_f\data\map\markers\nato\b_unknown.paa"], + ["markerType", "b_unknown"], + ["pointCost", 5] ]; - + VehicleTypes set [toUpper typeOf _vehicle, _newVehicleInfo]; -_newVehicleInfo \ No newline at end of file +_newVehicleInfo diff --git a/addons/icons/functions/fn_getAmmoInfo.sqf b/addons/icons/functions/fn_getAmmoInfo.sqf index 1b68b19..29cec6a 100644 --- a/addons/icons/functions/fn_getAmmoInfo.sqf +++ b/addons/icons/functions/fn_getAmmoInfo.sqf @@ -26,39 +26,39 @@ private _vehicleInfo = [_vehicle] call FUNC(getVehicleInfo); private _ammoInfo = _vehicleInfo getOrDefault [AMMO_PROPERTY, objNull]; if (_ammoInfo isEqualTo objNull) then { - private _vehicleClassName = _vehicleInfo get CLASS_NAME_PROPERTY; - - // diag_log format ["DDd %1", _vehicleClassName]; - - private _magazines = getArray (configFile >> "CfgVehicles" >> _vehicleClassName >> "Turrets" >> "MainTurret" >> "magazines"); - _magazines = _magazines arrayIntersect _magazines; - - // diag_log format ["Ddd mags: %1", str _magazines]; - - private _ammo = _magazines apply { - MagazineTypes getOrDefault [toUpper _x, objNull] - } - select {_x isNotEqualTo objNull} - apply { - [_x get CLASS_NAME_PROPERTY, _x getOrDefault [AMMO_PROPERTY, objNull]] - } - select {_x select 1 isNotEqualTo objNull} - apply { - (_x select 1) set ["displayNameShort", getText (configFile >> "CfgMagazines" >> (_x select 0) >> "displayNameShort")]; - _x select 1 - }; - - // diag_log ["Ddd ammo: %1", str _ammo]; - - private _ammoInfo = createHashMap; - { - _ammoInfo set [_x get CLASS_NAME_PROPERTY, _x]; - } forEach _ammo; - - // diag_log ["Ddd ammo info: %1", str _ammoInfo]; - - _vehicleInfo set [AMMO_PROPERTY, _ammoInfo]; - // diag_log ["Ddd vehicle info: %1", str _vehicleInfo]; + private _vehicleClassName = _vehicleInfo get CLASS_NAME_PROPERTY; + + // diag_log format ["DDd %1", _vehicleClassName]; + + private _magazines = getArray (configFile >> "CfgVehicles" >> _vehicleClassName >> "Turrets" >> "MainTurret" >> "magazines"); + _magazines = _magazines arrayIntersect _magazines; + + // diag_log format ["Ddd mags: %1", str _magazines]; + + private _ammo = _magazines apply { + MagazineTypes getOrDefault [toUpper _x, objNull] + } + select {_x isNotEqualTo objNull} + apply { + [_x get CLASS_NAME_PROPERTY, _x getOrDefault [AMMO_PROPERTY, objNull]] + } + select {_x select 1 isNotEqualTo objNull} + apply { + (_x select 1) set ["displayNameShort", getText (configFile >> "CfgMagazines" >> (_x select 0) >> "displayNameShort")]; + _x select 1 + }; + + // diag_log ["Ddd ammo: %1", str _ammo]; + + private _ammoInfo = createHashMap; + { + _ammoInfo set [_x get CLASS_NAME_PROPERTY, _x]; + } forEach _ammo; + + // diag_log ["Ddd ammo info: %1", str _ammoInfo]; + + _vehicleInfo set [AMMO_PROPERTY, _ammoInfo]; + // diag_log ["Ddd vehicle info: %1", str _vehicleInfo]; }; _ammoInfo @@ -84,7 +84,7 @@ if (_ammoInfo isEqualTo objNull) then { if (_ammoInfo isNotEqualTo objNull) then { LOG_3("Found matching parent '%1' for '%2' with vehicle info: %3",_ammoInfo get CLASS_NAME_PROPERTY,_unitClassName,str _ammoInfo); - + _ammoInfo set [CLASS_NAME_PROPERTY, _unitClassName]; _ammoInfo set [DISPLAY_NAME_PROPERTY, getText (configFile >> "CfgVehicles" >> _unitClassName >> DISPLAY_NAME_PROPERTY)]; VehicleTypes set [_unitClassName, _ammoInfo]; @@ -106,7 +106,7 @@ _ammoInfo getOrDefault [_key, _defaultValue]*/ // _hashMap set [DISPLAY_NAME_PROPERTY, getText (configFile >> "CfgAmmo" >> configName _x >> DISPLAY_NAME_PROPERTY)]; /* - private _vehicle = get3DENSelected "Object" select 0; + private _vehicle = get3DENSelected "Object" select 0; _vehicle = vehicle player; private _magazines = getArray (configOf _vehicle >> "Turrets" >> "MainTurret" >> "magazines"); @@ -124,4 +124,4 @@ apply { _x select 1 } - */ \ No newline at end of file + */ diff --git a/addons/icons/functions/fn_visibilityCheckLoop.sqf b/addons/icons/functions/fn_visibilityCheckLoop.sqf index c2150bb..3b4018d 100644 --- a/addons/icons/functions/fn_visibilityCheckLoop.sqf +++ b/addons/icons/functions/fn_visibilityCheckLoop.sqf @@ -16,10 +16,10 @@ params [["_targetsToCheck", []]]; if (_targetsToCheck isEqualTo []) then { - _targetsToCheck = vehicles select {side effectiveCommander _x isEqualTo EAST}; + _targetsToCheck = vehicles select {side effectiveCommander _x isEqualTo EAST}; }; if (_targetsToCheck isEqualTo []) exitWith { - [FUNC(visibilityCheckLoop), [], 5] call CBA_fnc_waitAndExecute; + [FUNC(visibilityCheckLoop), [], 5] call CBA_fnc_waitAndExecute; }; private _target = _targetsToCheck deleteAt (count _targetsToCheck - 1); @@ -34,7 +34,7 @@ if (_isVisible && {!_shouldBeVisible}) then { #ifdef DEV_DEBUG diag_log format ["WARGAY DEBUG VISIBILITY CHECK [%1]: Making Target %2 not visible", diag_tickTime, _target]; #endif - _target setVariable ["MDL_IsVisible", false, false]; + _target setVariable ["MDL_IsVisible", false, false]; }; [FUNC(visibilityCheckLoop), [_targetsToCheck], 1] call CBA_fnc_waitAndExecute; diff --git a/addons/music/functions/fn_addToMusicQueue.sqf b/addons/music/functions/fn_addToMusicQueue.sqf index ae65ef5..d3c4f27 100644 --- a/addons/music/functions/fn_addToMusicQueue.sqf +++ b/addons/music/functions/fn_addToMusicQueue.sqf @@ -19,13 +19,13 @@ params ["_music", ["_forceNow", false]]; if (!isServer) exitWith {}; if (_forceNow) exitWith { - _music remoteExec ["playMusic", 0]; + _music remoteExec ["playMusic", 0]; }; if (_music isEqualType "") then { - GVAR(musicQueue) pushBack _music; + GVAR(musicQueue) pushBack _music; } else { - GVAR(musicQueue) append _music; + GVAR(musicQueue) append _music; }; [FUNC(playNextMusic)] call CBA_fnc_execNextFrame; diff --git a/addons/rearm/functions/fn_canRearm.sqf b/addons/rearm/functions/fn_canRearm.sqf index 8e636b7..8ccc6b3 100644 --- a/addons/rearm/functions/fn_canRearm.sqf +++ b/addons/rearm/functions/fn_canRearm.sqf @@ -15,8 +15,8 @@ params ["_caller", "_target"]; alive _target && { - _caller call FUNC(isEngineer) && { - vehicle _caller isEqualTo _caller && { - _caller distance _target < 5 && { - ((_target getVariable ["MDL_lastCombatActive", -GVAR(repairMinNoCombatTime)]) + GVAR(repairMinNoCombatTime)) < CBA_missionTime + _caller call FUNC(isEngineer) && { + vehicle _caller isEqualTo _caller && { + _caller distance _target < 5 && { + ((_target getVariable ["MDL_lastCombatActive", -GVAR(repairMinNoCombatTime)]) + GVAR(repairMinNoCombatTime)) < CBA_missionTime }}}} diff --git a/addons/rearm/functions/fn_interruptedRearm.sqf b/addons/rearm/functions/fn_interruptedRearm.sqf index 56f921e..c42dbf2 100644 --- a/addons/rearm/functions/fn_interruptedRearm.sqf +++ b/addons/rearm/functions/fn_interruptedRearm.sqf @@ -16,7 +16,7 @@ params ["_target"]; private _lastCombatActive = _target getVariable ["MDL_lastCombatActive", -GVAR(repairMinNoCombatTime)]; if (_lastCombatActive + GVAR(repairMinNoCombatTime) > CBA_missionTime) exitWith { - systemChat LLSTRING(VehicleInCombat); + systemChat LLSTRING(VehicleInCombat); }; systemChat LLSTRING(RearmInterrupted); diff --git a/addons/refuel/functions/fn_canRefuel.sqf b/addons/refuel/functions/fn_canRefuel.sqf index 401d58c..f3482c4 100644 --- a/addons/refuel/functions/fn_canRefuel.sqf +++ b/addons/refuel/functions/fn_canRefuel.sqf @@ -15,9 +15,9 @@ params ["_caller", "_target"]; alive _target && { - _caller call FUNC(isEngineer) && { - vehicle _caller isEqualTo _caller && { - _caller distance _target < 5 && { - fuel _target < 1 && { - ((_target getVariable ["MDL_lastCombatActive", -GVAR(repairMinNoCombatTime)]) + GVAR(repairMinNoCombatTime)) < CBA_missionTime -}}}}} \ No newline at end of file + _caller call FUNC(isEngineer) && { + vehicle _caller isEqualTo _caller && { + _caller distance _target < 5 && { + fuel _target < 1 && { + ((_target getVariable ["MDL_lastCombatActive", -GVAR(repairMinNoCombatTime)]) + GVAR(repairMinNoCombatTime)) < CBA_missionTime +}}}}} diff --git a/addons/refuel/functions/fn_interruptedRefuel.sqf b/addons/refuel/functions/fn_interruptedRefuel.sqf index 9cb2bc6..5f03d7f 100644 --- a/addons/refuel/functions/fn_interruptedRefuel.sqf +++ b/addons/refuel/functions/fn_interruptedRefuel.sqf @@ -18,7 +18,7 @@ private _currentFuel = fuel _target * 100; private _lastCombatActive = _target getVariable ["MDL_lastCombatActive", -GVAR(repairMinNoCombatTime)]; if (_lastCombatActive + GVAR(repairMinNoCombatTime) > CBA_missionTime) exitWith { - systemChat LLSTRING(VehicleInCombat); + systemChat LLSTRING(VehicleInCombat); }; systemChat format [LLSTRING(RefuelInterrupted), _currentFuel]; diff --git a/addons/repair/functions/fn_canRepair.sqf b/addons/repair/functions/fn_canRepair.sqf index ecae1a1..f7a7635 100644 --- a/addons/repair/functions/fn_canRepair.sqf +++ b/addons/repair/functions/fn_canRepair.sqf @@ -15,9 +15,9 @@ params ["_caller", "_target"]; alive _target && { - _caller call FUNC(isEngineer) && { - vehicle _caller isEqualTo _caller && { - _caller distance _target < 5 && { - (_target getVariable ['MDL_currentHp', 0]) < (_target getVariable ['MDL_maxHp', 0]) && { - ((_target getVariable ["MDL_lastCombatActive", -GVAR(repairMinNoCombatTime)]) + GVAR(repairMinNoCombatTime)) < CBA_missionTime -}}}}} \ No newline at end of file + _caller call FUNC(isEngineer) && { + vehicle _caller isEqualTo _caller && { + _caller distance _target < 5 && { + (_target getVariable ['MDL_currentHp', 0]) < (_target getVariable ['MDL_maxHp', 0]) && { + ((_target getVariable ["MDL_lastCombatActive", -GVAR(repairMinNoCombatTime)]) + GVAR(repairMinNoCombatTime)) < CBA_missionTime +}}}}} diff --git a/addons/repair/functions/fn_interruptedRepair.sqf b/addons/repair/functions/fn_interruptedRepair.sqf index 1df3572..b3f1f4f 100644 --- a/addons/repair/functions/fn_interruptedRepair.sqf +++ b/addons/repair/functions/fn_interruptedRepair.sqf @@ -19,7 +19,7 @@ private _currentHp = _target getVariable ["MDL_currentHp", MAX_HP]; private _lastCombatActive = _target getVariable ["MDL_lastCombatActive", -1]; if (_lastCombatActive + GVAR(repairMinNoCombatTime) > CBA_missionTime) exitWith { - systemChat LLSTRING(VehicleInCombat); + systemChat LLSTRING(VehicleInCombat); }; systemChat format [LLSTRING(RepairInterrupted), _currentHp, _maxHp]; diff --git a/addons/stats/functions/fn_getPlayerStats.sqf b/addons/stats/functions/fn_getPlayerStats.sqf index 10ac030..22c7374 100644 --- a/addons/stats/functions/fn_getPlayerStats.sqf +++ b/addons/stats/functions/fn_getPlayerStats.sqf @@ -18,9 +18,9 @@ params ["_uid"]; if (_uid isEqualTo "") exitWith {}; if (isServer) then { - GVAR(allPlayersStats) getOrDefaultCall [_uid, {createHashMap}, true] + GVAR(allPlayersStats) getOrDefaultCall [_uid, {createHashMap}, true] } else { - private _playerData = player get ["MDL_playerStats", []]; - if (_playerData isEqualTo []) then { _playerData = createHashMap }; - _playerData + private _playerData = player get ["MDL_playerStats", []]; + if (_playerData isEqualTo []) then { _playerData = createHashMap }; + _playerData } diff --git a/addons/stats/functions/fn_loadAllStats.sqf b/addons/stats/functions/fn_loadAllStats.sqf index 4cb5cd7..01381b0 100644 --- a/addons/stats/functions/fn_loadAllStats.sqf +++ b/addons/stats/functions/fn_loadAllStats.sqf @@ -18,8 +18,8 @@ params ["_uid"]; private _wargayProgress = profileNamespace getVariable ["MDL_WG_Progress", []]; if (_wargayProgress isEqualTo []) then { - _wargayProgress = createHashMap; - profileNamespace setVariable ["MDL_WG_Progress", _wargayProgress]; + _wargayProgress = createHashMap; + profileNamespace setVariable ["MDL_WG_Progress", _wargayProgress]; }; _wargayProgress getOrDefaultCall ["Players", {createHashMap}, true] diff --git a/addons/stats/functions/fn_loadPlayerStats.sqf b/addons/stats/functions/fn_loadPlayerStats.sqf index ebbc1eb..a788807 100644 --- a/addons/stats/functions/fn_loadPlayerStats.sqf +++ b/addons/stats/functions/fn_loadPlayerStats.sqf @@ -17,7 +17,7 @@ params [["_unit", player]]; if (!isServer) exitWith { - ["MDL_loadPlayerStats", [player]] call CBA_fnc_serverEvent; + ["MDL_loadPlayerStats", [player]] call CBA_fnc_serverEvent; }; private _uid = getPlayerUID _unit; @@ -28,8 +28,8 @@ private _playerData = [_uid] call FUNC(getPlayerStats); private _index = GVAR(loadedPlayers) pushBackUnique _uid; if (_index isEqualTo -1) then { - private _playedMissions = _playerData getOrDefault ["Missions", 0, true]; - _playerData set ["Missions", _playedMissions + 1]; + private _playedMissions = _playerData getOrDefault ["Missions", 0, true]; + _playerData set ["Missions", _playedMissions + 1]; }; _unit setVariable ["MDL_playerStats", _playerData, true]; diff --git a/addons/stats/functions/fn_playerKilled.sqf b/addons/stats/functions/fn_playerKilled.sqf index 8c51dd1..97d07ba 100644 --- a/addons/stats/functions/fn_playerKilled.sqf +++ b/addons/stats/functions/fn_playerKilled.sqf @@ -24,11 +24,11 @@ private _playerStats = [_playerUid] call FUNC(getPlayerStats); _playerStats set ["Current XP", 0]; private _currentDeaths = _playerStats getOrDefault ["Deaths", 0]; _playerStats set ["Deaths", _currentDeaths + 1]; - + // If outside vehicle or vehicle still lives, do not count as a loss if (isNull _vehicle || {alive _vehicle}) exitWith { - _playerUnit setVariable ["MDL_playerStats", _playerStats, true]; + _playerUnit setVariable ["MDL_playerStats", _playerStats, true]; }; private _vehicleInfo = VehicleTypes getOrDefault [toUpper typeOf _vehicle, objNull]; diff --git a/addons/stats/functions/fn_showPlayerStats.sqf b/addons/stats/functions/fn_showPlayerStats.sqf index 3ca0626..8dcf9af 100644 --- a/addons/stats/functions/fn_showPlayerStats.sqf +++ b/addons/stats/functions/fn_showPlayerStats.sqf @@ -25,19 +25,19 @@ private _losses = _playerData getOrDefault ["Losses", 0]; private _playedMissions = _playerData getOrDefault ["Missions", 0]; private _messageParts = [ - format ["Player: %1", name _unit], - lineBreak, - lineBreak, - format ["XP: %1", _currentXp], - lineBreak, - format ["XP Total: %2", _totalXp], - lineBreak, - lineBreak, - format ["Played missions: %1", _playedMissions], - format ["Deaths: %1", _deaths], - format ["Kills: %1", _kills], - format ["Losses: %1", _losses], - format ["K/L ratio: %1", _kills/_losses] + format ["Player: %1", name _unit], + lineBreak, + lineBreak, + format ["XP: %1", _currentXp], + lineBreak, + format ["XP Total: %2", _totalXp], + lineBreak, + lineBreak, + format ["Played missions: %1", _playedMissions], + format ["Deaths: %1", _deaths], + format ["Kills: %1", _kills], + format ["Losses: %1", _losses], + format ["K/L ratio: %1", _kills/_losses] ]; private _text = composeText _messageParts; From 9a9e795d431763f4bf89f1a4e5b47ad0bf40ec2e Mon Sep 17 00:00:00 2001 From: 3Mydlo3 Date: Mon, 16 Dec 2024 00:11:34 +0100 Subject: [PATCH 04/47] Add some init.sqf stuff and macros --- addons/_eventHandlers/XEH_postInit.sqf | 11 ++- addons/init/XEH_postInit.sqf | 131 +++++++++++++++++++++++++ addons/main/script_macros.hpp | 9 ++ addons/refuel/script_component.hpp | 4 + addons/repair/script_component.hpp | 4 + 5 files changed, 158 insertions(+), 1 deletion(-) diff --git a/addons/_eventHandlers/XEH_postInit.sqf b/addons/_eventHandlers/XEH_postInit.sqf index 32a30f8..cfd489a 100644 --- a/addons/_eventHandlers/XEH_postInit.sqf +++ b/addons/_eventHandlers/XEH_postInit.sqf @@ -1,4 +1,13 @@ #include "script_component.hpp" -// TODO: Move to music componet and change function name (or better, remove it as a function) +// TODO: Add KnowsAboutChanged EH to WEST groups as needed as this thing most likely won't work +{ + _x addEventHandler ["KnowsAboutChanged", FUNC(knowsAboutChanged)]; +} forEach (groups WEST); + +{ + _x addEventHandler ["CuratorObjectDeleted", FUNC(curatorObjectDeleted)]; +} forEach allCurators; + +// TODO: Move to music component and change function name (or better, remove it as a function) call FUNC(musicStop); diff --git a/addons/init/XEH_postInit.sqf b/addons/init/XEH_postInit.sqf index f9987bf..c7242dc 100644 --- a/addons/init/XEH_postInit.sqf +++ b/addons/init/XEH_postInit.sqf @@ -5,6 +5,137 @@ // TODO: Move onPlayerKilled.sqf // TODO: Move and split CfgWargay.hpp +GVAR(isTest) = true; + +AmmoTypes = createHashMapFromArray + ("true" configClasses (missionConfigFile >> "CfgWargay" >> "Ammo") + apply { + private _hashMap = createHashMap; + _hashMap set [CLASS_NAME_PROPERTY, toUpper configName _x]; + _hashMap set [DAMAGE_PROPERTY, getNumber (_x >> DAMAGE_PROPERTY)]; + _hashMap set [TYPE_PROPERTY, getText (_x >> TYPE_PROPERTY)]; + + private _child = getText (_x >> "child"); + if (_child isNotEqualTo "") then { + _hashMap set ["child", _child]; + }; + + [toUpper configName _x, _hashMap] + }); + +VehicleTypes = createHashMapFromArray + ("true" configClasses (missionConfigFile >> "CfgWargay" >> "Vehicles") + apply { + private _hashMap = createHashMap; + _hashMap set [CLASS_NAME_PROPERTY, toUpper configName _x]; + _hashMap set ["pointCost", getNumber (_x >> "pointCost")]; + _hashMap set ["hitpoints", getNumber (_x >> "hitpoints")]; + _hashMap set ["armor", getArray (_x >> "armor")]; + _hashMap set ["iconPath", getText (_x >> "iconPath")]; + _hashMap set ["markerType", getText (_x >> "markerType")]; + _hashMap set ["isCommandVehicle", (_x >> "isCommandVehicle") call BIS_fnc_getCfgDataBool]; + _hashMap set ["isLogistics", (_x >> "isLogistics") call BIS_fnc_getCfgDataBool]; + _hashMap set ["isRecon", (_x >> "isRecon") call BIS_fnc_getCfgDataBool]; + [toUpper configName _x, _hashMap] + }); + +private _magazinesForVehicles = VehicleTypes apply { + private _vehicleClassName = VehicleTypes get _x get CLASS_NAME_PROPERTY; + private _magazines = getArray (configFile >> "CfgVehicles" >> _vehicleClassName >> "Turrets" >> "MainTurret" >> "magazines"); + _magazines = _magazines arrayIntersect _magazines; + + private _magazinesAndAmmo = _magazines apply { + [_x, getText (configFile >> "CfgMagazines" >> _x >> "ammo")] + } apply { + [_x select 0, AmmoTypes getOrDefault [toUpper (_x select 1), objNull]] + } select { + _x select 1 isNotEqualTo objNull + }; + + _magazinesAndAmmo apply { + private _hashMap = createHashMap; + + _hashMap set [CLASS_NAME_PROPERTY, _x select 0]; + + private _ammoInfo = _x select 1; + private _child = _ammoInfo getOrDefault ["child", ""]; + if (_child isNotEqualTo "") then { + _ammoInfo = AmmoTypes get toUpper _child; + // diag_log format ["WARGAY MAGS DEBUG: %1 Has child: %2 Ammo Info: %3", _x select 0, _child, str _ammoInfo]; + }; + + _hashMap set [AMMO_PROPERTY, _ammoInfo]; + [toUpper (_x select 0), _hashMap]; + } +}; + +private _magazineTypes = []; +{ + _magazineTypes append _x; +} forEach _magazinesForVehicles; +MagazineTypes = createHashMapFromArray _magazineTypes; + +[ + "AllVehicles", + "Init", + FUNC(vehicleInit), + true, // Allow inheritance + ["Man"], // Excluded classes + true // Apply retroactive +] call CBA_fnc_addClassEventHandler; + +[ + "Man", + "Init", + FUNC(manInit), + true, // Allow inheritance + [], // Excluded classes + true // Apply retroactive +] call CBA_fnc_addClassEventHandler; + +// TODO: Find an easy way to ininitalize spawnable vehicles from mission init +GVAR(spawnableVehicles) = createHashMapFromArray [ + // LOG + ["gm_ge_army_iltis_cargo", 2], + ["gm_ge_army_m113a1g_command", 1], + ["cwr3_b_m577_hq", 1], + ["gm_ge_army_fuchsa0_command", 1], + ["gm_ge_army_bpz2a0", 2], + ["gm_ge_army_kat1_451_reammo", 4], + ["B_Truck_01_fuel_F", 2], + + // SUP + ["gm_ge_army_gepard1a1", 2], // 3 + ["gm_ge_army_m109g", 2], + ["cwr3_b_m163", 4], + ["gm_ge_army_kat1_463_mlrs", 1], + + // TNK + ["gm_ge_army_Leopard1a1", 1], // 6 + ["gm_ge_army_Leopard1a3", 6], + ["gm_ge_army_marder1a1a", 4], + ["cwr3_b_m60a3", 4], + + // REC + ["gm_ge_army_iltis_milan", 4], + ["gm_ge_army_bo105m_vbh", 1], + ["gm_ge_army_fuchsa0_reconnaissance", 1], // 3 + ["gm_ge_army_luchsa1", 2], + + // VEH + ["cwr3_b_m901_itv", 2], + ["cwr3_b_hmmwv_tow", 4], + + // HEL + ["cwr3_b_ah1f", 2] +]; + +if (GVAR(isTest)) then { + [{ + ["MDL_startGame"] call CBA_fnc_globalEvent; + }] call CBA_fnc_execNextFrame; +}; + if (isServer) exitWith {}; addMissionEventHandler ["Draw3D", FUNC(draw3D)]; diff --git a/addons/main/script_macros.hpp b/addons/main/script_macros.hpp index 23a8203..ec422e6 100644 --- a/addons/main/script_macros.hpp +++ b/addons/main/script_macros.hpp @@ -22,6 +22,15 @@ // AFWG macros #define IS_MOD_LOADED(modclass) (isClass (configFile >> "CfgPatches" >> #modclass)) +// #define DEV_DEBUG +// #define DEBUG_MODE_FULL +#define AMMO_PROPERTY "ammo" +#define CLASS_NAME_PROPERTY "className" +#define DAMAGE_PROPERTY "damage" +#define DISPLAY_NAME_PROPERTY "displayNameShort" +#define TYPE_PROPERTY "type" +#define MAX_HP 10 +#define NO_ARMOR [0, 0, 0, 0] // Extension macros #define EXT "armaforces_wargame" diff --git a/addons/refuel/script_component.hpp b/addons/refuel/script_component.hpp index 01c9bcf..cf8b5fa 100644 --- a/addons/refuel/script_component.hpp +++ b/addons/refuel/script_component.hpp @@ -12,3 +12,7 @@ #endif #include "\z\afwg\addons\main\script_macros.hpp" + +// Component specific macros +#define REFUEL_AMOUNT 0.05 +#define REFUEL_SECONDS_FULL 50 diff --git a/addons/repair/script_component.hpp b/addons/repair/script_component.hpp index fba1bdf..10f28d9 100644 --- a/addons/repair/script_component.hpp +++ b/addons/repair/script_component.hpp @@ -12,3 +12,7 @@ #endif #include "\z\afwg\addons\main\script_macros.hpp" + +// Component specific +#define HEAL_AMOUNT 0.5 +#define HEAL_SECONDS_PER_POINT 5 From fe2fb306f4e6144aebff6633c1839e38f0a8e637 Mon Sep 17 00:00:00 2001 From: 3Mydlo3 Date: Mon, 16 Dec 2024 00:13:40 +0100 Subject: [PATCH 05/47] Add missing Return Value documentation --- addons/stats/functions/fn_saveAllStats.sqf | 3 +++ addons/stats/functions/fn_showPlayerStats.sqf | 3 +++ 2 files changed, 6 insertions(+) diff --git a/addons/stats/functions/fn_saveAllStats.sqf b/addons/stats/functions/fn_saveAllStats.sqf index ea8a73e..364dfb8 100644 --- a/addons/stats/functions/fn_saveAllStats.sqf +++ b/addons/stats/functions/fn_saveAllStats.sqf @@ -8,6 +8,9 @@ * Arguments: * 0: Player unit * + * Return Value: + * None + * * Public: No */ diff --git a/addons/stats/functions/fn_showPlayerStats.sqf b/addons/stats/functions/fn_showPlayerStats.sqf index 8dcf9af..3670d79 100644 --- a/addons/stats/functions/fn_showPlayerStats.sqf +++ b/addons/stats/functions/fn_showPlayerStats.sqf @@ -8,6 +8,9 @@ * Arguments: * 0: Player unit * + * Return Value: + * None + * * Public: No */ From c954802dd4296779e966b2650a2c8a93e8ad0fd2 Mon Sep 17 00:00:00 2001 From: 3Mydlo3 Date: Mon, 16 Dec 2024 10:58:18 +0100 Subject: [PATCH 06/47] Fixing references and structure --- .vscode/extensions.json | 3 + addons/_eventHandlers/$PBOPREFIX$ | 1 - addons/_eventHandlers/config.cpp | 17 - .../_eventHandlers/functions/fn_musicStop.sqf | 17 - .../functions/script_component.hpp | 1 - addons/_eventHandlers/script_component.hpp | 14 - addons/_keyHandlers/$PBOPREFIX$ | 1 - addons/_keyHandlers/CfgEventHandlers.hpp | 15 - addons/_keyHandlers/XEH_PREP.hpp | 1 - addons/_keyHandlers/XEH_postInit.sqf | 16 - addons/_keyHandlers/XEH_preInit.sqf | 8 - addons/_keyHandlers/XEH_preStart.sqf | 2 - .../functions/script_component.hpp | 1 - addons/_keyHandlers/script_component.hpp | 14 - addons/_keyHandlers/stringtable.xml | 17 - addons/_settings/$PBOPREFIX$ | 1 - addons/_settings/CfgEventHandlers.hpp | 15 - addons/_settings/XEH_PREP.hpp | 2 - addons/_settings/XEH_postInit.sqf | 1 - addons/_settings/XEH_preInit.sqf | 12 - addons/_settings/XEH_preStart.sqf | 2 - addons/_settings/config.cpp | 17 - .../functions/fn_initGlobalSettings.sqf | 66 - .../_settings/functions/script_component.hpp | 1 - addons/_settings/stringtable.xml | 17 - addons/common/CfgWargay.hpp | 1241 +++++++++++++++++ addons/common/XEH_PREP.hpp | 7 + addons/common/XEH_preInit.sqf | 2 + addons/common/config.cpp | 1 + ...eateVehicleInfoForNonConfiguredVehicle.sqf | 2 +- .../functions/fn_currentHpString.sqf | 2 +- .../functions/fn_getAmmoInfo.sqf | 2 +- .../functions/fn_getVehicleDisplayName.sqf | 4 +- .../functions/fn_getVehicleInfo.sqf | 4 +- .../functions/fn_isReconVehicle.sqf | 2 +- .../functions/fn_shouldStillBeVisible.sqf | 2 +- addons/common/initSettings.inc.sqf | 8 + addons/common/stringtable.xml | 4 + addons/damage/XEH_postInit.sqf | 12 - addons/damage/XEH_preInit.sqf | 2 + addons/damage/initSettings.inc.sqf | 8 + addons/damage/stringtable.xml | 8 + addons/deployment/stringtable.xml | 4 + addons/event_handlers/$PBOPREFIX$ | 1 + .../CfgEventHandlers.hpp | 0 .../XEH_PREP.hpp | 1 - .../XEH_postInit.sqf | 5 +- .../XEH_preInit.sqf | 0 .../XEH_preStart.sqf | 0 .../config.cpp | 5 +- .../functions/fn_curatorObjectDeleted.sqf | 5 +- .../functions/fn_draw3D.sqf | 16 +- .../functions/fn_fired.sqf | 4 +- .../functions/fn_handleDamage.sqf | 6 +- .../functions/fn_handleDamageMan.sqf | 2 +- .../functions/fn_hitPart.sqf | 6 +- .../functions/fn_knowsAboutChanged.sqf | 4 +- .../functions/script_component.hpp | 1 + .../script_component.hpp | 8 +- .../stringtable.xml | 12 +- addons/experience/$PBOPREFIX$ | 1 - addons/experience/CfgEventHandlers.hpp | 15 - addons/experience/XEH_PREP.hpp | 1 - addons/experience/XEH_postInit.sqf | 15 - addons/experience/XEH_preInit.sqf | 8 - addons/experience/XEH_preStart.sqf | 2 - addons/experience/config.cpp | 17 - .../experience/functions/script_component.hpp | 1 - addons/experience/script_component.hpp | 14 - addons/experience/stringtable.xml | 21 - addons/hud/CfgEventHandlers.hpp | 6 + addons/hud/XEH_PREP.hpp | 2 + addons/hud/XEH_postInit.sqf | 13 + addons/hud/XEH_preInit.sqf | 2 + addons/hud/config.cpp | 2 +- .../hud/functions/fn_initHitpointsDisplay.sqf | 2 +- .../functions/fn_keyUnitInfo.sqf | 4 +- .../functions/fn_showUnitInfo.sqf | 12 +- .../functions/fn_updateHitpointsDisplay.sqf | 2 +- addons/hud/initSettings.inc.sqf | 2 + addons/icons/XEH_PREP.hpp | 8 - addons/icons/XEH_preInit.sqf | 2 + addons/icons/functions/fn_drawIcon.sqf | 4 +- addons/icons/functions/fn_getIconPath.sqf | 2 +- .../functions/fn_visibilityCheckLoop.sqf | 2 +- .../initSettings.inc.sqf} | 35 +- addons/icons/stringtable.xml | 32 + addons/init/XEH_postInit.sqf | 2 - addons/init/functions/fn_manInit.sqf | 2 +- addons/init/functions/fn_vehicleInit.sqf | 4 +- .../init/functions/fn_vehicleSpawnerInit.sqf | 4 +- addons/main/stringtable.xml | 60 - addons/markers/XEH_preInit.sqf | 2 + addons/markers/assets/b_antiair_spaag.paa | Bin 0 -> 5625 bytes .../markers/assets/b_antiair_spaag_radar.paa | Bin 0 -> 5625 bytes addons/markers/assets/b_antitank.paa | Bin 0 -> 5625 bytes addons/markers/assets/b_antitank_armor.paa | Bin 0 -> 5625 bytes addons/markers/assets/b_art_rocket.paa | Bin 0 -> 5625 bytes addons/markers/assets/b_cv.paa | Bin 0 -> 5625 bytes addons/markers/assets/b_cv_armor.paa | Bin 0 -> 5625 bytes addons/markers/assets/b_mech_inf_armed.paa | Bin 0 -> 5625 bytes addons/markers/assets/b_recon_air.paa | Bin 0 -> 5625 bytes addons/markers/assets/b_recon_antitank.paa | Bin 0 -> 5625 bytes addons/markers/assets/b_recon_armor.paa | Bin 0 -> 5625 bytes .../functions/fn_createVehicleMarker.sqf | 8 +- .../markers/functions/fn_enemyMarkersLoop.sqf | 8 +- .../functions/fn_removeVehicleMarker.sqf | 6 +- addons/markers/initSettings.inc.sqf | 26 + addons/music/CfgSounds.hpp | 10 + addons/music/XEH_postInit.sqf | 18 + addons/music/XEH_preInit.sqf | 2 + addons/music/assets/wargay-alarm.ogg | Bin 0 -> 54123 bytes addons/music/config.cpp | 1 + addons/music/functions/fn_addToMusicQueue.sqf | 2 +- addons/music/functions/fn_isMusicPlaying.sqf | 2 +- .../music/functions/fn_isMusicQueueEmpty.sqf | 2 +- addons/music/functions/fn_playNextMusic.sqf | 2 +- addons/music/initSettings.inc.sqf | 8 + addons/music/stringtable.xml | 12 + addons/rearm/config.cpp | 2 +- addons/rearm/functions/fn_addRearmAction.sqf | 2 +- addons/rearm/functions/fn_canRearm.sqf | 2 +- addons/rearm/functions/fn_completeRearm.sqf | 2 +- .../rearm/functions/fn_interruptedRearm.sqf | 4 +- addons/rearm/functions/fn_rearmVehicle.sqf | 2 +- addons/refuel/XEH_preInit.sqf | 2 + addons/refuel/config.cpp | 2 +- .../refuel/functions/fn_addRefuelAction.sqf | 2 +- addons/refuel/functions/fn_canRefuel.sqf | 2 +- addons/refuel/functions/fn_completeRefuel.sqf | 2 +- .../refuel/functions/fn_interruptedRefuel.sqf | 4 +- addons/refuel/functions/fn_progressRefuel.sqf | 6 +- addons/refuel/functions/fn_refuelVehicle.sqf | 2 +- addons/refuel/functions/fn_startRefuel.sqf | 2 +- addons/refuel/initSettings.inc.sqf | 2 + addons/repair/XEH_preInit.sqf | 2 + addons/repair/config.cpp | 2 +- .../repair/functions/fn_addRepairAction.sqf | 2 +- addons/repair/functions/fn_canRepair.sqf | 2 +- addons/repair/functions/fn_completeRepair.sqf | 2 +- .../repair/functions/fn_interruptedRepair.sqf | 4 +- addons/repair/functions/fn_progressRepair.sqf | 6 +- addons/repair/functions/fn_startRepair.sqf | 2 +- addons/repair/initSettings.inc.sqf | 8 + addons/stats/XEH_PREP.hpp | 1 + addons/stats/XEH_postInit.sqf | 12 + .../functions/fn_addExperienceForKill.sqf | 2 +- addons/stats/functions/fn_getPlayerStats.sqf | 2 +- addons/stats/functions/fn_loadAllStats.sqf | 2 +- addons/stats/functions/fn_loadPlayerStats.sqf | 2 +- addons/stats/functions/fn_playerKilled.sqf | 2 +- addons/stats/functions/fn_saveAllStats.sqf | 2 +- addons/stats/functions/fn_showPlayerStats.sqf | 2 +- addons/stats/stringtable.xml | 4 + 154 files changed, 1582 insertions(+), 580 deletions(-) create mode 100644 .vscode/extensions.json delete mode 100644 addons/_eventHandlers/$PBOPREFIX$ delete mode 100644 addons/_eventHandlers/config.cpp delete mode 100644 addons/_eventHandlers/functions/fn_musicStop.sqf delete mode 100644 addons/_eventHandlers/functions/script_component.hpp delete mode 100644 addons/_eventHandlers/script_component.hpp delete mode 100644 addons/_keyHandlers/$PBOPREFIX$ delete mode 100644 addons/_keyHandlers/CfgEventHandlers.hpp delete mode 100644 addons/_keyHandlers/XEH_PREP.hpp delete mode 100644 addons/_keyHandlers/XEH_postInit.sqf delete mode 100644 addons/_keyHandlers/XEH_preInit.sqf delete mode 100644 addons/_keyHandlers/XEH_preStart.sqf delete mode 100644 addons/_keyHandlers/functions/script_component.hpp delete mode 100644 addons/_keyHandlers/script_component.hpp delete mode 100644 addons/_keyHandlers/stringtable.xml delete mode 100644 addons/_settings/$PBOPREFIX$ delete mode 100644 addons/_settings/CfgEventHandlers.hpp delete mode 100644 addons/_settings/XEH_PREP.hpp delete mode 100644 addons/_settings/XEH_postInit.sqf delete mode 100644 addons/_settings/XEH_preInit.sqf delete mode 100644 addons/_settings/XEH_preStart.sqf delete mode 100644 addons/_settings/config.cpp delete mode 100644 addons/_settings/functions/fn_initGlobalSettings.sqf delete mode 100644 addons/_settings/functions/script_component.hpp delete mode 100644 addons/_settings/stringtable.xml create mode 100644 addons/common/CfgWargay.hpp rename addons/{icons => common}/functions/fn_createVehicleInfoForNonConfiguredVehicle.sqf (95%) rename addons/{icons => common}/functions/fn_currentHpString.sqf (95%) rename addons/{icons => common}/functions/fn_getAmmoInfo.sqf (99%) rename addons/{icons => common}/functions/fn_getVehicleDisplayName.sqf (89%) rename addons/{icons => common}/functions/fn_getVehicleInfo.sqf (98%) rename addons/{icons => common}/functions/fn_isReconVehicle.sqf (90%) rename addons/{icons => common}/functions/fn_shouldStillBeVisible.sqf (92%) create mode 100644 addons/common/initSettings.inc.sqf create mode 100644 addons/damage/initSettings.inc.sqf create mode 100644 addons/event_handlers/$PBOPREFIX$ rename addons/{_eventHandlers => event_handlers}/CfgEventHandlers.hpp (100%) rename addons/{_eventHandlers => event_handlers}/XEH_PREP.hpp (89%) rename addons/{_eventHandlers => event_handlers}/XEH_postInit.sqf (73%) rename addons/{_eventHandlers => event_handlers}/XEH_preInit.sqf (100%) rename addons/{_eventHandlers => event_handlers}/XEH_preStart.sqf (100%) rename addons/{_keyHandlers => event_handlers}/config.cpp (75%) rename addons/{_eventHandlers => event_handlers}/functions/fn_curatorObjectDeleted.sqf (69%) rename addons/{_eventHandlers => event_handlers}/functions/fn_draw3D.sqf (86%) rename addons/{_eventHandlers => event_handlers}/functions/fn_fired.sqf (91%) rename addons/{_eventHandlers => event_handlers}/functions/fn_handleDamage.sqf (96%) rename addons/{_eventHandlers => event_handlers}/functions/fn_handleDamageMan.sqf (92%) rename addons/{_eventHandlers => event_handlers}/functions/fn_hitPart.sqf (94%) rename addons/{_eventHandlers => event_handlers}/functions/fn_knowsAboutChanged.sqf (90%) create mode 100644 addons/event_handlers/functions/script_component.hpp rename addons/{_settings => event_handlers}/script_component.hpp (54%) rename addons/{_eventHandlers => event_handlers}/stringtable.xml (53%) delete mode 100644 addons/experience/$PBOPREFIX$ delete mode 100644 addons/experience/CfgEventHandlers.hpp delete mode 100644 addons/experience/XEH_PREP.hpp delete mode 100644 addons/experience/XEH_postInit.sqf delete mode 100644 addons/experience/XEH_preInit.sqf delete mode 100644 addons/experience/XEH_preStart.sqf delete mode 100644 addons/experience/config.cpp delete mode 100644 addons/experience/functions/script_component.hpp delete mode 100644 addons/experience/script_component.hpp delete mode 100644 addons/experience/stringtable.xml rename addons/{_keyHandlers => hud}/functions/fn_keyUnitInfo.sqf (84%) rename addons/{icons => hud}/functions/fn_showUnitInfo.sqf (84%) create mode 100644 addons/hud/initSettings.inc.sqf rename addons/{_settings/functions/fn_initClientSettings.sqf => icons/initSettings.inc.sqf} (57%) create mode 100644 addons/markers/assets/b_antiair_spaag.paa create mode 100644 addons/markers/assets/b_antiair_spaag_radar.paa create mode 100644 addons/markers/assets/b_antitank.paa create mode 100644 addons/markers/assets/b_antitank_armor.paa create mode 100644 addons/markers/assets/b_art_rocket.paa create mode 100644 addons/markers/assets/b_cv.paa create mode 100644 addons/markers/assets/b_cv_armor.paa create mode 100644 addons/markers/assets/b_mech_inf_armed.paa create mode 100644 addons/markers/assets/b_recon_air.paa create mode 100644 addons/markers/assets/b_recon_antitank.paa create mode 100644 addons/markers/assets/b_recon_armor.paa create mode 100644 addons/markers/initSettings.inc.sqf create mode 100644 addons/music/CfgSounds.hpp create mode 100644 addons/music/assets/wargay-alarm.ogg create mode 100644 addons/music/initSettings.inc.sqf create mode 100644 addons/refuel/initSettings.inc.sqf create mode 100644 addons/repair/initSettings.inc.sqf rename addons/{experience => stats}/functions/fn_addExperienceForKill.sqf (97%) diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 0000000..4ef01b0 --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,3 @@ +{ + "recommendations": [] +} diff --git a/addons/_eventHandlers/$PBOPREFIX$ b/addons/_eventHandlers/$PBOPREFIX$ deleted file mode 100644 index abfafb6..0000000 --- a/addons/_eventHandlers/$PBOPREFIX$ +++ /dev/null @@ -1 +0,0 @@ -z\afwg\addons\common \ No newline at end of file diff --git a/addons/_eventHandlers/config.cpp b/addons/_eventHandlers/config.cpp deleted file mode 100644 index d821136..0000000 --- a/addons/_eventHandlers/config.cpp +++ /dev/null @@ -1,17 +0,0 @@ -#include "script_component.hpp" - -class CfgPatches { - class ADDON { - name = COMPONENT_NAME; - units[] = {}; - weapons[] = {}; - requiredVersion = REQUIRED_VERSION; - requiredAddons[] = { - "afwg_main" - }; - author = "ArmaForces"; - VERSION_CONFIG; - }; -}; - -#include "CfgEventHandlers.hpp" diff --git a/addons/_eventHandlers/functions/fn_musicStop.sqf b/addons/_eventHandlers/functions/fn_musicStop.sqf deleted file mode 100644 index 9d6268e..0000000 --- a/addons/_eventHandlers/functions/fn_musicStop.sqf +++ /dev/null @@ -1,17 +0,0 @@ -#include "..\script_component.hpp" -/* - * Author: 3Mydlo3 - * - * - * Arguments: - * None - * - * Return Value: - * None - * - * Public: No - */ - -addMusicEventHandler ["MusicStop", { - [FUNC(playNextMusic), [], random 15] call CBA_fnc_waitAndExecute; -}]; diff --git a/addons/_eventHandlers/functions/script_component.hpp b/addons/_eventHandlers/functions/script_component.hpp deleted file mode 100644 index 6686d96..0000000 --- a/addons/_eventHandlers/functions/script_component.hpp +++ /dev/null @@ -1 +0,0 @@ -#include "\z\afwg\addons\common\script_component.hpp" diff --git a/addons/_eventHandlers/script_component.hpp b/addons/_eventHandlers/script_component.hpp deleted file mode 100644 index 0f429bd..0000000 --- a/addons/_eventHandlers/script_component.hpp +++ /dev/null @@ -1,14 +0,0 @@ -#define COMPONENT common -#include "\z\afwg\addons\main\script_mod.hpp" - -// #define DEBUG_MODE_FULL -// #define DISABLE_COMPILE_CACHE - -#ifdef DEBUG_ENABLED_COMMON - #define DEBUG_MODE_FULL -#endif - #ifdef DEBUG_SETTINGS_COMMON - #define DEBUG_SETTINGS DEBUG_SETTINGS_COMMON -#endif - -#include "\z\afwg\addons\main\script_macros.hpp" diff --git a/addons/_keyHandlers/$PBOPREFIX$ b/addons/_keyHandlers/$PBOPREFIX$ deleted file mode 100644 index abfafb6..0000000 --- a/addons/_keyHandlers/$PBOPREFIX$ +++ /dev/null @@ -1 +0,0 @@ -z\afwg\addons\common \ No newline at end of file diff --git a/addons/_keyHandlers/CfgEventHandlers.hpp b/addons/_keyHandlers/CfgEventHandlers.hpp deleted file mode 100644 index 2a3f71f..0000000 --- a/addons/_keyHandlers/CfgEventHandlers.hpp +++ /dev/null @@ -1,15 +0,0 @@ -class Extended_PreStart_EventHandlers { - class ADDON { - init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); - }; -}; -class Extended_PreInit_EventHandlers { - class ADDON { - init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); - }; -}; -class Extended_PostInit_EventHandlers { - class ADDON { - init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); - }; -}; diff --git a/addons/_keyHandlers/XEH_PREP.hpp b/addons/_keyHandlers/XEH_PREP.hpp deleted file mode 100644 index b789598..0000000 --- a/addons/_keyHandlers/XEH_PREP.hpp +++ /dev/null @@ -1 +0,0 @@ -PREP(keyUnitInfo); diff --git a/addons/_keyHandlers/XEH_postInit.sqf b/addons/_keyHandlers/XEH_postInit.sqf deleted file mode 100644 index 838b9ad..0000000 --- a/addons/_keyHandlers/XEH_postInit.sqf +++ /dev/null @@ -1,16 +0,0 @@ -#include "script_component.hpp" - -if (isServer) exitWith {}; - -// Register a simple keypress to an action -#include "\a3\ui_f\hpp\defineDIKCodes.inc" - -// Handle "Info" button -[ - "MDL Wargay", - "MDL_WG_UnitInfo", - ["Unit Info", "Opens info popup of targeted unit"], - FUNC(keyUnitInfo), - {}, - [DIK_TAB, [false, false, false]] -] call CBA_fnc_addKeybind; diff --git a/addons/_keyHandlers/XEH_preInit.sqf b/addons/_keyHandlers/XEH_preInit.sqf deleted file mode 100644 index ecb5d0c..0000000 --- a/addons/_keyHandlers/XEH_preInit.sqf +++ /dev/null @@ -1,8 +0,0 @@ -#include "script_component.hpp" -ADDON = false; - -PREP_RECOMPILE_START; -#include "XEH_PREP.hpp" -PREP_RECOMPILE_END; - -ADDON = true; diff --git a/addons/_keyHandlers/XEH_preStart.sqf b/addons/_keyHandlers/XEH_preStart.sqf deleted file mode 100644 index a51262a..0000000 --- a/addons/_keyHandlers/XEH_preStart.sqf +++ /dev/null @@ -1,2 +0,0 @@ -#include "script_component.hpp" -#include "XEH_PREP.hpp" diff --git a/addons/_keyHandlers/functions/script_component.hpp b/addons/_keyHandlers/functions/script_component.hpp deleted file mode 100644 index 6686d96..0000000 --- a/addons/_keyHandlers/functions/script_component.hpp +++ /dev/null @@ -1 +0,0 @@ -#include "\z\afwg\addons\common\script_component.hpp" diff --git a/addons/_keyHandlers/script_component.hpp b/addons/_keyHandlers/script_component.hpp deleted file mode 100644 index 0f429bd..0000000 --- a/addons/_keyHandlers/script_component.hpp +++ /dev/null @@ -1,14 +0,0 @@ -#define COMPONENT common -#include "\z\afwg\addons\main\script_mod.hpp" - -// #define DEBUG_MODE_FULL -// #define DISABLE_COMPILE_CACHE - -#ifdef DEBUG_ENABLED_COMMON - #define DEBUG_MODE_FULL -#endif - #ifdef DEBUG_SETTINGS_COMMON - #define DEBUG_SETTINGS DEBUG_SETTINGS_COMMON -#endif - -#include "\z\afwg\addons\main\script_macros.hpp" diff --git a/addons/_keyHandlers/stringtable.xml b/addons/_keyHandlers/stringtable.xml deleted file mode 100644 index 2b43f32..0000000 --- a/addons/_keyHandlers/stringtable.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - ArmaForces Wargame - Common - ArmaForces Wargame - Common - - - Enable component - Włącz komponent - - - Controls whether this component is active. - Pozwala kontrolować czy komponent jest włączony. - - - diff --git a/addons/_settings/$PBOPREFIX$ b/addons/_settings/$PBOPREFIX$ deleted file mode 100644 index abfafb6..0000000 --- a/addons/_settings/$PBOPREFIX$ +++ /dev/null @@ -1 +0,0 @@ -z\afwg\addons\common \ No newline at end of file diff --git a/addons/_settings/CfgEventHandlers.hpp b/addons/_settings/CfgEventHandlers.hpp deleted file mode 100644 index 2a3f71f..0000000 --- a/addons/_settings/CfgEventHandlers.hpp +++ /dev/null @@ -1,15 +0,0 @@ -class Extended_PreStart_EventHandlers { - class ADDON { - init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); - }; -}; -class Extended_PreInit_EventHandlers { - class ADDON { - init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); - }; -}; -class Extended_PostInit_EventHandlers { - class ADDON { - init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); - }; -}; diff --git a/addons/_settings/XEH_PREP.hpp b/addons/_settings/XEH_PREP.hpp deleted file mode 100644 index 57454c8..0000000 --- a/addons/_settings/XEH_PREP.hpp +++ /dev/null @@ -1,2 +0,0 @@ -PREP(initClientSettings); -PREP(initGlobalSettings); diff --git a/addons/_settings/XEH_postInit.sqf b/addons/_settings/XEH_postInit.sqf deleted file mode 100644 index 421c54b..0000000 --- a/addons/_settings/XEH_postInit.sqf +++ /dev/null @@ -1 +0,0 @@ -#include "script_component.hpp" diff --git a/addons/_settings/XEH_preInit.sqf b/addons/_settings/XEH_preInit.sqf deleted file mode 100644 index 81fa580..0000000 --- a/addons/_settings/XEH_preInit.sqf +++ /dev/null @@ -1,12 +0,0 @@ -#include "script_component.hpp" -ADDON = false; - -PREP_RECOMPILE_START; -#include "XEH_PREP.hpp" -PREP_RECOMPILE_END; - -// TODO: Consider spliting settings per component and dropping `settings` component entirely -call FUNC(initClientSettings); -call FUNC(initGlobalSettings); - -ADDON = true; diff --git a/addons/_settings/XEH_preStart.sqf b/addons/_settings/XEH_preStart.sqf deleted file mode 100644 index a51262a..0000000 --- a/addons/_settings/XEH_preStart.sqf +++ /dev/null @@ -1,2 +0,0 @@ -#include "script_component.hpp" -#include "XEH_PREP.hpp" diff --git a/addons/_settings/config.cpp b/addons/_settings/config.cpp deleted file mode 100644 index d821136..0000000 --- a/addons/_settings/config.cpp +++ /dev/null @@ -1,17 +0,0 @@ -#include "script_component.hpp" - -class CfgPatches { - class ADDON { - name = COMPONENT_NAME; - units[] = {}; - weapons[] = {}; - requiredVersion = REQUIRED_VERSION; - requiredAddons[] = { - "afwg_main" - }; - author = "ArmaForces"; - VERSION_CONFIG; - }; -}; - -#include "CfgEventHandlers.hpp" diff --git a/addons/_settings/functions/fn_initGlobalSettings.sqf b/addons/_settings/functions/fn_initGlobalSettings.sqf deleted file mode 100644 index 5422601..0000000 --- a/addons/_settings/functions/fn_initGlobalSettings.sqf +++ /dev/null @@ -1,66 +0,0 @@ -#include "..\script_component.hpp" -/* - * Author: 3Mydlo3, veteran29 - * Initializes global scenario settings. - * - * Arguments: - * None - * - * Return Value: - * None - * - * Public: No - */ - -[ - QGVAR(unitIconMode), - "LIST", - ["Unit icon mode", ""], - [LSTRING(Settings_DisplayName), LSTRING(UnitIcons)], - [[0, 1], ["All", "Enemy only"]], - true -] call CBA_fnc_addSetting; - -[ - QGVAR(enemyMarkersEnabled), - "CHECKBOX", - ["Enable map markers enemies", "If enabled, map markers will be show for spotted enemy units (icons might look different on map vs in-game)."], - [LSTRING(Settings_DisplayName), LSTRING(UnitIcons)], - true, - true -] call CBA_fnc_addSetting; - -[ - QGVAR(enemyMarkersRefreshRate), - "TIME", - ["Refresh rate for enemy markers", "Controls how often map markers for enemies should refresh."], - [LSTRING(Settings_DisplayName), LSTRING(UnitIcons)], - [0, 60, 5], - true -] call CBA_fnc_addSetting; - -[ - QGVAR(onlyReconCanSpot), - "CHECKBOX", - ["Only recon can spot", "If enabled, only recon units can spot enemies to be visible for other units"], - [LSTRING(Settings_DisplayName)], - false, - true -] call CBA_fnc_addSetting; - -[ - QGVAR(repairMinNoCombatTime), - "TIME", - ["Minimum no combat time", "Vehicle must be out of combat for long enough to be able to be repaired"], - [LSTRING(Settings_DisplayName), localize "str_state_repair"], - [0, 900, 60], - true -] call CBA_fnc_addSetting; - -GVAR(iconWidth) = getNumber (configFile >> "CfgInGameUI" >> "Cursor" >> "activeWidth"); -GVAR(westIconColor) = getArray (missionConfigFile >> "CfgWargay" >> "westMarkerColor"); -GVAR(westAiIconColor) = getArray (missionConfigFile >> "CfgWargay" >> "westAiMarkerColor"); -GVAR(eastIconColor) = getArray (missionConfigFile >> "CfgWargay" >> "eastMarkerColor"); -GVAR(filledHpColor) = getArray (missionConfigFile >> "CfgWargay" >> "filledHpColor"); -GVAR(missingHpColor) = getArray (missionConfigFile >> "CfgWargay" >> "missingHpColor"); -GVAR(fuelConsumptionMultiplier) = 4; diff --git a/addons/_settings/functions/script_component.hpp b/addons/_settings/functions/script_component.hpp deleted file mode 100644 index 6686d96..0000000 --- a/addons/_settings/functions/script_component.hpp +++ /dev/null @@ -1 +0,0 @@ -#include "\z\afwg\addons\common\script_component.hpp" diff --git a/addons/_settings/stringtable.xml b/addons/_settings/stringtable.xml deleted file mode 100644 index 2b43f32..0000000 --- a/addons/_settings/stringtable.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - ArmaForces Wargame - Common - ArmaForces Wargame - Common - - - Enable component - Włącz komponent - - - Controls whether this component is active. - Pozwala kontrolować czy komponent jest włączony. - - - diff --git a/addons/common/CfgWargay.hpp b/addons/common/CfgWargay.hpp new file mode 100644 index 0000000..1142a7b --- /dev/null +++ b/addons/common/CfgWargay.hpp @@ -0,0 +1,1241 @@ +#define ARMOR(FRONT,SIDES,BACK,TOP) armor[] = { FRONT, SIDES, BACK, TOP } +#define VEHICLE(cost,vehicleClass,armorFront,armorSides,armorBack,armorTop) class vehicleClass \ + { \ + pointCost = cost;\ + hitpoints = 10;\ + ARMOR(armorFront,armorSides,armorBack,armorTop);\ + } +#define VEHICLE_RECON(cost,vehicleClass,armorFront,armorSides,armorBack,armorTop) class vehicleClass \ + { \ + pointCost = cost;\ + hitpoints = 10;\ + ARMOR(armorFront,armorSides,armorBack,armorTop);\ + isRecon = 1;\ + } +#define VEHICLE_LIKE(otherVehicleClass,vehicleClass) class vehicleClass : otherVehicleClass {} +#define HAS_PENETRATOR(penetratorClass) NO_DAMAGE \ + { \ + child = penetratorClass;\ + } + +// Icon macros +// TODO: Adjust paths for mod-based icons +#define ARMA_NATO_MARKERS_DIR \A3\ui_f\data\map\markers\nato +#define ANTIAIR_ICON QUOTE(ARMA_NATO_MARKERS_DIR\b_antiair.paa) +#define ANTIAIR_SPAAG_ICON __EVAL(getMissionPath "gui\markers\b_antiair_spaag.paa") +#define ANTIAIR_SPAAG_RADAR_ICON __EVAL(getMissionPath "gui\markers\b_antiair_spaag_radar.paa") +#define ANTITANK_ICON __EVAL(getMissionPath "gui\markers\b_antitank.paa") +#define ANTITANK_ARMOR_ICON __EVAL(getMissionPath "gui\markers\b_antitank_armor.paa") +#define ART_ICON QUOTE(ARMA_NATO_MARKERS_DIR\b_art.paa) +#define ART_ROCKET_ICON __EVAL(getMissionPath "gui\markers\b_art_rocket.paa") +#define ARMOR_ICON QUOTE(ARMA_NATO_MARKERS_DIR\b_armor.paa) +#define CV_ARMOR_ICON __EVAL(getMissionPath "gui\markers\b_cv_armor.paa") +#define CV_ICON __EVAL(getMissionPath "gui\markers\b_cv.paa") +#define HELI_ICON QUOTE(ARMA_NATO_MARKERS_DIR\b_air.paa) +#define LOG_ARMOR_ICON QUOTE(ARMA_NATO_MARKERS_DIR\b_support.paa) +#define LOG_ICON QUOTE(ARMA_NATO_MARKERS_DIR\b_support.paa) +#define MECH_INF_ICON QUOTE(ARMA_NATO_MARKERS_DIR\b_mech_inf.paa) +#define MECH_INF_ARMED_ICON __EVAL(getMissionPath "gui\markers\b_mech_inf_armed.paa") +#define MOTOR_INF_ICON QUOTE(ARMA_NATO_MARKERS_DIR\b_motor_inf.paa) +#define PLANE_ICON QUOTE(ARMA_NATO_MARKERS_DIR\b_air.paa) +#define RECON_AIR_ICON __EVAL(getMissionPath "gui\markers\b_recon_air.paa") +#define RECON_ANTITANK_ICON __EVAL(getMissionPath "gui\markers\b_recon_antitank.paa") +#define RECON_ARMOR_ICON __EVAL(getMissionPath "gui\markers\b_recon_armor.paa") +// TODO: Add missing icons + +class CfgWargay +{ + westMarkerColor[] = { + __EVAL(96/255), + __EVAL(159/255), + __EVAL(197/255), + 0.85 + }; + westAiMarkerColor[] = { + __EVAL(29/255), + __EVAL(197/255), + __EVAL(46/255), + 0.85 + }; + eastMarkerColor[] = { + __EVAL(192/255), + __EVAL(29/255), + __EVAL(46/255), + 0.85 + }; + filledHpColor[] = { + __EVAL(117/255), + 1, + 1, + 1 + }; + missingHpColor[] = { + __EVAL(117/255), + __EVAL(117/255), + __EVAL(117/255), + 1 + }; + + class Ammo + { + class NO_DAMAGE + { + damage = 0; + type = "NONE"; + }; + + /* Base */ + class AA_HE + { + damage = 1; + type = "HE"; + }; + class SMALL_ARMS + { + damage = 0.1; + type = "AP"; + }; + class HMG_HE : AA_HE {}; + class HMG_AP + { + damage = 1; + type = "AP"; + }; + class Small_HE + { + damage = 2; + type = "HE"; + }; + class Tank_HE + { + damage = 3; + type = "HE"; + }; + + /* ACE Fragmentation */ + class ace_frag_tiny + { + damage = 0.1; + type = "HE"; + }; + class ace_frag_tiny_HD : ace_frag_tiny {}; + class ace_frag_small + { + damage = 0.2; + type = "HE"; + }; + class ace_frag_small_HD : ace_frag_small {}; + class ace_frag_medium + { + damage = 0.5; + type = "HE"; + }; + class ace_frag_medium_HD : ace_frag_medium {}; + class ace_frag_large + { + damage = 1; + type = "HE"; + }; + class ace_frag_large_HD : ace_frag_large {}; + class ace_frag_huge + { + damage = 2; + type = "HE"; + }; + class ace_frag_huge_HD : ace_frag_huge {}; + + class ACE_ammoExplosionLarge + { + damage = 4; + type = "HE"; + }; + + /* + USA + */ + class CUP_R_70mm_Hydra_HE + { + damage = 2; + type = "HE"; + }; + class CUP_B_20mm_AP_Tracer_Red + { + damage = 2; + type = "AP"; + }; + class CUP_R_TOW_AT + { + damage = 20; + type = "HEAT"; + }; + + class CUP_Sh_105mm_M900 + { + damage = 13; + type = "AP"; + }; + class CUP_Sh_105mm_M456A2 : HAS_PENETRATOR(CUP_P_105mm_M393A3); + class CUP_P_105mm_M393A3 + { + damage = 13; + type = "HEAT"; + }; + class CUP_P_120mm_HESH + { + damage = 3; + type = "HE"; + }; + + class CUP_B_20mm_API_Tracer_Red : AA_HE {}; + + class CUP_B_127x99_Ball_Red_Tracer : SMALL_ARMS {}; + class B_127x107_Ball : SMALL_ARMS {}; + class B_762x51_Tracer_Red : SMALL_ARMS {}; + + /* + Western Germany + */ + // LARS-2 + class gm_rocket_mlrs_110mm_he_dm21 : HAS_PENETRATOR(gm_warhead_mlrs_110mm_he_dm21); + class gm_warhead_mlrs_110mm_he_dm21 + { + damage = 7; + type = "HE"; + }; + + class gm_rocket_mlrs_110mm_icm_dm602 : HAS_PENETRATOR(gm_penetrator_m77); + class gm_penetrator_m77 + { + damage = 6; + type = "HEAT"; + }; + + // M-109G + class gm_shell_155mm_he_dm21 : HAS_PENETRATOR(gm_warhead_155mm_he_dm21); + class gm_warhead_155mm_he_dm21 + { + damage = 7; + type = "HE"; + }; + + class gm_shell_155mm_icm_602 : HAS_PENETRATOR(gm_warhead_155mm_icm_602); + class gm_warhead_155mm_icm_602 + { + damage = 6; + type = "HEAT"; + }; + + // Flakpanzer Gepard 1A1 + class gm_bullet_35x228mm_hei_t_DM21 : AA_HE {}; + class gm_bullet_35x228mm_hvapds_t_DM23 : AA_HE {}; + + // Luchs & Marder 1 + class gm_bullet_20x139mm_hei_t_dm81 : HMG_HE {}; + class gm_bullet_20x139mm_apds_t_dm63 + { + damage = 2; + type = "AP"; + }; + + /* Leopard 1 family */ + class gm_shell_105x617mm_apds_t_dm13 + { + damage = 11; + type = "AP"; + }; + + class gm_shell_105x617mm_heat_mp_t_dm12 : HAS_PENETRATOR(gm_penetrator_105x617mm_heat_dm12); + class gm_penetrator_105x617mm_heat_dm12 + { + damage = 11; + type = "HEAT"; + }; + + class gm_shell_105x617mm_apfsds_t_dm23 : gm_shell_105x617mm_apds_t_dm13 {}; + + // Leopard 1A3/4 + class gm_shell_105x617mm_apfsds_t_dm33 + { + damage = 12; + type = "AP"; + }; + + // Leopard 1A5 + class gm_shell_105x617mm_apfsds_t_dm63 + { + damage = 16; + type = "AP"; + }; + + // Milan + class gm_missile_milan_heat_dm92 : HAS_PENETRATOR(gm_penetrator_milan_HEAT_dm92); + class gm_penetrator_milan_HEAT_dm82 + { + damage = 17; + type = "HEAT"; + }; + class gm_penetrator_milan_HEAT_dm92 : gm_penetrator_milan_HEAT_dm82 {}; + + // Hot 1 & 2 + class gm_missile_hot_heat_dm72 : HAS_PENETRATOR(gm_penetrator_hot_HEAT_dm72); + class gm_missile_hot_heat_dm102 : HAS_PENETRATOR(gm_penetrator_hot_HEAT_dm102); + class gm_penetrator_hot_HEAT_dm72 + { + damage = 22; + type = "HEAT"; + }; + class gm_penetrator_hot_HEAT_dm102 + { + damage = 25; + type = "HEAT"; + }; + + // PzF 44 + class gm_rocket_44x537mm_HEAT_dm32 : HAS_PENETRATOR(gm_penetrator_44x537mm_HEAT_dm32); + class gm_penetrator_44x537mm_HEAT_dm32 + { + damage = 16; + type = "HEAT"; + }; + + // PzF 3 + class gm_rocket_60mm_HEAT_dm12 : HAS_PENETRATOR(gm_penetrator_60mm_HEAT_dm12); + class gm_rocket_60mm_HEAT_dm22 : HAS_PENETRATOR(gm_penetrator_60mm_HEAT_dm22); + class gm_rocket_60mm_HEAT_dm32 : HAS_PENETRATOR(gm_penetrator_60mm_HEAT_dm32); + class gm_penetrator_60mm_HEAT_dm12 + { + damage = 24; + type = "HEAT"; + }; + class gm_penetrator_60mm_HEAT_dm22 : gm_penetrator_60mm_HEAT_dm12 + { + damage = 26; + }; + class gm_penetrator_60mm_HEAT_dm32 : gm_penetrator_60mm_HEAT_dm12 + { + damage = 28; + }; + + // PzF 84 (Carl Gustav M2) + class gm_rocket_84x245mm_HEAT_T_DM12 : HAS_PENETRATOR(gm_penetrator_84x245mm_HEAT_DM12); + class gm_rocket_84x245mm_HEAT_T_DM12A1 : HAS_PENETRATOR(gm_penetrator_84x245mm_HEAT_DM12A1); + class gm_rocket_84x245mm_HEAT_T_DM22 : HAS_PENETRATOR(gm_penetrator_84x245mm_HEAT_DM22); + class gm_rocket_84x245mm_HEAT_T_DM32 : HAS_PENETRATOR(gm_penetrator_84x245mm_HEAT_DM32); + + class gm_penetrator_84x245mm_HEAT_DM12 + { + damage = 18; + type = "HEAT"; + }; + class gm_penetrator_84x245mm_HEAT_DM12A1 : gm_penetrator_84x245mm_HEAT_DM12 {}; + class gm_penetrator_84x245mm_HEAT_DM22 : gm_penetrator_84x245mm_HEAT_DM12 + { + damage = 20; + }; + class gm_penetrator_84x245mm_HEAT_DM32 : gm_penetrator_84x245mm_HEAT_DM12 + { + damage = 22; + }; + + // M72A3 LAW + class gm_rocket_66mm_HEAT_m72a3 : HAS_PENETRATOR(gm_penetrator_66mm_HEAT_m72a3); + + class gm_penetrator_66mm_HEAT_m72a3 + { + damage = 13; + type = "HEAT"; + }; + + // FIM-43 (Redeye) + class gm_rocket_70mm_HE_m585 + { + damage = 3; + type = "HE"; + }; + + /* + Eastern Germany + */ + + /* PT-76B */ + class gm_shell_76x385mm_he_of350 : Small_HE {}; + class gm_shell_76x385mm_HVAP_T_br354p + { + damage = 10; + type = "AP"; + }; + class gm_shell_76x385mm_HEAT_T_bk350m + { + damage = 10; + type = "HEAT"; + }; + + /* T-55 family */ + class gm_shell_100x695mm_apfsds_t_bm8 + { + damage = 11; + type = "AP"; + }; + + class gm_shell_100x695mm_he_of412 : Tank_HE {}; + + // T-55A + class gm_shell_100x695mm_heat_t_bk5m : HAS_PENETRATOR(gm_penetrator_100x695mm_HEAT_T_bk5m); + class gm_penetrator_100x695mm_HEAT_T_bk5m + { + damage = 11; + type = "HEAT"; + }; + + class gm_shell_100x695mm_apfsds_t_bm20 + { + damage = 11; + type = "AP"; + }; + + // T-55AK/T-55AM2/T-55AM2B + class gm_shell_100x695mm_apfsds_t_bm25 + { + damage = 15; + type = "AP"; + }; + + // ZSU-23-4 + class gm_bullet_23x152mm_hei_t_ofzt : AA_HE {}; + class gm_bullet_23x152mm_api_t_bzt : gm_bullet_23x152mm_hei_t_ofzt {}; + + // SFL 2S1 + class gm_shell_122x447mm_he_of462 : HAS_PENETRATOR(gm_warhead_122x447mm_he_of462); + class gm_warhead_122x447mm_he_of462 + { + damage = 6; + type = "HE"; + }; + + class gm_shell_122x447mm_heat_t_bk13 : HAS_PENETRATOR(gm_penetrator_122x447mm_heat_t_bk13); + class gm_penetrator_122x447mm_heat_bk6m + { + damage = 9; + type = "HEAT"; + }; + class gm_penetrator_122x447mm_heat_t_bk13 : gm_penetrator_122x447mm_heat_bk6m {}; + + // BM-21 + class gm_rocket_mlrs_122mm_he_9m22u : HAS_PENETRATOR(gm_warhead_122mm_he_9m22u); + class gm_warhead_122mm_he_9m22u + { + damage = 7; + type = "HE"; + }; + + class gm_rocket_mlrs_122mm_icm_9m218 : HAS_PENETRATOR(gm_penetrator_3b30); + class gm_penetrator_3b30 + { + damage = 5; + type = "HEAT"; + }; + + // 2P16 + class gm_rocket_luna_he_3r9 + { + damage = 15; + type = "HE"; + }; + + // BMP-1 & SPG-9 + class gm_shell_73mm_heat_pg15v + { + damage = 12; + type = "HEAT"; + }; + class gm_shell_73mm_he_og15v : Small_HE {}; + + class gm_missile_maljutka_heat_9m14m : HAS_PENETRATOR(gm_penetrator_maljutka_HEAT_9m14m); + class gm_penetrator_maljutka_HEAT_9m14 + { + damage = 15; + type = "HEAT"; + }; + class gm_penetrator_maljutka_HEAT_9m14m : gm_penetrator_maljutka_HEAT_9m14 {}; + + // SPW-60PB + class gm_bullet_145x114mm_AP_B32 : HMG_AP {}; + class gm_bullet_145x114mm_HEI_T_MDZ : HMG_HE {}; + + // Fagot + class gm_missile_fagot_heat_9m111 : HAS_PENETRATOR(gm_penetrator_fagot_HEAT_9m111); + class gm_penetrator_fagot_HEAT_9m111 + { + damage = 16; + type = "HEAT"; + }; + + + class gm_rocket_40mm_HEAT_pg7v : HAS_PENETRATOR(gm_penetrator_40mm_HEAT_pg7v); + class gm_penetrator_40mm_HEAT_pg7v + { + damage = 14; + type = "HEAT"; + }; + + class gm_rocket_40mm_HEAT_pg7v1 : HAS_PENETRATOR(gm_penetrator_40mm_HEAT_pg7v1); + class gm_penetrator_40mm_HEAT_pg7v1 + { + damage = 17; + type = "HEAT"; + }; + + class gm_rocket_55mm_HE_s5 + { + damage = 1; + type = "HE"; + }; + + class gm_rocket_55mm_heat_s5k : HAS_PENETRATOR(gm_penetrator_55mm_heat_s5k); + class gm_penetrator_55mm_heat_s5k + { + damage = 2; + type = "HEAT"; + }; + + class gm_rocket_64mm_HEAT_pg18 : HAS_PENETRATOR(gm_penetrator_64mm_HEAT_pg18); + class gm_penetrator_64mm_HEAT_pg18 + { + damage = 15; + type = "HEAT"; + }; + + // Strela-2 + class gm_rocket_72mm_HE_9m32m : gm_rocket_70mm_HE_m585 {}; + + // DShKM + class gm_bullet_127x108mm_API_T_BZT : SMALL_ARMS {}; + + /* + Soviet Union + */ + class ammo_Missile_AA_R77 + { + damage = 5; + type = "HE"; + }; + class CUP_M_9M119M_Refleks_AT11_Sniper_AT + { + damage = 20; + type = "HEAT"; + }; + class CUP_B_30mm_CAS_Red_Tracer : AA_HE {}; + class CUP_B_23mm_APHE_Tracer_Green : AA_HE {}; + class cwr3_b_30mm_nr30_hedp_tracer_red : AA_HE {}; + class Rocket_03_HE_F + { + damage = 2; + type = "HE"; + }; + class Rocket_03_AP_F + { + damage = 2; + type = "HEAT"; + }; + + class Sh_125mm_APFSDS_T_Green + { + damage = 16; + type = "AP"; + }; + class Sh_125mm_HE_T_Green + { + damage = 4; + type = "HE"; + }; + + /* + Military Aviation + */ + class B_20mm_Tracer_Red : AA_HE {}; + class sab_milavi_27mm_he_ammo : AA_HE {}; + class sab_milavi_rkt_hydra_ammo + { + damage = 3; + type = "HE"; + }; + class sab_milavi_rkt_zuni_ammo + { + damage = 4; + type = "HE"; + }; + class sab_milavi_bmb_mk82_ammo + { + damage = 10; + type = "HE"; + }; + class sab_milavi_bomblets_he_subammo + { + damage = 1; + type = "HE"; + }; + class sab_milavi_msl_maverick_ammo + { + damage = 26; + type = "HEAT"; + }; + }; + + class Vehicles + { + /* + USA + */ + + // LOG + class CUP_M113New_HQ_Base + { + pointCost = 120; + hitpoints = 10; + ARMOR(2,2,1,1); + iconPath = CV_ARMOR_ICON; + markerType = "b_hq"; + isCommandVehicle = 1; + }; + class Truck_01_base_F // HEMTT + { + pointCost = 40; + hitpoints = 10; + ARMOR(1,1,1,0); + iconPath = LOG_ICON; + markerType = "b_support"; + isLogistics = 1; + }; + + // SUP + class CUP_M163New_Base + { + pointCost = 40; + hitpoints = 10; + ARMOR(1,1,1,1); + iconPath = ANTIAIR_SPAAG_RADAR_ICON; + markerType = "b_antiair"; + }; + + // TNK + class CUP_M60A3_Base + { + pointCost = 50; + hitpoints = 10; + ARMOR(10,5,2,2); + iconPath = ARMOR_ICON; + markerType = "b_armor"; + }; + + // VEH + class cwr3_m901_itv_base + { + pointCost = 40; + hitpoints = 10; + ARMOR(2,2,1,1); + iconPath = ANTITANK_ICON; + markerType = "b_motor_inf"; + }; + + class CUP_nM1036_TOW_Base + { + pointCost = 40; + hitpoints = 10; + ARMOR(0,0,0,0); + iconPath = ANTITANK_ICON; + markerType = "b_motor_inf"; + }; + + // HEL + class cwr3_ah1f_base + { + pointCost = 80; + hitpoints = 10; // Should be 6 according to Wargay + ARMOR(0,0,0,0); + iconPath = HELI_ICON; + markerType = "b_air"; + }; + + // PLA + class sab_f104_base + { + pointCost = 70; + hitpoints = 10; + ARMOR(0,0,0,0); + iconPath = PLANE_ICON; + markerType = "b_air"; + }; + + /* + West Germany + */ + + // LOG + class gm_ge_army_m113a1g_command + { + pointCost = 105; + hitpoints = 10; + ARMOR(1,1,1,1); + iconPath = CV_ARMOR_ICON; + markerType = "b_hq"; + isCommandVehicle = 1; + }; + class gm_iltis_cargo_base + { + pointCost = 110; + hitpoints = 5; + ARMOR(0,0,0,0); + iconPath = CV_ICON; + markerType = "b_hq"; + isCommandVehicle = 1; + }; + class gm_fuchsa0_command_base + { + pointCost = 120; + hitpoints = 10; + ARMOR(1,1,1,1); + iconPath = CV_ARMOR_ICON; + markerType = "b_hq"; + isCommandVehicle = 1; + }; + + class gm_kat1_451_reammo_base + { + pointCost = 30; + hitpoints = 10; + ARMOR(0,0,0,0); + iconPath = LOG_ICON; + markerType = "b_support"; + isLogistics = 1; + }; + VEHICLE_LIKE(gm_kat1_451_reammo_base,gm_kat1_451_refuel_base); + VEHICLE_LIKE(gm_kat1_451_reammo_base,gm_kat1_451_container_base); + class gm_kat1_452_container_base : gm_kat1_451_reammo_base + { + pointCost = 35; + }; + class gm_kat1_454_cargo_base : gm_kat1_451_reammo_base + { + pointCost = 40; + }; + class gm_u1300l_repair_base : gm_kat1_451_reammo_base + { + pointCost = 10; + hitpoints = 5; + }; + VEHICLE_LIKE(gm_u1300l_repair_base,gm_u1300l_container_base); + VEHICLE_LIKE(gm_u1300l_repair_base,gm_u1300l_medic_base); + + // TNK + class gm_Leopard1_base + { + pointCost = 30; + hitpoints = 10; + ARMOR(6,2,2,1); + iconPath = ARMOR_ICON; + markerType = "b_armor"; + }; + VEHICLE_LIKE(gm_Leopard1_base,gm_Leopard1a1_base); // 1A1 should be recon with 5/2/2/1 + + class gm_BPz2_base : gm_Leopard1_base + { + pointCost = 40; + iconPath = LOG_ARMOR_ICON; + markerType = "b_support"; + isLogistics = 1; + }; + class gm_Leopard1a3_base + { + pointCost = 40; + hitpoints = 10; + ARMOR(8,3,2,2); + iconPath = ARMOR_ICON; + markerType = "b_armor"; + }; + class gm_leopard1a5_base + { + pointCost = 65; + hitpoints = 10; + ARMOR(10,3,2,2); + iconPath = ARMOR_ICON; + markerType = "b_armor"; + }; + + // SUP + class gm_Gepard1a1_base + { + pointCost = 55; + hitpoints = 10; + ARMOR(3,2,2,1); + iconPath = ANTIAIR_SPAAG_RADAR_ICON; + markerType = "b_antiair"; + }; + class gm_m109g_base + { + pointCost = 50; + hitpoints = 10; + ARMOR(2,1,1,1); + iconPath = ART_ICON; + markerType = "b_art"; + }; + class gm_kat1_463_mlrs_base + { + pointCost = 70; + hitpoints = 10; + ARMOR(0,0,0,0); + iconPath = ART_ROCKET_ICON; + markerType = "b_art"; + }; + + // VEH + class gm_iltis_base + { + pointCost = 5; + hitpoints = 5; + ARMOR(0,0,0,0); + iconPath = MOTOR_INF_ICON; + markerType = "b_motor_inf"; + }; + class gm_iltis_milan_base : gm_iltis_base + { + pointCost = 20; + iconPath = ANTITANK_ICON; + markerType = "b_motor_inf"; + }; + class gm_kat1_base + { + pointCost = 5; + hitpoints = 10; + ARMOR(0,0,0,0); + iconPath = MOTOR_INF_ICON; + markerType = "b_motor_inf"; + }; + class gm_u1300l_base : gm_kat1_base + { + hitpoints = 5; + }; + + class gm_marder1_base + { + pointCost = 15; + hitpoints = 10; + ARMOR(4,2,1,1); + iconPath = MECH_INF_ARMED_ICON; + markerType = "b_mech_inf"; + }; + class gm_marder1a1plus_base : gm_marder1_base + { + pointCost = 15; + ARMOR(4,2,2,1); + }; + class gm_marder1a2_base : gm_marder1_base + { + pointCost = 20; + ARMOR(5,3,2,2); + }; + class gm_m113_base + { + pointCost = 5; + hitpoints = 10; + ARMOR(1,1,1,1); + iconPath = MECH_INF_ICON; + markerType = "b_mech_inf"; + }; + class gm_m113a1g_apc_milan_base : gm_m113_base + { + pointCost = 20; + iconPath = ANTITANK_ARMOR_ICON; + markerType = "b_mech_inf"; + }; + class gm_m113a1g_medic_base : gm_m113_base + { + pointCost = 15; + iconPath = LOG_ARMOR_ICON; + markerType = "b_med"; + isLogistics = 1; + }; + class gm_fuchs_base : gm_m113_base + { + iconPath = MOTOR_INF_ICON; + markerType = "b_motor_inf"; + }; + class gm_fuchsa0_engineer_base : gm_fuchs_base + { + pointCost = 20; + iconPath = LOG_ARMOR_ICON; + markerType = "b_support"; + isLogistics = 1; + }; + + // REC + class gm_iltis_mg3_base : gm_iltis_base + { + pointCost = 25; + iconPath = RECON_ICON; + markerType = "b_recon"; + isRecon = 1; + }; + class gm_luchs_base + { + pointCost = 25; + hitpoints = 10; + ARMOR(2,1,1,1); + iconPath = RECON_ARMOR_ICON; + markerType = "b_recon"; + isRecon = 1; + }; + class gm_fuchsa0_reconnaissance_base : gm_luchs_base + { + pointCost = 10; + ARMOR(1,1,1,1); + iconPath = RECON_ANTITANK_ICON; + markerType = "b_recon"; + }; + class gm_bo105m_base + { + pointCost = 45; + hitpoints = 10; // Should be 4 according to Wargay + ARMOR(0,0,0,0); + iconPath = RECON_AIR_ICON; + markerType = "b_air"; + isRecon = 1; + }; + + // HEL + class gm_bo105p_base + { + pointCost = 50; + hitpoints = 10; // Should be 4 according to Wargay + ARMOR(0,0,0,0); + iconPath = HELI_ICON; + markerType = "b_air"; + }; + class gm_bo105p_pah1a1_base : gm_bo105p_base + { + pointCost = 60; + }; + class gm_ch53_base + { + pointCost = 20; + hitpoints = 10; + ARMOR(0,0,0,0); + iconPath = HELI_ICON; // TODO: Consider Heli cargo vs heli attack icon + markerType = "b_air"; + }; + + // PLA + class sab_alphajet_base + { + pointCost = 50; + hitpoints = 10; + ARMOR(0,0,0,0); + iconPath = PLANE_ICON; + markerType = "b_air"; + }; + + /* + East Germany + */ + + // LOG + class gm_uaz469_cargo_base + { + pointCost = 100; + hitpoints = 5; + ARMOR(0,0,0,0); + iconPath = CV_ICON; + markerType = "b_hq"; + isCommandVehicle = 1; + }; + class gm_btr60pu12_base + { + pointCost = 110; + hitpoints = 10; + ARMOR(1,1,1,1); + iconPath = CV_ARMOR_ICON; + markerType = "b_hq"; + isCommandVehicle = 1; + }; + class gm_brdm2um_base + { + pointCost = 120; + hitpoints = 10; + ARMOR(1,1,1,1); + iconPath = CV_ARMOR_ICON; + markerType = "b_hq"; + isCommandVehicle = 1; + }; + class gm_t55ak_base + { + pointCost = 120; + hitpoints = 10; + ARMOR(7,3,2,1); + iconPath = CV_ARMOR_ICON; + markerType = "b_hq"; + isCommandVehicle = 1; + }; + class gm_ural4320_repair_base + { + pointCost = 20; + hitpoints = 5; + ARMOR(0,0,0,0); + iconPath = LOG_ICON; + markerType = "b_support"; + isLogistics = 1; + }; + VEHICLE_LIKE(gm_ural4320_repair_base,gm_ural4320_reammo_base); + class gm_ural375d_refuel_base : gm_ural4320_repair_base + { + pointCost = 15; + }; + VEHICLE_LIKE(gm_ural375d_refuel_base,gm_ural375d_medic_base); + + // SUP + class gm_zsu234_base + { + pointCost = 35; + hitpoints = 10; + ARMOR(1,1,1,1); + iconPath = ANTIAIR_SPAAG_RADAR_ICON; + markerType = "b_antiair"; + }; + class gm_2s1_base + { + pointCost = 55; + hitpoints = 10; + ARMOR(1,1,1,1); + iconPath = ART_ICON; + markerType = "b_art"; + }; + class gm_2p16_base + { + pointCost = 130; + hitpoints = 10; + ARMOR(1,1,1,1); + iconPath = ART_ROCKET_ICON; + markerType = "b_art"; + }; + class gm_ural375d_mlrs_base + { + pointCost = 65; + hitpoints = 5; + ARMOR(0,0,0,0); + iconPath = ART_ROCKET_ICON; + markerType = "b_art"; + }; + + // TNK + class gm_t55_base + { + pointCost = 25; + hitpoints = 10; + ARMOR(7,3,2,1); + iconPath = ARMOR_ICON; + markerType = "b_armor"; + }; + VEHICLE_LIKE(gm_t55_base,gm_t55a_base); + class gm_t55am2_base : gm_t55_base + { + pointCost = 50; + ARMOR(10,4,2,2); + }; + class gm_t55am2b_base + { + pointCost = 55; + ARMOR(10,5,2,2); + }; + + // VEH + class gm_ural4320_base + { + pointCost = 5; + hitpoints = 5; + ARMOR(0,0,0,0); + iconPath = MOTOR_INF_ICON; + markerType = "b_motor_inf"; + }; + class gm_uaz469_base + { + pointCost = 5; + hitpoints = 5; + ARMOR(0,0,0,0); + iconPath = MOTOR_INF_ICON; + markerType = "b_motor_inf"; + }; + class gm_uaz469_spg9_base : gm_uaz469_base + { + pointCost = 10; + iconPath = ANTITANK_ICON; + markerType = "b_motor_inf"; + }; + class gm_bmp1_base + { + pointCost = 10; + hitpoints = 10; + ARMOR(1,1,1,1); + iconPath = MECH_INF_ARMED_ICON; + markerType = "b_mech_inf"; + }; + class gm_btr60_base + { + pointCost = 10; + hitpoints = 10; + ARMOR(1,1,1,1); + iconPath = MOTOR_INF_ICON; + markerType = "b_motor_inf"; + }; + class gm_btr60pb_base : gm_btr60_base + { + pointCost = 15; + iconPath = MECH_INF_ARMED_ICON;// TODO: Consider MOTOR_INF_ARMED_ICON; + markerType = "b_mech_inf"; + }; + + // REC + class gm_pt76_base + { + pointCost = 15; + hitpoints = 10; + ARMOR(2,1,1,1); + iconPath = RECON_ARMOR_ICON; + markerType = "b_recon"; + isRecon = 1; + }; + class gm_brdm2_base + { + pointCost = 15; + hitpoints = 10; + ARMOR(1,1,1,1); + iconPath = RECON_ARMOR_ICON; + markerType = "b_recon"; + isRecon = 1; + }; + class gm_mi2p_base + { + pointCost = 40; + hitpoints = 10; // Should be 4 according to Wargay + ARMOR(0,0,0,0); + iconPath = RECON_AIR_ICON; + markerType = "b_air"; + isRecon = 1; + }; + + // HEL + class gm_mi2_base + { + pointCost = 10; + hitpoints = 10; // Should be 4 according to Wargay + ARMOR(0,0,0,0); + iconPath = HELI_ICON; + markerType = "b_air"; + }; + class gm_mi2t_base : gm_mi2_base + { + pointCost = 15; + }; + class gm_mi2us_base : gm_mi2_base + { + pointCost = 20; + }; + class gm_mi2urn_base : gm_mi2_base + { + pointCost = 30; + }; + + /* + Soviet Union + */ + + // SUP + class cwr3_mtlb_sa13_base + { + pointCost = 45; + hitpoints = 10; + ARMOR(1,1,1,1); + iconPath = ANTIAIR_ICON; + }; + + // TNK + class cwr3_t64b_base + { + pointCost = 65; + hitpoints = 10; + ARMOR(13,6,3,2); + iconPath = ARMOR_ICON; + markerType = "b_armor"; + }; + class cwr3_t72_base + { + pointCost = 40; + hitpoints = 10; + ARMOR(11,6,3,2); + iconPath = ARMOR_ICON; + markerType = "b_armor"; + }; + class cwr3_o_t72a : cwr3_t72_base + { + pointCost = 50; + ARMOR(13,7,3,2); + }; + class cwr3_o_t72b1 : cwr3_t72_base + { + pointCost = 85; + ARMOR(15,8,4,4); + // TODO: Ammo config + }; + + // HEL + class CUP_Mi24_D_Dynamic_Base + { + pointCost = 55; + hitpoints = 10; + ARMOR(1,1,0,0); + iconPath = HELI_ICON; + markerType = "b_air"; + }; + + // PLA + class cwr3_mig23_base + { + pointCost = 90; + hitpoints = 10; + ARMOR(0,0,0,0); + iconPath = PLANE_ICON; + markerType = "b_air"; + }; + class cwr3_mig27_base : cwr3_mig23_base + { + pointCost = 115; + }; + class cwr3_su17_base : cwr3_mig23_base + { + pointCost = 70; + }; + class cwr3_su25_base : cwr3_mig23_base + { + pointCost = 130; + }; + }; +}; + +// For future CSLA usage: +// ["CSLA_T72", [11, 6, 3, 2]]; +// ["CSLA_T72M", [12, 7, 3, 2]]; +// ["CSLA_T72M1", [14, 7, 3, 2]]; +// ["CSLA_BVP1", [3, 1, 1, 1]]; +// ["CSLA_BPzV", [3, 1, 1, 1]]; +// ["CSLA_DTP90", [3, 1, 1, 1]]; +// ["CSLA_MU90", [3, 1, 1, 1]]; +// ["CSLA_OZV90", [3, 1, 1, 1]]; +// ["CSLA_OT62", [2, 1, 1, 1]]; +// ["CSLA_OT64C", [1, 1, 1, 1]]; +// ["CSLA_OT64C_VB", [1, 1, 1, 1]]; +// ["CSLA_OT65A", [1, 1, 1, 1]]; +// ["AFMC_M1IP", [17, 7, 3, 3]]; +// ["AFMC_M1A1", [17, 7, 4, 3]]; +// ["AFMC_LAV25", [1, 1, 1, 1]]; +// ["AFMC_M113_AMB", [1, 1, 1, 1]]; +// ["AFMC_M113_DTP", [1, 1, 1, 1]]; +// ["AFMC_M113", [1, 1, 1, 1]]; +// ["AFMC_M163", [1, 1, 1, 1]]; +// ["AFMC_M270", [1, 0, 0, 0]]; diff --git a/addons/common/XEH_PREP.hpp b/addons/common/XEH_PREP.hpp index 86d4ff6..94ffac1 100644 --- a/addons/common/XEH_PREP.hpp +++ b/addons/common/XEH_PREP.hpp @@ -1,2 +1,9 @@ +PREP(createVehicleInfoForNonConfiguredVehicle); +PREP(currentHpString); +PREP(getAmmoInfo); PREP(getGroupVehicles); +PREP(getVehicleDisplayName); +PREP(getVehicleInfo); PREP(isEngineer); +PREP(isReconVehicle); +PREP(shouldStillBeVisible); diff --git a/addons/common/XEH_preInit.sqf b/addons/common/XEH_preInit.sqf index ecb5d0c..6706cf8 100644 --- a/addons/common/XEH_preInit.sqf +++ b/addons/common/XEH_preInit.sqf @@ -5,4 +5,6 @@ PREP_RECOMPILE_START; #include "XEH_PREP.hpp" PREP_RECOMPILE_END; +#include "initSettings.inc.sqf" + ADDON = true; diff --git a/addons/common/config.cpp b/addons/common/config.cpp index d821136..212e50f 100644 --- a/addons/common/config.cpp +++ b/addons/common/config.cpp @@ -15,3 +15,4 @@ class CfgPatches { }; #include "CfgEventHandlers.hpp" +#include "CfgWargay.hpp" diff --git a/addons/icons/functions/fn_createVehicleInfoForNonConfiguredVehicle.sqf b/addons/common/functions/fn_createVehicleInfoForNonConfiguredVehicle.sqf similarity index 95% rename from addons/icons/functions/fn_createVehicleInfoForNonConfiguredVehicle.sqf rename to addons/common/functions/fn_createVehicleInfoForNonConfiguredVehicle.sqf index a489594..8e612c1 100644 --- a/addons/icons/functions/fn_createVehicleInfoForNonConfiguredVehicle.sqf +++ b/addons/common/functions/fn_createVehicleInfoForNonConfiguredVehicle.sqf @@ -1,4 +1,4 @@ -#include "..\script_component.hpp" +#include "script_component.hpp" /* * Author: 3Mydlo3 * Creates configuration hashmap for given vehicle. diff --git a/addons/icons/functions/fn_currentHpString.sqf b/addons/common/functions/fn_currentHpString.sqf similarity index 95% rename from addons/icons/functions/fn_currentHpString.sqf rename to addons/common/functions/fn_currentHpString.sqf index eded43a..9072301 100644 --- a/addons/icons/functions/fn_currentHpString.sqf +++ b/addons/common/functions/fn_currentHpString.sqf @@ -1,4 +1,4 @@ -#include "..\script_component.hpp" +#include "script_component.hpp" /* * Author: 3Mydlo3, veteran29 * Returns the unit HP in [ ] string representation. diff --git a/addons/icons/functions/fn_getAmmoInfo.sqf b/addons/common/functions/fn_getAmmoInfo.sqf similarity index 99% rename from addons/icons/functions/fn_getAmmoInfo.sqf rename to addons/common/functions/fn_getAmmoInfo.sqf index 29cec6a..dd0e8e0 100644 --- a/addons/icons/functions/fn_getAmmoInfo.sqf +++ b/addons/common/functions/fn_getAmmoInfo.sqf @@ -1,4 +1,4 @@ -#include "..\script_component.hpp" +#include "script_component.hpp" /* * Author: 3Mydlo3 * Retrieves vehicle info hashmap for given unit or group (leader vehicle) if available. diff --git a/addons/icons/functions/fn_getVehicleDisplayName.sqf b/addons/common/functions/fn_getVehicleDisplayName.sqf similarity index 89% rename from addons/icons/functions/fn_getVehicleDisplayName.sqf rename to addons/common/functions/fn_getVehicleDisplayName.sqf index 31a3042..4f7847b 100644 --- a/addons/icons/functions/fn_getVehicleDisplayName.sqf +++ b/addons/common/functions/fn_getVehicleDisplayName.sqf @@ -1,4 +1,4 @@ -#include "..\script_component.hpp" +#include "script_component.hpp" /* * Author: 3Mydlo3, veteran29 * Returns displayNameShort for given vehicle type. @@ -15,7 +15,7 @@ params ["_vehicleOrInfo"]; if ( - _vehicleOrInfo isEqualType objNull + _vehicleOrInfo isEqualType objNull && {!(_vehicleOrInfo isKindOf "AllVehicles")} ) exitWith { "" }; diff --git a/addons/icons/functions/fn_getVehicleInfo.sqf b/addons/common/functions/fn_getVehicleInfo.sqf similarity index 98% rename from addons/icons/functions/fn_getVehicleInfo.sqf rename to addons/common/functions/fn_getVehicleInfo.sqf index 94e1676..a69b4d2 100644 --- a/addons/icons/functions/fn_getVehicleInfo.sqf +++ b/addons/common/functions/fn_getVehicleInfo.sqf @@ -1,4 +1,4 @@ -#include "..\script_component.hpp" +#include "script_component.hpp" /* * Author: 3Mydlo3 * Retrieves vehicle info hashmap for given unit or group (leader vehicle) if available. @@ -40,7 +40,7 @@ if (_vehicleInfo isEqualTo objNull) then { if (_vehicleInfo isNotEqualTo objNull) then { LOG_3("Found matching parent '%1' for '%2' with vehicle info: %3",_vehicleInfo get CLASS_NAME_PROPERTY,_unitClassName,str _vehicleInfo); - + // BUG:? It might replace value in original hashmap _vehicleInfo set [CLASS_NAME_PROPERTY, _unitClassName]; _vehicleInfo set [DISPLAY_NAME_PROPERTY, getText (configFile >> "CfgVehicles" >> _unitClassName >> DISPLAY_NAME_PROPERTY)]; diff --git a/addons/icons/functions/fn_isReconVehicle.sqf b/addons/common/functions/fn_isReconVehicle.sqf similarity index 90% rename from addons/icons/functions/fn_isReconVehicle.sqf rename to addons/common/functions/fn_isReconVehicle.sqf index 347300b..f21b7df 100644 --- a/addons/icons/functions/fn_isReconVehicle.sqf +++ b/addons/common/functions/fn_isReconVehicle.sqf @@ -1,4 +1,4 @@ -#include "..\script_component.hpp" +#include "script_component.hpp" /* * Author: 3Mydlo3 * Checks if given unit or group is recon. diff --git a/addons/icons/functions/fn_shouldStillBeVisible.sqf b/addons/common/functions/fn_shouldStillBeVisible.sqf similarity index 92% rename from addons/icons/functions/fn_shouldStillBeVisible.sqf rename to addons/common/functions/fn_shouldStillBeVisible.sqf index 778b353..b29649b 100644 --- a/addons/icons/functions/fn_shouldStillBeVisible.sqf +++ b/addons/common/functions/fn_shouldStillBeVisible.sqf @@ -1,4 +1,4 @@ -#include "..\script_component.hpp" +#include "script_component.hpp" /* * Author: 3Mydlo3 * Checks if given target is known to at least one unit. diff --git a/addons/common/initSettings.inc.sqf b/addons/common/initSettings.inc.sqf new file mode 100644 index 0000000..f18a2b0 --- /dev/null +++ b/addons/common/initSettings.inc.sqf @@ -0,0 +1,8 @@ +[ + QGVAR(onlyReconCanSpot), + "CHECKBOX", + ["Only recon can spot", "If enabled, only recon units can spot enemies to be visible for other units"], + [LSTRING(Settings_DisplayName)], + false, + true +] call CBA_fnc_addSetting; diff --git a/addons/common/stringtable.xml b/addons/common/stringtable.xml index 2b43f32..23b482b 100644 --- a/addons/common/stringtable.xml +++ b/addons/common/stringtable.xml @@ -13,5 +13,9 @@ Controls whether this component is active. Pozwala kontrolować czy komponent jest włączony. + + Action interrupted, vehicle is in combat. + Akcja przerwana, pojazd uczestniczy w walce. + diff --git a/addons/damage/XEH_postInit.sqf b/addons/damage/XEH_postInit.sqf index 918f0cb..d79a543 100644 --- a/addons/damage/XEH_postInit.sqf +++ b/addons/damage/XEH_postInit.sqf @@ -1,15 +1,3 @@ #include "script_component.hpp" if (isServer) exitWith {}; - -["MDL_applyDamage", { - params ["_unit"]; - - if (GVAR(damageAlarmEnabled) && {_unit isEqualTo vehicle player} && {!GVAR(isSoundPlaying)}) then { - GVAR(isSoundPlaying) = true; - playSound ["MDL_Wargay_Alarm", 2]; - [{ - GVAR(isSoundPlaying) = false; - }, [], 4] call CBA_fnc_waitAndExecute; - }; -}] call CBA_fnc_addEventHandler; diff --git a/addons/damage/XEH_preInit.sqf b/addons/damage/XEH_preInit.sqf index ecb5d0c..6706cf8 100644 --- a/addons/damage/XEH_preInit.sqf +++ b/addons/damage/XEH_preInit.sqf @@ -5,4 +5,6 @@ PREP_RECOMPILE_START; #include "XEH_PREP.hpp" PREP_RECOMPILE_END; +#include "initSettings.inc.sqf" + ADDON = true; diff --git a/addons/damage/initSettings.inc.sqf b/addons/damage/initSettings.inc.sqf new file mode 100644 index 0000000..61af5c2 --- /dev/null +++ b/addons/damage/initSettings.inc.sqf @@ -0,0 +1,8 @@ +[ + QGVAR(showDamageFeedback), + "CHECKBOX", + [LSTRING(ShowDamageFeedback), LSTRING(ShowDamageFeedback_Description)], + [LSTRING(Settings_DisplayNameClient)], + true, + false +] call CBA_fnc_addSetting; diff --git a/addons/damage/stringtable.xml b/addons/damage/stringtable.xml index d6ef232..a1be29e 100644 --- a/addons/damage/stringtable.xml +++ b/addons/damage/stringtable.xml @@ -13,5 +13,13 @@ Controls whether this component is active. Pozwala kontrolować czy komponent jest włączony. + + Show Damage Feedback + Informacja zwrotna o obrażeniach + + + Adds feedback message with dealt damage information - potential damage, armor hit and actual damage. + Dodaje informację zwrotną o zadanych obrażeniach - obrażenia potencjalne, trafiony pancerz i faktycznie zadane obrażenia. + diff --git a/addons/deployment/stringtable.xml b/addons/deployment/stringtable.xml index 658d045..16affbd 100644 --- a/addons/deployment/stringtable.xml +++ b/addons/deployment/stringtable.xml @@ -25,5 +25,9 @@ Deployment of new '%1' vehicle is no longer possible. Rozmieszczenie nowych pojazdów '%1' już nie jest możliwe. + + Lost %1 %2 + Utracono %1 %2 + diff --git a/addons/event_handlers/$PBOPREFIX$ b/addons/event_handlers/$PBOPREFIX$ new file mode 100644 index 0000000..f7aa4e9 --- /dev/null +++ b/addons/event_handlers/$PBOPREFIX$ @@ -0,0 +1 @@ +z\afwg\addons\event_handlers \ No newline at end of file diff --git a/addons/_eventHandlers/CfgEventHandlers.hpp b/addons/event_handlers/CfgEventHandlers.hpp similarity index 100% rename from addons/_eventHandlers/CfgEventHandlers.hpp rename to addons/event_handlers/CfgEventHandlers.hpp diff --git a/addons/_eventHandlers/XEH_PREP.hpp b/addons/event_handlers/XEH_PREP.hpp similarity index 89% rename from addons/_eventHandlers/XEH_PREP.hpp rename to addons/event_handlers/XEH_PREP.hpp index d03b488..d84620c 100644 --- a/addons/_eventHandlers/XEH_PREP.hpp +++ b/addons/event_handlers/XEH_PREP.hpp @@ -5,4 +5,3 @@ PREP(handleDamage); PREP(handleDamageMan); PREP(hitPart); PREP(knowsAboutChanged); -PREP(musicStop); diff --git a/addons/_eventHandlers/XEH_postInit.sqf b/addons/event_handlers/XEH_postInit.sqf similarity index 73% rename from addons/_eventHandlers/XEH_postInit.sqf rename to addons/event_handlers/XEH_postInit.sqf index cfd489a..ae22e61 100644 --- a/addons/_eventHandlers/XEH_postInit.sqf +++ b/addons/event_handlers/XEH_postInit.sqf @@ -9,5 +9,6 @@ _x addEventHandler ["CuratorObjectDeleted", FUNC(curatorObjectDeleted)]; } forEach allCurators; -// TODO: Move to music component and change function name (or better, remove it as a function) -call FUNC(musicStop); +if (isServer) exitWith {}; + +addMissionEventHandler ["Draw3D", FUNC(draw3D)]; diff --git a/addons/_eventHandlers/XEH_preInit.sqf b/addons/event_handlers/XEH_preInit.sqf similarity index 100% rename from addons/_eventHandlers/XEH_preInit.sqf rename to addons/event_handlers/XEH_preInit.sqf diff --git a/addons/_eventHandlers/XEH_preStart.sqf b/addons/event_handlers/XEH_preStart.sqf similarity index 100% rename from addons/_eventHandlers/XEH_preStart.sqf rename to addons/event_handlers/XEH_preStart.sqf diff --git a/addons/_keyHandlers/config.cpp b/addons/event_handlers/config.cpp similarity index 75% rename from addons/_keyHandlers/config.cpp rename to addons/event_handlers/config.cpp index d821136..6e73c27 100644 --- a/addons/_keyHandlers/config.cpp +++ b/addons/event_handlers/config.cpp @@ -7,7 +7,10 @@ class CfgPatches { weapons[] = {}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = { - "afwg_main" + "afwg_common", + "afwg_damage", + "afwg_icons", + "afwg_markers" }; author = "ArmaForces"; VERSION_CONFIG; diff --git a/addons/_eventHandlers/functions/fn_curatorObjectDeleted.sqf b/addons/event_handlers/functions/fn_curatorObjectDeleted.sqf similarity index 69% rename from addons/_eventHandlers/functions/fn_curatorObjectDeleted.sqf rename to addons/event_handlers/functions/fn_curatorObjectDeleted.sqf index 89afbc7..b98a477 100644 --- a/addons/_eventHandlers/functions/fn_curatorObjectDeleted.sqf +++ b/addons/event_handlers/functions/fn_curatorObjectDeleted.sqf @@ -1,4 +1,4 @@ -#include "..\script_component.hpp" +#include "script_component.hpp" /* * Author: 3Mydlo3 * Removes marker of an entity that has been deleted by curator. @@ -13,4 +13,5 @@ */ params ["_curator", "_entity"]; -[_entity] call FUNC(removeVehicleMarker); + +[_entity] call EFUNC(markers,removeVehicleMarker); diff --git a/addons/_eventHandlers/functions/fn_draw3D.sqf b/addons/event_handlers/functions/fn_draw3D.sqf similarity index 86% rename from addons/_eventHandlers/functions/fn_draw3D.sqf rename to addons/event_handlers/functions/fn_draw3D.sqf index a5754e3..7548da7 100644 --- a/addons/_eventHandlers/functions/fn_draw3D.sqf +++ b/addons/event_handlers/functions/fn_draw3D.sqf @@ -1,4 +1,4 @@ -#include "..\script_component.hpp" +#include "script_component.hpp" /* * Author: 3Mydlo3, veteran29 * Draws unit icons in Draw3D MissionEventHandler. @@ -13,7 +13,7 @@ */ #ifdef DEV_DEBUG -call FUNC(drawHitDebug); +call EFUNC(debug,drawHitDebug); #endif // Always draw icon for cursor object @@ -27,7 +27,9 @@ private _vehiclesWithIcons = if ( [[_cursorObject, true]] } else { [] }; -switch (GVAR(unitIconMode)) do { +private _iconMode = EGVAR(icons,unitIconMode); + +switch (_iconMode) do { // Friendly and enemy case 0: { _vehiclesWithIcons append (vehicles select {( @@ -57,9 +59,9 @@ if (!isNull findDisplay 312) then { if (_type isEqualTo "GROUP") then { { _vehiclesWithIcons pushBackUnique [_x, true]; - } forEach ([_entity] call FUNC(getGroupVehicles)); + } forEach ([_entity] call EFUNC(common,getGroupVehicles)); }; - + curatorSelected params ["_objects", "_groups"]; { _vehiclesWithIcons pushBackUnique [_x, true]; @@ -67,11 +69,11 @@ if (!isNull findDisplay 312) then { { { _vehiclesWithIcons pushBackUnique [_x, true]; - } forEach ([_x] call FUNC(getGroupVehicles)); + } forEach ([_x] call EFUNC(common,getGroupVehicles)); } forEach _groups; }; // Draws icons. Might draw an icon twice for one object if it's targeted/highlighted. { - _x call FUNC(drawIcon); + _x call EFUNC(icons,drawIcon); } forEach _vehiclesWithIcons; diff --git a/addons/_eventHandlers/functions/fn_fired.sqf b/addons/event_handlers/functions/fn_fired.sqf similarity index 91% rename from addons/_eventHandlers/functions/fn_fired.sqf rename to addons/event_handlers/functions/fn_fired.sqf index e9a2250..2633104 100644 --- a/addons/_eventHandlers/functions/fn_fired.sqf +++ b/addons/event_handlers/functions/fn_fired.sqf @@ -1,7 +1,7 @@ -#include "..\script_component.hpp" +#include "script_component.hpp" /* * Author: 3Mydlo3 - * + * * * Arguments: * "Fired" EH params diff --git a/addons/_eventHandlers/functions/fn_handleDamage.sqf b/addons/event_handlers/functions/fn_handleDamage.sqf similarity index 96% rename from addons/_eventHandlers/functions/fn_handleDamage.sqf rename to addons/event_handlers/functions/fn_handleDamage.sqf index 7e9a87a..428d96f 100644 --- a/addons/_eventHandlers/functions/fn_handleDamage.sqf +++ b/addons/event_handlers/functions/fn_handleDamage.sqf @@ -1,4 +1,4 @@ -#include "..\script_component.hpp" +#include "script_component.hpp" /* * Author: 3Mydlo3 * Overrides damage handler to ignore default engine damage handling. @@ -16,7 +16,7 @@ params ["_unit", "_selection", "_damage", "_source", "_projectile", "_hitIndex", // Exclude total damage info (_context == 0), FakeHeadHit (3) and TotalDamageBeforeBleeding (4) if (_context isEqualTo 0 || {_context > 2}) exitWith { damage _unit }; - + // Most likely a collision so let the engine handle it if (_projectile isEqualTo "" && {isNull _instigator}) exitWith {}; // TODO: Consider changing HP afterwards somehow @@ -38,4 +38,4 @@ if (_modelHitpointPosition isEqualTo [0, 0, 0]) exitWith { damage _unit }; HitpointHits pushBackUnique (_unit modelToWorld _modelHitpointPosition); #endif -0 \ No newline at end of file +0 diff --git a/addons/_eventHandlers/functions/fn_handleDamageMan.sqf b/addons/event_handlers/functions/fn_handleDamageMan.sqf similarity index 92% rename from addons/_eventHandlers/functions/fn_handleDamageMan.sqf rename to addons/event_handlers/functions/fn_handleDamageMan.sqf index 5581bab..1838144 100644 --- a/addons/_eventHandlers/functions/fn_handleDamageMan.sqf +++ b/addons/event_handlers/functions/fn_handleDamageMan.sqf @@ -1,4 +1,4 @@ -#include "..\script_component.hpp" +#include "script_component.hpp" /* * Author: 3Mydlo3 * Overrides damage handler to ignore default engine damage handling. diff --git a/addons/_eventHandlers/functions/fn_hitPart.sqf b/addons/event_handlers/functions/fn_hitPart.sqf similarity index 94% rename from addons/_eventHandlers/functions/fn_hitPart.sqf rename to addons/event_handlers/functions/fn_hitPart.sqf index 6f100de..986dd91 100644 --- a/addons/_eventHandlers/functions/fn_hitPart.sqf +++ b/addons/event_handlers/functions/fn_hitPart.sqf @@ -1,4 +1,4 @@ -#include "..\script_component.hpp" +#include "script_component.hpp" /* * Author: 3Mydlo3 * @@ -39,7 +39,7 @@ diag_log format ["WARGAY DEBUG HIT PART [%1]: Selection: %2 Vector: %3, Velocity private _velocityAndSurfaceProduct = vectorNormalized _velocity vectorDotProduct _vector; if (_velocity isNotEqualTo [0, 0, 0] && {_velocityAndSurfaceProduct < 0.15 && {_velocityAndSurfaceProduct > -0.15}}) exitWith {}; -private _hitDir = [_target, _vector, _velocity, _projectile] call FUNC(getHitDir); +private _hitDir = [_target, _vector, _velocity, _projectile] call EFUNC(damage,getHitDir); #ifdef DEV_DEBUG PositionHits pushBack (_position); @@ -51,4 +51,4 @@ _projectile setVariable [str _target, true]; private _hitPosition = if (_isDirect) then { [] } else { getPosATL _projectile }; -[_target, _shooter, _hitDir, _hitPosition, _velocity, _projectile, _ammo] call FUNC(calculateAndApplyDamage); +[_target, _shooter, _hitDir, _hitPosition, _velocity, _projectile, _ammo] call EFUNC(damage,calculateAndApplyDamage); diff --git a/addons/_eventHandlers/functions/fn_knowsAboutChanged.sqf b/addons/event_handlers/functions/fn_knowsAboutChanged.sqf similarity index 90% rename from addons/_eventHandlers/functions/fn_knowsAboutChanged.sqf rename to addons/event_handlers/functions/fn_knowsAboutChanged.sqf index 4a1843f..4b1f9ba 100644 --- a/addons/_eventHandlers/functions/fn_knowsAboutChanged.sqf +++ b/addons/event_handlers/functions/fn_knowsAboutChanged.sqf @@ -1,4 +1,4 @@ -#include "..\script_component.hpp" +#include "script_component.hpp" /* * Author: 3Mydlo3 * Checks if new unit is spotted and propagates info so that the icon can be drawn for target. @@ -20,7 +20,7 @@ params ["_group", "_targetUnit", "_newKnowsAbout", "_oldKnowsAbout"]; if (side _targetUnit isNotEqualTo EAST) exitWith {}; if (isObjectHidden leader _group) exitWith {}; -if (GVAR(onlyReconCanSpot) && {!([_group] call FUNC(isReconVehicle))}) exitWith {}; +if (EGVAR(common,onlyReconCanSpot) && {!([_group] call EFUNC(common,isReconVehicle))}) exitWith {}; #ifdef DEV_DEBUG diag_log format ["WARGAY DEBUG KNOWS ABOUT CHANGED [%1]: Group: %2, Target: %3, KnowsAbout: %4 -> %5", diag_tickTime, _group, _targetUnit, _oldKnowsAbout, _newKnowsAbout]; diff --git a/addons/event_handlers/functions/script_component.hpp b/addons/event_handlers/functions/script_component.hpp new file mode 100644 index 0000000..624a555 --- /dev/null +++ b/addons/event_handlers/functions/script_component.hpp @@ -0,0 +1 @@ +#include "\z\afwg\addons\event_handlers\script_component.hpp" diff --git a/addons/_settings/script_component.hpp b/addons/event_handlers/script_component.hpp similarity index 54% rename from addons/_settings/script_component.hpp rename to addons/event_handlers/script_component.hpp index 0f429bd..c8a15f4 100644 --- a/addons/_settings/script_component.hpp +++ b/addons/event_handlers/script_component.hpp @@ -1,14 +1,14 @@ -#define COMPONENT common +#define COMPONENT event_handlers #include "\z\afwg\addons\main\script_mod.hpp" // #define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE -#ifdef DEBUG_ENABLED_COMMON +#ifdef DEBUG_ENABLED_EVENT_HANDLERS #define DEBUG_MODE_FULL #endif - #ifdef DEBUG_SETTINGS_COMMON - #define DEBUG_SETTINGS DEBUG_SETTINGS_COMMON + #ifdef DEBUG_SETTINGS_EVENT_HANDLERS + #define DEBUG_SETTINGS DEBUG_SETTINGS_EVENT_HANDLERS #endif #include "\z\afwg\addons\main\script_macros.hpp" diff --git a/addons/_eventHandlers/stringtable.xml b/addons/event_handlers/stringtable.xml similarity index 53% rename from addons/_eventHandlers/stringtable.xml rename to addons/event_handlers/stringtable.xml index 2b43f32..9f9eee5 100644 --- a/addons/_eventHandlers/stringtable.xml +++ b/addons/event_handlers/stringtable.xml @@ -1,15 +1,15 @@ - - - ArmaForces Wargame - Common - ArmaForces Wargame - Common + + + ArmaForces Wargame - Event Handlers + ArmaForces Wargame - Event Handlers - + Enable component Włącz komponent - + Controls whether this component is active. Pozwala kontrolować czy komponent jest włączony. diff --git a/addons/experience/$PBOPREFIX$ b/addons/experience/$PBOPREFIX$ deleted file mode 100644 index d494ee3..0000000 --- a/addons/experience/$PBOPREFIX$ +++ /dev/null @@ -1 +0,0 @@ -z\afwg\addons\experience \ No newline at end of file diff --git a/addons/experience/CfgEventHandlers.hpp b/addons/experience/CfgEventHandlers.hpp deleted file mode 100644 index 2a3f71f..0000000 --- a/addons/experience/CfgEventHandlers.hpp +++ /dev/null @@ -1,15 +0,0 @@ -class Extended_PreStart_EventHandlers { - class ADDON { - init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); - }; -}; -class Extended_PreInit_EventHandlers { - class ADDON { - init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); - }; -}; -class Extended_PostInit_EventHandlers { - class ADDON { - init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); - }; -}; diff --git a/addons/experience/XEH_PREP.hpp b/addons/experience/XEH_PREP.hpp deleted file mode 100644 index c3bd43c..0000000 --- a/addons/experience/XEH_PREP.hpp +++ /dev/null @@ -1 +0,0 @@ -PREP(addExperienceForKill); diff --git a/addons/experience/XEH_postInit.sqf b/addons/experience/XEH_postInit.sqf deleted file mode 100644 index cfd69e3..0000000 --- a/addons/experience/XEH_postInit.sqf +++ /dev/null @@ -1,15 +0,0 @@ -#include "script_component.hpp" - -if (isServer) exitWith {}; - -["MDL_xpReceived", { - params ["_receivedXp", "_newLifeXp", "_newTotalXp"]; - - systemChat format [LLSTRING(XpReceived), _receivedXp, _newLifeXp, _newTotalXp]; -}] call CBA_fnc_addEventHandler; - -["MDL_showXp", { - params ["_currentXp", "_totalXp"]; - - systemChat format [LLSTRING(CurrentAndTotalXp), _currentXp, _totalXp]; -}] call CBA_fnc_addEventHandler; diff --git a/addons/experience/XEH_preInit.sqf b/addons/experience/XEH_preInit.sqf deleted file mode 100644 index ecb5d0c..0000000 --- a/addons/experience/XEH_preInit.sqf +++ /dev/null @@ -1,8 +0,0 @@ -#include "script_component.hpp" -ADDON = false; - -PREP_RECOMPILE_START; -#include "XEH_PREP.hpp" -PREP_RECOMPILE_END; - -ADDON = true; diff --git a/addons/experience/XEH_preStart.sqf b/addons/experience/XEH_preStart.sqf deleted file mode 100644 index a51262a..0000000 --- a/addons/experience/XEH_preStart.sqf +++ /dev/null @@ -1,2 +0,0 @@ -#include "script_component.hpp" -#include "XEH_PREP.hpp" diff --git a/addons/experience/config.cpp b/addons/experience/config.cpp deleted file mode 100644 index d821136..0000000 --- a/addons/experience/config.cpp +++ /dev/null @@ -1,17 +0,0 @@ -#include "script_component.hpp" - -class CfgPatches { - class ADDON { - name = COMPONENT_NAME; - units[] = {}; - weapons[] = {}; - requiredVersion = REQUIRED_VERSION; - requiredAddons[] = { - "afwg_main" - }; - author = "ArmaForces"; - VERSION_CONFIG; - }; -}; - -#include "CfgEventHandlers.hpp" diff --git a/addons/experience/functions/script_component.hpp b/addons/experience/functions/script_component.hpp deleted file mode 100644 index 550ab69..0000000 --- a/addons/experience/functions/script_component.hpp +++ /dev/null @@ -1 +0,0 @@ -#include "\z\afwg\addons\experience\script_component.hpp" diff --git a/addons/experience/script_component.hpp b/addons/experience/script_component.hpp deleted file mode 100644 index 3eaec08..0000000 --- a/addons/experience/script_component.hpp +++ /dev/null @@ -1,14 +0,0 @@ -#define COMPONENT experience -#include "\z\afwg\addons\main\script_mod.hpp" - -// #define DEBUG_MODE_FULL -// #define DISABLE_COMPILE_CACHE - -#ifdef DEBUG_ENABLED_EXPERIENCE - #define DEBUG_MODE_FULL -#endif - #ifdef DEBUG_SETTINGS_EXPERIENCE - #define DEBUG_SETTINGS DEBUG_SETTINGS_EXPERIENCE -#endif - -#include "\z\afwg\addons\main\script_macros.hpp" diff --git a/addons/experience/stringtable.xml b/addons/experience/stringtable.xml deleted file mode 100644 index bcb0351..0000000 --- a/addons/experience/stringtable.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - - - ArmaForces Wargame - Experience - ArmaForces Wargame - Experience - - - Enable component - Włącz komponent - - - Controls whether this component is active. - Pozwala kontrolować czy komponent jest włączony. - - - Received %1 XP. New total from last death: %2 XP. Grand total: %3 XP - Otrzymano %1 PD. Całkowite PD od ostatniej śmierci: %2. PD w kampanii: %3 XP - - - diff --git a/addons/hud/CfgEventHandlers.hpp b/addons/hud/CfgEventHandlers.hpp index 2a3f71f..e5bcd3c 100644 --- a/addons/hud/CfgEventHandlers.hpp +++ b/addons/hud/CfgEventHandlers.hpp @@ -13,3 +13,9 @@ class Extended_PostInit_EventHandlers { init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); }; }; + +class Extended_DisplayLoad_EventHandlers { + class RscUnitInfo { + MDL_Wargay = QUOTE(call FUNC(initHitpointsDisplay)); + }; +}; diff --git a/addons/hud/XEH_PREP.hpp b/addons/hud/XEH_PREP.hpp index 812db28..3174a65 100644 --- a/addons/hud/XEH_PREP.hpp +++ b/addons/hud/XEH_PREP.hpp @@ -1,2 +1,4 @@ PREP(initHitpointsDisplay); +PREP(keyUnitInfo); +PREP(showUnitInfo); PREP(updateHitpointsDisplay); diff --git a/addons/hud/XEH_postInit.sqf b/addons/hud/XEH_postInit.sqf index f95ff0c..ee6e276 100644 --- a/addons/hud/XEH_postInit.sqf +++ b/addons/hud/XEH_postInit.sqf @@ -6,3 +6,16 @@ if (isServer) exitWith {}; if (vehicle player isEqualTo player) exitWith {}; call FUNC(updateHitpointsDisplay); }] call CBA_fnc_addEventHandler; + +// Register a simple keypress to an action +#include "\a3\ui_f\hpp\defineDIKCodes.inc" + +// Handle "Info" button +[ + "MDL Wargay", + "MDL_WG_UnitInfo", + ["Unit Info", "Opens info popup of targeted unit"], + FUNC(keyUnitInfo), + {}, + [DIK_TAB, [false, false, false]] +] call CBA_fnc_addKeybind; diff --git a/addons/hud/XEH_preInit.sqf b/addons/hud/XEH_preInit.sqf index ecb5d0c..6706cf8 100644 --- a/addons/hud/XEH_preInit.sqf +++ b/addons/hud/XEH_preInit.sqf @@ -5,4 +5,6 @@ PREP_RECOMPILE_START; #include "XEH_PREP.hpp" PREP_RECOMPILE_END; +#include "initSettings.inc.sqf" + ADDON = true; diff --git a/addons/hud/config.cpp b/addons/hud/config.cpp index d821136..2949b60 100644 --- a/addons/hud/config.cpp +++ b/addons/hud/config.cpp @@ -7,7 +7,7 @@ class CfgPatches { weapons[] = {}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = { - "afwg_main" + "afwg_common" }; author = "ArmaForces"; VERSION_CONFIG; diff --git a/addons/hud/functions/fn_initHitpointsDisplay.sqf b/addons/hud/functions/fn_initHitpointsDisplay.sqf index 42ac008..9a1c2c3 100644 --- a/addons/hud/functions/fn_initHitpointsDisplay.sqf +++ b/addons/hud/functions/fn_initHitpointsDisplay.sqf @@ -1,4 +1,4 @@ -#include "..\script_component.hpp" +#include "script_component.hpp" /* * Author: veteran29 * Initializes Wargay-like HP HUD display in vehicle. diff --git a/addons/_keyHandlers/functions/fn_keyUnitInfo.sqf b/addons/hud/functions/fn_keyUnitInfo.sqf similarity index 84% rename from addons/_keyHandlers/functions/fn_keyUnitInfo.sqf rename to addons/hud/functions/fn_keyUnitInfo.sqf index 0a0943a..3664411 100644 --- a/addons/_keyHandlers/functions/fn_keyUnitInfo.sqf +++ b/addons/hud/functions/fn_keyUnitInfo.sqf @@ -1,4 +1,4 @@ -#include "..\script_component.hpp" +#include "script_component.hpp" /* * Author: 3Mydlo3 * Checks if TAB is pressed and shows targeted unit info. @@ -21,4 +21,4 @@ params ["_displayOrControl", "_key", "_shift", "_ctrl", "_alt"]; private _cursorTarget = cursorTarget; if (_cursorTarget isEqualTo objNull) exitWith {}; -[_cursorTarget] call FUNC(showUnitInfo); +[_cursorTarget] call EFUNC(common,showUnitInfo); diff --git a/addons/icons/functions/fn_showUnitInfo.sqf b/addons/hud/functions/fn_showUnitInfo.sqf similarity index 84% rename from addons/icons/functions/fn_showUnitInfo.sqf rename to addons/hud/functions/fn_showUnitInfo.sqf index 8149e9e..dda9b62 100644 --- a/addons/icons/functions/fn_showUnitInfo.sqf +++ b/addons/hud/functions/fn_showUnitInfo.sqf @@ -1,7 +1,7 @@ -#include "..\script_component.hpp" +#include "script_component.hpp" /* * Author: 3Mydlo3 - * Shows targeted unit info to local player. + * Shows targeted unit info to local player. * Works only for objects of kind "AllVehicles". * * Arguments: @@ -17,12 +17,12 @@ params ["_unit"]; if !(_unit isKindOf "AllVehicles") exitWith {}; -private _unitInfo = [_unit] call FUNC(getVehicleInfo); +private _unitInfo = [_unit] call EFUNC(common,getVehicleInfo); if (_unitInfo isEqualTo objNull) exitWith {}; private _messageParts = [ - [_unitInfo] call FUNC(getVehicleDisplayName), + [_unitInfo] call EFUNC(common,getVehicleDisplayName), lineBreak, lineBreak, format ["Points cost: %1", _unitInfo getOrDefault ["pointCost", 5]], @@ -31,7 +31,7 @@ private _messageParts = [ ]; // Get ammo and its damage -private _ammoInfo = [_unit] call FUNC(getAmmoInfo); +private _ammoInfo = [_unit] call EFUNC(common,getAmmoInfo); if (_ammoInfo isNotEqualTo objNull) then { private _ammoInfoText = keys _ammoInfo apply { private _displayName = _ammoInfo get _x get DISPLAY_NAME_PROPERTY; @@ -64,4 +64,4 @@ private _armorInfoParts = [ _messageParts append _armorInfoParts; private _text = composeText _messageParts; -hint _text; \ No newline at end of file +hint _text; diff --git a/addons/hud/functions/fn_updateHitpointsDisplay.sqf b/addons/hud/functions/fn_updateHitpointsDisplay.sqf index 3b78fee..32de595 100644 --- a/addons/hud/functions/fn_updateHitpointsDisplay.sqf +++ b/addons/hud/functions/fn_updateHitpointsDisplay.sqf @@ -1,4 +1,4 @@ -#include "..\script_component.hpp" +#include "script_component.hpp" /* * Author: veteran29 * Updates Wargay-like HP HUD display. diff --git a/addons/hud/initSettings.inc.sqf b/addons/hud/initSettings.inc.sqf new file mode 100644 index 0000000..fc0e09f --- /dev/null +++ b/addons/hud/initSettings.inc.sqf @@ -0,0 +1,2 @@ +GVAR(filledHpColor) = getArray (missionConfigFile >> "CfgWargay" >> "filledHpColor"); +GVAR(missingHpColor) = getArray (missionConfigFile >> "CfgWargay" >> "missingHpColor"); diff --git a/addons/icons/XEH_PREP.hpp b/addons/icons/XEH_PREP.hpp index 457c2fd..69eefb8 100644 --- a/addons/icons/XEH_PREP.hpp +++ b/addons/icons/XEH_PREP.hpp @@ -1,11 +1,3 @@ -PREP(createVehicleInfoForNonConfiguredVehicle); -PREP(currentHpString); PREP(drawIcon); -PREP(getAmmoInfo); PREP(getIconPath); -PREP(getVehicleDisplayName); -PREP(getVehicleInfo); -PREP(isReconVehicle); -PREP(shouldStillBeVisible); -PREP(showUnitInfo); PREP(visibilityCheckLoop); diff --git a/addons/icons/XEH_preInit.sqf b/addons/icons/XEH_preInit.sqf index ecb5d0c..6706cf8 100644 --- a/addons/icons/XEH_preInit.sqf +++ b/addons/icons/XEH_preInit.sqf @@ -5,4 +5,6 @@ PREP_RECOMPILE_START; #include "XEH_PREP.hpp" PREP_RECOMPILE_END; +#include "initSettings.inc.sqf" + ADDON = true; diff --git a/addons/icons/functions/fn_drawIcon.sqf b/addons/icons/functions/fn_drawIcon.sqf index dcca8db..f637e52 100644 --- a/addons/icons/functions/fn_drawIcon.sqf +++ b/addons/icons/functions/fn_drawIcon.sqf @@ -1,4 +1,4 @@ -#include "..\script_component.hpp" +#include "script_component.hpp" /* * Author: 3Mydlo3, veteran29 * Draws 3D icon above given unit. @@ -18,7 +18,7 @@ params ["_target", ["_includeText", false]]; if (!alive _target || {_target getVariable ["MDL_currentHp", 0] isEqualTo 0}) exitWith {}; - + private _worldPos = _target modelToWorldVisual ABOVE_UNIT; private _screenPosition = worldToScreen _worldPos; diff --git a/addons/icons/functions/fn_getIconPath.sqf b/addons/icons/functions/fn_getIconPath.sqf index 58d1ffb..1142c9b 100644 --- a/addons/icons/functions/fn_getIconPath.sqf +++ b/addons/icons/functions/fn_getIconPath.sqf @@ -1,4 +1,4 @@ -#include "..\script_component.hpp" +#include "script_component.hpp" /* * Author: 3Mydlo3, veteran29 * Returns path to icon corresponding to given vehicle type. diff --git a/addons/icons/functions/fn_visibilityCheckLoop.sqf b/addons/icons/functions/fn_visibilityCheckLoop.sqf index 3b4018d..4e725df 100644 --- a/addons/icons/functions/fn_visibilityCheckLoop.sqf +++ b/addons/icons/functions/fn_visibilityCheckLoop.sqf @@ -1,4 +1,4 @@ -#include "..\script_component.hpp" +#include "script_component.hpp" /* * Author: 3Mydlo3 * Loop checking all enemy units one by one. diff --git a/addons/_settings/functions/fn_initClientSettings.sqf b/addons/icons/initSettings.inc.sqf similarity index 57% rename from addons/_settings/functions/fn_initClientSettings.sqf rename to addons/icons/initSettings.inc.sqf index 02f2dea..8fc606f 100644 --- a/addons/_settings/functions/fn_initClientSettings.sqf +++ b/addons/icons/initSettings.inc.sqf @@ -1,26 +1,3 @@ -#include "..\script_component.hpp" -/* - * Author: 3Mydlo3 - * Initializes clientside settings. - * - * Arguments: - * None - * - * Return Value: - * None - * - * Public: No - */ - -[ - QGVAR(damageAlarmEnabled), - "CHECKBOX", - [LSTRING(DamageAlarmEnabled), LSTRING(DamageAlarmEnabled_Description)], - [LSTRING(Settings_DisplayNameClient)], - true, - false -] call CBA_fnc_addSetting; - [ QGVAR(unitIconSizeDependsOnDistance), "CHECKBOX", @@ -48,11 +25,7 @@ false ] call CBA_fnc_addSetting; -[ - QGVAR(showDamageFeedback), - "CHECKBOX", - [LSTRING(ShowDamageFeedback), LSTRING(ShowDamageFeedback_Description)], - [LSTRING(Settings_DisplayNameClient)], - true, - false -] call CBA_fnc_addSetting; +GVAR(iconWidth) = getNumber (configFile >> "CfgInGameUI" >> "Cursor" >> "activeWidth"); +GVAR(westIconColor) = getArray (missionConfigFile >> "CfgWargay" >> "westMarkerColor"); +GVAR(westAiIconColor) = getArray (missionConfigFile >> "CfgWargay" >> "westAiMarkerColor"); +GVAR(eastIconColor) = getArray (missionConfigFile >> "CfgWargay" >> "eastMarkerColor"); diff --git a/addons/icons/stringtable.xml b/addons/icons/stringtable.xml index fc75cdd..0c7cb25 100644 --- a/addons/icons/stringtable.xml +++ b/addons/icons/stringtable.xml @@ -13,5 +13,37 @@ Controls whether this component is active. Pozwala kontrolować czy komponent jest włączony. + + Unit Icons + Znaczniki jednostek + + + Icon size multiplier + Mnożnik rozmiaru znaczników + + + Icon size depending on distance + Rozmiar znaczników zależny od odległości + + + Enables autoscaling of icon size depending on the distance to the unit. The closer the unit is, the bigger the icon gets (up to 2x the standard size when it's 50 m or closer). + Włącza skalowanie rozmiaru znaczników w zależności od odległości do jednostki. Im bliżej jest jednostka, tym większy będzie jej znacznik (do 2x normalnego rozmiaru jeżeli jest w odległości do 50 m). + + + Icon size multiplier + Mnożnik rozmiaru znaczników + + + Allows adjusting size of icons shown above known units + Pozwala dostosować rozmiar znaczników wyświetlanych nad znanymi jednostkami + + + Icon text size multiplier + Mnożnik rozmiaru tekstu znaczników + + + Allows adjusting size of text shown above targeted unit + Pozwala dostosować rozmiar tekstu wyświetlanego nad namierzoną jednostką + diff --git a/addons/init/XEH_postInit.sqf b/addons/init/XEH_postInit.sqf index c7242dc..7eefda6 100644 --- a/addons/init/XEH_postInit.sqf +++ b/addons/init/XEH_postInit.sqf @@ -137,5 +137,3 @@ if (GVAR(isTest)) then { }; if (isServer) exitWith {}; - -addMissionEventHandler ["Draw3D", FUNC(draw3D)]; diff --git a/addons/init/functions/fn_manInit.sqf b/addons/init/functions/fn_manInit.sqf index 3dca1dd..4dc4f9e 100644 --- a/addons/init/functions/fn_manInit.sqf +++ b/addons/init/functions/fn_manInit.sqf @@ -1,4 +1,4 @@ -#include "..\script_component.hpp" +#include "script_component.hpp" /* * Author: 3Mydlo3 * Initializes infantry units to work with custom damage model. diff --git a/addons/init/functions/fn_vehicleInit.sqf b/addons/init/functions/fn_vehicleInit.sqf index b99e73b..af47bba 100644 --- a/addons/init/functions/fn_vehicleInit.sqf +++ b/addons/init/functions/fn_vehicleInit.sqf @@ -1,4 +1,4 @@ -#include "..\script_component.hpp" +#include "script_component.hpp" /* * Author: 3Mydlo3 * Initializes vehicles to work with custom damage model. @@ -26,7 +26,7 @@ if (_vehicleHitpoints isEqualTo objNull) then { } else { diag_log format ["WARGAY DEBUG Hitpoints %1", str _vehicleHitpoints]; }; - + _entity setVariable ["MDL_currentHp", _vehicleHitpoints]; _entity setVariable ["MDL_maxHp", _vehicleHitpoints]; diff --git a/addons/init/functions/fn_vehicleSpawnerInit.sqf b/addons/init/functions/fn_vehicleSpawnerInit.sqf index 903c5bd..80b3041 100644 --- a/addons/init/functions/fn_vehicleSpawnerInit.sqf +++ b/addons/init/functions/fn_vehicleSpawnerInit.sqf @@ -1,4 +1,4 @@ -#include "..\script_component.hpp" +#include "script_component.hpp" /* * Author: 3Mydlo3 * Initializes spawner for given vehicle. @@ -22,7 +22,7 @@ _spawner addAction [ { params ["_target", "_caller", "", "_arguments"]; - ["MDL_deployVehicle", [_arguments select 0, _caller, _target]] call CBA_fnc_serverEvent; + ["MDL_deployVehicle", [_arguments select 0, _caller, _target]] call CBA_fnc_serverEvent; }, [_vehicleClass] ]; diff --git a/addons/main/stringtable.xml b/addons/main/stringtable.xml index 24c1906..3e3f740 100644 --- a/addons/main/stringtable.xml +++ b/addons/main/stringtable.xml @@ -14,18 +14,6 @@ Wiki - - Damage alarm - Alarm o uszkodzeniach - - - Audible alarm when your vehicle gets damaged. - Alarm dźwiękowy gdy Twój pojazd zostanie uszkodzony. - - - Damage received - Otrzymano uszkodzenia - Mydlana Kampania Wargay Mydlana Kampania Wargay @@ -34,53 +22,5 @@ Mydlana Kampania Wargay - Klient Mydlana Kampania Wargay - Client - - Show Damage Feedback - Informacja zwrotna o obrażeniach - - - Adds feedback message with dealt damage information - potential damage, armor hit and actual damage. - Dodaje informację zwrotną o zadanych obrażeniach - obrażenia potencjalne, trafiony pancerz i faktycznie zadane obrażenia. - - - Unit Icons - Znaczniki jednostek - - - Icon size multiplier - Mnożnik rozmiaru znaczników - - - Icon size depending on distance - Rozmiar znaczników zależny od odległości - - - Enables autoscaling of icon size depending on the distance to the unit. The closer the unit is, the bigger the icon gets (up to 2x the standard size when it's 50 m or closer). - Włącza skalowanie rozmiaru znaczników w zależności od odległości do jednostki. Im bliżej jest jednostka, tym większy będzie jej znacznik (do 2x normalnego rozmiaru jeżeli jest w odległości do 50 m). - - - Icon size multiplier - Mnożnik rozmiaru znaczników - - - Allows adjusting size of icons shown above known units - Pozwala dostosować rozmiar znaczników wyświetlanych nad znanymi jednostkami - - - Icon text size multiplier - Mnożnik rozmiaru tekstu znaczników - - - Allows adjusting size of text shown above targeted unit - Pozwala dostosować rozmiar tekstu wyświetlanego nad namierzoną jednostką - - - Lost %1 %2 - Utracono %1 %2 - - - Action interrupted, vehicle is in combat. - Akcja przerwana, pojazd uczestniczy w walce. - diff --git a/addons/markers/XEH_preInit.sqf b/addons/markers/XEH_preInit.sqf index ecb5d0c..6706cf8 100644 --- a/addons/markers/XEH_preInit.sqf +++ b/addons/markers/XEH_preInit.sqf @@ -5,4 +5,6 @@ PREP_RECOMPILE_START; #include "XEH_PREP.hpp" PREP_RECOMPILE_END; +#include "initSettings.inc.sqf" + ADDON = true; diff --git a/addons/markers/assets/b_antiair_spaag.paa b/addons/markers/assets/b_antiair_spaag.paa new file mode 100644 index 0000000000000000000000000000000000000000..4aaf315f9519a3acf056a966c29bde5d1e86fce3 GIT binary patch literal 5625 zcmeI0ZERCj7{{O9_Oe^Ht~bhb>Ib`|NFWdl$wG)TYYS}F@X{cMPP33Pd`X1q{NM*k z%uW_TK*fd(GtC$TiI62Ed~hUwfhJoP6NqBsjLD#zL77Aoifk0w=<)xY+r9D@0;s^w z)}8z7dCtrKInR07HC1J0c=h7SHDM1C9Y22j70p%Q<;)6+xiY-0g4vbhmnte&hQJb^ z4{f3yGl+H-5uL*4_ELyKL}J*Q~r3E;-Rq5neR|YuLoXzdOZm7KyqF^ zHW;2?mkas|`|!&gLXw-6a+jyw%)&HHu%9h8BflScIO!kOK*-@-+v78IsK6T@9Y1Ly+#40JSFTtC8IloEdj(+M={Y_q4}g0a=2YcZEvGo z+Z%W8@Bdc6lHOef+Y(xDO+EWxZ!UWEY0pezC2JdJ#*85Q!|S^n@pq5)CwW%eu)fw= zM9FH|M|9|KrCKxizE6lPmqM+qxU4^H#e@)76y`tr2nA3q@Nw8+)M@J_f4Us@PxXc^ z6ZVLY$SgUHj&ghX-9jEkUX-p>suq_Qcl)j5o=U1#{CeJ4$+)gwg zzeof%FP$BSz5G+nKT96e50F?ZNe-%u>V*HnEy?i*Ah9TC|MEPt-lrP4ZJ0I%Iuq zt04Q{?~gl(yFq`x4U%)|vGb$NL5`1jRgylsTz=u0IyT&s3J}~8muHjnhksCd|BtPD z8Rz-U_kSlIn}Pwf{jMky^78iympcs?lvt%cLpbrq3p4=Vw`tUlT~W-t_v^g~JCW1g z*tVN1f96Kz*S9~dk1ez>oc^wMyiL;EEK@i}PTIEJkc#Gx87soOpuEehC=v-S zi3GX7JdekN{+qdf_CC6|8$Q6TV<$zG!Z%V9^9%Tjc{>FHd~NnWVN)+(yXvb~gBzbu z8Uf9|(xS0zQLi#E#p9XpF_v7^(t%&@58YqWzZ`&Q+Wwoqc2TmbVTgif-)na5K3`(V z>Ta)+nBYqZ_;Z~V7n}GRV^Q;NaMQxF##XD~wqV8(ul|YC&hH zpp)&NM%c@2VV_*l-;~Pivpt}k!sHrxLs@24L2=l=F1b;%VQ O5mfJdOl5detJ6O`c-sa5 literal 0 HcmV?d00001 diff --git a/addons/markers/assets/b_antiair_spaag_radar.paa b/addons/markers/assets/b_antiair_spaag_radar.paa new file mode 100644 index 0000000000000000000000000000000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JB;i-H)Mf<^m<&$BH65RIfcrd^+3fEvhM$TJM zWh6$0VT`ggM$Q{P8I23a%NtCm^RAxG6Ky(b+xj`-!(Y)c#i722vEgesFpt;##Ph2E zvGUikOsn#$KYwEY>p3%)gRug0f~wws@&HhFBdFx8g*ticLfKPr7Va~PK*P~khpaL&KvN@%Gf1_N2%2O4(EAqGxlMP!0uCvRGbzbcJ0m1I`riA t{g7kn#S?rj@p?1cf%s02A%^Z#9p&@**QftznzjQsRo8Bonu_*m{0aIR?sotH literal 0 HcmV?d00001 diff --git a/addons/markers/assets/b_antitank_armor.paa b/addons/markers/assets/b_antitank_armor.paa new file mode 100644 index 0000000000000000000000000000000000000000..0cb16de8976cf4c0614c0c9a164f083dcfac08ac GIT binary patch literal 5625 zcmeHLeQaCR6~BJA+vlXuc@-@Lby{uJZfTVOts0d|>H3n528U$zppO`ou1*7@q0MGG zA*B_QFM+}~F>0a|y3miTOjSUdwslD=geYc7Qwm)d37UXX?1+VSRktOeByJKrcfa$V zo93hYh+zLfZ(=|He9pP&o{xLZy|#;@qJmA|Eqb89#u)49=-6W5KtU;CfkC*apkxDK zOB&z5VZ%lZnB(=F%Ge7F7~8jyvGaJ%ZfHzn3^UkGF(K08H?ZM|8~*qv<%6@=jJKv4 z`+;_!u^)8(Yl-KEP+%y&77Ofi_TrzghQap;VO>99C9K=+cHk`HG%%jC#%~((x25H| z_$7--c2847*Q?ojc~>4VTP;0Qa92l#tb31_bAw++y@P(nq*?2mSg(uZjrAs@SxI9) zzu(X7Fg|U+1!JcDFg|TR%!mDCy=gx^r{nY7SLgB7%@gAB=RpqgVZ84c7jeVCyLG{T zeli1J3GvtL-rf2+!Tr|n0RObVE!(T;puZNmDUAam!aJpXY5vUL>Sg>2z{U~e;}I0= z7X6Z;uhuI>>2^>Y)7LW-!}zrQF#pTj{~ok5<`SZ$5>L)A2hS!)#M^OEA&1J#_K6o5 zD{YQg8oG|CdiBn7-Y>+wTQydGk+C5qb5cC7#fK&oB8~gS-p`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ers/assets/b_cv.paa new file mode 100644 index 0000000000000000000000000000000000000000..cc7d212b1cadc70b1a5596c638008800c7bfacae GIT binary patch literal 5625 zcmeI0&r2Io5XUDm(G?oqgO=W0B=jJjyhx#tO%&5WY!~WEk41ZGl@|O1@{meP4-%x6 z9xN?w40EX7MnYrOVQ5GpN1%ju-=X_$5O@uRq z^)M;D;cZqE(VmZsR1ZCSI^VXf`hmMo^@HpFm)!LT3k>Hs5I}rAdw4V35V0g>M{K`? z*$s!o;9j;=jPF+DqkQj?x_-xTD2(8}_ydsR@yGU6`VoKFbzQMURi>8YybcHPIJo|^ z#9zrj(vSRe_I3XGyY(2!_wtYQpDF+C_;vrc^WU!j*6Vj(rRvwKf9ij=|D*nS{fF=t zz~9t@%<=OUfc4*TnymkNzVPn{o1P9;?U(NV$k_ZL93OW7_We)$evivR)q^^?VDn*- zMT92|)v!xw3}H3!8%#{S-olW2#()~bmZe^AJZ;_FtnFd+qP{rpIAP-Ook$D((Iv+BUO}*i8kg_*1Qgk~Ul^ zimTCFM3u=&?6*ISB_$Hkv0#+_b%i?F|4V^)3Gtec%;S}4YK2l#;uj%^`38Psenyt1 z^oyD;OlNJIE=hxe4ID&@8}%d%acylAZ}u00`2E-0Th<`_nYbSIr}Ck$C+=O3g`aBn zT7Mch@o)2dApC8y%jd}=Uq%84ZpO!c{drl^cp^GJsOBHxcNvkbhp4|I$LGLdS*Gq+ zn0G;Jiw(EIWjQ(XH@)B9&qgFRR~fHbrP?p-3{qvzkZ5G9UXNpzs=dYK gz{Q|d;TW%{A)e3IA9CLdopUIvA8XWi9p`8H1Ghh*`~Uy| literal 0 HcmV?d00001 diff --git a/addons/markers/assets/b_cv_armor.paa b/addons/markers/assets/b_cv_armor.paa new file mode 100644 index 0000000000000000000000000000000000000000..708436875676ee3954863b89f8ff85f5562ee3db GIT binary patch literal 5625 zcmeHLZ)j6j6hH6fPhX^I-Ul7qC*w$*lY&(cw-2MYRjk?Ud~7}~;%02!7;0H%41^7G zDLMxemldmnxlKA5P8h<(Fc@?h7Q4-ME5i?ybgdsoKxE8~(rR0G_dEBcwN0(lRX?ab zO`7~T=iYOE=bU@q%L}NQnyU3HYc^E*iKw%)^CgYzs%jZ42;-WnwW}E$1^nXb)$0VX z#CxAjbYLz~>pY@fyzfi|2_oze@Rli6SU!t&B4+dPF!e*(MX%mM=<~p*PoD?ZeIRj3 z69x>|*D%1Z>>^%_1w`&u%2#>C$Jh-70>BZr)EJ-lBOc90Ms@s-<4^$P3;YepRQ{D$ zbos$Q;JU8dOXHaCOPuxSfRBUtZ-@U_{ZW3@pR4cHpFib~{GXyqz4;|Rv+{ECr_pQb z+xDRaR@3H@RK4xSeKYTu3+nwm%|ZWdwcOp3vfqJ)7-#tGhww z5JkX-KJqq^X-tWCFN$BNKgxew^}iK=B@>7Ip$|%xsX(K^Ot!M8K5%MzsgD`MOI0WC*LCG9|**k zPxX)bK=}Nz%v7%=$cNInAAKh{JvD1$1OPG`!)U#0030KM7 zp;#uY$HvWYvHgExMb*`@m1d0nmH30~|3isaKjO0?xm2R%_rwu@zuL7Q=@m)_7e1A2 zj`gcH`+PiPq`DCwM5)pSp3<@yU#|_ur5SA>YO@bJLgZ!Q@7S}v{@f-apJB^+TqmNwvvD~s`UG8Z|&Y-9gI zIEV9cO&dV_to4)kQ?#l&w(4q`A#dmVta~P21^R-!!%ly}Hymd0h3%gqZWn zsYa!0cZe-ZTscx*+9B4SWqZi{Wh;V7FRkSb$3bA(3L3{JZjK9OC~sH{y@fx46WN_< zr045D?;ASs2GRO-$+=88o9ONF@VsC*EqEk>n_k9g{Os%^pYO>64nD*4)X(|+`n${@ R9l@Pws){`{7f))n{0k61G}8b8 literal 0 HcmV?d00001 diff --git a/addons/markers/assets/b_mech_inf_armed.paa b/addons/markers/assets/b_mech_inf_armed.paa new file mode 100644 index 0000000000000000000000000000000000000000..4e360926ba7656057a7dd78da9805634839ad5a5 GIT binary patch literal 5625 zcmeHLe{56N6+V8p!!yBouWHiLwG&QfuP|9!A}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UjskJUgZ@WktUx$$Q!i&e|#OuN37qi%%9aB?*Gik=>NFS zOz&6b`DeyQ)3BApq{8yJ{XBsf{4tmxPXD?09|wD5vObXybNDIphl^Z9_=RC2?A<5~ z;hKgI!yi-UU05;|W5FbbERU)43NAcTad@V@;%o_BX$j$&GgkYDB;)3<6WDwWGuoUn zuP5en?>BGin{3Ob{8b!F=6X}#Xe@yplG65zw1a}LCGD!J*53)uBeKT3aSTYj7>O?Q zd|RKw^OCGi17j;G6(4uW8TcCHDdpzQUata`xYk^W%!`I|U+vkX)cf--%2;7%Y~IOO zEB14w*zM4Nko9*%80yvfF-mtqKikKzWw;i6|4iu*p4LIP()7+JHYv)(xnhU4YcQ5g zX-z>K(}%L2r@o!NFecuaBZZyn$_~_YOOLzaT_3K=)7!ox3ciftpY_=>lJzHFvt)hg z@f*V~Z9Vq4*{Ux~v1Iw-U+=&kyF2i?lf+QlwwAz89z z9CLheEE@N4o@YEH%Qin~K3P5)E6&2LN7W3UNm-_a#4*u@lmSdB>qUxaUd@=AhD=r42QVe6UZ{1nemzkNlaAkfJ z>Z4$`GM^^!vDtAV40+W{F|XiHBf3Pm!S2oSb<02BCK_o^z1-rAhC16#yfF1LxwF_qBgR=_>zG`AExGWKee+ze>~L^igs;9QmGA;g&!r1@fVfmC20Tv literal 0 HcmV?d00001 diff --git a/addons/markers/assets/b_recon_antitank.paa b/addons/markers/assets/b_recon_antitank.paa new file mode 100644 index 0000000000000000000000000000000000000000..8eed3e849780f258bc9dea2347b5a98c6ad9c394 GIT binary patch literal 5625 zcmeHLeQZv2@|?9GZ%Hw0AF(0>CTtSg$d=J< zO1Dlq~mK#7DS9Uxhpm@Hl*=W z8#iuN2_wCKqX7JV3BaMH02k?fccg*}Kqr_}+k{AOzlU{4-1Em*DIao%Qt?(*y&kyw z^m@>=FD1^XqXxtAH5kagoFRHKR*A4h2xHlVk+Ehrn+fMKr;h3KuJPOY{*~$dD1HY) z$?WVta{jnY^PhJShILZ4yQF`otmVDwN1b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14~s7qWiGl!`?^r4daRDOCS3?OXfiSjRLl+oJ1o{t}Vgx|4F-W_VVtwW;N53!H)T^ z^_}&dxo3LOi@jbu4FJu%RW26fSfSf9H?&p7J)kM-@M-1>Iw+kN`wY3QjoxkeH#fAW>*Dntco?*8)h n%M-kT#X71dUhGrjQr~WUyOq2F?3L33kf{z14h{|u4h{|uDs=q$ literal 0 HcmV?d00001 diff --git a/addons/music/config.cpp b/addons/music/config.cpp index fb4df7f..200d360 100644 --- a/addons/music/config.cpp +++ b/addons/music/config.cpp @@ -15,5 +15,6 @@ class CfgPatches { }; #include "CfgEventHandlers.hpp" +#include "CfgSounds.hpp" // TODO: Add wargay music oggs // TOOD: Add Wargay alarm sound diff --git a/addons/music/functions/fn_addToMusicQueue.sqf b/addons/music/functions/fn_addToMusicQueue.sqf index d3c4f27..8f08f67 100644 --- a/addons/music/functions/fn_addToMusicQueue.sqf +++ b/addons/music/functions/fn_addToMusicQueue.sqf @@ -1,4 +1,4 @@ -#include "..\script_component.hpp" +#include "script_component.hpp" /* * Author: 3Mydlo3 * Adds given music to the queue. diff --git a/addons/music/functions/fn_isMusicPlaying.sqf b/addons/music/functions/fn_isMusicPlaying.sqf index e2bf1ae..e3334a3 100644 --- a/addons/music/functions/fn_isMusicPlaying.sqf +++ b/addons/music/functions/fn_isMusicPlaying.sqf @@ -1,4 +1,4 @@ -#include "..\script_component.hpp" +#include "script_component.hpp" /* * Author: 3Mydlo3 * Checks whether there is currently music playing. diff --git a/addons/music/functions/fn_isMusicQueueEmpty.sqf b/addons/music/functions/fn_isMusicQueueEmpty.sqf index 7211e9c..2d6c734 100644 --- a/addons/music/functions/fn_isMusicQueueEmpty.sqf +++ b/addons/music/functions/fn_isMusicQueueEmpty.sqf @@ -1,4 +1,4 @@ -#include "..\script_component.hpp" +#include "script_component.hpp" /* * Author: 3Mydlo3 * Checks whether play queue is empty. diff --git a/addons/music/functions/fn_playNextMusic.sqf b/addons/music/functions/fn_playNextMusic.sqf index 84258bc..a45cbad 100644 --- a/addons/music/functions/fn_playNextMusic.sqf +++ b/addons/music/functions/fn_playNextMusic.sqf @@ -1,4 +1,4 @@ -#include "..\script_component.hpp" +#include "script_component.hpp" /* * Author: 3Mydlo3 * Plays next music from the queue. diff --git a/addons/music/initSettings.inc.sqf b/addons/music/initSettings.inc.sqf new file mode 100644 index 0000000..1f4ae82 --- /dev/null +++ b/addons/music/initSettings.inc.sqf @@ -0,0 +1,8 @@ +[ + QGVAR(damageAlarmEnabled), + "CHECKBOX", + [LSTRING(DamageAlarmEnabled), LSTRING(DamageAlarmEnabled_Description)], + [LSTRING(Settings_DisplayNameClient)], + true, + false +] call CBA_fnc_addSetting; diff --git a/addons/music/stringtable.xml b/addons/music/stringtable.xml index 2ae2e2d..63ae0a6 100644 --- a/addons/music/stringtable.xml +++ b/addons/music/stringtable.xml @@ -13,5 +13,17 @@ Controls whether this component is active. Pozwala kontrolować czy komponent jest włączony. + + Damage alarm + Alarm o uszkodzeniach + + + Audible alarm when your vehicle gets damaged. + Alarm dźwiękowy gdy Twój pojazd zostanie uszkodzony. + + + Damage received + Otrzymano uszkodzenia + diff --git a/addons/rearm/config.cpp b/addons/rearm/config.cpp index d821136..2949b60 100644 --- a/addons/rearm/config.cpp +++ b/addons/rearm/config.cpp @@ -7,7 +7,7 @@ class CfgPatches { weapons[] = {}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = { - "afwg_main" + "afwg_common" }; author = "ArmaForces"; VERSION_CONFIG; diff --git a/addons/rearm/functions/fn_addRearmAction.sqf b/addons/rearm/functions/fn_addRearmAction.sqf index 5e324d9..1ac3df4 100644 --- a/addons/rearm/functions/fn_addRearmAction.sqf +++ b/addons/rearm/functions/fn_addRearmAction.sqf @@ -1,4 +1,4 @@ -#include "..\script_component.hpp" +#include "script_component.hpp" /* * Author: 3Mydlo3 * Creates rearm action for given entity. diff --git a/addons/rearm/functions/fn_canRearm.sqf b/addons/rearm/functions/fn_canRearm.sqf index 8ccc6b3..be845c5 100644 --- a/addons/rearm/functions/fn_canRearm.sqf +++ b/addons/rearm/functions/fn_canRearm.sqf @@ -1,4 +1,4 @@ -#include "..\script_component.hpp" +#include "script_component.hpp" /* * Author: 3Mydlo3 * Checks if caller can rearm target. diff --git a/addons/rearm/functions/fn_completeRearm.sqf b/addons/rearm/functions/fn_completeRearm.sqf index ecb3071..73b219a 100644 --- a/addons/rearm/functions/fn_completeRearm.sqf +++ b/addons/rearm/functions/fn_completeRearm.sqf @@ -1,4 +1,4 @@ -#include "..\script_component.hpp" +#include "script_component.hpp" /* * Author: 3Mydlo3 * Completes repair fully repairing vehicle diff --git a/addons/rearm/functions/fn_interruptedRearm.sqf b/addons/rearm/functions/fn_interruptedRearm.sqf index c42dbf2..4901bab 100644 --- a/addons/rearm/functions/fn_interruptedRearm.sqf +++ b/addons/rearm/functions/fn_interruptedRearm.sqf @@ -1,4 +1,4 @@ -#include "..\script_component.hpp" +#include "script_component.hpp" /* * Author: 3Mydlo3 * Handles rearm process interruption. @@ -16,7 +16,7 @@ params ["_target"]; private _lastCombatActive = _target getVariable ["MDL_lastCombatActive", -GVAR(repairMinNoCombatTime)]; if (_lastCombatActive + GVAR(repairMinNoCombatTime) > CBA_missionTime) exitWith { - systemChat LLSTRING(VehicleInCombat); + systemChat LELSTRING(Common,VehicleInCombat); }; systemChat LLSTRING(RearmInterrupted); diff --git a/addons/rearm/functions/fn_rearmVehicle.sqf b/addons/rearm/functions/fn_rearmVehicle.sqf index e6c8f13..731a74f 100644 --- a/addons/rearm/functions/fn_rearmVehicle.sqf +++ b/addons/rearm/functions/fn_rearmVehicle.sqf @@ -1,4 +1,4 @@ -#include "..\script_component.hpp" +#include "script_component.hpp" /* * Author: 3Mydlo3 * Handles rearming vehicle. diff --git a/addons/refuel/XEH_preInit.sqf b/addons/refuel/XEH_preInit.sqf index ecb5d0c..6706cf8 100644 --- a/addons/refuel/XEH_preInit.sqf +++ b/addons/refuel/XEH_preInit.sqf @@ -5,4 +5,6 @@ PREP_RECOMPILE_START; #include "XEH_PREP.hpp" PREP_RECOMPILE_END; +#include "initSettings.inc.sqf" + ADDON = true; diff --git a/addons/refuel/config.cpp b/addons/refuel/config.cpp index d821136..2949b60 100644 --- a/addons/refuel/config.cpp +++ b/addons/refuel/config.cpp @@ -7,7 +7,7 @@ class CfgPatches { weapons[] = {}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = { - "afwg_main" + "afwg_common" }; author = "ArmaForces"; VERSION_CONFIG; diff --git a/addons/refuel/functions/fn_addRefuelAction.sqf b/addons/refuel/functions/fn_addRefuelAction.sqf index 15b4b21..642cdda 100644 --- a/addons/refuel/functions/fn_addRefuelAction.sqf +++ b/addons/refuel/functions/fn_addRefuelAction.sqf @@ -1,4 +1,4 @@ -#include "..\script_component.hpp" +#include "script_component.hpp" /* * Author: 3Mydlo3 * Creates refuel action for given entity. diff --git a/addons/refuel/functions/fn_canRefuel.sqf b/addons/refuel/functions/fn_canRefuel.sqf index f3482c4..6c3b7a9 100644 --- a/addons/refuel/functions/fn_canRefuel.sqf +++ b/addons/refuel/functions/fn_canRefuel.sqf @@ -1,4 +1,4 @@ -#include "..\script_component.hpp" +#include "script_component.hpp" /* * Author: 3Mydlo3 * Checks if caller can repair target. diff --git a/addons/refuel/functions/fn_completeRefuel.sqf b/addons/refuel/functions/fn_completeRefuel.sqf index 1944376..984a275 100644 --- a/addons/refuel/functions/fn_completeRefuel.sqf +++ b/addons/refuel/functions/fn_completeRefuel.sqf @@ -1,4 +1,4 @@ -#include "..\script_component.hpp" +#include "script_component.hpp" /* * Author: 3Mydlo3 * Completes refueling fully fueling vehicle diff --git a/addons/refuel/functions/fn_interruptedRefuel.sqf b/addons/refuel/functions/fn_interruptedRefuel.sqf index 5f03d7f..c287021 100644 --- a/addons/refuel/functions/fn_interruptedRefuel.sqf +++ b/addons/refuel/functions/fn_interruptedRefuel.sqf @@ -1,4 +1,4 @@ -#include "..\script_component.hpp" +#include "script_component.hpp" /* * Author: 3Mydlo3 * Handles refuel process interruption. @@ -18,7 +18,7 @@ private _currentFuel = fuel _target * 100; private _lastCombatActive = _target getVariable ["MDL_lastCombatActive", -GVAR(repairMinNoCombatTime)]; if (_lastCombatActive + GVAR(repairMinNoCombatTime) > CBA_missionTime) exitWith { - systemChat LLSTRING(VehicleInCombat); + systemChat LELSTRING(Common,VehicleInCombat); }; systemChat format [LLSTRING(RefuelInterrupted), _currentFuel]; diff --git a/addons/refuel/functions/fn_progressRefuel.sqf b/addons/refuel/functions/fn_progressRefuel.sqf index 3d4525e..39a57e4 100644 --- a/addons/refuel/functions/fn_progressRefuel.sqf +++ b/addons/refuel/functions/fn_progressRefuel.sqf @@ -1,4 +1,4 @@ -#include "..\script_component.hpp" +#include "script_component.hpp" /* * Author: 3Mydlo3 * Handles refuel progress @@ -21,13 +21,13 @@ private _stepsWithRefuel = _target getVariable ["MDL_refuelAtSteps", []]; if (_stepsWithRefuel isEqualTo []) exitWith {}; private _nextRefuelStep = _stepsWithRefuel select (count _stepsWithRefuel - 1); - + if (_frame > _nextRefuelStep) then { // For display purposes only private _newFuel = fuel _target + REFUEL_AMOUNT; private _newFuelPercent = (_newFuel*100) min 100; systemChat format [LLSTRING(RefuelProgress), _newFuelPercent]; - + // Actual refueling ["MDL_refuelVehicle", [_target, _newFuel]] call CBA_fnc_globalEvent; diff --git a/addons/refuel/functions/fn_refuelVehicle.sqf b/addons/refuel/functions/fn_refuelVehicle.sqf index e7688fd..a2726b6 100644 --- a/addons/refuel/functions/fn_refuelVehicle.sqf +++ b/addons/refuel/functions/fn_refuelVehicle.sqf @@ -1,4 +1,4 @@ -#include "..\script_component.hpp" +#include "script_component.hpp" /* * Author: 3Mydlo3 * Handles refueling vehicle. diff --git a/addons/refuel/functions/fn_startRefuel.sqf b/addons/refuel/functions/fn_startRefuel.sqf index fd979a3..9673805 100644 --- a/addons/refuel/functions/fn_startRefuel.sqf +++ b/addons/refuel/functions/fn_startRefuel.sqf @@ -1,4 +1,4 @@ -#include "..\script_component.hpp" +#include "script_component.hpp" /* * Author: 3Mydlo3 * Handles repair start. diff --git a/addons/refuel/initSettings.inc.sqf b/addons/refuel/initSettings.inc.sqf new file mode 100644 index 0000000..a59a2f5 --- /dev/null +++ b/addons/refuel/initSettings.inc.sqf @@ -0,0 +1,2 @@ + +GVAR(fuelConsumptionMultiplier) = 4; diff --git a/addons/repair/XEH_preInit.sqf b/addons/repair/XEH_preInit.sqf index ecb5d0c..6706cf8 100644 --- a/addons/repair/XEH_preInit.sqf +++ b/addons/repair/XEH_preInit.sqf @@ -5,4 +5,6 @@ PREP_RECOMPILE_START; #include "XEH_PREP.hpp" PREP_RECOMPILE_END; +#include "initSettings.inc.sqf" + ADDON = true; diff --git a/addons/repair/config.cpp b/addons/repair/config.cpp index d821136..2949b60 100644 --- a/addons/repair/config.cpp +++ b/addons/repair/config.cpp @@ -7,7 +7,7 @@ class CfgPatches { weapons[] = {}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = { - "afwg_main" + "afwg_common" }; author = "ArmaForces"; VERSION_CONFIG; diff --git a/addons/repair/functions/fn_addRepairAction.sqf b/addons/repair/functions/fn_addRepairAction.sqf index 54a165e..541a3b0 100644 --- a/addons/repair/functions/fn_addRepairAction.sqf +++ b/addons/repair/functions/fn_addRepairAction.sqf @@ -1,4 +1,4 @@ -#include "..\script_component.hpp" +#include "script_component.hpp" /* * Author: 3Mydlo3 * Creates repair action for given entity. diff --git a/addons/repair/functions/fn_canRepair.sqf b/addons/repair/functions/fn_canRepair.sqf index f7a7635..a0f560b 100644 --- a/addons/repair/functions/fn_canRepair.sqf +++ b/addons/repair/functions/fn_canRepair.sqf @@ -1,4 +1,4 @@ -#include "..\script_component.hpp" +#include "script_component.hpp" /* * Author: 3Mydlo3 * Checks if caller can repair target. diff --git a/addons/repair/functions/fn_completeRepair.sqf b/addons/repair/functions/fn_completeRepair.sqf index 8a42a87..4e22dcd 100644 --- a/addons/repair/functions/fn_completeRepair.sqf +++ b/addons/repair/functions/fn_completeRepair.sqf @@ -1,4 +1,4 @@ -#include "..\script_component.hpp" +#include "script_component.hpp" /* * Author: 3Mydlo3 * Completes repair fully repairing vehicle diff --git a/addons/repair/functions/fn_interruptedRepair.sqf b/addons/repair/functions/fn_interruptedRepair.sqf index b3f1f4f..0ffe24e 100644 --- a/addons/repair/functions/fn_interruptedRepair.sqf +++ b/addons/repair/functions/fn_interruptedRepair.sqf @@ -1,4 +1,4 @@ -#include "..\script_component.hpp" +#include "script_component.hpp" /* * Author: 3Mydlo3 * Handles repair process interruption. @@ -19,7 +19,7 @@ private _currentHp = _target getVariable ["MDL_currentHp", MAX_HP]; private _lastCombatActive = _target getVariable ["MDL_lastCombatActive", -1]; if (_lastCombatActive + GVAR(repairMinNoCombatTime) > CBA_missionTime) exitWith { - systemChat LLSTRING(VehicleInCombat); + systemChat LELSTRING(Common,VehicleInCombat); }; systemChat format [LLSTRING(RepairInterrupted), _currentHp, _maxHp]; diff --git a/addons/repair/functions/fn_progressRepair.sqf b/addons/repair/functions/fn_progressRepair.sqf index 6dc658a..e683b2d 100644 --- a/addons/repair/functions/fn_progressRepair.sqf +++ b/addons/repair/functions/fn_progressRepair.sqf @@ -1,4 +1,4 @@ -#include "..\script_component.hpp" +#include "script_component.hpp" /* * Author: 3Mydlo3 * Handles repair progress @@ -21,14 +21,14 @@ private _stepsWithRepair = _target getVariable ["MDL_repairAtSteps", []]; if (_stepsWithRepair isEqualTo []) exitWith {}; private _nextRepairStep = _stepsWithRepair select (count _stepsWithRepair - 1); - + if (_frame > _nextRepairStep) then { // For display purposes only private _maxHp = _target getVariable ["MDL_maxHp", MAX_HP]; private _currentHp = _target getVariable ["MDL_currentHp", MAX_HP]; private _newHp = (_currentHp + HEAL_AMOUNT) min 10; systemChat format [LLSTRING(RepairProgress), _newHp, _maxHp]; - + // Actual healing ["MDL_healDamage", [_target, HEAL_AMOUNT]] call CBA_fnc_serverEvent; diff --git a/addons/repair/functions/fn_startRepair.sqf b/addons/repair/functions/fn_startRepair.sqf index a24af75..b4d8421 100644 --- a/addons/repair/functions/fn_startRepair.sqf +++ b/addons/repair/functions/fn_startRepair.sqf @@ -1,4 +1,4 @@ -#include "..\script_component.hpp" +#include "script_component.hpp" /* * Author: 3Mydlo3 * Handles repair start. diff --git a/addons/repair/initSettings.inc.sqf b/addons/repair/initSettings.inc.sqf new file mode 100644 index 0000000..e93088d --- /dev/null +++ b/addons/repair/initSettings.inc.sqf @@ -0,0 +1,8 @@ +[ + QGVAR(repairMinNoCombatTime), + "TIME", + ["Minimum no combat time", "Vehicle must be out of combat for long enough to be able to be repaired"], + [LSTRING(Settings_DisplayName), localize "str_state_repair"], + [0, 900, 60], + true +] call CBA_fnc_addSetting; diff --git a/addons/stats/XEH_PREP.hpp b/addons/stats/XEH_PREP.hpp index f59a368..12ad1f9 100644 --- a/addons/stats/XEH_PREP.hpp +++ b/addons/stats/XEH_PREP.hpp @@ -1,3 +1,4 @@ +PREP(addExperienceForKill); PREP(getPlayerStats); PREP(loadAllStats); PREP(loadPlayerStats); diff --git a/addons/stats/XEH_postInit.sqf b/addons/stats/XEH_postInit.sqf index 8a6cdd3..e74fa2e 100644 --- a/addons/stats/XEH_postInit.sqf +++ b/addons/stats/XEH_postInit.sqf @@ -2,4 +2,16 @@ if (isServer) exitWith {}; +["MDL_xpReceived", { + params ["_receivedXp", "_newLifeXp", "_newTotalXp"]; + + systemChat format [LLSTRING(XpReceived), _receivedXp, _newLifeXp, _newTotalXp]; +}] call CBA_fnc_addEventHandler; + +["MDL_showXp", { + params ["_currentXp", "_totalXp"]; + + systemChat format [LLSTRING(CurrentAndTotalXp), _currentXp, _totalXp]; +}] call CBA_fnc_addEventHandler; + call FUNC(loadPlayerStats); diff --git a/addons/experience/functions/fn_addExperienceForKill.sqf b/addons/stats/functions/fn_addExperienceForKill.sqf similarity index 97% rename from addons/experience/functions/fn_addExperienceForKill.sqf rename to addons/stats/functions/fn_addExperienceForKill.sqf index 293c05f..4e1aa01 100644 --- a/addons/experience/functions/fn_addExperienceForKill.sqf +++ b/addons/stats/functions/fn_addExperienceForKill.sqf @@ -1,4 +1,4 @@ -#include "..\script_component.hpp" +#include "script_component.hpp" /* * Author: 3Mydlo3 * Adds experience for kill to crew of shooting vehicle diff --git a/addons/stats/functions/fn_getPlayerStats.sqf b/addons/stats/functions/fn_getPlayerStats.sqf index 22c7374..8d2decb 100644 --- a/addons/stats/functions/fn_getPlayerStats.sqf +++ b/addons/stats/functions/fn_getPlayerStats.sqf @@ -1,5 +1,5 @@ -#include "..\script_component.hpp" +#include "script_component.hpp" /* * Author: 3Mydlo3 * Retrieves player stats. diff --git a/addons/stats/functions/fn_loadAllStats.sqf b/addons/stats/functions/fn_loadAllStats.sqf index 01381b0..2282426 100644 --- a/addons/stats/functions/fn_loadAllStats.sqf +++ b/addons/stats/functions/fn_loadAllStats.sqf @@ -1,5 +1,5 @@ -#include "..\script_component.hpp" +#include "script_component.hpp" /* * Author: 3Mydlo3 * Loads all stats from previous missions. diff --git a/addons/stats/functions/fn_loadPlayerStats.sqf b/addons/stats/functions/fn_loadPlayerStats.sqf index a788807..6f2f281 100644 --- a/addons/stats/functions/fn_loadPlayerStats.sqf +++ b/addons/stats/functions/fn_loadPlayerStats.sqf @@ -1,5 +1,5 @@ -#include "..\script_component.hpp" +#include "script_component.hpp" /* * Author: 3Mydlo3 * Loads player's stats from previous mission. diff --git a/addons/stats/functions/fn_playerKilled.sqf b/addons/stats/functions/fn_playerKilled.sqf index 97d07ba..c5c0c3f 100644 --- a/addons/stats/functions/fn_playerKilled.sqf +++ b/addons/stats/functions/fn_playerKilled.sqf @@ -1,5 +1,5 @@ -#include "..\script_component.hpp" +#include "script_component.hpp" /* * Author: 3Mydlo3 * Handles player death. Updates his stats. diff --git a/addons/stats/functions/fn_saveAllStats.sqf b/addons/stats/functions/fn_saveAllStats.sqf index 364dfb8..77758bc 100644 --- a/addons/stats/functions/fn_saveAllStats.sqf +++ b/addons/stats/functions/fn_saveAllStats.sqf @@ -1,5 +1,5 @@ -#include "..\script_component.hpp" +#include "script_component.hpp" /* * Author: 3Mydlo3 * Saves all stats to profile namespace. diff --git a/addons/stats/functions/fn_showPlayerStats.sqf b/addons/stats/functions/fn_showPlayerStats.sqf index 3670d79..7af537d 100644 --- a/addons/stats/functions/fn_showPlayerStats.sqf +++ b/addons/stats/functions/fn_showPlayerStats.sqf @@ -1,5 +1,5 @@ -#include "..\script_component.hpp" +#include "script_component.hpp" /* * Author: 3Mydlo3 * Shows all player stats from whole campaign. diff --git a/addons/stats/stringtable.xml b/addons/stats/stringtable.xml index 6d35f8e..92a8240 100644 --- a/addons/stats/stringtable.xml +++ b/addons/stats/stringtable.xml @@ -13,5 +13,9 @@ Controls whether this component is active. Pozwala kontrolować czy komponent jest włączony. + + Received %1 XP. New total from last death: %2 XP. Grand total: %3 XP + Otrzymano %1 PD. Całkowite PD od ostatniej śmierci: %2. PD w kampanii: %3 XP + From e6a56a17f044c260ab0b48e44d28be45d34a46da Mon Sep 17 00:00:00 2001 From: 3Mydlo3 Date: Mon, 16 Dec 2024 15:22:54 +0100 Subject: [PATCH 07/47] HEMTT suggestions --- .hemtt/lints.toml | 5 + addons/common/CfgTest.hpp | 28 +++ addons/common/config.cpp | 3 +- addons/damage/functions/fn_keDamage.sqf | 2 +- addons/init/functions/fn_vehicleInit.sqf | 2 +- addons/stats/functions/fn_showPlayerStats.sqf | 2 +- include/a3/ui_f/hpp/definedikcodes.inc | 190 ++++++++++++++++++ 7 files changed, 228 insertions(+), 4 deletions(-) create mode 100644 .hemtt/lints.toml create mode 100644 addons/common/CfgTest.hpp create mode 100644 include/a3/ui_f/hpp/definedikcodes.inc diff --git a/.hemtt/lints.toml b/.hemtt/lints.toml new file mode 100644 index 0000000..a8fd636 --- /dev/null +++ b/.hemtt/lints.toml @@ -0,0 +1,5 @@ +[sqf.command_case] +options.ignore = [ + "EAST", + "WEST", +] diff --git a/addons/common/CfgTest.hpp b/addons/common/CfgTest.hpp new file mode 100644 index 0000000..15dfb9f --- /dev/null +++ b/addons/common/CfgTest.hpp @@ -0,0 +1,28 @@ +#define HAS_PENETRATOR(penetratorClass) NO_DAMAGE \ + { \ + child = penetratorClass;\ + } + +class CfgTest +{ + westMarkerColor[] = { + __EVAL(96/255), + __EVAL(159/255), + __EVAL(197/255), + 0.85 + }; + + class NO_DAMAGE + { + damage = 0; + type = "NONE"; + }; + + class Test : HAS_PENETRATOR(TestPenetrator); + + class TestPenetrator + { + damage = 2; + type = "HEAT"; + }; +}; diff --git a/addons/common/config.cpp b/addons/common/config.cpp index 212e50f..0c9fa25 100644 --- a/addons/common/config.cpp +++ b/addons/common/config.cpp @@ -15,4 +15,5 @@ class CfgPatches { }; #include "CfgEventHandlers.hpp" -#include "CfgWargay.hpp" +#include "CfgTest.hpp" +// #include "CfgWargay.hpp" diff --git a/addons/damage/functions/fn_keDamage.sqf b/addons/damage/functions/fn_keDamage.sqf index 5c14257..c14bc27 100644 --- a/addons/damage/functions/fn_keDamage.sqf +++ b/addons/damage/functions/fn_keDamage.sqf @@ -21,7 +21,7 @@ params ["_armor", "_ammoBaseDamage", "_velocity", "_initialVelocity"]; if (_ammoBaseDamage isEqualTo 0.1) exitWith { - if (_armor isEqualTo 0) then { _ammoBaseDamage } else { 0 }; + [0, _ammoBaseDamage] select (_armor isEqualTo 0) }; private _damageFromVelocity = _ammoBaseDamage - ((vectorMagnitude _initialVelocity - vectorMagnitude _velocity) / VELOCITY_STEP); diff --git a/addons/init/functions/fn_vehicleInit.sqf b/addons/init/functions/fn_vehicleInit.sqf index af47bba..964310f 100644 --- a/addons/init/functions/fn_vehicleInit.sqf +++ b/addons/init/functions/fn_vehicleInit.sqf @@ -22,7 +22,7 @@ private _vehicleHitpoints = [_entity, "hitpoints"] call FUNC(getVehicleInfo); if (_vehicleHitpoints isEqualTo objNull) then { private _defaultHitpoints = 10; _vehicleHitpoints = _defaultHitpoints; - diag_log format ["WARGAY WARNING Hitpoints not defined for %1. Setting default hitpoints %2", typeof _entity, _defaultHitpoints]; + diag_log format ["WARGAY WARNING Hitpoints not defined for %1. Setting default hitpoints %2", typeOf _entity, _defaultHitpoints]; } else { diag_log format ["WARGAY DEBUG Hitpoints %1", str _vehicleHitpoints]; }; diff --git a/addons/stats/functions/fn_showPlayerStats.sqf b/addons/stats/functions/fn_showPlayerStats.sqf index 7af537d..bfeefee 100644 --- a/addons/stats/functions/fn_showPlayerStats.sqf +++ b/addons/stats/functions/fn_showPlayerStats.sqf @@ -33,7 +33,7 @@ private _messageParts = [ lineBreak, format ["XP: %1", _currentXp], lineBreak, - format ["XP Total: %2", _totalXp], + format ["XP Total: %1", _totalXp], lineBreak, lineBreak, format ["Played missions: %1", _playedMissions], diff --git a/include/a3/ui_f/hpp/definedikcodes.inc b/include/a3/ui_f/hpp/definedikcodes.inc new file mode 100644 index 0000000..c641d60 --- /dev/null +++ b/include/a3/ui_f/hpp/definedikcodes.inc @@ -0,0 +1,190 @@ +#ifndef DIK_ESCAPE + +/**************************************************************************** + * + * DirectInput keyboard scan codes + * + ****************************************************************************/ + +#define DIK_ESCAPE 0x01 +#define DIK_1 0x02 +#define DIK_2 0x03 +#define DIK_3 0x04 +#define DIK_4 0x05 +#define DIK_5 0x06 +#define DIK_6 0x07 +#define DIK_7 0x08 +#define DIK_8 0x09 +#define DIK_9 0x0A +#define DIK_0 0x0B +#define DIK_MINUS 0x0C /* - on main keyboard */ +#define DIK_EQUALS 0x0D +#define DIK_BACK 0x0E /* backspace */ +#define DIK_TAB 0x0F +#define DIK_Q 0x10 +#define DIK_W 0x11 +#define DIK_E 0x12 +#define DIK_R 0x13 +#define DIK_T 0x14 +#define DIK_Y 0x15 +#define DIK_U 0x16 +#define DIK_I 0x17 +#define DIK_O 0x18 +#define DIK_P 0x19 +#define DIK_LBRACKET 0x1A +#define DIK_RBRACKET 0x1B +#define DIK_RETURN 0x1C /* Enter on main keyboard */ +#define DIK_LCONTROL 0x1D +#define DIK_A 0x1E +#define DIK_S 0x1F +#define DIK_D 0x20 +#define DIK_F 0x21 +#define DIK_G 0x22 +#define DIK_H 0x23 +#define DIK_J 0x24 +#define DIK_K 0x25 +#define DIK_L 0x26 +#define DIK_SEMICOLON 0x27 +#define DIK_APOSTROPHE 0x28 +#define DIK_GRAVE 0x29 /* accent grave */ +#define DIK_LSHIFT 0x2A +#define DIK_BACKSLASH 0x2B +#define DIK_Z 0x2C +#define DIK_X 0x2D +#define DIK_C 0x2E +#define DIK_V 0x2F +#define DIK_B 0x30 +#define DIK_N 0x31 +#define DIK_M 0x32 +#define DIK_COMMA 0x33 +#define DIK_PERIOD 0x34 /* . on main keyboard */ +#define DIK_SLASH 0x35 /* / on main keyboard */ +#define DIK_RSHIFT 0x36 +#define DIK_MULTIPLY 0x37 /* * on numeric keypad */ +#define DIK_LMENU 0x38 /* left Alt */ +#define DIK_SPACE 0x39 +#define DIK_CAPITAL 0x3A +#define DIK_F1 0x3B +#define DIK_F2 0x3C +#define DIK_F3 0x3D +#define DIK_F4 0x3E +#define DIK_F5 0x3F +#define DIK_F6 0x40 +#define DIK_F7 0x41 +#define DIK_F8 0x42 +#define DIK_F9 0x43 +#define DIK_F10 0x44 +#define DIK_NUMLOCK 0x45 +#define DIK_SCROLL 0x46 /* Scroll Lock */ +#define DIK_NUMPAD7 0x47 +#define DIK_NUMPAD8 0x48 +#define DIK_NUMPAD9 0x49 +#define DIK_SUBTRACT 0x4A /* - on numeric keypad */ +#define DIK_NUMPAD4 0x4B +#define DIK_NUMPAD5 0x4C +#define DIK_NUMPAD6 0x4D +#define DIK_ADD 0x4E /* + on numeric keypad */ +#define DIK_NUMPAD1 0x4F +#define DIK_NUMPAD2 0x50 +#define DIK_NUMPAD3 0x51 +#define DIK_NUMPAD0 0x52 +#define DIK_DECIMAL 0x53 /* . on numeric keypad */ +#define DIK_OEM_102 0x56 /* < > | on UK/Germany keyboards */ +#define DIK_F11 0x57 +#define DIK_F12 0x58 + +#define DIK_F13 0x64 /* (NEC PC98) */ +#define DIK_F14 0x65 /* (NEC PC98) */ +#define DIK_F15 0x66 /* (NEC PC98) */ + +#define DIK_KANA 0x70 /* (Japanese keyboard) */ +#define DIK_ABNT_C1 0x73 /* / ? on Portugese (Brazilian) keyboards */ +#define DIK_CONVERT 0x79 /* (Japanese keyboard) */ +#define DIK_NOCONVERT 0x7B /* (Japanese keyboard) */ +#define DIK_YEN 0x7D /* (Japanese keyboard) */ +#define DIK_ABNT_C2 0x7E /* Numpad . on Portugese (Brazilian) keyboards */ +#define DIK_NUMPADEQUALS 0x8D /* = on numeric keypad (NEC PC98) */ +#define DIK_PREVTRACK 0x90 /* Previous Track (DIK_CIRCUMFLEX on Japanese keyboard) */ +#define DIK_AT 0x91 /* (NEC PC98) */ +#define DIK_COLON 0x92 /* (NEC PC98) */ +#define DIK_UNDERLINE 0x93 /* (NEC PC98) */ +#define DIK_KANJI 0x94 /* (Japanese keyboard) */ +#define DIK_STOP 0x95 /* (NEC PC98) */ +#define DIK_AX 0x96 /* (Japan AX) */ +#define DIK_UNLABELED 0x97 /* (J3100) */ +#define DIK_NEXTTRACK 0x99 /* Next Track */ +#define DIK_NUMPADENTER 0x9C /* Enter on numeric keypad */ +#define DIK_RCONTROL 0x9D +#define DIK_MUTE 0xA0 /* Mute */ +#define DIK_CALCULATOR 0xA1 /* Calculator */ +#define DIK_PLAYPAUSE 0xA2 /* Play / Pause */ +#define DIK_MEDIASTOP 0xA4 /* Media Stop */ +#define DIK_VOLUMEDOWN 0xAE /* Volume - */ +#define DIK_VOLUMEUP 0xB0 /* Volume + */ +#define DIK_WEBHOME 0xB2 /* Web home */ +#define DIK_NUMPADCOMMA 0xB3 /* , on numeric keypad (NEC PC98) */ +#define DIK_DIVIDE 0xB5 /* / on numeric keypad */ +#define DIK_SYSRQ 0xB7 +#define DIK_RMENU 0xB8 /* right Alt */ +#define DIK_PAUSE 0xC5 /* Pause */ +#define DIK_HOME 0xC7 /* Home on arrow keypad */ +#define DIK_UP 0xC8 /* UpArrow on arrow keypad */ +#define DIK_PRIOR 0xC9 /* PgUp on arrow keypad */ +#define DIK_LEFT 0xCB /* LeftArrow on arrow keypad */ +#define DIK_RIGHT 0xCD /* RightArrow on arrow keypad */ +#define DIK_END 0xCF /* End on arrow keypad */ +#define DIK_DOWN 0xD0 /* DownArrow on arrow keypad */ +#define DIK_NEXT 0xD1 /* PgDn on arrow keypad */ +#define DIK_INSERT 0xD2 /* Insert on arrow keypad */ +#define DIK_DELETE 0xD3 /* Delete on arrow keypad */ +#define DIK_LWIN 0xDB /* Left Windows key */ +#define DIK_RWIN 0xDC /* Right Windows key */ +#define DIK_APPS 0xDD /* AppMenu key */ +#define DIK_POWER 0xDE /* System Power */ +#define DIK_SLEEP 0xDF /* System Sleep */ +#define DIK_WAKE 0xE3 /* System Wake */ +#define DIK_WEBSEARCH 0xE5 /* Web Search */ +#define DIK_WEBFAVORITES 0xE6 /* Web Favorites */ +#define DIK_WEBREFRESH 0xE7 /* Web Refresh */ +#define DIK_WEBSTOP 0xE8 /* Web Stop */ +#define DIK_WEBFORWARD 0xE9 /* Web Forward */ +#define DIK_WEBBACK 0xEA /* Web Back */ +#define DIK_MYCOMPUTER 0xEB /* My Computer */ +#define DIK_MAIL 0xEC /* Mail */ +#define DIK_MEDIASELECT 0xED /* Media Select */ + +/* + * Alternate names for keys, to facilitate transition from DOS. + */ +#define DIK_BACKSPACE DIK_BACK /* backspace */ +#define DIK_NUMPADSTAR DIK_MULTIPLY /* * on numeric keypad */ +#define DIK_LALT DIK_LMENU /* left Alt */ +#define DIK_CAPSLOCK DIK_CAPITAL /* CapsLock */ +#define DIK_NUMPADMINUS DIK_SUBTRACT /* - on numeric keypad */ +#define DIK_NUMPADPLUS DIK_ADD /* + on numeric keypad */ +#define DIK_NUMPADPERIOD DIK_DECIMAL /* . on numeric keypad */ +#define DIK_NUMPADSLASH DIK_DIVIDE /* / on numeric keypad */ +#define DIK_RALT DIK_RMENU /* right Alt */ +#define DIK_UPARROW DIK_UP /* UpArrow on arrow keypad */ +#define DIK_PGUP DIK_PRIOR /* PgUp on arrow keypad */ +#define DIK_LEFTARROW DIK_LEFT /* LeftArrow on arrow keypad */ +#define DIK_RIGHTARROW DIK_RIGHT /* RightArrow on arrow keypad */ +#define DIK_DOWNARROW DIK_DOWN /* DownArrow on arrow keypad */ +#define DIK_PGDN DIK_NEXT /* PgDn on arrow keypad */ + +/* + * Alternate names for keys originally not used on US keyboards. + */ +#define DIK_CIRCUMFLEX DIK_PREVTRACK /* Japanese keyboard */ + + +/* + * Combination keys + */ +#define INPUT_CTRL_OFFSET 512 +#define INPUT_SHIFT_OFFSET 1024 +#define INPUT_ALT_OFFSET 2048 + + +#endif /* DIK_ESCAPE */ + From 2352b3744159a575ade7d96c4f7d8812fe283246 Mon Sep 17 00:00:00 2001 From: 3Mydlo3 Date: Mon, 16 Dec 2024 15:26:37 +0100 Subject: [PATCH 08/47] Reset version to 0.1 --- addons/main/script_version.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/main/script_version.hpp b/addons/main/script_version.hpp index 960a5de..9859d34 100644 --- a/addons/main/script_version.hpp +++ b/addons/main/script_version.hpp @@ -1,3 +1,3 @@ -#define MAJOR 1 -#define MINOR 17 +#define MAJOR 0 +#define MINOR 1 #define PATCH 0 From 0c61259588e3f67015093dc81785b0d5f02290a7 Mon Sep 17 00:00:00 2001 From: 3Mydlo3 Date: Mon, 16 Dec 2024 16:06:39 +0100 Subject: [PATCH 09/47] Move color config to settings --- addons/common/CfgWargay.hpp | 119 +++++++++++++++--------------- addons/common/config.cpp | 4 +- addons/hud/initSettings.inc.sqf | 30 +++++++- addons/icons/initSettings.inc.sqf | 45 ++++++++++- 4 files changed, 132 insertions(+), 66 deletions(-) diff --git a/addons/common/CfgWargay.hpp b/addons/common/CfgWargay.hpp index 1142a7b..0aa07ba 100644 --- a/addons/common/CfgWargay.hpp +++ b/addons/common/CfgWargay.hpp @@ -41,40 +41,41 @@ #define RECON_AIR_ICON __EVAL(getMissionPath "gui\markers\b_recon_air.paa") #define RECON_ANTITANK_ICON __EVAL(getMissionPath "gui\markers\b_recon_antitank.paa") #define RECON_ARMOR_ICON __EVAL(getMissionPath "gui\markers\b_recon_armor.paa") +#define RECON_ICON __EVAL(getMissionPath "gui\markers\b_recon.paa") // TODO: Add missing icons class CfgWargay { - westMarkerColor[] = { - __EVAL(96/255), - __EVAL(159/255), - __EVAL(197/255), - 0.85 - }; - westAiMarkerColor[] = { - __EVAL(29/255), - __EVAL(197/255), - __EVAL(46/255), - 0.85 - }; - eastMarkerColor[] = { - __EVAL(192/255), - __EVAL(29/255), - __EVAL(46/255), - 0.85 - }; - filledHpColor[] = { - __EVAL(117/255), - 1, - 1, - 1 - }; - missingHpColor[] = { - __EVAL(117/255), - __EVAL(117/255), - __EVAL(117/255), - 1 - }; + // westMarkerColor[] = { + // __EVAL(96/255), + // __EVAL(159/255), + // __EVAL(197/255), + // 0.85 + // }; + // westAiMarkerColor[] = { + // __EVAL(29/255), + // __EVAL(197/255), + // __EVAL(46/255), + // 0.85 + // }; + // eastMarkerColor[] = { + // __EVAL(192/255), + // __EVAL(29/255), + // __EVAL(46/255), + // 0.85 + // }; + // filledHpColor[] = { + // __EVAL(117/255), + // 1, + // 1, + // 1 + // }; + // missingHpColor[] = { + // __EVAL(117/255), + // __EVAL(117/255), + // __EVAL(117/255), + // 1 + // }; class Ammo { @@ -174,7 +175,7 @@ class CfgWargay damage = 13; type = "AP"; }; - class CUP_Sh_105mm_M456A2 : HAS_PENETRATOR(CUP_P_105mm_M393A3); + // class CUP_Sh_105mm_M456A2 : HAS_PENETRATOR(CUP_P_105mm_M393A3); class CUP_P_105mm_M393A3 { damage = 13; @@ -196,14 +197,14 @@ class CfgWargay Western Germany */ // LARS-2 - class gm_rocket_mlrs_110mm_he_dm21 : HAS_PENETRATOR(gm_warhead_mlrs_110mm_he_dm21); + // class gm_rocket_mlrs_110mm_he_dm21 : HAS_PENETRATOR(gm_warhead_mlrs_110mm_he_dm21); class gm_warhead_mlrs_110mm_he_dm21 { damage = 7; type = "HE"; }; - class gm_rocket_mlrs_110mm_icm_dm602 : HAS_PENETRATOR(gm_penetrator_m77); + // class gm_rocket_mlrs_110mm_icm_dm602 : HAS_PENETRATOR(gm_penetrator_m77); class gm_penetrator_m77 { damage = 6; @@ -211,14 +212,14 @@ class CfgWargay }; // M-109G - class gm_shell_155mm_he_dm21 : HAS_PENETRATOR(gm_warhead_155mm_he_dm21); + // class gm_shell_155mm_he_dm21 : HAS_PENETRATOR(gm_warhead_155mm_he_dm21); class gm_warhead_155mm_he_dm21 { damage = 7; type = "HE"; }; - class gm_shell_155mm_icm_602 : HAS_PENETRATOR(gm_warhead_155mm_icm_602); + // class gm_shell_155mm_icm_602 : HAS_PENETRATOR(gm_warhead_155mm_icm_602); class gm_warhead_155mm_icm_602 { damage = 6; @@ -244,7 +245,7 @@ class CfgWargay type = "AP"; }; - class gm_shell_105x617mm_heat_mp_t_dm12 : HAS_PENETRATOR(gm_penetrator_105x617mm_heat_dm12); + // class gm_shell_105x617mm_heat_mp_t_dm12 : HAS_PENETRATOR(gm_penetrator_105x617mm_heat_dm12); class gm_penetrator_105x617mm_heat_dm12 { damage = 11; @@ -268,7 +269,7 @@ class CfgWargay }; // Milan - class gm_missile_milan_heat_dm92 : HAS_PENETRATOR(gm_penetrator_milan_HEAT_dm92); + // class gm_missile_milan_heat_dm92 : HAS_PENETRATOR(gm_penetrator_milan_HEAT_dm92); class gm_penetrator_milan_HEAT_dm82 { damage = 17; @@ -277,8 +278,8 @@ class CfgWargay class gm_penetrator_milan_HEAT_dm92 : gm_penetrator_milan_HEAT_dm82 {}; // Hot 1 & 2 - class gm_missile_hot_heat_dm72 : HAS_PENETRATOR(gm_penetrator_hot_HEAT_dm72); - class gm_missile_hot_heat_dm102 : HAS_PENETRATOR(gm_penetrator_hot_HEAT_dm102); + // class gm_missile_hot_heat_dm72 : HAS_PENETRATOR(gm_penetrator_hot_HEAT_dm72); + // class gm_missile_hot_heat_dm102 : HAS_PENETRATOR(gm_penetrator_hot_HEAT_dm102); class gm_penetrator_hot_HEAT_dm72 { damage = 22; @@ -291,7 +292,7 @@ class CfgWargay }; // PzF 44 - class gm_rocket_44x537mm_HEAT_dm32 : HAS_PENETRATOR(gm_penetrator_44x537mm_HEAT_dm32); + // class gm_rocket_44x537mm_HEAT_dm32 : HAS_PENETRATOR(gm_penetrator_44x537mm_HEAT_dm32); class gm_penetrator_44x537mm_HEAT_dm32 { damage = 16; @@ -299,9 +300,9 @@ class CfgWargay }; // PzF 3 - class gm_rocket_60mm_HEAT_dm12 : HAS_PENETRATOR(gm_penetrator_60mm_HEAT_dm12); - class gm_rocket_60mm_HEAT_dm22 : HAS_PENETRATOR(gm_penetrator_60mm_HEAT_dm22); - class gm_rocket_60mm_HEAT_dm32 : HAS_PENETRATOR(gm_penetrator_60mm_HEAT_dm32); + // class gm_rocket_60mm_HEAT_dm12 : HAS_PENETRATOR(gm_penetrator_60mm_HEAT_dm12); + // class gm_rocket_60mm_HEAT_dm22 : HAS_PENETRATOR(gm_penetrator_60mm_HEAT_dm22); + // class gm_rocket_60mm_HEAT_dm32 : HAS_PENETRATOR(gm_penetrator_60mm_HEAT_dm32); class gm_penetrator_60mm_HEAT_dm12 { damage = 24; @@ -317,10 +318,10 @@ class CfgWargay }; // PzF 84 (Carl Gustav M2) - class gm_rocket_84x245mm_HEAT_T_DM12 : HAS_PENETRATOR(gm_penetrator_84x245mm_HEAT_DM12); - class gm_rocket_84x245mm_HEAT_T_DM12A1 : HAS_PENETRATOR(gm_penetrator_84x245mm_HEAT_DM12A1); - class gm_rocket_84x245mm_HEAT_T_DM22 : HAS_PENETRATOR(gm_penetrator_84x245mm_HEAT_DM22); - class gm_rocket_84x245mm_HEAT_T_DM32 : HAS_PENETRATOR(gm_penetrator_84x245mm_HEAT_DM32); + // class gm_rocket_84x245mm_HEAT_T_DM12 : HAS_PENETRATOR(gm_penetrator_84x245mm_HEAT_DM12); + // class gm_rocket_84x245mm_HEAT_T_DM12A1 : HAS_PENETRATOR(gm_penetrator_84x245mm_HEAT_DM12A1); + // class gm_rocket_84x245mm_HEAT_T_DM22 : HAS_PENETRATOR(gm_penetrator_84x245mm_HEAT_DM22); + // class gm_rocket_84x245mm_HEAT_T_DM32 : HAS_PENETRATOR(gm_penetrator_84x245mm_HEAT_DM32); class gm_penetrator_84x245mm_HEAT_DM12 { @@ -338,7 +339,7 @@ class CfgWargay }; // M72A3 LAW - class gm_rocket_66mm_HEAT_m72a3 : HAS_PENETRATOR(gm_penetrator_66mm_HEAT_m72a3); + // class gm_rocket_66mm_HEAT_m72a3 : HAS_PENETRATOR(gm_penetrator_66mm_HEAT_m72a3); class gm_penetrator_66mm_HEAT_m72a3 { @@ -380,7 +381,7 @@ class CfgWargay class gm_shell_100x695mm_he_of412 : Tank_HE {}; // T-55A - class gm_shell_100x695mm_heat_t_bk5m : HAS_PENETRATOR(gm_penetrator_100x695mm_HEAT_T_bk5m); + // class gm_shell_100x695mm_heat_t_bk5m : HAS_PENETRATOR(gm_penetrator_100x695mm_HEAT_T_bk5m); class gm_penetrator_100x695mm_HEAT_T_bk5m { damage = 11; @@ -405,14 +406,14 @@ class CfgWargay class gm_bullet_23x152mm_api_t_bzt : gm_bullet_23x152mm_hei_t_ofzt {}; // SFL 2S1 - class gm_shell_122x447mm_he_of462 : HAS_PENETRATOR(gm_warhead_122x447mm_he_of462); + // class gm_shell_122x447mm_he_of462 : HAS_PENETRATOR(gm_warhead_122x447mm_he_of462); class gm_warhead_122x447mm_he_of462 { damage = 6; type = "HE"; }; - class gm_shell_122x447mm_heat_t_bk13 : HAS_PENETRATOR(gm_penetrator_122x447mm_heat_t_bk13); + // class gm_shell_122x447mm_heat_t_bk13 : HAS_PENETRATOR(gm_penetrator_122x447mm_heat_t_bk13); class gm_penetrator_122x447mm_heat_bk6m { damage = 9; @@ -421,14 +422,14 @@ class CfgWargay class gm_penetrator_122x447mm_heat_t_bk13 : gm_penetrator_122x447mm_heat_bk6m {}; // BM-21 - class gm_rocket_mlrs_122mm_he_9m22u : HAS_PENETRATOR(gm_warhead_122mm_he_9m22u); + // class gm_rocket_mlrs_122mm_he_9m22u : HAS_PENETRATOR(gm_warhead_122mm_he_9m22u); class gm_warhead_122mm_he_9m22u { damage = 7; type = "HE"; }; - class gm_rocket_mlrs_122mm_icm_9m218 : HAS_PENETRATOR(gm_penetrator_3b30); + // class gm_rocket_mlrs_122mm_icm_9m218 : HAS_PENETRATOR(gm_penetrator_3b30); class gm_penetrator_3b30 { damage = 5; @@ -450,7 +451,7 @@ class CfgWargay }; class gm_shell_73mm_he_og15v : Small_HE {}; - class gm_missile_maljutka_heat_9m14m : HAS_PENETRATOR(gm_penetrator_maljutka_HEAT_9m14m); + // class gm_missile_maljutka_heat_9m14m : HAS_PENETRATOR(gm_penetrator_maljutka_HEAT_9m14m); class gm_penetrator_maljutka_HEAT_9m14 { damage = 15; @@ -463,7 +464,7 @@ class CfgWargay class gm_bullet_145x114mm_HEI_T_MDZ : HMG_HE {}; // Fagot - class gm_missile_fagot_heat_9m111 : HAS_PENETRATOR(gm_penetrator_fagot_HEAT_9m111); + // class gm_missile_fagot_heat_9m111 : HAS_PENETRATOR(gm_penetrator_fagot_HEAT_9m111); class gm_penetrator_fagot_HEAT_9m111 { damage = 16; @@ -471,14 +472,14 @@ class CfgWargay }; - class gm_rocket_40mm_HEAT_pg7v : HAS_PENETRATOR(gm_penetrator_40mm_HEAT_pg7v); + // class gm_rocket_40mm_HEAT_pg7v : HAS_PENETRATOR(gm_penetrator_40mm_HEAT_pg7v); class gm_penetrator_40mm_HEAT_pg7v { damage = 14; type = "HEAT"; }; - class gm_rocket_40mm_HEAT_pg7v1 : HAS_PENETRATOR(gm_penetrator_40mm_HEAT_pg7v1); + // class gm_rocket_40mm_HEAT_pg7v1 : HAS_PENETRATOR(gm_penetrator_40mm_HEAT_pg7v1); class gm_penetrator_40mm_HEAT_pg7v1 { damage = 17; @@ -491,14 +492,14 @@ class CfgWargay type = "HE"; }; - class gm_rocket_55mm_heat_s5k : HAS_PENETRATOR(gm_penetrator_55mm_heat_s5k); + // class gm_rocket_55mm_heat_s5k : HAS_PENETRATOR(gm_penetrator_55mm_heat_s5k); class gm_penetrator_55mm_heat_s5k { damage = 2; type = "HEAT"; }; - class gm_rocket_64mm_HEAT_pg18 : HAS_PENETRATOR(gm_penetrator_64mm_HEAT_pg18); + // class gm_rocket_64mm_HEAT_pg18 : HAS_PENETRATOR(gm_penetrator_64mm_HEAT_pg18); class gm_penetrator_64mm_HEAT_pg18 { damage = 15; diff --git a/addons/common/config.cpp b/addons/common/config.cpp index 0c9fa25..e50c24f 100644 --- a/addons/common/config.cpp +++ b/addons/common/config.cpp @@ -15,5 +15,5 @@ class CfgPatches { }; #include "CfgEventHandlers.hpp" -#include "CfgTest.hpp" -// #include "CfgWargay.hpp" +// #include "CfgTest.hpp" +#include "CfgWargay.hpp" diff --git a/addons/hud/initSettings.inc.sqf b/addons/hud/initSettings.inc.sqf index fc0e09f..d25cef1 100644 --- a/addons/hud/initSettings.inc.sqf +++ b/addons/hud/initSettings.inc.sqf @@ -1,2 +1,28 @@ -GVAR(filledHpColor) = getArray (missionConfigFile >> "CfgWargay" >> "filledHpColor"); -GVAR(missingHpColor) = getArray (missionConfigFile >> "CfgWargay" >> "missingHpColor"); +// GVAR(filledHpColor) = getArray (missionConfigFile >> "CfgWargay" >> "filledHpColor"); +// GVAR(missingHpColor) = getArray (missionConfigFile >> "CfgWargay" >> "missingHpColor"); + +[ + QGVAR(filledHpColor), + "COLOR", + ["-test color-", "-tooltip-"], + "My Category", + [ + 117/255, + 1, + 1, + 1 + ] +] call CBA_fnc_addSetting; + +[ + QGVAR(missingHpColor), + "COLOR", + ["-test color-", "-tooltip-"], + "My Category", + [ + 117/255, + 117/255, + 117/255, + 1 + ] +] call CBA_fnc_addSetting; diff --git a/addons/icons/initSettings.inc.sqf b/addons/icons/initSettings.inc.sqf index 8fc606f..1a32261 100644 --- a/addons/icons/initSettings.inc.sqf +++ b/addons/icons/initSettings.inc.sqf @@ -26,6 +26,45 @@ ] call CBA_fnc_addSetting; GVAR(iconWidth) = getNumber (configFile >> "CfgInGameUI" >> "Cursor" >> "activeWidth"); -GVAR(westIconColor) = getArray (missionConfigFile >> "CfgWargay" >> "westMarkerColor"); -GVAR(westAiIconColor) = getArray (missionConfigFile >> "CfgWargay" >> "westAiMarkerColor"); -GVAR(eastIconColor) = getArray (missionConfigFile >> "CfgWargay" >> "eastMarkerColor"); +// GVAR(westIconColor) = getArray (missionConfigFile >> "CfgWargay" >> "westMarkerColor"); +// GVAR(westAiIconColor) = getArray (missionConfigFile >> "CfgWargay" >> "westAiMarkerColor"); +// GVAR(eastIconColor) = getArray (missionConfigFile >> "CfgWargay" >> "eastMarkerColor"); + +[ + QGVAR(westIconColor), + "COLOR", + ["-test color-", "-tooltip-"], + "My Category", + [ + 96/255, + 159/255, + 197/255, + 0.85 + ] +] call CBA_fnc_addSetting; + +[ + QGVAR(westAiIconColor), + "COLOR", + ["-test color-", "-tooltip-"], + "My Category", + [ + 29/255, + 197/255, + 46/255, + 0.85 + ] +] call CBA_fnc_addSetting; + +[ + QGVAR(eastIconColor), + "COLOR", + ["-test color-", "-tooltip-"], + "My Category", + [ + 192/255, + 29/255, + 46/255, + 0.85 + ] +] call CBA_fnc_addSetting; From c96e54dada3a245fea2d0fc295bacfa2d0e074e2 Mon Sep 17 00:00:00 2001 From: 3Mydlo3 Date: Mon, 16 Dec 2024 16:10:57 +0100 Subject: [PATCH 10/47] Rename from fn_ to fnc_ --- ...hicle.sqf => fnc_createVehicleInfoForNonConfiguredVehicle.sqf} | 0 .../functions/{fn_currentHpString.sqf => fnc_currentHpString.sqf} | 0 .../common/functions/{fn_getAmmoInfo.sqf => fnc_getAmmoInfo.sqf} | 0 .../{fn_getGroupVehicles.sqf => fnc_getGroupVehicles.sqf} | 0 ...fn_getVehicleDisplayName.sqf => fnc_getVehicleDisplayName.sqf} | 0 .../functions/{fn_getVehicleInfo.sqf => fnc_getVehicleInfo.sqf} | 0 addons/common/functions/{fn_isEngineer.sqf => fnc_isEngineer.sqf} | 0 .../functions/{fn_isReconVehicle.sqf => fnc_isReconVehicle.sqf} | 0 .../{fn_shouldStillBeVisible.sqf => fnc_shouldStillBeVisible.sqf} | 0 .../damage/functions/{fn_applyDamage.sqf => fnc_applyDamage.sqf} | 0 ...alculateAndApplyDamage.sqf => fnc_calculateAndApplyDamage.sqf} | 0 addons/damage/functions/{fn_getHitDir.sqf => fnc_getHitDir.sqf} | 0 addons/damage/functions/{fn_heDamage.sqf => fnc_heDamage.sqf} | 0 addons/damage/functions/{fn_healDamage.sqf => fnc_healDamage.sqf} | 0 addons/damage/functions/{fn_heatDamage.sqf => fnc_heatDamage.sqf} | 0 addons/damage/functions/{fn_keDamage.sqf => fnc_keDamage.sqf} | 0 .../debug/functions/{fn_drawHitDebug.sqf => fnc_drawHitDebug.sqf} | 0 addons/debug/functions/{fn_initDebug.sqf => fnc_initDebug.sqf} | 0 .../functions/{fn_deployVehicle.sqf => fnc_deployVehicle.sqf} | 0 .../{fn_curatorObjectDeleted.sqf => fnc_curatorObjectDeleted.sqf} | 0 addons/event_handlers/functions/{fn_draw3D.sqf => fnc_draw3D.sqf} | 0 addons/event_handlers/functions/{fn_fired.sqf => fnc_fired.sqf} | 0 .../functions/{fn_handleDamage.sqf => fnc_handleDamage.sqf} | 0 .../functions/{fn_handleDamageMan.sqf => fnc_handleDamageMan.sqf} | 0 .../event_handlers/functions/{fn_hitPart.sqf => fnc_hitPart.sqf} | 0 .../{fn_knowsAboutChanged.sqf => fnc_knowsAboutChanged.sqf} | 0 .../{fn_initHitpointsDisplay.sqf => fnc_initHitpointsDisplay.sqf} | 0 addons/hud/functions/{fn_keyUnitInfo.sqf => fnc_keyUnitInfo.sqf} | 0 .../hud/functions/{fn_showUnitInfo.sqf => fnc_showUnitInfo.sqf} | 0 ..._updateHitpointsDisplay.sqf => fnc_updateHitpointsDisplay.sqf} | 0 addons/icons/functions/{fn_drawIcon.sqf => fnc_drawIcon.sqf} | 0 .../icons/functions/{fn_getIconPath.sqf => fnc_getIconPath.sqf} | 0 .../{fn_visibilityCheckLoop.sqf => fnc_visibilityCheckLoop.sqf} | 0 addons/init/functions/{fn_manInit.sqf => fnc_manInit.sqf} | 0 addons/init/functions/{fn_vehicleInit.sqf => fnc_vehicleInit.sqf} | 0 .../{fn_vehicleSpawnerInit.sqf => fnc_vehicleSpawnerInit.sqf} | 0 .../{fn_createVehicleMarker.sqf => fnc_createVehicleMarker.sqf} | 0 .../{fn_enemyMarkersLoop.sqf => fnc_enemyMarkersLoop.sqf} | 0 .../{fn_removeVehicleMarker.sqf => fnc_removeVehicleMarker.sqf} | 0 .../functions/{fn_addToMusicQueue.sqf => fnc_addToMusicQueue.sqf} | 0 .../functions/{fn_isMusicPlaying.sqf => fnc_isMusicPlaying.sqf} | 0 .../{fn_isMusicQueueEmpty.sqf => fnc_isMusicQueueEmpty.sqf} | 0 .../functions/{fn_playNextMusic.sqf => fnc_playNextMusic.sqf} | 0 .../functions/{fn_addRearmAction.sqf => fnc_addRearmAction.sqf} | 0 addons/rearm/functions/{fn_canRearm.sqf => fnc_canRearm.sqf} | 0 .../functions/{fn_completeRearm.sqf => fnc_completeRearm.sqf} | 0 .../{fn_interruptedRearm.sqf => fnc_interruptedRearm.sqf} | 0 .../rearm/functions/{fn_rearmVehicle.sqf => fnc_rearmVehicle.sqf} | 0 .../functions/{fn_addRefuelAction.sqf => fnc_addRefuelAction.sqf} | 0 addons/refuel/functions/{fn_canRefuel.sqf => fnc_canRefuel.sqf} | 0 .../functions/{fn_completeRefuel.sqf => fnc_completeRefuel.sqf} | 0 .../{fn_interruptedRefuel.sqf => fnc_interruptedRefuel.sqf} | 0 .../functions/{fn_progressRefuel.sqf => fnc_progressRefuel.sqf} | 0 .../functions/{fn_refuelVehicle.sqf => fnc_refuelVehicle.sqf} | 0 .../refuel/functions/{fn_startRefuel.sqf => fnc_startRefuel.sqf} | 0 .../functions/{fn_addRepairAction.sqf => fnc_addRepairAction.sqf} | 0 addons/repair/functions/{fn_canRepair.sqf => fnc_canRepair.sqf} | 0 .../functions/{fn_completeRepair.sqf => fnc_completeRepair.sqf} | 0 .../{fn_interruptedRepair.sqf => fnc_interruptedRepair.sqf} | 0 .../functions/{fn_progressRepair.sqf => fnc_progressRepair.sqf} | 0 .../repair/functions/{fn_startRepair.sqf => fnc_startRepair.sqf} | 0 .../{fn_addExperienceForKill.sqf => fnc_addExperienceForKill.sqf} | 0 .../functions/{fn_getPlayerStats.sqf => fnc_getPlayerStats.sqf} | 0 .../stats/functions/{fn_loadAllStats.sqf => fnc_loadAllStats.sqf} | 0 .../functions/{fn_loadPlayerStats.sqf => fnc_loadPlayerStats.sqf} | 0 .../stats/functions/{fn_playerKilled.sqf => fnc_playerKilled.sqf} | 0 .../stats/functions/{fn_saveAllStats.sqf => fnc_saveAllStats.sqf} | 0 .../functions/{fn_showPlayerStats.sqf => fnc_showPlayerStats.sqf} | 0 68 files changed, 0 insertions(+), 0 deletions(-) rename addons/common/functions/{fn_createVehicleInfoForNonConfiguredVehicle.sqf => fnc_createVehicleInfoForNonConfiguredVehicle.sqf} (100%) rename addons/common/functions/{fn_currentHpString.sqf => fnc_currentHpString.sqf} (100%) rename addons/common/functions/{fn_getAmmoInfo.sqf => fnc_getAmmoInfo.sqf} (100%) rename addons/common/functions/{fn_getGroupVehicles.sqf => fnc_getGroupVehicles.sqf} (100%) rename addons/common/functions/{fn_getVehicleDisplayName.sqf => fnc_getVehicleDisplayName.sqf} (100%) rename addons/common/functions/{fn_getVehicleInfo.sqf => fnc_getVehicleInfo.sqf} (100%) rename addons/common/functions/{fn_isEngineer.sqf => fnc_isEngineer.sqf} (100%) rename addons/common/functions/{fn_isReconVehicle.sqf => fnc_isReconVehicle.sqf} (100%) rename addons/common/functions/{fn_shouldStillBeVisible.sqf => fnc_shouldStillBeVisible.sqf} (100%) rename addons/damage/functions/{fn_applyDamage.sqf => fnc_applyDamage.sqf} (100%) rename addons/damage/functions/{fn_calculateAndApplyDamage.sqf => fnc_calculateAndApplyDamage.sqf} (100%) rename addons/damage/functions/{fn_getHitDir.sqf => fnc_getHitDir.sqf} (100%) rename addons/damage/functions/{fn_heDamage.sqf => fnc_heDamage.sqf} (100%) rename addons/damage/functions/{fn_healDamage.sqf => fnc_healDamage.sqf} (100%) rename addons/damage/functions/{fn_heatDamage.sqf => fnc_heatDamage.sqf} (100%) rename addons/damage/functions/{fn_keDamage.sqf => fnc_keDamage.sqf} (100%) rename addons/debug/functions/{fn_drawHitDebug.sqf => fnc_drawHitDebug.sqf} (100%) rename addons/debug/functions/{fn_initDebug.sqf => fnc_initDebug.sqf} (100%) rename addons/deployment/functions/{fn_deployVehicle.sqf => fnc_deployVehicle.sqf} (100%) rename addons/event_handlers/functions/{fn_curatorObjectDeleted.sqf => fnc_curatorObjectDeleted.sqf} (100%) rename addons/event_handlers/functions/{fn_draw3D.sqf => fnc_draw3D.sqf} (100%) rename addons/event_handlers/functions/{fn_fired.sqf => fnc_fired.sqf} (100%) rename addons/event_handlers/functions/{fn_handleDamage.sqf => fnc_handleDamage.sqf} (100%) rename addons/event_handlers/functions/{fn_handleDamageMan.sqf => fnc_handleDamageMan.sqf} (100%) rename addons/event_handlers/functions/{fn_hitPart.sqf => fnc_hitPart.sqf} (100%) rename addons/event_handlers/functions/{fn_knowsAboutChanged.sqf => fnc_knowsAboutChanged.sqf} (100%) rename addons/hud/functions/{fn_initHitpointsDisplay.sqf => fnc_initHitpointsDisplay.sqf} (100%) rename addons/hud/functions/{fn_keyUnitInfo.sqf => fnc_keyUnitInfo.sqf} (100%) rename addons/hud/functions/{fn_showUnitInfo.sqf => fnc_showUnitInfo.sqf} (100%) rename addons/hud/functions/{fn_updateHitpointsDisplay.sqf => fnc_updateHitpointsDisplay.sqf} (100%) rename addons/icons/functions/{fn_drawIcon.sqf => fnc_drawIcon.sqf} (100%) rename addons/icons/functions/{fn_getIconPath.sqf => fnc_getIconPath.sqf} (100%) rename addons/icons/functions/{fn_visibilityCheckLoop.sqf => fnc_visibilityCheckLoop.sqf} (100%) rename addons/init/functions/{fn_manInit.sqf => fnc_manInit.sqf} (100%) rename addons/init/functions/{fn_vehicleInit.sqf => fnc_vehicleInit.sqf} (100%) rename addons/init/functions/{fn_vehicleSpawnerInit.sqf => fnc_vehicleSpawnerInit.sqf} (100%) rename addons/markers/functions/{fn_createVehicleMarker.sqf => fnc_createVehicleMarker.sqf} (100%) rename addons/markers/functions/{fn_enemyMarkersLoop.sqf => fnc_enemyMarkersLoop.sqf} (100%) rename addons/markers/functions/{fn_removeVehicleMarker.sqf => fnc_removeVehicleMarker.sqf} (100%) rename addons/music/functions/{fn_addToMusicQueue.sqf => fnc_addToMusicQueue.sqf} (100%) rename addons/music/functions/{fn_isMusicPlaying.sqf => fnc_isMusicPlaying.sqf} (100%) rename addons/music/functions/{fn_isMusicQueueEmpty.sqf => fnc_isMusicQueueEmpty.sqf} (100%) rename addons/music/functions/{fn_playNextMusic.sqf => fnc_playNextMusic.sqf} (100%) rename addons/rearm/functions/{fn_addRearmAction.sqf => fnc_addRearmAction.sqf} (100%) rename addons/rearm/functions/{fn_canRearm.sqf => fnc_canRearm.sqf} (100%) rename addons/rearm/functions/{fn_completeRearm.sqf => fnc_completeRearm.sqf} (100%) rename addons/rearm/functions/{fn_interruptedRearm.sqf => fnc_interruptedRearm.sqf} (100%) rename addons/rearm/functions/{fn_rearmVehicle.sqf => fnc_rearmVehicle.sqf} (100%) rename addons/refuel/functions/{fn_addRefuelAction.sqf => fnc_addRefuelAction.sqf} (100%) rename addons/refuel/functions/{fn_canRefuel.sqf => fnc_canRefuel.sqf} (100%) rename addons/refuel/functions/{fn_completeRefuel.sqf => fnc_completeRefuel.sqf} (100%) rename addons/refuel/functions/{fn_interruptedRefuel.sqf => fnc_interruptedRefuel.sqf} (100%) rename addons/refuel/functions/{fn_progressRefuel.sqf => fnc_progressRefuel.sqf} (100%) rename addons/refuel/functions/{fn_refuelVehicle.sqf => fnc_refuelVehicle.sqf} (100%) rename addons/refuel/functions/{fn_startRefuel.sqf => fnc_startRefuel.sqf} (100%) rename addons/repair/functions/{fn_addRepairAction.sqf => fnc_addRepairAction.sqf} (100%) rename addons/repair/functions/{fn_canRepair.sqf => fnc_canRepair.sqf} (100%) rename addons/repair/functions/{fn_completeRepair.sqf => fnc_completeRepair.sqf} (100%) rename addons/repair/functions/{fn_interruptedRepair.sqf => fnc_interruptedRepair.sqf} (100%) rename addons/repair/functions/{fn_progressRepair.sqf => fnc_progressRepair.sqf} (100%) rename addons/repair/functions/{fn_startRepair.sqf => fnc_startRepair.sqf} (100%) rename addons/stats/functions/{fn_addExperienceForKill.sqf => fnc_addExperienceForKill.sqf} (100%) rename addons/stats/functions/{fn_getPlayerStats.sqf => fnc_getPlayerStats.sqf} (100%) rename addons/stats/functions/{fn_loadAllStats.sqf => fnc_loadAllStats.sqf} (100%) rename addons/stats/functions/{fn_loadPlayerStats.sqf => fnc_loadPlayerStats.sqf} (100%) rename addons/stats/functions/{fn_playerKilled.sqf => fnc_playerKilled.sqf} (100%) rename addons/stats/functions/{fn_saveAllStats.sqf => fnc_saveAllStats.sqf} (100%) rename addons/stats/functions/{fn_showPlayerStats.sqf => fnc_showPlayerStats.sqf} (100%) diff --git a/addons/common/functions/fn_createVehicleInfoForNonConfiguredVehicle.sqf b/addons/common/functions/fnc_createVehicleInfoForNonConfiguredVehicle.sqf similarity index 100% rename from addons/common/functions/fn_createVehicleInfoForNonConfiguredVehicle.sqf rename to addons/common/functions/fnc_createVehicleInfoForNonConfiguredVehicle.sqf diff --git a/addons/common/functions/fn_currentHpString.sqf b/addons/common/functions/fnc_currentHpString.sqf similarity index 100% rename from addons/common/functions/fn_currentHpString.sqf rename to addons/common/functions/fnc_currentHpString.sqf diff --git a/addons/common/functions/fn_getAmmoInfo.sqf b/addons/common/functions/fnc_getAmmoInfo.sqf similarity index 100% rename from addons/common/functions/fn_getAmmoInfo.sqf rename to addons/common/functions/fnc_getAmmoInfo.sqf diff --git a/addons/common/functions/fn_getGroupVehicles.sqf b/addons/common/functions/fnc_getGroupVehicles.sqf similarity index 100% rename from addons/common/functions/fn_getGroupVehicles.sqf rename to addons/common/functions/fnc_getGroupVehicles.sqf diff --git a/addons/common/functions/fn_getVehicleDisplayName.sqf b/addons/common/functions/fnc_getVehicleDisplayName.sqf similarity index 100% rename from addons/common/functions/fn_getVehicleDisplayName.sqf rename to addons/common/functions/fnc_getVehicleDisplayName.sqf diff --git a/addons/common/functions/fn_getVehicleInfo.sqf b/addons/common/functions/fnc_getVehicleInfo.sqf similarity index 100% rename from addons/common/functions/fn_getVehicleInfo.sqf rename to addons/common/functions/fnc_getVehicleInfo.sqf diff --git a/addons/common/functions/fn_isEngineer.sqf b/addons/common/functions/fnc_isEngineer.sqf similarity index 100% rename from addons/common/functions/fn_isEngineer.sqf rename to addons/common/functions/fnc_isEngineer.sqf diff --git a/addons/common/functions/fn_isReconVehicle.sqf b/addons/common/functions/fnc_isReconVehicle.sqf similarity index 100% rename from addons/common/functions/fn_isReconVehicle.sqf rename to addons/common/functions/fnc_isReconVehicle.sqf diff --git a/addons/common/functions/fn_shouldStillBeVisible.sqf b/addons/common/functions/fnc_shouldStillBeVisible.sqf similarity index 100% rename from addons/common/functions/fn_shouldStillBeVisible.sqf rename to addons/common/functions/fnc_shouldStillBeVisible.sqf diff --git a/addons/damage/functions/fn_applyDamage.sqf b/addons/damage/functions/fnc_applyDamage.sqf similarity index 100% rename from addons/damage/functions/fn_applyDamage.sqf rename to addons/damage/functions/fnc_applyDamage.sqf diff --git a/addons/damage/functions/fn_calculateAndApplyDamage.sqf b/addons/damage/functions/fnc_calculateAndApplyDamage.sqf similarity index 100% rename from addons/damage/functions/fn_calculateAndApplyDamage.sqf rename to addons/damage/functions/fnc_calculateAndApplyDamage.sqf diff --git a/addons/damage/functions/fn_getHitDir.sqf b/addons/damage/functions/fnc_getHitDir.sqf similarity index 100% rename from addons/damage/functions/fn_getHitDir.sqf rename to addons/damage/functions/fnc_getHitDir.sqf diff --git a/addons/damage/functions/fn_heDamage.sqf b/addons/damage/functions/fnc_heDamage.sqf similarity index 100% rename from addons/damage/functions/fn_heDamage.sqf rename to addons/damage/functions/fnc_heDamage.sqf diff --git a/addons/damage/functions/fn_healDamage.sqf b/addons/damage/functions/fnc_healDamage.sqf similarity index 100% rename from addons/damage/functions/fn_healDamage.sqf rename to addons/damage/functions/fnc_healDamage.sqf diff --git a/addons/damage/functions/fn_heatDamage.sqf b/addons/damage/functions/fnc_heatDamage.sqf similarity index 100% rename from addons/damage/functions/fn_heatDamage.sqf rename to addons/damage/functions/fnc_heatDamage.sqf diff --git a/addons/damage/functions/fn_keDamage.sqf b/addons/damage/functions/fnc_keDamage.sqf similarity index 100% rename from addons/damage/functions/fn_keDamage.sqf rename to addons/damage/functions/fnc_keDamage.sqf diff --git a/addons/debug/functions/fn_drawHitDebug.sqf b/addons/debug/functions/fnc_drawHitDebug.sqf similarity index 100% rename from addons/debug/functions/fn_drawHitDebug.sqf rename to addons/debug/functions/fnc_drawHitDebug.sqf diff --git a/addons/debug/functions/fn_initDebug.sqf b/addons/debug/functions/fnc_initDebug.sqf similarity index 100% rename from addons/debug/functions/fn_initDebug.sqf rename to addons/debug/functions/fnc_initDebug.sqf diff --git a/addons/deployment/functions/fn_deployVehicle.sqf b/addons/deployment/functions/fnc_deployVehicle.sqf similarity index 100% rename from addons/deployment/functions/fn_deployVehicle.sqf rename to addons/deployment/functions/fnc_deployVehicle.sqf diff --git a/addons/event_handlers/functions/fn_curatorObjectDeleted.sqf b/addons/event_handlers/functions/fnc_curatorObjectDeleted.sqf similarity index 100% rename from addons/event_handlers/functions/fn_curatorObjectDeleted.sqf rename to addons/event_handlers/functions/fnc_curatorObjectDeleted.sqf diff --git a/addons/event_handlers/functions/fn_draw3D.sqf b/addons/event_handlers/functions/fnc_draw3D.sqf similarity index 100% rename from addons/event_handlers/functions/fn_draw3D.sqf rename to addons/event_handlers/functions/fnc_draw3D.sqf diff --git a/addons/event_handlers/functions/fn_fired.sqf b/addons/event_handlers/functions/fnc_fired.sqf similarity index 100% rename from addons/event_handlers/functions/fn_fired.sqf rename to addons/event_handlers/functions/fnc_fired.sqf diff --git a/addons/event_handlers/functions/fn_handleDamage.sqf b/addons/event_handlers/functions/fnc_handleDamage.sqf similarity index 100% rename from addons/event_handlers/functions/fn_handleDamage.sqf rename to addons/event_handlers/functions/fnc_handleDamage.sqf diff --git a/addons/event_handlers/functions/fn_handleDamageMan.sqf b/addons/event_handlers/functions/fnc_handleDamageMan.sqf similarity index 100% rename from addons/event_handlers/functions/fn_handleDamageMan.sqf rename to addons/event_handlers/functions/fnc_handleDamageMan.sqf diff --git a/addons/event_handlers/functions/fn_hitPart.sqf b/addons/event_handlers/functions/fnc_hitPart.sqf similarity index 100% rename from addons/event_handlers/functions/fn_hitPart.sqf rename to addons/event_handlers/functions/fnc_hitPart.sqf diff --git a/addons/event_handlers/functions/fn_knowsAboutChanged.sqf b/addons/event_handlers/functions/fnc_knowsAboutChanged.sqf similarity index 100% rename from addons/event_handlers/functions/fn_knowsAboutChanged.sqf rename to addons/event_handlers/functions/fnc_knowsAboutChanged.sqf diff --git a/addons/hud/functions/fn_initHitpointsDisplay.sqf b/addons/hud/functions/fnc_initHitpointsDisplay.sqf similarity index 100% rename from addons/hud/functions/fn_initHitpointsDisplay.sqf rename to addons/hud/functions/fnc_initHitpointsDisplay.sqf diff --git a/addons/hud/functions/fn_keyUnitInfo.sqf b/addons/hud/functions/fnc_keyUnitInfo.sqf similarity index 100% rename from addons/hud/functions/fn_keyUnitInfo.sqf rename to addons/hud/functions/fnc_keyUnitInfo.sqf diff --git a/addons/hud/functions/fn_showUnitInfo.sqf b/addons/hud/functions/fnc_showUnitInfo.sqf similarity index 100% rename from addons/hud/functions/fn_showUnitInfo.sqf rename to addons/hud/functions/fnc_showUnitInfo.sqf diff --git a/addons/hud/functions/fn_updateHitpointsDisplay.sqf b/addons/hud/functions/fnc_updateHitpointsDisplay.sqf similarity index 100% rename from addons/hud/functions/fn_updateHitpointsDisplay.sqf rename to addons/hud/functions/fnc_updateHitpointsDisplay.sqf diff --git a/addons/icons/functions/fn_drawIcon.sqf b/addons/icons/functions/fnc_drawIcon.sqf similarity index 100% rename from addons/icons/functions/fn_drawIcon.sqf rename to addons/icons/functions/fnc_drawIcon.sqf diff --git a/addons/icons/functions/fn_getIconPath.sqf b/addons/icons/functions/fnc_getIconPath.sqf similarity index 100% rename from addons/icons/functions/fn_getIconPath.sqf rename to addons/icons/functions/fnc_getIconPath.sqf diff --git a/addons/icons/functions/fn_visibilityCheckLoop.sqf b/addons/icons/functions/fnc_visibilityCheckLoop.sqf similarity index 100% rename from addons/icons/functions/fn_visibilityCheckLoop.sqf rename to addons/icons/functions/fnc_visibilityCheckLoop.sqf diff --git a/addons/init/functions/fn_manInit.sqf b/addons/init/functions/fnc_manInit.sqf similarity index 100% rename from addons/init/functions/fn_manInit.sqf rename to addons/init/functions/fnc_manInit.sqf diff --git a/addons/init/functions/fn_vehicleInit.sqf b/addons/init/functions/fnc_vehicleInit.sqf similarity index 100% rename from addons/init/functions/fn_vehicleInit.sqf rename to addons/init/functions/fnc_vehicleInit.sqf diff --git a/addons/init/functions/fn_vehicleSpawnerInit.sqf b/addons/init/functions/fnc_vehicleSpawnerInit.sqf similarity index 100% rename from addons/init/functions/fn_vehicleSpawnerInit.sqf rename to addons/init/functions/fnc_vehicleSpawnerInit.sqf diff --git a/addons/markers/functions/fn_createVehicleMarker.sqf b/addons/markers/functions/fnc_createVehicleMarker.sqf similarity index 100% rename from addons/markers/functions/fn_createVehicleMarker.sqf rename to addons/markers/functions/fnc_createVehicleMarker.sqf diff --git a/addons/markers/functions/fn_enemyMarkersLoop.sqf b/addons/markers/functions/fnc_enemyMarkersLoop.sqf similarity index 100% rename from addons/markers/functions/fn_enemyMarkersLoop.sqf rename to addons/markers/functions/fnc_enemyMarkersLoop.sqf diff --git a/addons/markers/functions/fn_removeVehicleMarker.sqf b/addons/markers/functions/fnc_removeVehicleMarker.sqf similarity index 100% rename from addons/markers/functions/fn_removeVehicleMarker.sqf rename to addons/markers/functions/fnc_removeVehicleMarker.sqf diff --git a/addons/music/functions/fn_addToMusicQueue.sqf b/addons/music/functions/fnc_addToMusicQueue.sqf similarity index 100% rename from addons/music/functions/fn_addToMusicQueue.sqf rename to addons/music/functions/fnc_addToMusicQueue.sqf diff --git a/addons/music/functions/fn_isMusicPlaying.sqf b/addons/music/functions/fnc_isMusicPlaying.sqf similarity index 100% rename from addons/music/functions/fn_isMusicPlaying.sqf rename to addons/music/functions/fnc_isMusicPlaying.sqf diff --git a/addons/music/functions/fn_isMusicQueueEmpty.sqf b/addons/music/functions/fnc_isMusicQueueEmpty.sqf similarity index 100% rename from addons/music/functions/fn_isMusicQueueEmpty.sqf rename to addons/music/functions/fnc_isMusicQueueEmpty.sqf diff --git a/addons/music/functions/fn_playNextMusic.sqf b/addons/music/functions/fnc_playNextMusic.sqf similarity index 100% rename from addons/music/functions/fn_playNextMusic.sqf rename to addons/music/functions/fnc_playNextMusic.sqf diff --git a/addons/rearm/functions/fn_addRearmAction.sqf b/addons/rearm/functions/fnc_addRearmAction.sqf similarity index 100% rename from addons/rearm/functions/fn_addRearmAction.sqf rename to addons/rearm/functions/fnc_addRearmAction.sqf diff --git a/addons/rearm/functions/fn_canRearm.sqf b/addons/rearm/functions/fnc_canRearm.sqf similarity index 100% rename from addons/rearm/functions/fn_canRearm.sqf rename to addons/rearm/functions/fnc_canRearm.sqf diff --git a/addons/rearm/functions/fn_completeRearm.sqf b/addons/rearm/functions/fnc_completeRearm.sqf similarity index 100% rename from addons/rearm/functions/fn_completeRearm.sqf rename to addons/rearm/functions/fnc_completeRearm.sqf diff --git a/addons/rearm/functions/fn_interruptedRearm.sqf b/addons/rearm/functions/fnc_interruptedRearm.sqf similarity index 100% rename from addons/rearm/functions/fn_interruptedRearm.sqf rename to addons/rearm/functions/fnc_interruptedRearm.sqf diff --git a/addons/rearm/functions/fn_rearmVehicle.sqf b/addons/rearm/functions/fnc_rearmVehicle.sqf similarity index 100% rename from addons/rearm/functions/fn_rearmVehicle.sqf rename to addons/rearm/functions/fnc_rearmVehicle.sqf diff --git a/addons/refuel/functions/fn_addRefuelAction.sqf b/addons/refuel/functions/fnc_addRefuelAction.sqf similarity index 100% rename from addons/refuel/functions/fn_addRefuelAction.sqf rename to addons/refuel/functions/fnc_addRefuelAction.sqf diff --git a/addons/refuel/functions/fn_canRefuel.sqf b/addons/refuel/functions/fnc_canRefuel.sqf similarity index 100% rename from addons/refuel/functions/fn_canRefuel.sqf rename to addons/refuel/functions/fnc_canRefuel.sqf diff --git a/addons/refuel/functions/fn_completeRefuel.sqf b/addons/refuel/functions/fnc_completeRefuel.sqf similarity index 100% rename from addons/refuel/functions/fn_completeRefuel.sqf rename to addons/refuel/functions/fnc_completeRefuel.sqf diff --git a/addons/refuel/functions/fn_interruptedRefuel.sqf b/addons/refuel/functions/fnc_interruptedRefuel.sqf similarity index 100% rename from addons/refuel/functions/fn_interruptedRefuel.sqf rename to addons/refuel/functions/fnc_interruptedRefuel.sqf diff --git a/addons/refuel/functions/fn_progressRefuel.sqf b/addons/refuel/functions/fnc_progressRefuel.sqf similarity index 100% rename from addons/refuel/functions/fn_progressRefuel.sqf rename to addons/refuel/functions/fnc_progressRefuel.sqf diff --git a/addons/refuel/functions/fn_refuelVehicle.sqf b/addons/refuel/functions/fnc_refuelVehicle.sqf similarity index 100% rename from addons/refuel/functions/fn_refuelVehicle.sqf rename to addons/refuel/functions/fnc_refuelVehicle.sqf diff --git a/addons/refuel/functions/fn_startRefuel.sqf b/addons/refuel/functions/fnc_startRefuel.sqf similarity index 100% rename from addons/refuel/functions/fn_startRefuel.sqf rename to addons/refuel/functions/fnc_startRefuel.sqf diff --git a/addons/repair/functions/fn_addRepairAction.sqf b/addons/repair/functions/fnc_addRepairAction.sqf similarity index 100% rename from addons/repair/functions/fn_addRepairAction.sqf rename to addons/repair/functions/fnc_addRepairAction.sqf diff --git a/addons/repair/functions/fn_canRepair.sqf b/addons/repair/functions/fnc_canRepair.sqf similarity index 100% rename from addons/repair/functions/fn_canRepair.sqf rename to addons/repair/functions/fnc_canRepair.sqf diff --git a/addons/repair/functions/fn_completeRepair.sqf b/addons/repair/functions/fnc_completeRepair.sqf similarity index 100% rename from addons/repair/functions/fn_completeRepair.sqf rename to addons/repair/functions/fnc_completeRepair.sqf diff --git a/addons/repair/functions/fn_interruptedRepair.sqf b/addons/repair/functions/fnc_interruptedRepair.sqf similarity index 100% rename from addons/repair/functions/fn_interruptedRepair.sqf rename to addons/repair/functions/fnc_interruptedRepair.sqf diff --git a/addons/repair/functions/fn_progressRepair.sqf b/addons/repair/functions/fnc_progressRepair.sqf similarity index 100% rename from addons/repair/functions/fn_progressRepair.sqf rename to addons/repair/functions/fnc_progressRepair.sqf diff --git a/addons/repair/functions/fn_startRepair.sqf b/addons/repair/functions/fnc_startRepair.sqf similarity index 100% rename from addons/repair/functions/fn_startRepair.sqf rename to addons/repair/functions/fnc_startRepair.sqf diff --git a/addons/stats/functions/fn_addExperienceForKill.sqf b/addons/stats/functions/fnc_addExperienceForKill.sqf similarity index 100% rename from addons/stats/functions/fn_addExperienceForKill.sqf rename to addons/stats/functions/fnc_addExperienceForKill.sqf diff --git a/addons/stats/functions/fn_getPlayerStats.sqf b/addons/stats/functions/fnc_getPlayerStats.sqf similarity index 100% rename from addons/stats/functions/fn_getPlayerStats.sqf rename to addons/stats/functions/fnc_getPlayerStats.sqf diff --git a/addons/stats/functions/fn_loadAllStats.sqf b/addons/stats/functions/fnc_loadAllStats.sqf similarity index 100% rename from addons/stats/functions/fn_loadAllStats.sqf rename to addons/stats/functions/fnc_loadAllStats.sqf diff --git a/addons/stats/functions/fn_loadPlayerStats.sqf b/addons/stats/functions/fnc_loadPlayerStats.sqf similarity index 100% rename from addons/stats/functions/fn_loadPlayerStats.sqf rename to addons/stats/functions/fnc_loadPlayerStats.sqf diff --git a/addons/stats/functions/fn_playerKilled.sqf b/addons/stats/functions/fnc_playerKilled.sqf similarity index 100% rename from addons/stats/functions/fn_playerKilled.sqf rename to addons/stats/functions/fnc_playerKilled.sqf diff --git a/addons/stats/functions/fn_saveAllStats.sqf b/addons/stats/functions/fnc_saveAllStats.sqf similarity index 100% rename from addons/stats/functions/fn_saveAllStats.sqf rename to addons/stats/functions/fnc_saveAllStats.sqf diff --git a/addons/stats/functions/fn_showPlayerStats.sqf b/addons/stats/functions/fnc_showPlayerStats.sqf similarity index 100% rename from addons/stats/functions/fn_showPlayerStats.sqf rename to addons/stats/functions/fnc_showPlayerStats.sqf From 0be523578a357a74da303fc676d7a6c3429a8606 Mon Sep 17 00:00:00 2001 From: 3Mydlo3 Date: Tue, 17 Dec 2024 11:00:34 +0100 Subject: [PATCH 11/47] Fix compilation failure --- addons/common/CfgWargay.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/common/CfgWargay.hpp b/addons/common/CfgWargay.hpp index 0aa07ba..2d56d36 100644 --- a/addons/common/CfgWargay.hpp +++ b/addons/common/CfgWargay.hpp @@ -15,7 +15,7 @@ #define VEHICLE_LIKE(otherVehicleClass,vehicleClass) class vehicleClass : otherVehicleClass {} #define HAS_PENETRATOR(penetratorClass) NO_DAMAGE \ { \ - child = penetratorClass;\ + child = QUOTE(penetratorClass);\ } // Icon macros From 86dcab5c31d760aa1c4b44ff3d741047227654ec Mon Sep 17 00:00:00 2001 From: 3Mydlo3 Date: Tue, 17 Dec 2024 11:00:52 +0100 Subject: [PATCH 12/47] Configure icons and markers --- addons/common/CfgWargay.hpp | 85 +++++++++--------- addons/markers/CfgMarkers.hpp | 157 ++++++++++++++++++++++++++++++++++ addons/markers/config.cpp | 1 + 3 files changed, 200 insertions(+), 43 deletions(-) create mode 100644 addons/markers/CfgMarkers.hpp diff --git a/addons/common/CfgWargay.hpp b/addons/common/CfgWargay.hpp index 2d56d36..4188f6e 100644 --- a/addons/common/CfgWargay.hpp +++ b/addons/common/CfgWargay.hpp @@ -19,30 +19,29 @@ } // Icon macros -// TODO: Adjust paths for mod-based icons #define ARMA_NATO_MARKERS_DIR \A3\ui_f\data\map\markers\nato +#define WARGAY_NATO_MARKERS_DIR QPATHTOEF(markers,assets) #define ANTIAIR_ICON QUOTE(ARMA_NATO_MARKERS_DIR\b_antiair.paa) -#define ANTIAIR_SPAAG_ICON __EVAL(getMissionPath "gui\markers\b_antiair_spaag.paa") -#define ANTIAIR_SPAAG_RADAR_ICON __EVAL(getMissionPath "gui\markers\b_antiair_spaag_radar.paa") -#define ANTITANK_ICON __EVAL(getMissionPath "gui\markers\b_antitank.paa") -#define ANTITANK_ARMOR_ICON __EVAL(getMissionPath "gui\markers\b_antitank_armor.paa") +#define ANTIAIR_SPAAG_ICON QUOTE(WARGAY_NATO_MARKERS_DIR\b_antiair_spaag.paa) +#define ANTIAIR_SPAAG_RADAR_ICON QUOTE(WARGAY_NATO_MARKERS_DIR\b_antiair_spaag_radar.paa) +#define ANTITANK_ICON QUOTE(WARGAY_NATO_MARKERS_DIR\b_antitank.paa) +#define ANTITANK_ARMOR_ICON QUOTE(WARGAY_NATO_MARKERS_DIR\b_antitank_armor.paa) #define ART_ICON QUOTE(ARMA_NATO_MARKERS_DIR\b_art.paa) -#define ART_ROCKET_ICON __EVAL(getMissionPath "gui\markers\b_art_rocket.paa") +#define ART_ROCKET_ICON QUOTE(WARGAY_NATO_MARKERS_DIR\b_art_rocket.paa) #define ARMOR_ICON QUOTE(ARMA_NATO_MARKERS_DIR\b_armor.paa) -#define CV_ARMOR_ICON __EVAL(getMissionPath "gui\markers\b_cv_armor.paa") -#define CV_ICON __EVAL(getMissionPath "gui\markers\b_cv.paa") +#define CV_ARMOR_ICON QUOTE(WARGAY_NATO_MARKERS_DIR\b_cv_armor.paa) +#define CV_ICON QUOTE(WARGAY_NATO_MARKERS_DIR\b_cv.paa) #define HELI_ICON QUOTE(ARMA_NATO_MARKERS_DIR\b_air.paa) #define LOG_ARMOR_ICON QUOTE(ARMA_NATO_MARKERS_DIR\b_support.paa) #define LOG_ICON QUOTE(ARMA_NATO_MARKERS_DIR\b_support.paa) #define MECH_INF_ICON QUOTE(ARMA_NATO_MARKERS_DIR\b_mech_inf.paa) -#define MECH_INF_ARMED_ICON __EVAL(getMissionPath "gui\markers\b_mech_inf_armed.paa") +#define MECH_INF_ARMED_ICON QUOTE(WARGAY_NATO_MARKERS_DIR\b_mech_inf_armed.paa) #define MOTOR_INF_ICON QUOTE(ARMA_NATO_MARKERS_DIR\b_motor_inf.paa) #define PLANE_ICON QUOTE(ARMA_NATO_MARKERS_DIR\b_air.paa) -#define RECON_AIR_ICON __EVAL(getMissionPath "gui\markers\b_recon_air.paa") -#define RECON_ANTITANK_ICON __EVAL(getMissionPath "gui\markers\b_recon_antitank.paa") -#define RECON_ARMOR_ICON __EVAL(getMissionPath "gui\markers\b_recon_armor.paa") -#define RECON_ICON __EVAL(getMissionPath "gui\markers\b_recon.paa") -// TODO: Add missing icons +#define RECON_AIR_ICON QUOTE(WARGAY_NATO_MARKERS_DIR\b_recon_air.paa) +#define RECON_ANTITANK_ICON QUOTE(WARGAY_NATO_MARKERS_DIR\b_recon_antitank.paa) +#define RECON_ARMOR_ICON QUOTE(WARGAY_NATO_MARKERS_DIR\b_recon_armor.paa) +#define RECON_ICON QUOTE(WARGAY_NATO_MARKERS_DIR\b_recon.paa) class CfgWargay { @@ -175,7 +174,7 @@ class CfgWargay damage = 13; type = "AP"; }; - // class CUP_Sh_105mm_M456A2 : HAS_PENETRATOR(CUP_P_105mm_M393A3); + class CUP_Sh_105mm_M456A2 : HAS_PENETRATOR(CUP_P_105mm_M393A3); class CUP_P_105mm_M393A3 { damage = 13; @@ -197,14 +196,14 @@ class CfgWargay Western Germany */ // LARS-2 - // class gm_rocket_mlrs_110mm_he_dm21 : HAS_PENETRATOR(gm_warhead_mlrs_110mm_he_dm21); + class gm_rocket_mlrs_110mm_he_dm21 : HAS_PENETRATOR(gm_warhead_mlrs_110mm_he_dm21); class gm_warhead_mlrs_110mm_he_dm21 { damage = 7; type = "HE"; }; - // class gm_rocket_mlrs_110mm_icm_dm602 : HAS_PENETRATOR(gm_penetrator_m77); + class gm_rocket_mlrs_110mm_icm_dm602 : HAS_PENETRATOR(gm_penetrator_m77); class gm_penetrator_m77 { damage = 6; @@ -212,14 +211,14 @@ class CfgWargay }; // M-109G - // class gm_shell_155mm_he_dm21 : HAS_PENETRATOR(gm_warhead_155mm_he_dm21); + class gm_shell_155mm_he_dm21 : HAS_PENETRATOR(gm_warhead_155mm_he_dm21); class gm_warhead_155mm_he_dm21 { damage = 7; type = "HE"; }; - // class gm_shell_155mm_icm_602 : HAS_PENETRATOR(gm_warhead_155mm_icm_602); + class gm_shell_155mm_icm_602 : HAS_PENETRATOR(gm_warhead_155mm_icm_602); class gm_warhead_155mm_icm_602 { damage = 6; @@ -245,7 +244,7 @@ class CfgWargay type = "AP"; }; - // class gm_shell_105x617mm_heat_mp_t_dm12 : HAS_PENETRATOR(gm_penetrator_105x617mm_heat_dm12); + class gm_shell_105x617mm_heat_mp_t_dm12 : HAS_PENETRATOR(gm_penetrator_105x617mm_heat_dm12); class gm_penetrator_105x617mm_heat_dm12 { damage = 11; @@ -269,7 +268,7 @@ class CfgWargay }; // Milan - // class gm_missile_milan_heat_dm92 : HAS_PENETRATOR(gm_penetrator_milan_HEAT_dm92); + class gm_missile_milan_heat_dm92 : HAS_PENETRATOR(gm_penetrator_milan_HEAT_dm92); class gm_penetrator_milan_HEAT_dm82 { damage = 17; @@ -278,8 +277,8 @@ class CfgWargay class gm_penetrator_milan_HEAT_dm92 : gm_penetrator_milan_HEAT_dm82 {}; // Hot 1 & 2 - // class gm_missile_hot_heat_dm72 : HAS_PENETRATOR(gm_penetrator_hot_HEAT_dm72); - // class gm_missile_hot_heat_dm102 : HAS_PENETRATOR(gm_penetrator_hot_HEAT_dm102); + class gm_missile_hot_heat_dm72 : HAS_PENETRATOR(gm_penetrator_hot_HEAT_dm72); + class gm_missile_hot_heat_dm102 : HAS_PENETRATOR(gm_penetrator_hot_HEAT_dm102); class gm_penetrator_hot_HEAT_dm72 { damage = 22; @@ -292,7 +291,7 @@ class CfgWargay }; // PzF 44 - // class gm_rocket_44x537mm_HEAT_dm32 : HAS_PENETRATOR(gm_penetrator_44x537mm_HEAT_dm32); + class gm_rocket_44x537mm_HEAT_dm32 : HAS_PENETRATOR(gm_penetrator_44x537mm_HEAT_dm32); class gm_penetrator_44x537mm_HEAT_dm32 { damage = 16; @@ -300,9 +299,9 @@ class CfgWargay }; // PzF 3 - // class gm_rocket_60mm_HEAT_dm12 : HAS_PENETRATOR(gm_penetrator_60mm_HEAT_dm12); - // class gm_rocket_60mm_HEAT_dm22 : HAS_PENETRATOR(gm_penetrator_60mm_HEAT_dm22); - // class gm_rocket_60mm_HEAT_dm32 : HAS_PENETRATOR(gm_penetrator_60mm_HEAT_dm32); + class gm_rocket_60mm_HEAT_dm12 : HAS_PENETRATOR(gm_penetrator_60mm_HEAT_dm12); + class gm_rocket_60mm_HEAT_dm22 : HAS_PENETRATOR(gm_penetrator_60mm_HEAT_dm22); + class gm_rocket_60mm_HEAT_dm32 : HAS_PENETRATOR(gm_penetrator_60mm_HEAT_dm32); class gm_penetrator_60mm_HEAT_dm12 { damage = 24; @@ -318,10 +317,10 @@ class CfgWargay }; // PzF 84 (Carl Gustav M2) - // class gm_rocket_84x245mm_HEAT_T_DM12 : HAS_PENETRATOR(gm_penetrator_84x245mm_HEAT_DM12); - // class gm_rocket_84x245mm_HEAT_T_DM12A1 : HAS_PENETRATOR(gm_penetrator_84x245mm_HEAT_DM12A1); - // class gm_rocket_84x245mm_HEAT_T_DM22 : HAS_PENETRATOR(gm_penetrator_84x245mm_HEAT_DM22); - // class gm_rocket_84x245mm_HEAT_T_DM32 : HAS_PENETRATOR(gm_penetrator_84x245mm_HEAT_DM32); + class gm_rocket_84x245mm_HEAT_T_DM12 : HAS_PENETRATOR(gm_penetrator_84x245mm_HEAT_DM12); + class gm_rocket_84x245mm_HEAT_T_DM12A1 : HAS_PENETRATOR(gm_penetrator_84x245mm_HEAT_DM12A1); + class gm_rocket_84x245mm_HEAT_T_DM22 : HAS_PENETRATOR(gm_penetrator_84x245mm_HEAT_DM22); + class gm_rocket_84x245mm_HEAT_T_DM32 : HAS_PENETRATOR(gm_penetrator_84x245mm_HEAT_DM32); class gm_penetrator_84x245mm_HEAT_DM12 { @@ -339,7 +338,7 @@ class CfgWargay }; // M72A3 LAW - // class gm_rocket_66mm_HEAT_m72a3 : HAS_PENETRATOR(gm_penetrator_66mm_HEAT_m72a3); + class gm_rocket_66mm_HEAT_m72a3 : HAS_PENETRATOR(gm_penetrator_66mm_HEAT_m72a3); class gm_penetrator_66mm_HEAT_m72a3 { @@ -381,7 +380,7 @@ class CfgWargay class gm_shell_100x695mm_he_of412 : Tank_HE {}; // T-55A - // class gm_shell_100x695mm_heat_t_bk5m : HAS_PENETRATOR(gm_penetrator_100x695mm_HEAT_T_bk5m); + class gm_shell_100x695mm_heat_t_bk5m : HAS_PENETRATOR(gm_penetrator_100x695mm_HEAT_T_bk5m); class gm_penetrator_100x695mm_HEAT_T_bk5m { damage = 11; @@ -406,14 +405,14 @@ class CfgWargay class gm_bullet_23x152mm_api_t_bzt : gm_bullet_23x152mm_hei_t_ofzt {}; // SFL 2S1 - // class gm_shell_122x447mm_he_of462 : HAS_PENETRATOR(gm_warhead_122x447mm_he_of462); + class gm_shell_122x447mm_he_of462 : HAS_PENETRATOR(gm_warhead_122x447mm_he_of462); class gm_warhead_122x447mm_he_of462 { damage = 6; type = "HE"; }; - // class gm_shell_122x447mm_heat_t_bk13 : HAS_PENETRATOR(gm_penetrator_122x447mm_heat_t_bk13); + class gm_shell_122x447mm_heat_t_bk13 : HAS_PENETRATOR(gm_penetrator_122x447mm_heat_t_bk13); class gm_penetrator_122x447mm_heat_bk6m { damage = 9; @@ -422,14 +421,14 @@ class CfgWargay class gm_penetrator_122x447mm_heat_t_bk13 : gm_penetrator_122x447mm_heat_bk6m {}; // BM-21 - // class gm_rocket_mlrs_122mm_he_9m22u : HAS_PENETRATOR(gm_warhead_122mm_he_9m22u); + class gm_rocket_mlrs_122mm_he_9m22u : HAS_PENETRATOR(gm_warhead_122mm_he_9m22u); class gm_warhead_122mm_he_9m22u { damage = 7; type = "HE"; }; - // class gm_rocket_mlrs_122mm_icm_9m218 : HAS_PENETRATOR(gm_penetrator_3b30); + class gm_rocket_mlrs_122mm_icm_9m218 : HAS_PENETRATOR(gm_penetrator_3b30); class gm_penetrator_3b30 { damage = 5; @@ -451,7 +450,7 @@ class CfgWargay }; class gm_shell_73mm_he_og15v : Small_HE {}; - // class gm_missile_maljutka_heat_9m14m : HAS_PENETRATOR(gm_penetrator_maljutka_HEAT_9m14m); + class gm_missile_maljutka_heat_9m14m : HAS_PENETRATOR(gm_penetrator_maljutka_HEAT_9m14m); class gm_penetrator_maljutka_HEAT_9m14 { damage = 15; @@ -464,7 +463,7 @@ class CfgWargay class gm_bullet_145x114mm_HEI_T_MDZ : HMG_HE {}; // Fagot - // class gm_missile_fagot_heat_9m111 : HAS_PENETRATOR(gm_penetrator_fagot_HEAT_9m111); + class gm_missile_fagot_heat_9m111 : HAS_PENETRATOR(gm_penetrator_fagot_HEAT_9m111); class gm_penetrator_fagot_HEAT_9m111 { damage = 16; @@ -472,14 +471,14 @@ class CfgWargay }; - // class gm_rocket_40mm_HEAT_pg7v : HAS_PENETRATOR(gm_penetrator_40mm_HEAT_pg7v); + class gm_rocket_40mm_HEAT_pg7v : HAS_PENETRATOR(gm_penetrator_40mm_HEAT_pg7v); class gm_penetrator_40mm_HEAT_pg7v { damage = 14; type = "HEAT"; }; - // class gm_rocket_40mm_HEAT_pg7v1 : HAS_PENETRATOR(gm_penetrator_40mm_HEAT_pg7v1); + class gm_rocket_40mm_HEAT_pg7v1 : HAS_PENETRATOR(gm_penetrator_40mm_HEAT_pg7v1); class gm_penetrator_40mm_HEAT_pg7v1 { damage = 17; @@ -492,14 +491,14 @@ class CfgWargay type = "HE"; }; - // class gm_rocket_55mm_heat_s5k : HAS_PENETRATOR(gm_penetrator_55mm_heat_s5k); + class gm_rocket_55mm_heat_s5k : HAS_PENETRATOR(gm_penetrator_55mm_heat_s5k); class gm_penetrator_55mm_heat_s5k { damage = 2; type = "HEAT"; }; - // class gm_rocket_64mm_HEAT_pg18 : HAS_PENETRATOR(gm_penetrator_64mm_HEAT_pg18); + class gm_rocket_64mm_HEAT_pg18 : HAS_PENETRATOR(gm_penetrator_64mm_HEAT_pg18); class gm_penetrator_64mm_HEAT_pg18 { damage = 15; diff --git a/addons/markers/CfgMarkers.hpp b/addons/markers/CfgMarkers.hpp new file mode 100644 index 0000000..657a5eb --- /dev/null +++ b/addons/markers/CfgMarkers.hpp @@ -0,0 +1,157 @@ +class CfgMarkers +{ + class b_antiair_spaag_radar + { + scope = 2; + name = "b_antiair_spaag_radar"; + icon = QPATHTOF(assets\b_antiair_spaag_radar.paa); + texture = QPATHTOF(assets\b_antiair_spaag_radar.paa); + color[] = {"(profilenamespace getvariable ['Map_BLUFOR_R',0])","(profilenamespace getvariable ['Map_BLUFOR_G',1])","(profilenamespace getvariable ['Map_BLUFOR_B',1])","(profilenamespace getvariable ['Map_BLUFOR_A',0.8])"}; + markerClass = "NATO_BLUFOR"; + shadow = 0; + side = 1; + size = 29; + showEditorMarkerColor = 1; + }; + + class b_antiair_spaag + { + scope = 2; + name = "b_antiair_spaag"; + icon = QPATHTOF(assets\b_antiair_spaag.paa); + texture = QPATHTOF(assets\b_antiair_spaag.paa); + color[] = {"(profilenamespace getvariable ['Map_BLUFOR_R',0])","(profilenamespace getvariable ['Map_BLUFOR_G',1])","(profilenamespace getvariable ['Map_BLUFOR_B',1])","(profilenamespace getvariable ['Map_BLUFOR_A',0.8])"}; + markerClass = "NATO_BLUFOR"; + shadow = 0; + side = 1; + size = 29; + showEditorMarkerColor = 1; + }; + + class b_antitank_armor + { + scope = 2; + name = "b_antitank_armor"; + icon = QPATHTOF(assets\b_antitank_armor.paa); + texture = QPATHTOF(assets\b_antitank_armor.paa); + color[] = {"(profilenamespace getvariable ['Map_BLUFOR_R',0])","(profilenamespace getvariable ['Map_BLUFOR_G',1])","(profilenamespace getvariable ['Map_BLUFOR_B',1])","(profilenamespace getvariable ['Map_BLUFOR_A',0.8])"}; + markerClass = "NATO_BLUFOR"; + shadow = 0; + side = 1; + size = 29; + showEditorMarkerColor = 1; + }; + + class b_antitank + { + scope = 2; + name = "b_antitank"; + icon = QPATHTOF(assets\b_antitank.paa); + texture = QPATHTOF(assets\b_antitank.paa); + color[] = {"(profilenamespace getvariable ['Map_BLUFOR_R',0])","(profilenamespace getvariable ['Map_BLUFOR_G',1])","(profilenamespace getvariable ['Map_BLUFOR_B',1])","(profilenamespace getvariable ['Map_BLUFOR_A',0.8])"}; + markerClass = "NATO_BLUFOR"; + shadow = 0; + side = 1; + size = 29; + showEditorMarkerColor = 1; + }; + + class b_art_rocket + { + scope = 2; + name = "b_art_rocket"; + icon = QPATHTOF(assets\b_art_rocket.paa); + texture = QPATHTOF(assets\b_art_rocket.paa); + color[] = {"(profilenamespace getvariable ['Map_BLUFOR_R',0])","(profilenamespace getvariable ['Map_BLUFOR_G',1])","(profilenamespace getvariable ['Map_BLUFOR_B',1])","(profilenamespace getvariable ['Map_BLUFOR_A',0.8])"}; + markerClass = "NATO_BLUFOR"; + shadow = 0; + side = 1; + size = 29; + showEditorMarkerColor = 1; + }; + + class b_cv_armor + { + scope = 2; + name = "b_cv_armor"; + icon = QPATHTOF(assets\b_cv_armor.paa); + texture = QPATHTOF(assets\b_cv_armor.paa); + color[] = {"(profilenamespace getvariable ['Map_BLUFOR_R',0])","(profilenamespace getvariable ['Map_BLUFOR_G',1])","(profilenamespace getvariable ['Map_BLUFOR_B',1])","(profilenamespace getvariable ['Map_BLUFOR_A',0.8])"}; + markerClass = "NATO_BLUFOR"; + shadow = 0; + side = 1; + size = 29; + showEditorMarkerColor = 1; + }; + + class b_cv + { + scope = 2; + name = "b_cv"; + icon = QPATHTOF(assets\b_cv.paa); + texture = QPATHTOF(assets\b_cv.paa); + color[] = {"(profilenamespace getvariable ['Map_BLUFOR_R',0])","(profilenamespace getvariable ['Map_BLUFOR_G',1])","(profilenamespace getvariable ['Map_BLUFOR_B',1])","(profilenamespace getvariable ['Map_BLUFOR_A',0.8])"}; + markerClass = "NATO_BLUFOR"; + shadow = 0; + side = 1; + size = 29; + showEditorMarkerColor = 1; + }; + + class b_mech_inf_armed + { + scope = 2; + name = "b_mech_inf_armed"; + icon = QPATHTOF(assets\b_mech_inf_armed.paa); + texture = QPATHTOF(assets\b_mech_inf_armed.paa); + color[] = {"(profilenamespace getvariable ['Map_BLUFOR_R',0])","(profilenamespace getvariable ['Map_BLUFOR_G',1])","(profilenamespace getvariable ['Map_BLUFOR_B',1])","(profilenamespace getvariable ['Map_BLUFOR_A',0.8])"}; + markerClass = "NATO_BLUFOR"; + shadow = 0; + side = 1; + size = 29; + showEditorMarkerColor = 1; + }; + + class b_recon_air + { + scope = 2; + name = "b_recon_air"; + icon = QPATHTOF(assets\b_recon_air.paa); + texture = QPATHTOF(assets\b_recon_air.paa); + color[] = {"(profilenamespace getvariable ['Map_BLUFOR_R',0])","(profilenamespace getvariable ['Map_BLUFOR_G',1])","(profilenamespace getvariable ['Map_BLUFOR_B',1])","(profilenamespace getvariable ['Map_BLUFOR_A',0.8])"}; + markerClass = "NATO_BLUFOR"; + shadow = 0; + side = 1; + size = 29; + showEditorMarkerColor = 1; + }; + + class b_recon_antitank + { + scope = 2; + name = "b_recon_antitank"; + icon = QPATHTOF(assets\b_recon_antitank.paa); + texture = QPATHTOF(assets\b_recon_antitank.paa); + color[] = {"(profilenamespace getvariable ['Map_BLUFOR_R',0])","(profilenamespace getvariable ['Map_BLUFOR_G',1])","(profilenamespace getvariable ['Map_BLUFOR_B',1])","(profilenamespace getvariable ['Map_BLUFOR_A',0.8])"}; + markerClass = "NATO_BLUFOR"; + shadow = 0; + side = 1; + size = 29; + showEditorMarkerColor = 1; + }; + + class b_recon_armor + { + scope = 2; + name = "b_recon_armor"; + icon = QPATHTOF(assets\b_recon_armor.paa); + texture = QPATHTOF(assets\b_recon_armor.paa); + color[] = {"(profilenamespace getvariable ['Map_BLUFOR_R',0])","(profilenamespace getvariable ['Map_BLUFOR_G',1])","(profilenamespace getvariable ['Map_BLUFOR_B',1])","(profilenamespace getvariable ['Map_BLUFOR_A',0.8])"}; + markerClass = "NATO_BLUFOR"; + shadow = 0; + side = 1; + size = 29; + showEditorMarkerColor = 1; + }; + +}; diff --git a/addons/markers/config.cpp b/addons/markers/config.cpp index d821136..01429aa 100644 --- a/addons/markers/config.cpp +++ b/addons/markers/config.cpp @@ -15,3 +15,4 @@ class CfgPatches { }; #include "CfgEventHandlers.hpp" +#include "CfgMarkers.hpp" From 43619dbe2bfce8851555f457f121fccb2545ab63 Mon Sep 17 00:00:00 2001 From: 3Mydlo3 Date: Tue, 17 Dec 2024 11:04:49 +0100 Subject: [PATCH 13/47] Remove unnecessary QUOTE --- addons/common/CfgWargay.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/common/CfgWargay.hpp b/addons/common/CfgWargay.hpp index 4188f6e..3e9ff0c 100644 --- a/addons/common/CfgWargay.hpp +++ b/addons/common/CfgWargay.hpp @@ -20,7 +20,7 @@ // Icon macros #define ARMA_NATO_MARKERS_DIR \A3\ui_f\data\map\markers\nato -#define WARGAY_NATO_MARKERS_DIR QPATHTOEF(markers,assets) +#define WARGAY_NATO_MARKERS_DIR PATHTOEF(markers,assets) #define ANTIAIR_ICON QUOTE(ARMA_NATO_MARKERS_DIR\b_antiair.paa) #define ANTIAIR_SPAAG_ICON QUOTE(WARGAY_NATO_MARKERS_DIR\b_antiair_spaag.paa) #define ANTIAIR_SPAAG_RADAR_ICON QUOTE(WARGAY_NATO_MARKERS_DIR\b_antiair_spaag_radar.paa) From b4a40b6bd5ee312d2b3dc975dfa0d289e9314079 Mon Sep 17 00:00:00 2001 From: 3Mydlo3 Date: Tue, 17 Dec 2024 11:15:46 +0100 Subject: [PATCH 14/47] Fix project launch config --- .hemtt/project.toml | 29 +++++------------------------ 1 file changed, 5 insertions(+), 24 deletions(-) diff --git a/.hemtt/project.toml b/.hemtt/project.toml index 1222003..7308d11 100644 --- a/.hemtt/project.toml +++ b/.hemtt/project.toml @@ -36,9 +36,8 @@ parameters = [ ] [hemtt.launch.ace] +extends = "default" workshop = [ - "450814997", # CBA_A3 - "2369477168", # ADT "463939057", # ACE # "766491311", # KKA3 ACE Extension ] @@ -47,44 +46,26 @@ parameters = [ ] [hemtt.launch.cup] +extends = "default" workshop = [ - "450814997", # CBA_A3 - "2369477168", # ADT "583496184", # CUP Terrains - Core "583544987", # CUP Terrains - Maps ] -parameters = [ - "-name=dev", - "-window", -] [hemtt.launch.vn] -workshop = [ - "450814997", # CBA_A3 - "2369477168", # ADT -] -parameters = [ - "-name=dev", - "-window", -] +extends = "default" dlc = [ "S.O.G. Prairie Fire", ] [hemtt.launch.ww2] -workshop = [ - "450814997", # CBA_A3 - "2369477168", # ADT -] -parameters = [ - "-name=dev", - "-window", -] +extends = "default" dlc = [ "Spearhead 1944", ] [hemtt.launch.gm] +extends = "default" dlc = [ "Global Mobilization", ] From 21228ccb455f09cdfffafa28ec72da1e76207d94 Mon Sep 17 00:00:00 2001 From: 3Mydlo3 Date: Tue, 17 Dec 2024 12:53:59 +0100 Subject: [PATCH 15/47] More or less works --- .hemtt/project.toml | 10 ------- addons/damage/XEH_postInit.sqf | 2 +- addons/damage/XEH_postInitServer.sqf | 3 ++ addons/deployment/XEH_postInit.sqf | 3 +- addons/deployment/XEH_postInitServer.sqf | 3 ++ addons/event_handlers/XEH_postInit.sqf | 2 +- .../functions/fnc_knowsAboutChanged.sqf | 2 +- addons/hud/XEH_postInit.sqf | 2 +- addons/icons/XEH_postInit.sqf | 2 ++ addons/icons/XEH_postInitServer.sqf | 3 ++ addons/icons/functions/fnc_drawIcon.sqf | 6 ++-- addons/icons/functions/fnc_getIconPath.sqf | 2 +- .../functions/fnc_visibilityCheckLoop.sqf | 2 +- addons/icons/initSettings.inc.sqf | 9 ++++++ addons/init/XEH_postInit.sqf | 19 +++++++++---- addons/init/XEH_postInitServer.sqf | 28 +++++++++++++++++++ addons/init/functions/fnc_manInit.sqf | 2 +- addons/init/functions/fnc_vehicleInit.sqf | 27 ++++++++++-------- .../init/functions/fnc_vehicleSpawnerInit.sqf | 2 +- addons/main/script_macros.hpp | 2 -- addons/main/script_mod.hpp | 4 +++ addons/markers/CfgMarkers.hpp | 3 ++ addons/markers/XEH_postInit.sqf | 2 +- addons/markers/initSettings.inc.sqf | 9 ------ addons/music/XEH_postInit.sqf | 3 +- addons/music/XEH_postInitServer.sqf | 3 ++ addons/repair/XEH_postInit.sqf | 2 ++ addons/repair/XEH_postInitServer.sqf | 3 ++ addons/stats/XEH_postInit.sqf | 3 +- addons/stats/XEH_postInitServer.sqf | 11 ++++++++ 30 files changed, 120 insertions(+), 54 deletions(-) create mode 100644 addons/damage/XEH_postInitServer.sqf create mode 100644 addons/deployment/XEH_postInitServer.sqf create mode 100644 addons/icons/XEH_postInitServer.sqf create mode 100644 addons/init/XEH_postInitServer.sqf create mode 100644 addons/music/XEH_postInitServer.sqf create mode 100644 addons/repair/XEH_postInitServer.sqf create mode 100644 addons/stats/XEH_postInitServer.sqf diff --git a/.hemtt/project.toml b/.hemtt/project.toml index 7308d11..53a22aa 100644 --- a/.hemtt/project.toml +++ b/.hemtt/project.toml @@ -19,12 +19,6 @@ author = "ArmaForces" [version] path = "addons/main/script_version.hpp" -# Unused in HEMTT v1.11 or higher, kept for backwards compatibility -[asc] -exclude = [ - ".inc.sqf", -] - [hemtt.launch.default] workshop = [ "450814997", # CBA_A3 @@ -32,7 +26,6 @@ workshop = [ ] parameters = [ "-name=dev", - "-window", ] [hemtt.launch.ace] @@ -41,9 +34,6 @@ workshop = [ "463939057", # ACE # "766491311", # KKA3 ACE Extension ] -parameters = [ - "-name=dev", -] [hemtt.launch.cup] extends = "default" diff --git a/addons/damage/XEH_postInit.sqf b/addons/damage/XEH_postInit.sqf index d79a543..724d5c7 100644 --- a/addons/damage/XEH_postInit.sqf +++ b/addons/damage/XEH_postInit.sqf @@ -1,3 +1,3 @@ #include "script_component.hpp" -if (isServer) exitWith {}; +if (isServer) then { call COMPILE_SCRIPT(XEH_postInitServer) }; diff --git a/addons/damage/XEH_postInitServer.sqf b/addons/damage/XEH_postInitServer.sqf new file mode 100644 index 0000000..48480ec --- /dev/null +++ b/addons/damage/XEH_postInitServer.sqf @@ -0,0 +1,3 @@ +#include "script_component.hpp" + +["MDL_applyDamage", FUNC(applyDamage)] call CBA_fnc_addEventHandler; diff --git a/addons/deployment/XEH_postInit.sqf b/addons/deployment/XEH_postInit.sqf index 7f386a8..60db162 100644 --- a/addons/deployment/XEH_postInit.sqf +++ b/addons/deployment/XEH_postInit.sqf @@ -1,6 +1,7 @@ #include "script_component.hpp" -if (isServer) exitWith {}; +if (isServer) then { call COMPILE_SCRIPT(XEH_postInitServer) }; +if (!hasInterface) exitWith {}; ["MDL_createVehicleFailed", { systemChat LLSTRING(DeploymentFailure); diff --git a/addons/deployment/XEH_postInitServer.sqf b/addons/deployment/XEH_postInitServer.sqf new file mode 100644 index 0000000..b265b2c --- /dev/null +++ b/addons/deployment/XEH_postInitServer.sqf @@ -0,0 +1,3 @@ +#include "script_component.hpp" + +["MDL_deployVehicle", FUNC(deployVehicle)] call CBA_fnc_addEventHandler; diff --git a/addons/event_handlers/XEH_postInit.sqf b/addons/event_handlers/XEH_postInit.sqf index ae22e61..67a4984 100644 --- a/addons/event_handlers/XEH_postInit.sqf +++ b/addons/event_handlers/XEH_postInit.sqf @@ -9,6 +9,6 @@ _x addEventHandler ["CuratorObjectDeleted", FUNC(curatorObjectDeleted)]; } forEach allCurators; -if (isServer) exitWith {}; +if (!hasInterface) exitWith {}; addMissionEventHandler ["Draw3D", FUNC(draw3D)]; diff --git a/addons/event_handlers/functions/fnc_knowsAboutChanged.sqf b/addons/event_handlers/functions/fnc_knowsAboutChanged.sqf index 4b1f9ba..9b73bc4 100644 --- a/addons/event_handlers/functions/fnc_knowsAboutChanged.sqf +++ b/addons/event_handlers/functions/fnc_knowsAboutChanged.sqf @@ -32,7 +32,7 @@ if (_newKnowsAbout > 0.75 && {!_isRevealed}) then { _targetUnit setVariable ["MDL_IsVisible", true, true]; #ifdef DEV_DEBUG - diag_log format ["WARGAY DEBUG KNOWS ABOUT CHANGED [%1]: Revealing Target: %3 detected by Group: %2", diag_tickTime, _group, _targetUnit, _oldKnowsAbout, _newKnowsAbout]; + diag_log format ["WARGAY DEBUG KNOWS ABOUT CHANGED [%1]: Revealing Target: %3 detected by Group: %2", diag_tickTime, _group, _targetUnit/*, _oldKnowsAbout, _newKnowsAbout*/]; #endif _group reveal _targetUnit; ["MDL_unitSpotted", [_targetUnit]] call CBA_fnc_globalEvent; diff --git a/addons/hud/XEH_postInit.sqf b/addons/hud/XEH_postInit.sqf index ee6e276..22bdf33 100644 --- a/addons/hud/XEH_postInit.sqf +++ b/addons/hud/XEH_postInit.sqf @@ -1,6 +1,6 @@ #include "script_component.hpp" -if (isServer) exitWith {}; +if (!hasInterface) exitWith {}; ["MDL_showCurrentHp", { if (vehicle player isEqualTo player) exitWith {}; diff --git a/addons/icons/XEH_postInit.sqf b/addons/icons/XEH_postInit.sqf index 421c54b..724d5c7 100644 --- a/addons/icons/XEH_postInit.sqf +++ b/addons/icons/XEH_postInit.sqf @@ -1 +1,3 @@ #include "script_component.hpp" + +if (isServer) then { call COMPILE_SCRIPT(XEH_postInitServer) }; diff --git a/addons/icons/XEH_postInitServer.sqf b/addons/icons/XEH_postInitServer.sqf new file mode 100644 index 0000000..7a4d59f --- /dev/null +++ b/addons/icons/XEH_postInitServer.sqf @@ -0,0 +1,3 @@ +#include "script_component.hpp" + +call FUNC(visibilityCheckLoop); diff --git a/addons/icons/functions/fnc_drawIcon.sqf b/addons/icons/functions/fnc_drawIcon.sqf index f637e52..021117f 100644 --- a/addons/icons/functions/fnc_drawIcon.sqf +++ b/addons/icons/functions/fnc_drawIcon.sqf @@ -34,10 +34,6 @@ private _effectiveCommander = effectiveCommander _target; private _sideColor = if (side _effectiveCommander isEqualTo WEST) then { [GVAR(westAiIconColor), GVAR(westIconColor)] select isPlayer _effectiveCommander } else { GVAR(eastIconColor) }; -// #ifdef DEV_DEBUG -// private _icon3DParams = [_iconPath, [_sideColor, [1,1,1,1]], _worldPos, _iconSize, _iconHeight, 0, _iconDescription, 0, 0.02, "EtelkaMonospacePro"]; -// diag_log format ["WARGAY DEBUG ICON3D [%1]: Params: %2", diag_tickTime, str _icon3DParams]; -// #endif if (GVAR(unitIconSizeDependsOnDistance)) then { // BUG: Distance should be from camera? @@ -47,6 +43,8 @@ if (GVAR(unitIconSizeDependsOnDistance)) then { _iconSize = _iconSize * _factor; }; +TRACE_6("drawIcon3D",_iconPath,_sideColor,_worldPos,_iconSize,_iconDescription,_includeText); + drawIcon3D [ _iconPath, [_sideColor, [1,1,1,1]], diff --git a/addons/icons/functions/fnc_getIconPath.sqf b/addons/icons/functions/fnc_getIconPath.sqf index 1142c9b..d65f1bb 100644 --- a/addons/icons/functions/fnc_getIconPath.sqf +++ b/addons/icons/functions/fnc_getIconPath.sqf @@ -18,7 +18,7 @@ private _iconType = _vehicle getVariable ["MDL_iconPath", ""]; if (_iconType isNotEqualTo "") exitWith { _iconType }; -private _vehicleInfo = [_vehicle] call FUNC(getVehicleInfo); +private _vehicleInfo = [_vehicle] call EFUNC(common,getVehicleInfo); private _iconPath = _vehicleInfo getOrDefault [ "iconPath", diff --git a/addons/icons/functions/fnc_visibilityCheckLoop.sqf b/addons/icons/functions/fnc_visibilityCheckLoop.sqf index 4e725df..0d1f073 100644 --- a/addons/icons/functions/fnc_visibilityCheckLoop.sqf +++ b/addons/icons/functions/fnc_visibilityCheckLoop.sqf @@ -28,7 +28,7 @@ private _target = _targetsToCheck deleteAt (count _targetsToCheck - 1); diag_log format ["WARGAY DEBUG VISIBILITY CHECK [%1]: Checking Target %2", diag_tickTime, _target]; #endif -private _shouldBeVisible = [_target] call FUNC(shouldStillBeVisible); +private _shouldBeVisible = [_target] call EFUNC(common,shouldStillBeVisible); private _isVisible = _target getVariable ["MDL_IsVisible", false]; if (_isVisible && {!_shouldBeVisible}) then { #ifdef DEV_DEBUG diff --git a/addons/icons/initSettings.inc.sqf b/addons/icons/initSettings.inc.sqf index 1a32261..c967f02 100644 --- a/addons/icons/initSettings.inc.sqf +++ b/addons/icons/initSettings.inc.sqf @@ -1,3 +1,12 @@ +[ + QGVAR(unitIconMode), + "LIST", + ["Unit icon mode", ""], + [LSTRING(Icons_DisplayName), LSTRING(UnitIcons)], + [[0, 1], ["All", "Enemy only"]], + true +] call CBA_fnc_addSetting; + [ QGVAR(unitIconSizeDependsOnDistance), "CHECKBOX", diff --git a/addons/init/XEH_postInit.sqf b/addons/init/XEH_postInit.sqf index 7eefda6..ae71d16 100644 --- a/addons/init/XEH_postInit.sqf +++ b/addons/init/XEH_postInit.sqf @@ -1,14 +1,12 @@ #include "script_component.hpp" -// TODO: Move whole init.sqf -// TODO: Move whole initServer.sqf // TODO: Move onPlayerKilled.sqf // TODO: Move and split CfgWargay.hpp GVAR(isTest) = true; AmmoTypes = createHashMapFromArray - ("true" configClasses (missionConfigFile >> "CfgWargay" >> "Ammo") + ("true" configClasses (configFile >> "CfgWargay" >> "Ammo") apply { private _hashMap = createHashMap; _hashMap set [CLASS_NAME_PROPERTY, toUpper configName _x]; @@ -20,11 +18,12 @@ AmmoTypes = createHashMapFromArray _hashMap set ["child", _child]; }; + LOG_1("Configuration for ammo type %1 read from config",toUpper configName _x); [toUpper configName _x, _hashMap] }); VehicleTypes = createHashMapFromArray - ("true" configClasses (missionConfigFile >> "CfgWargay" >> "Vehicles") + ("true" configClasses (configFile >> "CfgWargay" >> "Vehicles") apply { private _hashMap = createHashMap; _hashMap set [CLASS_NAME_PROPERTY, toUpper configName _x]; @@ -36,6 +35,7 @@ VehicleTypes = createHashMapFromArray _hashMap set ["isCommandVehicle", (_x >> "isCommandVehicle") call BIS_fnc_getCfgDataBool]; _hashMap set ["isLogistics", (_x >> "isLogistics") call BIS_fnc_getCfgDataBool]; _hashMap set ["isRecon", (_x >> "isRecon") call BIS_fnc_getCfgDataBool]; + LOG_1("Configuration for vehicle type %1 read from config",toUpper configName _x); [toUpper configName _x, _hashMap] }); @@ -136,4 +136,13 @@ if (GVAR(isTest)) then { }] call CBA_fnc_execNextFrame; }; -if (isServer) exitWith {}; +if (isServer) then { call COMPILE_SCRIPT(XEH_postInitServer) }; +if (!hasInterface) exitWith {}; + +player addMPEventHandler ["MPKilled", { + params ["_unit", "_killer", "_instigator", "_useEffects"]; + + private _vehicle = if (vehicle player isEqualTo player) then { objNull } else { vehicle player }; + + ["MDL_playerKilled", [getPlayerUID player, player, _vehicle]] call CBA_fnc_serverEvent; +}]; diff --git a/addons/init/XEH_postInitServer.sqf b/addons/init/XEH_postInitServer.sqf new file mode 100644 index 0000000..59da299 --- /dev/null +++ b/addons/init/XEH_postInitServer.sqf @@ -0,0 +1,28 @@ +#include "script_component.hpp" + +GVAR(gameStarted) = false; + +["MDL_startGame", { + if (GVAR(gameStarted)) exitWith {}; + + // TODO: Check if SoundSystems mod is loaded + private _allWargayTracks = [ + "WARGAME_EE_Preparation", + "WARGAME_EE_Campaign_Brief", + "WARGAME_EE_Tension", + "WARGAME_EE_The_Lost_Rites", + "WARGAME_RD_Keep_it_Cool", + "WARGAME_RD_Sweeping_Bass", + "WARGAME_RD_Cryptoplanets", + "WARGAME_RD_Mission_Omega", + "WARGAME_RD_The_Infiltrator", + "WARNO_Dark_City_Beats", + "WARNO_Lap_Time", + "WARNO_Mysteries", + "WARNO_Raging_Burn" + ]; + + [(_allWargayTracks call BIS_fnc_arrayShuffle)] call EFUNC(music,addToMusicQueue); + + GVAR(gameStarted) = true; +}] call CBA_fnc_addEventHandler; diff --git a/addons/init/functions/fnc_manInit.sqf b/addons/init/functions/fnc_manInit.sqf index 4dc4f9e..897b219 100644 --- a/addons/init/functions/fnc_manInit.sqf +++ b/addons/init/functions/fnc_manInit.sqf @@ -15,4 +15,4 @@ params ["_entity"]; -_entity addEventHandler ["HandleDamage", FUNC(handleDamageMan)]; +_entity addEventHandler ["HandleDamage", EFUNC(event_handlers,handleDamageMan)]; diff --git a/addons/init/functions/fnc_vehicleInit.sqf b/addons/init/functions/fnc_vehicleInit.sqf index 964310f..580b39c 100644 --- a/addons/init/functions/fnc_vehicleInit.sqf +++ b/addons/init/functions/fnc_vehicleInit.sqf @@ -15,33 +15,35 @@ params ["_entity"]; #ifdef DEV_DEBUG -diag_log format ["WARGAY DEBUG Init [%1]: Entity: %2, Type: %3", diag_tickTime, _entity, typeOf _entity]; +LOG_3("Init [%1]: Entity: %2, Type: %3",diag_tickTime,_entity,typeOf _entity); #endif -private _vehicleHitpoints = [_entity, "hitpoints"] call FUNC(getVehicleInfo); +private _vehicleHitpoints = [_entity, "hitpoints"] call EFUNC(common,getVehicleInfo); if (_vehicleHitpoints isEqualTo objNull) then { private _defaultHitpoints = 10; _vehicleHitpoints = _defaultHitpoints; - diag_log format ["WARGAY WARNING Hitpoints not defined for %1. Setting default hitpoints %2", typeOf _entity, _defaultHitpoints]; + WARNING_2("Hitpoints not defined for %1. Setting default hitpoints %2",typeOf _entity,_defaultHitpoints); } else { - diag_log format ["WARGAY DEBUG Hitpoints %1", str _vehicleHitpoints]; + LOG_2("Hitpoints for entity %1: %2",typeOf _entity,str _vehicleHitpoints); }; _entity setVariable ["MDL_currentHp", _vehicleHitpoints]; _entity setVariable ["MDL_maxHp", _vehicleHitpoints]; _entity addEventHandler ["HandleDamage", { - _this call FUNC(handleDamage); + _this call EFUNC(event_handlers,handleDamage); }]; -_entity addEventHandler ["HitPart", FUNC(hitPart)]; -_entity addEventHandler ["Fired", FUNC(fired)]; +_entity addEventHandler ["HitPart", EFUNC(event_handlers,hitPart)]; +_entity addEventHandler ["Fired", EFUNC(event_handlers,fired)]; + +LOG_1("Event handlers registered for %1",_entity); // Increase fuel consumption for players if (_entity getVariable ["MDL_deployedVehicle", false]) then { private _fuelCoef = if (_entity isKindOf "Air") then { - GVAR(fuelConsumptionMultiplier)/2 + EGVAR(refuel,fuelConsumptionMultiplier)/2 } else { - GVAR(fuelConsumptionMultiplier) + EGVAR(refuel,fuelConsumptionMultiplier) }; _entity setFuelConsumptionCoef _fuelCoef; @@ -52,11 +54,12 @@ _entity allowCrewInImmobile true; if (hasInterface) then { // TODO: Consider allowing repair only near supply vehicles // TODO: Consider repair/rearm/refuel for all eligible vehicles in some radius (e.g., via some deployable) - [_entity] call FUNC(addRepairAction); - [_entity] call FUNC(addRearmAction); - [_entity] call FUNC(addRefuelAction); + [_entity] call EFUNC(repair,addRepairAction); + [_entity] call EFUNC(rearm,addRearmAction); + [_entity] call EFUNC(refuel,addRefuelAction); if (_entity getVariable ["MDL_isSpawner", false]) then { [_entity] call FUNC(vehicleSpawnerInit); + LOG_1("Initialized spawner using %1",_entity); }; }; diff --git a/addons/init/functions/fnc_vehicleSpawnerInit.sqf b/addons/init/functions/fnc_vehicleSpawnerInit.sqf index 80b3041..2e5d72a 100644 --- a/addons/init/functions/fnc_vehicleSpawnerInit.sqf +++ b/addons/init/functions/fnc_vehicleSpawnerInit.sqf @@ -15,7 +15,7 @@ params ["_spawner"]; private _vehicleClass = typeOf _spawner; -private _vehicleName = [_spawner] call FUNC(getVehicleDisplayName); +private _vehicleName = [_spawner] call EFUNC(common,getVehicleDisplayName); _spawner addAction [ _vehicleName, diff --git a/addons/main/script_macros.hpp b/addons/main/script_macros.hpp index ec422e6..9dc276e 100644 --- a/addons/main/script_macros.hpp +++ b/addons/main/script_macros.hpp @@ -22,8 +22,6 @@ // AFWG macros #define IS_MOD_LOADED(modclass) (isClass (configFile >> "CfgPatches" >> #modclass)) -// #define DEV_DEBUG -// #define DEBUG_MODE_FULL #define AMMO_PROPERTY "ammo" #define CLASS_NAME_PROPERTY "className" #define DAMAGE_PROPERTY "damage" diff --git a/addons/main/script_mod.hpp b/addons/main/script_mod.hpp index 2c7a696..1cb93c1 100644 --- a/addons/main/script_mod.hpp +++ b/addons/main/script_mod.hpp @@ -14,3 +14,7 @@ #else #define COMPONENT_NAME QUOTE(AFWG - COMPONENT) #endif + +// Global DEBUG +#define DEV_DEBUG +#define DEBUG_MODE_FULL diff --git a/addons/markers/CfgMarkers.hpp b/addons/markers/CfgMarkers.hpp index 657a5eb..d8a5581 100644 --- a/addons/markers/CfgMarkers.hpp +++ b/addons/markers/CfgMarkers.hpp @@ -1,3 +1,6 @@ +// TODO: Proper stringtable for marker names +// TODO: Separate markerClass +// TODO: Change marker classes to include mod prefix class CfgMarkers { class b_antiair_spaag_radar diff --git a/addons/markers/XEH_postInit.sqf b/addons/markers/XEH_postInit.sqf index d7b4289..977eae9 100644 --- a/addons/markers/XEH_postInit.sqf +++ b/addons/markers/XEH_postInit.sqf @@ -1,6 +1,6 @@ #include "script_component.hpp" -if (isServer) exitWith {}; +if (!hasInterface) exitWith {}; [FUNC(enemyMarkersLoop)] call afm_common_fnc_runAfterSettingsInit; diff --git a/addons/markers/initSettings.inc.sqf b/addons/markers/initSettings.inc.sqf index 331de80..9104c06 100644 --- a/addons/markers/initSettings.inc.sqf +++ b/addons/markers/initSettings.inc.sqf @@ -1,12 +1,3 @@ -[ - QGVAR(unitIconMode), - "LIST", - ["Unit icon mode", ""], - [LSTRING(Markers_DisplayName), ELSTRING(icons,UnitIcons)], - [[0, 1], ["All", "Enemy only"]], - true -] call CBA_fnc_addSetting; - [ QGVAR(enemyMarkersEnabled), "CHECKBOX", diff --git a/addons/music/XEH_postInit.sqf b/addons/music/XEH_postInit.sqf index d68746e..cb7ffc5 100644 --- a/addons/music/XEH_postInit.sqf +++ b/addons/music/XEH_postInit.sqf @@ -1,6 +1,7 @@ #include "script_component.hpp" -if (isServer) exitWith {}; +if (isServer) then { call COMPILE_SCRIPT(XEH_postInitServer) }; +if (!hasInterface) exitWith {}; // TODO: Automatic queue of Wargame tracks if proper mod is loaded diff --git a/addons/music/XEH_postInitServer.sqf b/addons/music/XEH_postInitServer.sqf new file mode 100644 index 0000000..308c3bf --- /dev/null +++ b/addons/music/XEH_postInitServer.sqf @@ -0,0 +1,3 @@ +#include "script_component.hpp" + +GVAR(musicQueue) = []; diff --git a/addons/repair/XEH_postInit.sqf b/addons/repair/XEH_postInit.sqf index 421c54b..724d5c7 100644 --- a/addons/repair/XEH_postInit.sqf +++ b/addons/repair/XEH_postInit.sqf @@ -1 +1,3 @@ #include "script_component.hpp" + +if (isServer) then { call COMPILE_SCRIPT(XEH_postInitServer) }; diff --git a/addons/repair/XEH_postInitServer.sqf b/addons/repair/XEH_postInitServer.sqf new file mode 100644 index 0000000..474f8a6 --- /dev/null +++ b/addons/repair/XEH_postInitServer.sqf @@ -0,0 +1,3 @@ +#include "script_component.hpp" + +["MDL_healDamage", FUNC(healDamage)] call CBA_fnc_addEventHandler; diff --git a/addons/stats/XEH_postInit.sqf b/addons/stats/XEH_postInit.sqf index e74fa2e..4a596dc 100644 --- a/addons/stats/XEH_postInit.sqf +++ b/addons/stats/XEH_postInit.sqf @@ -1,6 +1,7 @@ #include "script_component.hpp" -if (isServer) exitWith {}; +if (isServer) then { call COMPILE_SCRIPT(XEH_postInitServer) }; +if (!hasInterface) exitWith {}; ["MDL_xpReceived", { params ["_receivedXp", "_newLifeXp", "_newTotalXp"]; diff --git a/addons/stats/XEH_postInitServer.sqf b/addons/stats/XEH_postInitServer.sqf new file mode 100644 index 0000000..1ddcbed --- /dev/null +++ b/addons/stats/XEH_postInitServer.sqf @@ -0,0 +1,11 @@ +#include "script_component.hpp" + +GVAR(loadedPlayers) = []; +GVAR(allPlayersStats) = call FUNC(loadAllStats); + +addMissionEventHandler ["Ended", FUNC(saveAllStats)]; +addMissionEventHandler ["MPEnded", FUNC(saveAllStats)]; + +["MDL_loadPlayerStats", FUNC(loadPlayerStats)] call CBA_fnc_addEventHandler; + +["MDL_playerKilled", FUNC(playerKilled)] call CBA_fnc_addEventHandler; From e4c78b25f13c14e9cde9e7dcedc492f3b6a65b78 Mon Sep 17 00:00:00 2001 From: 3Mydlo3 Date: Tue, 17 Dec 2024 13:11:06 +0100 Subject: [PATCH 16/47] Fix alarm sound path --- addons/music/CfgSounds.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/music/CfgSounds.hpp b/addons/music/CfgSounds.hpp index 62e73b4..0554a2e 100644 --- a/addons/music/CfgSounds.hpp +++ b/addons/music/CfgSounds.hpp @@ -4,7 +4,7 @@ class CfgSounds { name = "Wargay alarm"; // BUG: Possible bug with path not existing on clients (use getMissionPath) - sound[] = { "assets\wargay-alarm.ogg", 4, 1 }; + sound[] = { QPATHTOF(assets\wargay-alarm.ogg), 4, 1 }; titles[] = { 0, CSTRING(DamageReceived) }; }; }; From 0121c939b4d92471605575766a1a20fba8523de2 Mon Sep 17 00:00:00 2001 From: 3Mydlo3 Date: Tue, 17 Dec 2024 13:11:58 +0100 Subject: [PATCH 17/47] Fix unit names not working on hover --- addons/common/CfgWargay.hpp | 1 + addons/common/XEH_PREP.hpp | 1 - addons/deployment/XEH_postInit.sqf | 7 +++---- addons/hud/XEH_PREP.hpp | 1 + addons/{common => hud}/functions/fnc_currentHpString.sqf | 0 addons/hud/functions/fnc_keyUnitInfo.sqf | 2 +- addons/icons/config.cpp | 4 ++-- addons/icons/functions/fnc_drawIcon.sqf | 2 +- addons/init/XEH_postInit.sqf | 3 --- 9 files changed, 9 insertions(+), 12 deletions(-) rename addons/{common => hud}/functions/fnc_currentHpString.sqf (100%) diff --git a/addons/common/CfgWargay.hpp b/addons/common/CfgWargay.hpp index 3e9ff0c..202f622 100644 --- a/addons/common/CfgWargay.hpp +++ b/addons/common/CfgWargay.hpp @@ -43,6 +43,7 @@ #define RECON_ARMOR_ICON QUOTE(WARGAY_NATO_MARKERS_DIR\b_recon_armor.paa) #define RECON_ICON QUOTE(WARGAY_NATO_MARKERS_DIR\b_recon.paa) +// Split it somehow class CfgWargay { // westMarkerColor[] = { diff --git a/addons/common/XEH_PREP.hpp b/addons/common/XEH_PREP.hpp index 94ffac1..66c7ef3 100644 --- a/addons/common/XEH_PREP.hpp +++ b/addons/common/XEH_PREP.hpp @@ -1,5 +1,4 @@ PREP(createVehicleInfoForNonConfiguredVehicle); -PREP(currentHpString); PREP(getAmmoInfo); PREP(getGroupVehicles); PREP(getVehicleDisplayName); diff --git a/addons/deployment/XEH_postInit.sqf b/addons/deployment/XEH_postInit.sqf index 60db162..11b376e 100644 --- a/addons/deployment/XEH_postInit.sqf +++ b/addons/deployment/XEH_postInit.sqf @@ -16,7 +16,7 @@ if (!hasInterface) exitWith {}; private _vehicleInfo = VehicleTypes getOrDefault [toUpper _vehicleClassName, ""]; private _vehicleName = if (_vehicleInfo isNotEqualTo "") then { - [_vehicleInfo] call FUNC(getVehicleDisplayName) + [_vehicleInfo] call EFUNC(common,getVehicleDisplayName) } else { _vehicleClassName }; @@ -28,7 +28,7 @@ if (!hasInterface) exitWith {}; params ["_vehicleClassName"]; private _vehicleInfo = VehicleTypes getOrDefault [toUpper _vehicleClassName, ""]; private _vehicleName = if (_vehicleInfo isNotEqualTo "") then { - [_vehicleInfo] call FUNC(getVehicleDisplayName) + [_vehicleInfo] call EFUNC(common,getVehicleDisplayName) } else { _vehicleClassName }; @@ -36,10 +36,9 @@ if (!hasInterface) exitWith {}; [WEST, "HQ"] sideChat format [LLSTRING(DeploymentOfVehicleNoLongerPossible), _vehicleName]; }] call CBA_fnc_addEventHandler; -// TODO: Consider where to put this event ["MDL_unitLost", { params ["_unit"]; - private _vehicleDisplayName = [_unit] call FUNC(getVehicleDisplayName); + private _vehicleDisplayName = [_unit] call EFUNC(common,getVehicleDisplayName); private _crew = crew _unit; private _crewNames = if (_crew isEqualTo []) then { "" diff --git a/addons/hud/XEH_PREP.hpp b/addons/hud/XEH_PREP.hpp index 3174a65..a274a05 100644 --- a/addons/hud/XEH_PREP.hpp +++ b/addons/hud/XEH_PREP.hpp @@ -1,3 +1,4 @@ +PREP(currentHpString); PREP(initHitpointsDisplay); PREP(keyUnitInfo); PREP(showUnitInfo); diff --git a/addons/common/functions/fnc_currentHpString.sqf b/addons/hud/functions/fnc_currentHpString.sqf similarity index 100% rename from addons/common/functions/fnc_currentHpString.sqf rename to addons/hud/functions/fnc_currentHpString.sqf diff --git a/addons/hud/functions/fnc_keyUnitInfo.sqf b/addons/hud/functions/fnc_keyUnitInfo.sqf index 3664411..7722487 100644 --- a/addons/hud/functions/fnc_keyUnitInfo.sqf +++ b/addons/hud/functions/fnc_keyUnitInfo.sqf @@ -21,4 +21,4 @@ params ["_displayOrControl", "_key", "_shift", "_ctrl", "_alt"]; private _cursorTarget = cursorTarget; if (_cursorTarget isEqualTo objNull) exitWith {}; -[_cursorTarget] call EFUNC(common,showUnitInfo); +[_cursorTarget] call FUNC(showUnitInfo); diff --git a/addons/icons/config.cpp b/addons/icons/config.cpp index a07d0d4..08519ec 100644 --- a/addons/icons/config.cpp +++ b/addons/icons/config.cpp @@ -7,7 +7,8 @@ class CfgPatches { weapons[] = {}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = { - "afwg_main" + "afwg_common", + "afwg_hud" }; author = "ArmaForces"; VERSION_CONFIG; @@ -15,4 +16,3 @@ class CfgPatches { }; #include "CfgEventHandlers.hpp" -// TODO: Add unit icons/markers diff --git a/addons/icons/functions/fnc_drawIcon.sqf b/addons/icons/functions/fnc_drawIcon.sqf index 021117f..ccc16e7 100644 --- a/addons/icons/functions/fnc_drawIcon.sqf +++ b/addons/icons/functions/fnc_drawIcon.sqf @@ -25,7 +25,7 @@ private _screenPosition = worldToScreen _worldPos; if (_screenPosition isEqualTo []) exitWith {}; private _iconDescription = if (_includeText) then { - format ["%1 - %2", [_target] call FUNC(getVehicleDisplayName), _target call FUNC(currentHpString)] + format ["%1 - %2", [_target] call EFUNC(common,getVehicleDisplayName), _target call EFUNC(hud,currentHpString)] } else { "" }; private _iconPath = [_target] call FUNC(getIconPath); diff --git a/addons/init/XEH_postInit.sqf b/addons/init/XEH_postInit.sqf index ae71d16..97891ac 100644 --- a/addons/init/XEH_postInit.sqf +++ b/addons/init/XEH_postInit.sqf @@ -1,8 +1,5 @@ #include "script_component.hpp" -// TODO: Move onPlayerKilled.sqf -// TODO: Move and split CfgWargay.hpp - GVAR(isTest) = true; AmmoTypes = createHashMapFromArray From d8f79f09816c5b3e6ca4a8455b5958a6f0e6c896 Mon Sep 17 00:00:00 2001 From: 3Mydlo3 Date: Tue, 17 Dec 2024 13:12:07 +0100 Subject: [PATCH 18/47] Fix settings categories --- addons/common/initSettings.inc.sqf | 2 +- addons/damage/initSettings.inc.sqf | 2 +- addons/hud/initSettings.inc.sqf | 8 ++++---- addons/icons/initSettings.inc.sqf | 20 ++++++++++---------- addons/markers/initSettings.inc.sqf | 4 ++-- addons/music/initSettings.inc.sqf | 2 +- addons/repair/initSettings.inc.sqf | 2 +- 7 files changed, 20 insertions(+), 20 deletions(-) diff --git a/addons/common/initSettings.inc.sqf b/addons/common/initSettings.inc.sqf index f18a2b0..173265e 100644 --- a/addons/common/initSettings.inc.sqf +++ b/addons/common/initSettings.inc.sqf @@ -2,7 +2,7 @@ QGVAR(onlyReconCanSpot), "CHECKBOX", ["Only recon can spot", "If enabled, only recon units can spot enemies to be visible for other units"], - [LSTRING(Settings_DisplayName)], + [LSTRING(DisplayName)], false, true ] call CBA_fnc_addSetting; diff --git a/addons/damage/initSettings.inc.sqf b/addons/damage/initSettings.inc.sqf index 61af5c2..cdbe300 100644 --- a/addons/damage/initSettings.inc.sqf +++ b/addons/damage/initSettings.inc.sqf @@ -2,7 +2,7 @@ QGVAR(showDamageFeedback), "CHECKBOX", [LSTRING(ShowDamageFeedback), LSTRING(ShowDamageFeedback_Description)], - [LSTRING(Settings_DisplayNameClient)], + [LSTRING(DisplayName)], true, false ] call CBA_fnc_addSetting; diff --git a/addons/hud/initSettings.inc.sqf b/addons/hud/initSettings.inc.sqf index d25cef1..5f4b6cb 100644 --- a/addons/hud/initSettings.inc.sqf +++ b/addons/hud/initSettings.inc.sqf @@ -4,8 +4,8 @@ [ QGVAR(filledHpColor), "COLOR", - ["-test color-", "-tooltip-"], - "My Category", + ["HP color", "Color used for full HP boxes in HUD"], + [LSTRING(DisplayName)], [ 117/255, 1, @@ -17,8 +17,8 @@ [ QGVAR(missingHpColor), "COLOR", - ["-test color-", "-tooltip-"], - "My Category", + ["Missing HP color", "Color used for missing HP boxes in HUD"], + [LSTRING(DisplayName)], [ 117/255, 117/255, diff --git a/addons/icons/initSettings.inc.sqf b/addons/icons/initSettings.inc.sqf index c967f02..48f1806 100644 --- a/addons/icons/initSettings.inc.sqf +++ b/addons/icons/initSettings.inc.sqf @@ -2,7 +2,7 @@ QGVAR(unitIconMode), "LIST", ["Unit icon mode", ""], - [LSTRING(Icons_DisplayName), LSTRING(UnitIcons)], + [LSTRING(DisplayName), LSTRING(UnitIcons)], [[0, 1], ["All", "Enemy only"]], true ] call CBA_fnc_addSetting; @@ -11,7 +11,7 @@ QGVAR(unitIconSizeDependsOnDistance), "CHECKBOX", [LSTRING(UnitIconSizeDependsOnDistance), LSTRING(UnitIconSizeDependsOnDistance_Description)], - [LSTRING(Settings_DisplayNameClient), LSTRING(UnitIconsSize)], + [LSTRING(DisplayName), LSTRING(UnitIconsSize)], true, false ] call CBA_fnc_addSetting; @@ -20,7 +20,7 @@ QGVAR(unitIconSizeMultiplier), "SLIDER", [LSTRING(UnitIconSizeMultiplier), LSTRING(UnitIconSizeMultiplier_Description)], - [LSTRING(Settings_DisplayNameClient), LSTRING(UnitIconsSize)], + [LSTRING(DisplayName), LSTRING(UnitIconsSize)], [0, 10, 1, 0], false ] call CBA_fnc_addSetting; @@ -29,7 +29,7 @@ QGVAR(unitIconTextSizeMultiplier), "SLIDER", [LSTRING(UnitIconTextSizeMultiplier), LSTRING(UnitIconTextSizeMultiplier_Description)], - [LSTRING(Settings_DisplayNameClient), LSTRING(UnitIconsSize)], + [LSTRING(DisplayName), LSTRING(UnitIconsSize)], [0, 10, 1, 0], false ] call CBA_fnc_addSetting; @@ -42,8 +42,8 @@ GVAR(iconWidth) = getNumber (configFile >> "CfgInGameUI" >> "Cursor" >> "activeW [ QGVAR(westIconColor), "COLOR", - ["-test color-", "-tooltip-"], - "My Category", + ["Friendly players color", "Color used for icons of friendly player's vehicles"], + [LSTRING(DisplayName), LSTRING(UnitIcons)], [ 96/255, 159/255, @@ -55,8 +55,8 @@ GVAR(iconWidth) = getNumber (configFile >> "CfgInGameUI" >> "Cursor" >> "activeW [ QGVAR(westAiIconColor), "COLOR", - ["-test color-", "-tooltip-"], - "My Category", + ["Friendly AI color", "Color used for icons of friendly AI's vehicles"], + [LSTRING(DisplayName), LSTRING(UnitIcons)], [ 29/255, 197/255, @@ -68,8 +68,8 @@ GVAR(iconWidth) = getNumber (configFile >> "CfgInGameUI" >> "Cursor" >> "activeW [ QGVAR(eastIconColor), "COLOR", - ["-test color-", "-tooltip-"], - "My Category", + ["Enemy color", "Color used for icons of enemy vehicles"], + [LSTRING(DisplayName), LSTRING(UnitIcons)], [ 192/255, 29/255, diff --git a/addons/markers/initSettings.inc.sqf b/addons/markers/initSettings.inc.sqf index 9104c06..0c6b8aa 100644 --- a/addons/markers/initSettings.inc.sqf +++ b/addons/markers/initSettings.inc.sqf @@ -2,7 +2,7 @@ QGVAR(enemyMarkersEnabled), "CHECKBOX", ["Enable map markers enemies", "If enabled, map markers will be show for spotted enemy units (icons might look different on map vs in-game)."], - [LSTRING(Markers_DisplayName), ELSTRING(icons,UnitIcons)], + [LSTRING(DisplayName), ELSTRING(icons,UnitIcons)], true, true ] call CBA_fnc_addSetting; @@ -11,7 +11,7 @@ QGVAR(enemyMarkersRefreshRate), "TIME", ["Refresh rate for enemy markers", "Controls how often map markers for enemies should refresh."], - [LSTRING(Markers_DisplayName), ELSTRING(icons,UnitIcons)], + [LSTRING(DisplayName), ELSTRING(icons,UnitIcons)], [0, 60, 5], true ] call CBA_fnc_addSetting; diff --git a/addons/music/initSettings.inc.sqf b/addons/music/initSettings.inc.sqf index 1f4ae82..af36bf4 100644 --- a/addons/music/initSettings.inc.sqf +++ b/addons/music/initSettings.inc.sqf @@ -2,7 +2,7 @@ QGVAR(damageAlarmEnabled), "CHECKBOX", [LSTRING(DamageAlarmEnabled), LSTRING(DamageAlarmEnabled_Description)], - [LSTRING(Settings_DisplayNameClient)], + [LSTRING(DisplayName)], true, false ] call CBA_fnc_addSetting; diff --git a/addons/repair/initSettings.inc.sqf b/addons/repair/initSettings.inc.sqf index e93088d..988c128 100644 --- a/addons/repair/initSettings.inc.sqf +++ b/addons/repair/initSettings.inc.sqf @@ -2,7 +2,7 @@ QGVAR(repairMinNoCombatTime), "TIME", ["Minimum no combat time", "Vehicle must be out of combat for long enough to be able to be repaired"], - [LSTRING(Settings_DisplayName), localize "str_state_repair"], + [LSTRING(DisplayName), localize "str_state_repair"], [0, 900, 60], true ] call CBA_fnc_addSetting; From 4715cedbf3ec9771bd7dc03dfb3a6dbd3dfe8bc1 Mon Sep 17 00:00:00 2001 From: 3Mydlo3 Date: Tue, 17 Dec 2024 16:38:46 +0100 Subject: [PATCH 19/47] Public addDeployableVehicle function --- .hemtt/launch.toml | 40 ++++++++++++++++++ .hemtt/project.toml | 41 ------------------- addons/deployment/README.md | 5 +++ addons/deployment/XEH_PREP.hpp | 1 + addons/deployment/XEH_postInit.sqf | 3 ++ .../functions/fnc_addDeployableVehicle.sqf | 29 +++++++++++++ .../functions/fnc_deployVehicle.sqf | 1 + addons/init/XEH_postInit.sqf | 37 ----------------- addons/main/script_mod.hpp | 4 +- 9 files changed, 81 insertions(+), 80 deletions(-) create mode 100644 .hemtt/launch.toml create mode 100644 addons/deployment/README.md create mode 100644 addons/deployment/functions/fnc_addDeployableVehicle.sqf diff --git a/.hemtt/launch.toml b/.hemtt/launch.toml new file mode 100644 index 0000000..23294ca --- /dev/null +++ b/.hemtt/launch.toml @@ -0,0 +1,40 @@ +[default] +workshop = [ + "450814997", # CBA_A3 + "2369477168", # ADT +] +parameters = [ + "-name=dev", +] + +[ace] +extends = "default" +workshop = [ + "463939057", # ACE +# "766491311", # KKA3 ACE Extension +] + +[cup] +extends = "default" +workshop = [ + "583496184", # CUP Terrains - Core + "583544987", # CUP Terrains - Maps +] + +[vn] +extends = "default" +dlc = [ + "S.O.G. Prairie Fire", +] + +[ww2] +extends = "default" +dlc = [ + "Spearhead 1944", +] + +[gm] +extends = "default" +dlc = [ + "Global Mobilization", +] diff --git a/.hemtt/project.toml b/.hemtt/project.toml index 53a22aa..9d5c1e0 100644 --- a/.hemtt/project.toml +++ b/.hemtt/project.toml @@ -18,44 +18,3 @@ author = "ArmaForces" [version] path = "addons/main/script_version.hpp" - -[hemtt.launch.default] -workshop = [ - "450814997", # CBA_A3 - "2369477168", # ADT -] -parameters = [ - "-name=dev", -] - -[hemtt.launch.ace] -extends = "default" -workshop = [ - "463939057", # ACE -# "766491311", # KKA3 ACE Extension -] - -[hemtt.launch.cup] -extends = "default" -workshop = [ - "583496184", # CUP Terrains - Core - "583544987", # CUP Terrains - Maps -] - -[hemtt.launch.vn] -extends = "default" -dlc = [ - "S.O.G. Prairie Fire", -] - -[hemtt.launch.ww2] -extends = "default" -dlc = [ - "Spearhead 1944", -] - -[hemtt.launch.gm] -extends = "default" -dlc = [ - "Global Mobilization", -] diff --git a/addons/deployment/README.md b/addons/deployment/README.md new file mode 100644 index 0000000..2c6ca42 --- /dev/null +++ b/addons/deployment/README.md @@ -0,0 +1,5 @@ +# Deployment + +## Public functions + +- [fnc_addDeployableVehicle](functions/fnc_addDeployableVehicle.sqf) diff --git a/addons/deployment/XEH_PREP.hpp b/addons/deployment/XEH_PREP.hpp index 347e965..6146e0f 100644 --- a/addons/deployment/XEH_PREP.hpp +++ b/addons/deployment/XEH_PREP.hpp @@ -1 +1,2 @@ +PREP(addDeployableVehicle); PREP(deployVehicle); diff --git a/addons/deployment/XEH_postInit.sqf b/addons/deployment/XEH_postInit.sqf index 11b376e..1bcce05 100644 --- a/addons/deployment/XEH_postInit.sqf +++ b/addons/deployment/XEH_postInit.sqf @@ -1,5 +1,8 @@ #include "script_component.hpp" +// Can be initialized using FUNC(addDeployableVehicle) +GVAR(spawnableVehicles) = createHashMap; + if (isServer) then { call COMPILE_SCRIPT(XEH_postInitServer) }; if (!hasInterface) exitWith {}; diff --git a/addons/deployment/functions/fnc_addDeployableVehicle.sqf b/addons/deployment/functions/fnc_addDeployableVehicle.sqf new file mode 100644 index 0000000..3a1a1a2 --- /dev/null +++ b/addons/deployment/functions/fnc_addDeployableVehicle.sqf @@ -0,0 +1,29 @@ +#include "script_component.hpp" +/* + * Author: 3Mydlo3 + * Changes availability of given vehicle class according to the number specified. + * Cannot change availability below 0. + * + * Arguments: + * 0: Vehicle class that will be deployable + * 1: Requested change in availability (can be negative) + * + * Example: + * ["GM_GC_ARMY_T55AM2", 4] call afwg_deployment_fnc_addDeployableVehicle + * + * Return Value: + * New availability of given vehicle + * + * Public: Yes + */ + +params [["_vehicleClassName", "", [""]], ["_count", 0, [0]]]; + +if (_vehicleClassName isEqualTo "") exitWith { 0 }; + +private _currentCount = GVAR(spawnableVehicles) getOrDefault [_vehicleClassName, 0]; + +private _newCount = (_currentCount + _count) max 0; +GVAR(spawnableVehicles) set [_vehicleClassName, _newCount]; + +_newCount diff --git a/addons/deployment/functions/fnc_deployVehicle.sqf b/addons/deployment/functions/fnc_deployVehicle.sqf index 6a373d8..490c29f 100644 --- a/addons/deployment/functions/fnc_deployVehicle.sqf +++ b/addons/deployment/functions/fnc_deployVehicle.sqf @@ -33,6 +33,7 @@ if (_vehicle isEqualTo objNull) exitWith { ["MDL_createVehicleFailed", [], _caller] call CBA_fnc_targetEvent; }; +// TODO: Provide number of remaining vehicles of given type ["MDL_vehicleDeployment", [_vehicleClassName, _caller, _vehicle]] call CBA_fnc_globalEvent; private _newRemainingSpawns = _remainingSpawns - 1; diff --git a/addons/init/XEH_postInit.sqf b/addons/init/XEH_postInit.sqf index 97891ac..134ec39 100644 --- a/addons/init/XEH_postInit.sqf +++ b/addons/init/XEH_postInit.sqf @@ -90,43 +90,6 @@ MagazineTypes = createHashMapFromArray _magazineTypes; true // Apply retroactive ] call CBA_fnc_addClassEventHandler; -// TODO: Find an easy way to ininitalize spawnable vehicles from mission init -GVAR(spawnableVehicles) = createHashMapFromArray [ - // LOG - ["gm_ge_army_iltis_cargo", 2], - ["gm_ge_army_m113a1g_command", 1], - ["cwr3_b_m577_hq", 1], - ["gm_ge_army_fuchsa0_command", 1], - ["gm_ge_army_bpz2a0", 2], - ["gm_ge_army_kat1_451_reammo", 4], - ["B_Truck_01_fuel_F", 2], - - // SUP - ["gm_ge_army_gepard1a1", 2], // 3 - ["gm_ge_army_m109g", 2], - ["cwr3_b_m163", 4], - ["gm_ge_army_kat1_463_mlrs", 1], - - // TNK - ["gm_ge_army_Leopard1a1", 1], // 6 - ["gm_ge_army_Leopard1a3", 6], - ["gm_ge_army_marder1a1a", 4], - ["cwr3_b_m60a3", 4], - - // REC - ["gm_ge_army_iltis_milan", 4], - ["gm_ge_army_bo105m_vbh", 1], - ["gm_ge_army_fuchsa0_reconnaissance", 1], // 3 - ["gm_ge_army_luchsa1", 2], - - // VEH - ["cwr3_b_m901_itv", 2], - ["cwr3_b_hmmwv_tow", 4], - - // HEL - ["cwr3_b_ah1f", 2] -]; - if (GVAR(isTest)) then { [{ ["MDL_startGame"] call CBA_fnc_globalEvent; diff --git a/addons/main/script_mod.hpp b/addons/main/script_mod.hpp index 1cb93c1..b1f63a7 100644 --- a/addons/main/script_mod.hpp +++ b/addons/main/script_mod.hpp @@ -16,5 +16,5 @@ #endif // Global DEBUG -#define DEV_DEBUG -#define DEBUG_MODE_FULL +// #define DEV_DEBUG +// #define DEBUG_MODE_FULL From 8c1175a18f83a52c5a290927e492c6c7e7bff7db Mon Sep 17 00:00:00 2001 From: 3Mydlo3 Date: Wed, 18 Dec 2024 13:24:23 +0100 Subject: [PATCH 20/47] Fix non-GM vehicles not having display name --- addons/common/functions/fnc_getAmmoInfo.sqf | 4 ++-- addons/common/functions/fnc_getVehicleDisplayName.sqf | 2 +- addons/main/script_macros.hpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/addons/common/functions/fnc_getAmmoInfo.sqf b/addons/common/functions/fnc_getAmmoInfo.sqf index dd0e8e0..dec0940 100644 --- a/addons/common/functions/fnc_getAmmoInfo.sqf +++ b/addons/common/functions/fnc_getAmmoInfo.sqf @@ -44,7 +44,7 @@ if (_ammoInfo isEqualTo objNull) then { } select {_x select 1 isNotEqualTo objNull} apply { - (_x select 1) set ["displayNameShort", getText (configFile >> "CfgMagazines" >> (_x select 0) >> "displayNameShort")]; + (_x select 1) set ["displayName", getText (configFile >> "CfgMagazines" >> (_x select 0) >> "displayName")]; _x select 1 }; @@ -120,7 +120,7 @@ _ammo apply { [_x select 0, AmmoTypes getOrDefault [toUpper (_x select 1), objNull]]; } select {_x select 1 isNotEqualTo objNull} apply { - (_x select 1) set ["displayNameShort", getText (configFile >> "CfgMagazines" >> (_x select 0) >> "displayNameShort")]; + (_x select 1) set ["displayName", getText (configFile >> "CfgMagazines" >> (_x select 0) >> "displayName")]; _x select 1 } diff --git a/addons/common/functions/fnc_getVehicleDisplayName.sqf b/addons/common/functions/fnc_getVehicleDisplayName.sqf index 4f7847b..7e32ff2 100644 --- a/addons/common/functions/fnc_getVehicleDisplayName.sqf +++ b/addons/common/functions/fnc_getVehicleDisplayName.sqf @@ -1,7 +1,7 @@ #include "script_component.hpp" /* * Author: 3Mydlo3, veteran29 - * Returns displayNameShort for given vehicle type. + * Returns displayName for given vehicle type. * * Arguments: * 0: Vehicle or unit info diff --git a/addons/main/script_macros.hpp b/addons/main/script_macros.hpp index 9dc276e..50317b0 100644 --- a/addons/main/script_macros.hpp +++ b/addons/main/script_macros.hpp @@ -25,7 +25,7 @@ #define AMMO_PROPERTY "ammo" #define CLASS_NAME_PROPERTY "className" #define DAMAGE_PROPERTY "damage" -#define DISPLAY_NAME_PROPERTY "displayNameShort" +#define DISPLAY_NAME_PROPERTY "displayName" #define TYPE_PROPERTY "type" #define MAX_HP 10 #define NO_ARMOR [0, 0, 0, 0] From 8e7143b90b2a1039ecfe09249875f0a5c10afc68 Mon Sep 17 00:00:00 2001 From: 3Mydlo3 Date: Wed, 18 Dec 2024 13:26:05 +0100 Subject: [PATCH 21/47] Add GM compatibility for recognizable names --- addons/compatibility/$PBOPREFIX$ | 1 + addons/compatibility/README.md | 3 + addons/compatibility/config.cpp | 17 + .../global_mobilization/CfgAmmo.hpp | 15 + .../global_mobilization/CfgVehicles.hpp | 322 ++++++++++++++++++ .../global_mobilization/config.cpp | 21 ++ .../global_mobilization/script_component.hpp | 2 + .../global_mobilization/stringtable.xml | 296 ++++++++++++++++ addons/compatibility/script_component.hpp | 14 + 9 files changed, 691 insertions(+) create mode 100644 addons/compatibility/$PBOPREFIX$ create mode 100644 addons/compatibility/README.md create mode 100644 addons/compatibility/config.cpp create mode 100644 addons/compatibility/global_mobilization/CfgAmmo.hpp create mode 100644 addons/compatibility/global_mobilization/CfgVehicles.hpp create mode 100644 addons/compatibility/global_mobilization/config.cpp create mode 100644 addons/compatibility/global_mobilization/script_component.hpp create mode 100644 addons/compatibility/global_mobilization/stringtable.xml create mode 100644 addons/compatibility/script_component.hpp diff --git a/addons/compatibility/$PBOPREFIX$ b/addons/compatibility/$PBOPREFIX$ new file mode 100644 index 0000000..b254666 --- /dev/null +++ b/addons/compatibility/$PBOPREFIX$ @@ -0,0 +1 @@ +z\afwg\addons\compatibility diff --git a/addons/compatibility/README.md b/addons/compatibility/README.md new file mode 100644 index 0000000..ecbc442 --- /dev/null +++ b/addons/compatibility/README.md @@ -0,0 +1,3 @@ +# Compatiblity + +Adds compatiblity for various mods, loaded as needed thanks to `skipWhenMissingDependencies` diff --git a/addons/compatibility/config.cpp b/addons/compatibility/config.cpp new file mode 100644 index 0000000..bd2f1cc --- /dev/null +++ b/addons/compatibility/config.cpp @@ -0,0 +1,17 @@ +#include "script_component.hpp" + +class CfgPatches { + class ADDON { + name = COMPONENT_NAME; + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = { + "afwg_main", + "A3_Data_F_Decade_Loadorder" + }; + author = "ArmaForces"; + authors[] = {"veteran29"}; + VERSION_CONFIG; + }; +}; diff --git a/addons/compatibility/global_mobilization/CfgAmmo.hpp b/addons/compatibility/global_mobilization/CfgAmmo.hpp new file mode 100644 index 0000000..038a260 --- /dev/null +++ b/addons/compatibility/global_mobilization/CfgAmmo.hpp @@ -0,0 +1,15 @@ + +class CfgAmmo { + /* + Reference: + B_30mm_APFSDS_Tracer_Green + aiAmmoUsageFlags = "128 + 512"; + caliber = 6; + hit = 120; + */ + class gm_bullet_23x152mm_base; + class gm_bullet_23x152mm_API_T_BZT: gm_bullet_23x152mm_base { + caliber = 6; // 3.80952 + hit = 80; // 52.47; + }; +}; diff --git a/addons/compatibility/global_mobilization/CfgVehicles.hpp b/addons/compatibility/global_mobilization/CfgVehicles.hpp new file mode 100644 index 0000000..9e5712c --- /dev/null +++ b/addons/compatibility/global_mobilization/CfgVehicles.hpp @@ -0,0 +1,322 @@ +class CfgVehicles { + class gm_bo105p_base; + class gm_bo105p_pah1_base : gm_bo105p_base { + displayName = SUBCSTRING(Bo105P_PAH1_Name); + shortDisplayName = SUBCSTRING(Bo105P_PAH1_Name); + }; + class gm_bo105p_pah1a1_base : gm_bo105p_pah1_base { + displayName = SUBCSTRING(Bo105P_PAH1A1_Name); + shortDisplayName = SUBCSTRING(Bo105P_PAH1A1_Name); + }; + class gm_bo105m_base; + class gm_bo105m_vbh_base : gm_bo105m_base { + displayName = SUBCSTRING(Bo105M_VBH1_Name); + shortDisplayName = SUBCSTRING(Bo105M_VBH1_Name); + }; + class gm_bo105p1m_base : gm_bo105p_base {}; + class gm_bo105p1m_vbh_base : gm_bo105p1m_base { + displayName = SUBCSTRING(Bo105M_VBH1A1_Name); + shortDisplayName = SUBCSTRING(Bo105M_VBH1A1_Name); + }; + class gm_bo105p1m_vbh_swooper_base : gm_bo105p1m_vbh_base { + displayName = SUBCSTRING(Bo105M_VBH1A1_Swooper_Name); + shortDisplayName = SUBCSTRING(Bo105M_VBH1A1_Name); + }; + class gm_ge_pol_bo105m_vbh_base : gm_bo105m_vbh_base { + displayName = SUBCSTRING(Bo105M_VBH1_Police_Name); + shortDisplayName = SUBCSTRING(Bo105M_VBH1_Name); + }; + class gm_ge_adak_bo105m_vbh_base : gm_bo105m_vbh_base { + displayName = SUBCSTRING(Bo105M_VBH1_ADAK_Name); + shortDisplayName = SUBCSTRING(Bo105M_VBH1_Name); + }; + + class gm_tracked_Tank_base; + + class gm_Leopard1_base : gm_tracked_Tank_base { + displayName = SUBCSTRING(Leopard1_Name); + shortDisplayName = SUBCSTRING(Leopard1_Name); + }; + class gm_Leopard1a0_base : gm_Leopard1_base { + displayName = SUBCSTRING(Leopard1A0_Name); + shortDisplayName = SUBCSTRING(Leopard1A0_Name); + }; + + class gm_Leopard1a1_base : gm_Leopard1a0_base { + displayName = SUBCSTRING(Leopard1A1_Name); + shortDisplayName = SUBCSTRING(Leopard1A1_Name); + }; + class gm_Leopard1a1a1_base : gm_Leopard1a1_base { + displayName = SUBCSTRING(Leopard1A1A1_Name); + shortDisplayName = SUBCSTRING(Leopard1A1A1_Name); + }; + class gm_Leopard1a1a2_base : gm_Leopard1a1a1_base { + displayName = SUBCSTRING(Leopard1A1A2_Name); + shortDisplayName = SUBCSTRING(Leopard1A1A2_Name); + }; + class gm_Leopard1a1a3_base : gm_Leopard1a1a1_base { + displayName = SUBCSTRING(Leopard1A1A3_Name); + shortDisplayName = SUBCSTRING(Leopard1A1A3_Name); + }; + class gm_Leopard1a1a4_base : gm_Leopard1a1a2_base { + displayName = SUBCSTRING(Leopard1A1A4_Name); + shortDisplayName = SUBCSTRING(Leopard1A1A4_Name); + }; + class gm_Leopard1a1no_base : gm_Leopard1a1_base { + displayName = SUBCSTRING(Leopard1A1NO_Name); + shortDisplayName = SUBCSTRING(Leopard1A1NO_Name); + }; + + class gm_Leopard1a3_base : gm_Leopard1a0_base { + displayName = SUBCSTRING(Leopard1A3_Name); + shortDisplayName = SUBCSTRING(Leopard1A3_Name); + }; + class gm_Leopard1a3a1_base : gm_Leopard1a3_base { + displayName = SUBCSTRING(Leopard1A3A1_Name); + shortDisplayName = SUBCSTRING(Leopard1A3A1_Name); + }; + class gm_Leopard1a3a2_base : gm_Leopard1a3_base { + displayName = SUBCSTRING(Leopard1A3A2_Name); + shortDisplayName = SUBCSTRING(Leopard1A3A2_Name); + }; + class gm_Leopard1a3a3_base : gm_Leopard1a3_base { + displayName = SUBCSTRING(Leopard1A3A3_Name); + shortDisplayName = SUBCSTRING(Leopard1A3A3_Name); + }; + class gm_Leopard1a3dk_base : gm_Leopard1a3_base { + displayName = SUBCSTRING(Leopard1A3DK_Name); + shortDisplayName = SUBCSTRING(Leopard1A3DK_Name); + }; + + class gm_Leopard1a4_base : gm_Leopard1a3_base { + displayName = SUBCSTRING(Leopard1A4_Name); + shortDisplayName = SUBCSTRING(Leopard1A4_Name); + }; + class gm_Leopard1a4a1_base : gm_Leopard1a4_base { + displayName = SUBCSTRING(Leopard1A4A1_Name); + shortDisplayName = SUBCSTRING(Leopard1A4A1_Name); + }; + + class gm_Leopard1a5_base : gm_Leopard1a0_base { + displayName = SUBCSTRING(Leopard1A5_Name); + shortDisplayName = SUBCSTRING(Leopard1A5_Name); + }; + class gm_Leopard1a5a1_base : gm_Leopard1a5_base { + displayName = SUBCSTRING(Leopard1A5A1_Name); + shortDisplayName = SUBCSTRING(Leopard1A5A1_Name); + }; + class gm_Leopard1a5dk_base : gm_Leopard1a5_base { + displayName = SUBCSTRING(Leopard1A5DK_Name); + shortDisplayName = SUBCSTRING(Leopard1A5DK_Name); + }; + class gm_Leopard1a5dk1_base : gm_Leopard1a5_base { + displayName = SUBCSTRING(Leopard1A5DK1_Name); + shortDisplayName = SUBCSTRING(Leopard1A5DK1_Name); + }; + class gm_Leopard1a5no_base : gm_Leopard1a5_base { + displayName = SUBCSTRING(Leopard1A5NO_Name); + shortDisplayName = SUBCSTRING(Leopard1A5NO_Name); + }; + class gm_Leopard1a5no2_base : gm_Leopard1a5_base { + displayName = SUBCSTRING(Leopard1A5NO2_Name); + shortDisplayName = SUBCSTRING(Leopard1A5NO2_Name); + }; + + class gm_Gepard_base : gm_Leopard1_base { + displayName = SUBCSTRING(Gepard_Name); + shortDisplayName = SUBCSTRING(Gepard_Name); + }; + class gm_Gepard1a1_base : gm_Gepard_base { + displayName = SUBCSTRING(Gepard1A1_Name); + shortDisplayName = SUBCSTRING(Gepard1A1_Name); + }; + + class gm_biber_base : gm_Leopard1_base { + displayName = SUBCSTRING(Biber_Name); + shortDisplayName = SUBCSTRING(Biber_Name); + }; + + class gm_tracked_APC_base; + class gm_marder1_base : gm_tracked_APC_base { + displayName = SUBCSTRING(Marder1_Name); + shortDisplayName = SUBCSTRING(Marder1_Name); + }; + class gm_marder1a0_base : gm_marder1_base { + displayName = SUBCSTRING(Marder1A0_Name); + shortDisplayName = SUBCSTRING(Marder1A0_Name); + }; + class gm_marder1a1_base : gm_marder1a0_base { + displayName = SUBCSTRING(Marder1A1_Name); + shortDisplayName = SUBCSTRING(Marder1A1_Name); + }; + class gm_marder1a1a_base : gm_marder1a1_base { + displayName = SUBCSTRING(Marder1A1A_Name); + shortDisplayName = SUBCSTRING(Marder1A1A_Name); + }; + class gm_marder1a1minus_base : gm_marder1a1_base { + displayName = SUBCSTRING(Marder1A1Minus_Name); + shortDisplayName = SUBCSTRING(Marder1A1Minus_Name); + }; + class gm_marder1a1plus_base : gm_marder1a1_base { + displayName = SUBCSTRING(Marder1A1Plus_Name); + shortDisplayName = SUBCSTRING(Marder1A1Plus_Name); + }; + class gm_marder1a2_base : gm_marder1a1_base { + displayName = SUBCSTRING(Marder1A2_Name); + shortDisplayName = SUBCSTRING(Marder1A2_Name); + }; + + class gm_m113a1g_base; + class gm_m113a1g_apc_milan_base : gm_m113a1g_base { + displayName = SUBCSTRING(M113A1G_Milan_Name); + shortDisplayName = SUBCSTRING(M113A1G_Milan_Name); + }; + + class gm_wheeled_APC_base; + class gm_luchs_base : gm_wheeled_APC_base { + displayName = SUBCSTRING(Luchs_Name); + shortDisplayName = SUBCSTRING(Luchs_Name); + }; + class gm_luchsa1_base : gm_luchs_base { + displayName = SUBCSTRING(LuchsA1_Name); + shortDisplayName = SUBCSTRING(LuchsA1_Name); + }; + class gm_luchsa2_base : gm_luchs_base { + displayName = SUBCSTRING(LuchsA2_Name); + shortDisplayName = SUBCSTRING(LuchsA2_Name); + }; + + class gm_fuchs_base : gm_wheeled_APC_base { + displayName = SUBCSTRING(Fuchs_Name); + shortDisplayName = SUBCSTRING(Fuchs_Name); + }; + class gm_fuchsa0_base : gm_fuchs_base { + displayName = SUBCSTRING(Fuchs1A0_Name); + shortDisplayName = SUBCSTRING(Fuchs1A0_Name); + }; + class gm_fuchsa0_command_base : gm_fuchsa0_base { + displayName = SUBCSTRING(Fuchs1A0_Command_Name); + shortDisplayName = SUBCSTRING(Fuchs1A0_Name); + }; + class gm_fuchsa0_engineer_base : gm_fuchsa0_base { + displayName = SUBCSTRING(Fuchs1A0_Engineer_Name); + shortDisplayName = SUBCSTRING(Fuchs1A0_Name); + }; + class gm_fuchsa0_medic_base : gm_fuchsa0_base { + displayName = SUBCSTRING(Fuchs1A0_Medic_Name); + shortDisplayName = SUBCSTRING(Fuchs1A0_Name); + }; + class gm_fuchsa0_reconnaissance_base : gm_fuchsa0_base { + displayName = SUBCSTRING(Fuchs1A0_Reconnaissance_Name); + shortDisplayName = SUBCSTRING(Fuchs1A0_Milan_Name); + }; + class gm_fuchsa4_command_base : gm_fuchsa0_command_base { + displayName = SUBCSTRING(Fuchs1A4_Command_Name); + shortDisplayName = SUBCSTRING(Fuchs1A4_Name); + }; + class gm_fuchsa4_engineer_base : gm_fuchsa0_engineer_base { + displayName = SUBCSTRING(Fuchs1A4_Engineer_Name); + shortDisplayName = SUBCSTRING(Fuchs1A4_Name); + }; + class gm_fuchsa4_medic_base : gm_fuchsa0_medic_base { + displayName = SUBCSTRING(Fuchs1A4_Medic_Name); + shortDisplayName = SUBCSTRING(Fuchs1A4_Name); + }; + class gm_fuchsa4_reconnaissance_base : gm_fuchsa0_reconnaissance_base { + displayName = SUBCSTRING(Fuchs1A4_Reconnaissance_Name); + shortDisplayName = SUBCSTRING(Fuchs1A4_Milan_Name); + }; + + class gm_iltis_cargo_base; + class gm_ge_army_iltis_cargo_base : gm_iltis_cargo_base { + displayName = SUBCSTRING(Iltis_Name); + shortDisplayName = SUBCSTRING(Iltis_Name); + }; + class gm_iltis_milan_base; + class gm_ge_army_iltis_milan_base : gm_iltis_milan_base { + displayName = SUBCSTRING(Iltis_Milan_Name); + shortDisplayName = SUBCSTRING(Iltis_Milan_Name); + }; + class gm_iltis_mg3_base; + class gm_ge_army_iltis_mg3_base : gm_iltis_mg3_base { + displayName = SUBCSTRING(Iltis_MG3_Name); + shortDisplayName = SUBCSTRING(Iltis_MG3_Name); + }; + + // TODO: MAN Kat1 4x4/6x6/8x8 + + class gm_wheeled_car_base; + class gm_w123_base : gm_wheeled_car_base { + displayName = SUBCSTRING(W123_Name); + shortDisplayName = SUBCSTRING(W123_Name); + }; + class gm_ge_army_w123_cargo_base : gm_w123_base { + displayName = SUBCSTRING(W123_Name); + shortDisplayName = SUBCSTRING(W123_Name); + }; + class gm_ge_civ_w123_base : gm_w123_base { + displayName = SUBCSTRING(W123_Name); + shortDisplayName = SUBCSTRING(W123_Name); + }; + class gm_ge_taxi_w123 : gm_ge_civ_w123_base { + displayName = SUBCSTRING(W123_Taxi_Name); + shortDisplayName = SUBCSTRING(W123_Name); + }; + class gm_ge_pol_w123 : gm_ge_civ_w123_base { + displayName = SUBCSTRING(W123_Police_Name); + shortDisplayName = SUBCSTRING(W123_Name); + }; + class gm_ge_ff_w123 : gm_ge_civ_w123_base { + displayName = SUBCSTRING(W123_FF_Name); + shortDisplayName = SUBCSTRING(W123_Name); + }; + class gm_ge_dbp_w123 : gm_ge_civ_w123_base { + displayName = SUBCSTRING(W123_DBP_Name); + shortDisplayName = SUBCSTRING(W123_Name); + }; + + class gm_typ1_base; + class gm_typ1200_base : gm_typ1_base { + displayName = SUBCSTRING(Typ1200_Name); + shortDisplayName = SUBCSTRING(Typ1200_Name); + }; + class gm_typ1200_patrol_base : gm_typ1200_base { + displayName = SUBCSTRING(Typ1200_Patrol_Name); + shortDisplayName = SUBCSTRING(Typ1200_Name); + }; + class gm_ge_army_typ1200_cargo_base : gm_typ1200_patrol_base { + displayName = SUBCSTRING(Typ1200_Name); + shortDisplayName = SUBCSTRING(Typ1200_Name); + }; + class gm_ge_ff_typ1200 : gm_typ1200_base { + displayName = SUBCSTRING(Typ1200_FF_Name); + shortDisplayName = SUBCSTRING(Typ1200_Name); + }; + class gm_ge_pol_typ1200 : gm_typ1200_base { + displayName = SUBCSTRING(Typ1200_Police_Name); + shortDisplayName = SUBCSTRING(Typ1200_Name); + }; + class gm_ge_dbp_typ1200 : gm_typ1200_base { + displayName = SUBCSTRING(Typ1200_DBP_Name); + shortDisplayName = SUBCSTRING(Typ1200_Name); + }; + + // TODO: Typ247/251/253 Volkswagen Type 2 (T3) + + class gm_wheeled_motorcycle_base; + class gm_k125_base : gm_wheeled_motorcycle_base { + displayName = SUBCSTRING(K125_Name); + shortDisplayName = SUBCSTRING(K125_Name); + }; + class gm_k125_bw_base : gm_k125_base {}; + class gm_ge_army_k125_base : gm_k125_bw_base { + displayName = SUBCSTRING(K125_Name); + shortDisplayName = SUBCSTRING(K125_Name); + }; + + class gm_staticATGM_base; + class gm_milan_launcher_tripod_base : gm_staticATGM_base { + displayName = SUBCSTRING(Milan_Tripod_Name); + shortDisplayName = SUBCSTRING(Milan_Name); + }; +}; diff --git a/addons/compatibility/global_mobilization/config.cpp b/addons/compatibility/global_mobilization/config.cpp new file mode 100644 index 0000000..aa9bbc0 --- /dev/null +++ b/addons/compatibility/global_mobilization/config.cpp @@ -0,0 +1,21 @@ +#include "script_component.hpp" + +class CfgPatches { + class SUBADDON { + name = COMPONENT_NAME; + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = { + "gm_core", + "afwg_compatibility" + }; + skipWhenMissingDependencies = 1; + author = "ArmaForces"; + authors[] = {"veteran29", "3Mydlo3"}; + VERSION_CONFIG; + }; +}; + +#include "CfgAmmo.hpp" +#include "CfgVehicles.hpp" diff --git a/addons/compatibility/global_mobilization/script_component.hpp b/addons/compatibility/global_mobilization/script_component.hpp new file mode 100644 index 0000000..b76a337 --- /dev/null +++ b/addons/compatibility/global_mobilization/script_component.hpp @@ -0,0 +1,2 @@ +#define SUBCOMPONENT global_mobilization +#include "..\script_component.hpp" diff --git a/addons/compatibility/global_mobilization/stringtable.xml b/addons/compatibility/global_mobilization/stringtable.xml new file mode 100644 index 0000000..884fc99 --- /dev/null +++ b/addons/compatibility/global_mobilization/stringtable.xml @@ -0,0 +1,296 @@ + + + + + BrPz 1 Biber + BrPz 1 Biber + + + Bo 105M/VBH-1A1 + Bo 105M/VBH-1A1 + + + Bo 105M/VBH-1A1 Swooper + Bo 105M/VBH-1A1 Swooper + + + Bo 105M/VBH-1 (ADAK) + + + Bo 105M/VBH-1 + Bo 105M/VBH-1 + + + Bo 105M/VBH-1 (Police) + Bo 105M/VBH-1 (Policja) + Bo 105M/VBH-1 (Polizei) + + + Bo 105P/PAH-1A1 + Bo 105P/PAH-1A1 + + + Bo 105P/PAH-1 + Bo 105P/PAH-1 + + + TPz Fuchs 1A0 Command + TPz Fuchs 1A0 Dowodzenia + + + TPz Fuchs 1A0 Engineer + TPz Fuchs 1A0 Inżynieryjny + + + TPz Fuchs 1A0 Medical + TPz Fuchs 1A0 Medyczny + + + TPz Fuchs 1A0 (Milan) + TPz Fuchs 1A0 (Milan) + + + TPz Fuchs 1A0 + TPz Fuchs 1A0 + + + TPz Fuchs 1A0 Recon (Milan) + TPz Fuchs 1A0 Zwiadowczy (Milan) + + + TPz Fuchs 1A4 Command + TPz Fuchs 1A4 Dowodzenia + + + TPz Fuchs 1A4 Engineer + TPz Fuchs 1A4 Inżynieryjny + + + TPz Fuchs 1A4 Medical + TPz Fuchs 1A4 Medyczny + + + TPz Fuchs 1A4 (Milan) + TPz Fuchs 1A4 (Milan) + + + TPz Fuchs 1A4 + TPz Fuchs 1A4 + + + TPz Fuchs 1A4 Recon (Milan) + TPz Fuchs 1A4 Zwiadowczy (Milan) + + + TPz Fuchs + TPz Fuchs + + + Flakpanzer Gepard 1A1 + Flakpanzer Gepard 1A1 + + + Flakpanzer Gepard + Flakpanzer Gepard + + + Iltis (MG3) + Iltis (MG3) + + + Iltis (Milan) + Iltis (Milan) + + + Iltis + Iltis + + + Hercules K 125 BW + Hercules K 125 BW + + + Leopard 1A0 + Leopard 1A0 + + + Leopard 1A1A1 + Leopard 1A1A1 + + + Leopard 1A1A2 + Leopard 1A1A2 + + + Leopard 1A1A3 + Leopard 1A1A3 + + + Leopard 1A1A4 + Leopard 1A1A4 + + + Leopard 1A1NO + Leopard 1A1NO + + + Leopard 1A1 + Leopard 1A1 + + + Leopard 1A3A1 + Leopard 1A3A1 + + + Leopard 1A3A2 + Leopard 1A3A2 + + + Leopard 1A3A3 + Leopard 1A3A3 + + + Leopard 1A3DK + Leopard 1A3DK + + + Leopard 1A3 + Leopard 1A3 + + + Leopard 1A4A1 + Leopard 1A4A1 + + + Leopard 1A4 + Leopard 1A4 + + + Leopard 1A5A1 + Leopard 1A5A1 + + + Leopard 1A5DK1 + Leopard 1A5DK1 + + + Leopard 1A5DK + Leopard 1A5DK + + + Leopard 1A5NO2 + Leopard 1A5NO2 + + + Leopard 1A5NO + Leopard 1A5NO + + + Leopard 1A5 + Leopard 1A5 + + + Leopard 1 + Leopard 1 + + + SpPz Luchs A1 + SpPz Luchs A1 + + + SpPz Luchs A2 + SpPz Luchs A2 + + + SpPz Luchs + SpPz Luchs + + + M113A1G (Milan) + M113A1G (Milan) + + + Marder 1A0 + Marder 1A0 + + + Marder 1A1A + Marder 1A1A + + + Marder 1A1- + Marder 1A1- + + + Marder 1A1+ + Marder 1A1+ + + + Marder 1A1 + Marder 1A1 + + + Marder 1A2 + Marder 1A2 + + + Marder 1 + Marder 1 + + + Milan + Milan + + + Milan - Tripod + Milan - Trójnóg + + + Volkswagen Beetle 1200 (Post) + Volkswagen Garbus 1200 (Poczta) + VW Käfer 1200 (Post) + + + Volkswagen Beetle 1200 (Firefighters) + Volkswagen Garbus 1200 (Straż Pożarna) + VW Käfer 1200 (Feuerwehr) + + + Volkswagen Beetle 1200 + Volkswagen Garbus 1200 + VW Käfer 1200 + + + Volkswagen Beetle 1200 (Patrol) + Volkswagen Garbus 1200 (Patrol) + VW Käfer 1200 (Patrouille) + + + Volkswagen Beetle 1200 (Police) + Volkswagen Garbus 1200 (Policja) + VW Käfer 1200 (Polizei) + + + Mercedes-Benz W123 (Post) + Mercedes-Benz W123 (Poczta) + + + Mercedes-Benz W123 (Firefighters) + Mercedes-Benz W123 (Straż Pożarna) + Mercedes-Benz W123 (Feuerwehr) + + + Mercedes-Benz W123 + Mercedes-Benz W123 + + + Mercedes-Benz W123 (Police) + Mercedes-Benz W123 (Policja) + Mercedes-Benz W123 (Polizei) + + + Mercedes-Benz W123 (Taxi) + Mercedes-Benz W123 (Taxi) + + + diff --git a/addons/compatibility/script_component.hpp b/addons/compatibility/script_component.hpp new file mode 100644 index 0000000..5c816a2 --- /dev/null +++ b/addons/compatibility/script_component.hpp @@ -0,0 +1,14 @@ +#define COMPONENT compatibility +#include "\z\afwg\addons\main\script_mod.hpp" + +// #define DEBUG_MODE_FULL +// #define DISABLE_COMPILE_CACHE + +#ifdef DEBUG_ENABLED_COMPATIBILITY + #define DEBUG_MODE_FULL +#endif + #ifdef DEBUG_SETTINGS_COMPATIBILITY + #define DEBUG_SETTINGS DEBUG_SETTINGS_COMPATIBILITY +#endif + +#include "\z\afwg\addons\main\script_macros.hpp" From 207443716cbe0af095ced5f7b1ed2b21e2b0b183 Mon Sep 17 00:00:00 2001 From: 3Mydlo3 Date: Wed, 18 Dec 2024 13:26:11 +0100 Subject: [PATCH 22/47] Sort stringtables --- addons/deployment/stringtable.xml | 24 ++++++++++++------------ addons/icons/stringtable.xml | 16 ++++++++-------- addons/main/stringtable.xml | 16 ++++++++-------- addons/music/stringtable.xml | 24 ++++++++++++------------ addons/refuel/stringtable.xml | 8 ++++---- addons/repair/stringtable.xml | 8 ++++---- 6 files changed, 48 insertions(+), 48 deletions(-) diff --git a/addons/deployment/stringtable.xml b/addons/deployment/stringtable.xml index 16affbd..bb87075 100644 --- a/addons/deployment/stringtable.xml +++ b/addons/deployment/stringtable.xml @@ -1,18 +1,6 @@ - - ArmaForces Wargame - Deployment - ArmaForces Wargame - Deployment - - - Enable component - Włącz komponent - - - Controls whether this component is active. - Pozwala kontrolować czy komponent jest włączony. - Failed deploying vehicle Nie udało się rozmieścić pojazdu @@ -25,6 +13,18 @@ Deployment of new '%1' vehicle is no longer possible. Rozmieszczenie nowych pojazdów '%1' już nie jest możliwe. + + ArmaForces Wargame - Deployment + ArmaForces Wargame - Deployment + + + Enable component + Włącz komponent + + + Controls whether this component is active. + Pozwala kontrolować czy komponent jest włączony. + Lost %1 %2 Utracono %1 %2 diff --git a/addons/icons/stringtable.xml b/addons/icons/stringtable.xml index 0c7cb25..12580f7 100644 --- a/addons/icons/stringtable.xml +++ b/addons/icons/stringtable.xml @@ -13,14 +13,6 @@ Controls whether this component is active. Pozwala kontrolować czy komponent jest włączony. - - Unit Icons - Znaczniki jednostek - - - Icon size multiplier - Mnożnik rozmiaru znaczników - Icon size depending on distance Rozmiar znaczników zależny od odległości @@ -45,5 +37,13 @@ Allows adjusting size of text shown above targeted unit Pozwala dostosować rozmiar tekstu wyświetlanego nad namierzoną jednostką + + Unit Icons + Znaczniki jednostek + + + Icon size multiplier + Mnożnik rozmiaru znaczników + diff --git a/addons/main/stringtable.xml b/addons/main/stringtable.xml index 3e3f740..ac4d8dd 100644 --- a/addons/main/stringtable.xml +++ b/addons/main/stringtable.xml @@ -1,6 +1,14 @@ + + Mydlana Kampania Wargay + Mydlana Kampania Wargay + + + Mydlana Kampania Wargay - Client + Mydlana Kampania Wargay - Klient + ArmaForces Wargame Attributes Atrybuty Wargame ArmaForces @@ -14,13 +22,5 @@ Wiki - - Mydlana Kampania Wargay - Mydlana Kampania Wargay - - - Mydlana Kampania Wargay - Klient - Mydlana Kampania Wargay - Client - diff --git a/addons/music/stringtable.xml b/addons/music/stringtable.xml index 63ae0a6..e53dca7 100644 --- a/addons/music/stringtable.xml +++ b/addons/music/stringtable.xml @@ -1,18 +1,6 @@ - - ArmaForces Wargame - Music - ArmaForces Wargame - Music - - - Enable component - Włącz komponent - - - Controls whether this component is active. - Pozwala kontrolować czy komponent jest włączony. - Damage alarm Alarm o uszkodzeniach @@ -25,5 +13,17 @@ Damage received Otrzymano uszkodzenia + + ArmaForces Wargame - Music + ArmaForces Wargame - Music + + + Enable component + Włącz komponent + + + Controls whether this component is active. + Pozwala kontrolować czy komponent jest włączony. + diff --git a/addons/refuel/stringtable.xml b/addons/refuel/stringtable.xml index f6266d0..c7eba12 100644 --- a/addons/refuel/stringtable.xml +++ b/addons/refuel/stringtable.xml @@ -13,6 +13,10 @@ Controls whether this component is active. Pozwala kontrolować czy komponent jest włączony. + + Refuel finished + Tankowanie zakończone + Refuel interrupted %1 percent Tankowanie przerwane %1 procent @@ -21,9 +25,5 @@ Refuel progress %1 percent Postęp tankowania %1 procent - - Refuel finished - Tankowanie zakończone - diff --git a/addons/repair/stringtable.xml b/addons/repair/stringtable.xml index 98f1da1..0d868cf 100644 --- a/addons/repair/stringtable.xml +++ b/addons/repair/stringtable.xml @@ -17,13 +17,13 @@ Repair finished Naprawa zakończona - - Repair progress %1/%2 HP - Postęp naprawy %1/%2 PŻ - Repair interrupted %1/%2 HP Naprawa przerwana %1/%2 PŻ + + Repair progress %1/%2 HP + Postęp naprawy %1/%2 PŻ + From 48cf087eb6ea6c865d85cfb8c84cac032175ead8 Mon Sep 17 00:00:00 2001 From: 3Mydlo3 Date: Wed, 18 Dec 2024 13:48:07 +0100 Subject: [PATCH 23/47] Fix `GVAR(spawnableVehicles)` unavailable during mission init --- addons/deployment/XEH_postInit.sqf | 3 --- addons/deployment/XEH_preInit.sqf | 3 +++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/deployment/XEH_postInit.sqf b/addons/deployment/XEH_postInit.sqf index 1bcce05..11b376e 100644 --- a/addons/deployment/XEH_postInit.sqf +++ b/addons/deployment/XEH_postInit.sqf @@ -1,8 +1,5 @@ #include "script_component.hpp" -// Can be initialized using FUNC(addDeployableVehicle) -GVAR(spawnableVehicles) = createHashMap; - if (isServer) then { call COMPILE_SCRIPT(XEH_postInitServer) }; if (!hasInterface) exitWith {}; diff --git a/addons/deployment/XEH_preInit.sqf b/addons/deployment/XEH_preInit.sqf index ecb5d0c..5de204e 100644 --- a/addons/deployment/XEH_preInit.sqf +++ b/addons/deployment/XEH_preInit.sqf @@ -5,4 +5,7 @@ PREP_RECOMPILE_START; #include "XEH_PREP.hpp" PREP_RECOMPILE_END; +// Can be initialized using FUNC(addDeployableVehicle) +GVAR(spawnableVehicles) = createHashMap; + ADDON = true; From aa1670aa9e866bd7ca7027a86b7eef9185c24e0d Mon Sep 17 00:00:00 2001 From: 3Mydlo3 Date: Wed, 18 Dec 2024 14:10:15 +0100 Subject: [PATCH 24/47] Add compat for french_armour_pack --- .../french_armour_pack/CfgWargay.hpp | 78 +++++++++++++++++++ .../french_armour_pack/README.md | 7 ++ .../french_armour_pack/config.cpp | 22 ++++++ .../french_armour_pack/script_component.hpp | 2 + .../functions/fnc_calculateAndApplyDamage.sqf | 4 +- 5 files changed, 110 insertions(+), 3 deletions(-) create mode 100644 addons/compatibility/french_armour_pack/CfgWargay.hpp create mode 100644 addons/compatibility/french_armour_pack/README.md create mode 100644 addons/compatibility/french_armour_pack/config.cpp create mode 100644 addons/compatibility/french_armour_pack/script_component.hpp diff --git a/addons/compatibility/french_armour_pack/CfgWargay.hpp b/addons/compatibility/french_armour_pack/CfgWargay.hpp new file mode 100644 index 0000000..57d610f --- /dev/null +++ b/addons/compatibility/french_armour_pack/CfgWargay.hpp @@ -0,0 +1,78 @@ +#define ARMOR(FRONT,SIDES,BACK,TOP) armor[] = { FRONT, SIDES, BACK, TOP } +#define VEHICLE_LIKE(otherVehicleClass,vehicleClass) class vehicleClass : otherVehicleClass {} +#define HAS_PENETRATOR(penetratorClass) NO_DAMAGE \ + { \ + child = QUOTE(penetratorClass);\ + } + +#define ARMA_NATO_MARKERS_DIR \A3\ui_f\data\map\markers\nato +#define WARGAY_NATO_MARKERS_DIR PATHTOEF(markers,assets) +#define ANTITANK_ICON QUOTE(WARGAY_NATO_MARKERS_DIR\b_antitank.paa) +#define ARMOR_ICON QUOTE(ARMA_NATO_MARKERS_DIR\b_armor.paa) +#define RECON_ARMOR_ICON QUOTE(WARGAY_NATO_MARKERS_DIR\b_recon_armor.paa) + +class CfgWargay +{ + class Ammo + { + // Mod uses vanilla ammo, so it might be incompatible in some scenarios + // TODO: Configure B_30mm_APFSDS_Tracer_Green and B_30mm_MP_Tracer_Green if needed + + class Sh_105mm_APFSDS_T_Red + { + damage = 12; + type = "AP"; + }; + + class Sh_105mm_HEAT_MP_T_Red : HAS_PENETRATOR(ammo_Penetrator_105mm); + class ammo_Penetrator_105mm + { + damage = 12; + type = "HEAT"; + }; + + class Sh_120mm_HE_Tracer_Red + { + damage = 3; + type = "HE"; + }; + + class 4Rnd_hot2_ammo : HAS_PENETRATOR(ammo_Penetrator_Titan_AT_long); + class ammo_Penetrator_Titan_AT_long + { + damage = 22; + type = "HEAT"; + }; + }; + + class Vehicles + { + class amx10rc_base + { + pointCost = 40; + hitpoints = 10; + ARMOR(3,2,1,1); + iconPath = RECON_ARMOR_ICON; + markerType = "b_recon_armor"; + }; + + // Based on AMX-30B2 https://wargame.fandom.com/wiki/AMX-30B2 + class amx30_base + { + pointCost = 40; + hitpoints = 10; + ARMOR(7,4,2,2); + iconPath = ARMOR_ICON; + markerType = "b_armor"; + }; + + class mephisto_base + { + pointCost = 40; + hitpoints = 10; + ARMOR(1,1,1,1); + iconPath = ANTITANK_ICON; + markerType = "b_antitank"; + }; + }; +}; diff --git a/addons/compatibility/french_armour_pack/README.md b/addons/compatibility/french_armour_pack/README.md new file mode 100644 index 0000000..3cb6904 --- /dev/null +++ b/addons/compatibility/french_armour_pack/README.md @@ -0,0 +1,7 @@ +## French Armour Pack + +Compatibility addon for [French Armour Pack](https://steamcommunity.com/sharedfiles/filedetails/?id=3317407146). + +### Notes + +This mod uses vanilla ammo classes, thus might result in degraded experience in combination with other mods that use vanilla ammo. diff --git a/addons/compatibility/french_armour_pack/config.cpp b/addons/compatibility/french_armour_pack/config.cpp new file mode 100644 index 0000000..0dfc741 --- /dev/null +++ b/addons/compatibility/french_armour_pack/config.cpp @@ -0,0 +1,22 @@ +#include "script_component.hpp" + +class CfgPatches { + class SUBADDON { + name = COMPONENT_NAME; + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = { + "afwg_compatibility", + "amx10rc", + "amx30", + "mephisto" + }; + skipWhenMissingDependencies = 1; + author = "ArmaForces"; + authors[] = {"3Mydlo3"}; + VERSION_CONFIG; + }; +}; + +#include "CfgWargay.hpp" diff --git a/addons/compatibility/french_armour_pack/script_component.hpp b/addons/compatibility/french_armour_pack/script_component.hpp new file mode 100644 index 0000000..22cdabb --- /dev/null +++ b/addons/compatibility/french_armour_pack/script_component.hpp @@ -0,0 +1,2 @@ +#define SUBCOMPONENT french_armour_pack +#include "..\script_component.hpp" diff --git a/addons/damage/functions/fnc_calculateAndApplyDamage.sqf b/addons/damage/functions/fnc_calculateAndApplyDamage.sqf index e0d6f63..d00b53c 100644 --- a/addons/damage/functions/fnc_calculateAndApplyDamage.sqf +++ b/addons/damage/functions/fnc_calculateAndApplyDamage.sqf @@ -42,11 +42,9 @@ if (_ammoInfo isEqualTo []) then { }; }; if (_ammoInfo isEqualTo []) exitWith { - #ifdef DEV_DEBUG private _infoMsg = format ["Unknown ammunition '%1' used, ignoring calculations",_ammoClassName]; systemChat _infoMsg; - diag_log _infoMsg; - #endif + WARNING(_infoMsg); }; private _ammoDamage = _ammoInfo getOrDefault ["damage", 0]; From d294cb5559ca7123a45a3ee35262faf6393b1e8e Mon Sep 17 00:00:00 2001 From: 3Mydlo3 Date: Wed, 18 Dec 2024 14:10:37 +0100 Subject: [PATCH 25/47] Use custom markers for vehicles where mismatching were used --- addons/common/CfgWargay.hpp | 58 ++++++++++++++++++------------------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/addons/common/CfgWargay.hpp b/addons/common/CfgWargay.hpp index 202f622..16f1971 100644 --- a/addons/common/CfgWargay.hpp +++ b/addons/common/CfgWargay.hpp @@ -43,7 +43,7 @@ #define RECON_ARMOR_ICON QUOTE(WARGAY_NATO_MARKERS_DIR\b_recon_armor.paa) #define RECON_ICON QUOTE(WARGAY_NATO_MARKERS_DIR\b_recon.paa) -// Split it somehow +// TODO: Consider moving all these to compatibility addons for other mods class CfgWargay { // westMarkerColor[] = { @@ -595,7 +595,7 @@ class CfgWargay hitpoints = 10; ARMOR(2,2,1,1); iconPath = CV_ARMOR_ICON; - markerType = "b_hq"; + markerType = "b_cv_armor"; isCommandVehicle = 1; }; class Truck_01_base_F // HEMTT @@ -615,7 +615,7 @@ class CfgWargay hitpoints = 10; ARMOR(1,1,1,1); iconPath = ANTIAIR_SPAAG_RADAR_ICON; - markerType = "b_antiair"; + markerType = "b_antiair_spaag_radar"; }; // TNK @@ -635,7 +635,7 @@ class CfgWargay hitpoints = 10; ARMOR(2,2,1,1); iconPath = ANTITANK_ICON; - markerType = "b_motor_inf"; + markerType = "b_antitank"; }; class CUP_nM1036_TOW_Base @@ -644,7 +644,7 @@ class CfgWargay hitpoints = 10; ARMOR(0,0,0,0); iconPath = ANTITANK_ICON; - markerType = "b_motor_inf"; + markerType = "b_antitank"; }; // HEL @@ -678,7 +678,7 @@ class CfgWargay hitpoints = 10; ARMOR(1,1,1,1); iconPath = CV_ARMOR_ICON; - markerType = "b_hq"; + markerType = "b_cv_armor"; isCommandVehicle = 1; }; class gm_iltis_cargo_base @@ -687,7 +687,7 @@ class CfgWargay hitpoints = 5; ARMOR(0,0,0,0); iconPath = CV_ICON; - markerType = "b_hq"; + markerType = "b_cv"; isCommandVehicle = 1; }; class gm_fuchsa0_command_base @@ -696,7 +696,7 @@ class CfgWargay hitpoints = 10; ARMOR(1,1,1,1); iconPath = CV_ARMOR_ICON; - markerType = "b_hq"; + markerType = "b_cv_armor"; isCommandVehicle = 1; }; @@ -769,7 +769,7 @@ class CfgWargay hitpoints = 10; ARMOR(3,2,2,1); iconPath = ANTIAIR_SPAAG_RADAR_ICON; - markerType = "b_antiair"; + markerType = "b_antiair_spaag_radar"; }; class gm_m109g_base { @@ -785,7 +785,7 @@ class CfgWargay hitpoints = 10; ARMOR(0,0,0,0); iconPath = ART_ROCKET_ICON; - markerType = "b_art"; + markerType = "b_art_rocket"; }; // VEH @@ -801,7 +801,7 @@ class CfgWargay { pointCost = 20; iconPath = ANTITANK_ICON; - markerType = "b_motor_inf"; + markerType = "b_antitank"; }; class gm_kat1_base { @@ -822,7 +822,7 @@ class CfgWargay hitpoints = 10; ARMOR(4,2,1,1); iconPath = MECH_INF_ARMED_ICON; - markerType = "b_mech_inf"; + markerType = "b_mech_inf_armed"; }; class gm_marder1a1plus_base : gm_marder1_base { @@ -846,7 +846,7 @@ class CfgWargay { pointCost = 20; iconPath = ANTITANK_ARMOR_ICON; - markerType = "b_mech_inf"; + markerType = "b_antitank_armor"; }; class gm_m113a1g_medic_base : gm_m113_base { @@ -882,7 +882,7 @@ class CfgWargay hitpoints = 10; ARMOR(2,1,1,1); iconPath = RECON_ARMOR_ICON; - markerType = "b_recon"; + markerType = "b_recon_armor"; isRecon = 1; }; class gm_fuchsa0_reconnaissance_base : gm_luchs_base @@ -890,7 +890,7 @@ class CfgWargay pointCost = 10; ARMOR(1,1,1,1); iconPath = RECON_ANTITANK_ICON; - markerType = "b_recon"; + markerType = "b_recon_antitank"; }; class gm_bo105m_base { @@ -898,7 +898,7 @@ class CfgWargay hitpoints = 10; // Should be 4 according to Wargay ARMOR(0,0,0,0); iconPath = RECON_AIR_ICON; - markerType = "b_air"; + markerType = "b_recon_air"; isRecon = 1; }; @@ -945,7 +945,7 @@ class CfgWargay hitpoints = 5; ARMOR(0,0,0,0); iconPath = CV_ICON; - markerType = "b_hq"; + markerType = "b_cv"; isCommandVehicle = 1; }; class gm_btr60pu12_base @@ -954,7 +954,7 @@ class CfgWargay hitpoints = 10; ARMOR(1,1,1,1); iconPath = CV_ARMOR_ICON; - markerType = "b_hq"; + markerType = "b_cv_armor"; isCommandVehicle = 1; }; class gm_brdm2um_base @@ -963,7 +963,7 @@ class CfgWargay hitpoints = 10; ARMOR(1,1,1,1); iconPath = CV_ARMOR_ICON; - markerType = "b_hq"; + markerType = "b_cv_armor"; isCommandVehicle = 1; }; class gm_t55ak_base @@ -972,7 +972,7 @@ class CfgWargay hitpoints = 10; ARMOR(7,3,2,1); iconPath = CV_ARMOR_ICON; - markerType = "b_hq"; + markerType = "b_cv_armor"; isCommandVehicle = 1; }; class gm_ural4320_repair_base @@ -998,7 +998,7 @@ class CfgWargay hitpoints = 10; ARMOR(1,1,1,1); iconPath = ANTIAIR_SPAAG_RADAR_ICON; - markerType = "b_antiair"; + markerType = "b_antiair_spaag_radar"; }; class gm_2s1_base { @@ -1014,7 +1014,7 @@ class CfgWargay hitpoints = 10; ARMOR(1,1,1,1); iconPath = ART_ROCKET_ICON; - markerType = "b_art"; + markerType = "b_art_rocket"; }; class gm_ural375d_mlrs_base { @@ -1022,7 +1022,7 @@ class CfgWargay hitpoints = 5; ARMOR(0,0,0,0); iconPath = ART_ROCKET_ICON; - markerType = "b_art"; + markerType = "b_art_rocket"; }; // TNK @@ -1067,7 +1067,7 @@ class CfgWargay { pointCost = 10; iconPath = ANTITANK_ICON; - markerType = "b_motor_inf"; + markerType = "b_antitank"; }; class gm_bmp1_base { @@ -1075,7 +1075,7 @@ class CfgWargay hitpoints = 10; ARMOR(1,1,1,1); iconPath = MECH_INF_ARMED_ICON; - markerType = "b_mech_inf"; + markerType = "b_mech_inf_armed"; }; class gm_btr60_base { @@ -1089,7 +1089,7 @@ class CfgWargay { pointCost = 15; iconPath = MECH_INF_ARMED_ICON;// TODO: Consider MOTOR_INF_ARMED_ICON; - markerType = "b_mech_inf"; + markerType = "b_mech_inf_armed"; }; // REC @@ -1099,7 +1099,7 @@ class CfgWargay hitpoints = 10; ARMOR(2,1,1,1); iconPath = RECON_ARMOR_ICON; - markerType = "b_recon"; + markerType = "b_recon_armor"; isRecon = 1; }; class gm_brdm2_base @@ -1108,7 +1108,7 @@ class CfgWargay hitpoints = 10; ARMOR(1,1,1,1); iconPath = RECON_ARMOR_ICON; - markerType = "b_recon"; + markerType = "b_recon_armor"; isRecon = 1; }; class gm_mi2p_base @@ -1117,7 +1117,7 @@ class CfgWargay hitpoints = 10; // Should be 4 according to Wargay ARMOR(0,0,0,0); iconPath = RECON_AIR_ICON; - markerType = "b_air"; + markerType = "b_recon_air"; isRecon = 1; }; From c30c21b83d3dbe8ff8214885d13d9b46792788cf Mon Sep 17 00:00:00 2001 From: 3Mydlo3 Date: Wed, 18 Dec 2024 14:11:37 +0100 Subject: [PATCH 26/47] Fix missing NO_DAMAGE class import --- addons/compatibility/config.cpp | 2 +- addons/compatibility/french_armour_pack/CfgWargay.hpp | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/addons/compatibility/config.cpp b/addons/compatibility/config.cpp index bd2f1cc..19e1e8b 100644 --- a/addons/compatibility/config.cpp +++ b/addons/compatibility/config.cpp @@ -7,7 +7,7 @@ class CfgPatches { weapons[] = {}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = { - "afwg_main", + "afwg_common", "A3_Data_F_Decade_Loadorder" }; author = "ArmaForces"; diff --git a/addons/compatibility/french_armour_pack/CfgWargay.hpp b/addons/compatibility/french_armour_pack/CfgWargay.hpp index 57d610f..6888289 100644 --- a/addons/compatibility/french_armour_pack/CfgWargay.hpp +++ b/addons/compatibility/french_armour_pack/CfgWargay.hpp @@ -13,10 +13,11 @@ class CfgWargay { + // Mod uses vanilla ammo, so it might be incompatible in some scenarios + // TODO: Configure B_30mm_APFSDS_Tracer_Green and B_30mm_MP_Tracer_Green if needed class Ammo { - // Mod uses vanilla ammo, so it might be incompatible in some scenarios - // TODO: Configure B_30mm_APFSDS_Tracer_Green and B_30mm_MP_Tracer_Green if needed + class NO_DAMAGE; class Sh_105mm_APFSDS_T_Red { From 03591b30ba8481cdcc874c01a5f7261083f58bf2 Mon Sep 17 00:00:00 2001 From: 3Mydlo3 Date: Wed, 18 Dec 2024 14:25:21 +0100 Subject: [PATCH 27/47] Handle some non-ACE explosives --- addons/common/CfgWargay.hpp | 10 ++++++++++ .../compatibility/global_mobilization/CfgWargay.hpp | 10 ++++++++++ addons/compatibility/global_mobilization/config.cpp | 1 + .../damage/functions/fnc_calculateAndApplyDamage.sqf | 11 ++++------- 4 files changed, 25 insertions(+), 7 deletions(-) create mode 100644 addons/compatibility/global_mobilization/CfgWargay.hpp diff --git a/addons/common/CfgWargay.hpp b/addons/common/CfgWargay.hpp index 16f1971..460b23e 100644 --- a/addons/common/CfgWargay.hpp +++ b/addons/common/CfgWargay.hpp @@ -151,6 +151,16 @@ class CfgWargay type = "HE"; }; + /* + Vanilla + */ + class SatchelCharge_Remote_Ammo : ACE_ammoExplosionLarge {}; + + /* + CUP + */ + class G_40mm_HE : ace_frag_small {}; + /* USA */ diff --git a/addons/compatibility/global_mobilization/CfgWargay.hpp b/addons/compatibility/global_mobilization/CfgWargay.hpp new file mode 100644 index 0000000..23a9022 --- /dev/null +++ b/addons/compatibility/global_mobilization/CfgWargay.hpp @@ -0,0 +1,10 @@ +class CfgWargay +{ + class Ammo + { + class SMALL_ARMS; + class ace_frag_small; + + class gm_HandGrenade_frag_dm51a1 : ace_frag_small {}; + }; +}; diff --git a/addons/compatibility/global_mobilization/config.cpp b/addons/compatibility/global_mobilization/config.cpp index aa9bbc0..f458d8b 100644 --- a/addons/compatibility/global_mobilization/config.cpp +++ b/addons/compatibility/global_mobilization/config.cpp @@ -19,3 +19,4 @@ class CfgPatches { #include "CfgAmmo.hpp" #include "CfgVehicles.hpp" +#include "CfgWargay.hpp" diff --git a/addons/damage/functions/fnc_calculateAndApplyDamage.sqf b/addons/damage/functions/fnc_calculateAndApplyDamage.sqf index d00b53c..9c21583 100644 --- a/addons/damage/functions/fnc_calculateAndApplyDamage.sqf +++ b/addons/damage/functions/fnc_calculateAndApplyDamage.sqf @@ -39,6 +39,7 @@ if (_ammoInfo isEqualTo []) then { if (_isSmallArms) then { private _hashMap = AmmoTypes get "SMALL_ARMS"; AmmoTypes set [toUpper _ammoClassName, _hashMap]; + _ammoInfo = _hashMap; }; }; if (_ammoInfo isEqualTo []) exitWith { @@ -70,19 +71,15 @@ private _damage = switch (_ammoType) do { }; if (_isUnknownAmmoType) exitWith { - #ifdef DEV_DEBUG - private _infoMsg = format ["Unknown ammunition type '%1' used, ignoring calculations",_ammoType]; + private _infoMsg = format ["Unknown ammunition '%1' used, ignoring calculations",_ammoClassName]; systemChat _infoMsg; - diag_log _infoMsg; - #endif + WARNING(_infoMsg); }; if (GVAR(showDamageFeedback)) then { private _infoMsg = format ["Potential damage: %1 %2, Hit armor: %3 %4, Actual damage: %5", _ammoDamage, _ammoType, _hitDir, _armor, _damage]; systemChat _infoMsg; - #ifdef DEV_DEBUG - diag_log _infoMsg; - #endif + LOG(_infoMsg); }; #ifdef DEV_DEBUG From 9ac855c6d5e55f326e92d86cb838a4518f5eae2d Mon Sep 17 00:00:00 2001 From: 3Mydlo3 Date: Wed, 18 Dec 2024 14:42:18 +0100 Subject: [PATCH 28/47] Create cup and cwr3 compats --- addons/common/CfgWargay.hpp | 181 ------------------ addons/compatibility/cup/CfgWargay.hpp | 126 ++++++++++++ addons/compatibility/cup/README.md | 7 + addons/compatibility/cup/config.cpp | 20 ++ addons/compatibility/cup/script_component.hpp | 2 + addons/compatibility/cwr3/CfgWargay.hpp | 114 +++++++++++ addons/compatibility/cwr3/README.md | 7 + addons/compatibility/cwr3/config.cpp | 21 ++ .../compatibility/cwr3/script_component.hpp | 2 + .../french_armour_pack/CfgWargay.hpp | 7 +- addons/icons/config.cpp | 3 +- 11 files changed, 303 insertions(+), 187 deletions(-) create mode 100644 addons/compatibility/cup/CfgWargay.hpp create mode 100644 addons/compatibility/cup/README.md create mode 100644 addons/compatibility/cup/config.cpp create mode 100644 addons/compatibility/cup/script_component.hpp create mode 100644 addons/compatibility/cwr3/CfgWargay.hpp create mode 100644 addons/compatibility/cwr3/README.md create mode 100644 addons/compatibility/cwr3/config.cpp create mode 100644 addons/compatibility/cwr3/script_component.hpp diff --git a/addons/common/CfgWargay.hpp b/addons/common/CfgWargay.hpp index 460b23e..0db5e47 100644 --- a/addons/common/CfgWargay.hpp +++ b/addons/common/CfgWargay.hpp @@ -156,50 +156,9 @@ class CfgWargay */ class SatchelCharge_Remote_Ammo : ACE_ammoExplosionLarge {}; - /* - CUP - */ - class G_40mm_HE : ace_frag_small {}; - /* USA */ - class CUP_R_70mm_Hydra_HE - { - damage = 2; - type = "HE"; - }; - class CUP_B_20mm_AP_Tracer_Red - { - damage = 2; - type = "AP"; - }; - class CUP_R_TOW_AT - { - damage = 20; - type = "HEAT"; - }; - - class CUP_Sh_105mm_M900 - { - damage = 13; - type = "AP"; - }; - class CUP_Sh_105mm_M456A2 : HAS_PENETRATOR(CUP_P_105mm_M393A3); - class CUP_P_105mm_M393A3 - { - damage = 13; - type = "HEAT"; - }; - class CUP_P_120mm_HESH - { - damage = 3; - type = "HE"; - }; - - class CUP_B_20mm_API_Tracer_Red : AA_HE {}; - - class CUP_B_127x99_Ball_Red_Tracer : SMALL_ARMS {}; class B_127x107_Ball : SMALL_ARMS {}; class B_762x51_Tracer_Red : SMALL_ARMS {}; @@ -530,14 +489,6 @@ class CfgWargay damage = 5; type = "HE"; }; - class CUP_M_9M119M_Refleks_AT11_Sniper_AT - { - damage = 20; - type = "HEAT"; - }; - class CUP_B_30mm_CAS_Red_Tracer : AA_HE {}; - class CUP_B_23mm_APHE_Tracer_Green : AA_HE {}; - class cwr3_b_30mm_nr30_hedp_tracer_red : AA_HE {}; class Rocket_03_HE_F { damage = 2; @@ -599,15 +550,6 @@ class CfgWargay */ // LOG - class CUP_M113New_HQ_Base - { - pointCost = 120; - hitpoints = 10; - ARMOR(2,2,1,1); - iconPath = CV_ARMOR_ICON; - markerType = "b_cv_armor"; - isCommandVehicle = 1; - }; class Truck_01_base_F // HEMTT { pointCost = 40; @@ -618,55 +560,6 @@ class CfgWargay isLogistics = 1; }; - // SUP - class CUP_M163New_Base - { - pointCost = 40; - hitpoints = 10; - ARMOR(1,1,1,1); - iconPath = ANTIAIR_SPAAG_RADAR_ICON; - markerType = "b_antiair_spaag_radar"; - }; - - // TNK - class CUP_M60A3_Base - { - pointCost = 50; - hitpoints = 10; - ARMOR(10,5,2,2); - iconPath = ARMOR_ICON; - markerType = "b_armor"; - }; - - // VEH - class cwr3_m901_itv_base - { - pointCost = 40; - hitpoints = 10; - ARMOR(2,2,1,1); - iconPath = ANTITANK_ICON; - markerType = "b_antitank"; - }; - - class CUP_nM1036_TOW_Base - { - pointCost = 40; - hitpoints = 10; - ARMOR(0,0,0,0); - iconPath = ANTITANK_ICON; - markerType = "b_antitank"; - }; - - // HEL - class cwr3_ah1f_base - { - pointCost = 80; - hitpoints = 10; // Should be 6 according to Wargay - ARMOR(0,0,0,0); - iconPath = HELI_ICON; - markerType = "b_air"; - }; - // PLA class sab_f104_base { @@ -1152,80 +1045,6 @@ class CfgWargay { pointCost = 30; }; - - /* - Soviet Union - */ - - // SUP - class cwr3_mtlb_sa13_base - { - pointCost = 45; - hitpoints = 10; - ARMOR(1,1,1,1); - iconPath = ANTIAIR_ICON; - }; - - // TNK - class cwr3_t64b_base - { - pointCost = 65; - hitpoints = 10; - ARMOR(13,6,3,2); - iconPath = ARMOR_ICON; - markerType = "b_armor"; - }; - class cwr3_t72_base - { - pointCost = 40; - hitpoints = 10; - ARMOR(11,6,3,2); - iconPath = ARMOR_ICON; - markerType = "b_armor"; - }; - class cwr3_o_t72a : cwr3_t72_base - { - pointCost = 50; - ARMOR(13,7,3,2); - }; - class cwr3_o_t72b1 : cwr3_t72_base - { - pointCost = 85; - ARMOR(15,8,4,4); - // TODO: Ammo config - }; - - // HEL - class CUP_Mi24_D_Dynamic_Base - { - pointCost = 55; - hitpoints = 10; - ARMOR(1,1,0,0); - iconPath = HELI_ICON; - markerType = "b_air"; - }; - - // PLA - class cwr3_mig23_base - { - pointCost = 90; - hitpoints = 10; - ARMOR(0,0,0,0); - iconPath = PLANE_ICON; - markerType = "b_air"; - }; - class cwr3_mig27_base : cwr3_mig23_base - { - pointCost = 115; - }; - class cwr3_su17_base : cwr3_mig23_base - { - pointCost = 70; - }; - class cwr3_su25_base : cwr3_mig23_base - { - pointCost = 130; - }; }; }; diff --git a/addons/compatibility/cup/CfgWargay.hpp b/addons/compatibility/cup/CfgWargay.hpp new file mode 100644 index 0000000..9d77aa2 --- /dev/null +++ b/addons/compatibility/cup/CfgWargay.hpp @@ -0,0 +1,126 @@ +#define ARMOR(FRONT,SIDES,BACK,TOP) armor[] = { FRONT, SIDES, BACK, TOP } +#define VEHICLE_LIKE(otherVehicleClass,vehicleClass) class vehicleClass : otherVehicleClass {} +#define HAS_PENETRATOR(penetratorClass) NO_DAMAGE \ + { \ + child = QUOTE(penetratorClass);\ + } + +#define ARMA_NATO_MARKERS_DIR \A3\ui_f\data\map\markers\nato +#define WARGAY_NATO_MARKERS_DIR PATHTOEF(markers,assets) +#define ANTIAIR_SPAAG_RADAR_ICON QUOTE(WARGAY_NATO_MARKERS_DIR\b_antiair_spaag_radar.paa) +#define ANTITANK_ICON QUOTE(WARGAY_NATO_MARKERS_DIR\b_antitank.paa) +#define ARMOR_ICON QUOTE(ARMA_NATO_MARKERS_DIR\b_armor.paa) +#define CV_ARMOR_ICON QUOTE(WARGAY_NATO_MARKERS_DIR\b_cv_armor.paa) +#define HELI_ICON QUOTE(ARMA_NATO_MARKERS_DIR\b_air.paa) + +class CfgWargay +{ + class Ammo + { + class NO_DAMAGE; + class AA_HE; + class SMALL_ARMS; + class ace_frag_small; + + class CUP_R_70mm_Hydra_HE + { + damage = 2; + type = "HE"; + }; + class CUP_B_20mm_AP_Tracer_Red + { + damage = 2; + type = "AP"; + }; + class CUP_R_TOW_AT + { + damage = 20; + type = "HEAT"; + }; + + class CUP_Sh_105mm_M900 + { + damage = 13; + type = "AP"; + }; + class CUP_Sh_105mm_M456A2 : HAS_PENETRATOR(CUP_P_105mm_M393A3); + class CUP_P_105mm_M393A3 + { + damage = 13; + type = "HEAT"; + }; + class CUP_P_120mm_HESH + { + damage = 3; + type = "HE"; + }; + + class CUP_B_20mm_API_Tracer_Red : AA_HE {}; + + class CUP_B_127x99_Ball_Red_Tracer : SMALL_ARMS {}; + + class G_40mm_HE : ace_frag_small {}; + + class CUP_M_9M119M_Refleks_AT11_Sniper_AT + { + damage = 20; + type = "HEAT"; + }; + class CUP_B_30mm_CAS_Red_Tracer : AA_HE {}; + class CUP_B_23mm_APHE_Tracer_Green : AA_HE {}; + }; + + class Vehicles + { + // LOG + class CUP_M113New_HQ_Base + { + pointCost = 120; + hitpoints = 10; + ARMOR(2,2,1,1); + iconPath = CV_ARMOR_ICON; + markerType = "b_cv_armor"; + isCommandVehicle = 1; + }; + + // SUP + class CUP_M163New_Base + { + pointCost = 40; + hitpoints = 10; + ARMOR(1,1,1,1); + iconPath = ANTIAIR_SPAAG_RADAR_ICON; + markerType = "b_antiair_spaag_radar"; + }; + + // TNK + class CUP_M60A3_Base + { + pointCost = 50; + hitpoints = 10; + ARMOR(10,5,2,2); + iconPath = ARMOR_ICON; + markerType = "b_armor"; + }; + + // VEH + class CUP_nM1036_TOW_Base + { + pointCost = 40; + hitpoints = 10; + ARMOR(0,0,0,0); + iconPath = ANTITANK_ICON; + markerType = "b_antitank"; + }; + + // HEL + class CUP_Mi24_D_Dynamic_Base + { + pointCost = 55; + hitpoints = 10; + ARMOR(1,1,0,0); + iconPath = HELI_ICON; + markerType = "b_air"; + }; + }; +}; diff --git a/addons/compatibility/cup/README.md b/addons/compatibility/cup/README.md new file mode 100644 index 0000000..7753c73 --- /dev/null +++ b/addons/compatibility/cup/README.md @@ -0,0 +1,7 @@ +## CUP + +Compatibility addon for [French Armour Pack](https://steamcommunity.com/sharedfiles/filedetails/?id=3317407146). + +### Notes + +This mod uses vanilla ammo classes, thus might result in degraded experience in combination with other mods that use vanilla ammo. diff --git a/addons/compatibility/cup/config.cpp b/addons/compatibility/cup/config.cpp new file mode 100644 index 0000000..0593220 --- /dev/null +++ b/addons/compatibility/cup/config.cpp @@ -0,0 +1,20 @@ +#include "script_component.hpp" + +class CfgPatches { + class SUBADDON { + name = COMPONENT_NAME; + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = { + "afwg_compatibility", + "CUP_Vehicles_LoadOrder" + }; + skipWhenMissingDependencies = 1; + author = "ArmaForces"; + authors[] = {"3Mydlo3"}; + VERSION_CONFIG; + }; +}; + +#include "CfgWargay.hpp" diff --git a/addons/compatibility/cup/script_component.hpp b/addons/compatibility/cup/script_component.hpp new file mode 100644 index 0000000..40c633d --- /dev/null +++ b/addons/compatibility/cup/script_component.hpp @@ -0,0 +1,2 @@ +#define SUBCOMPONENT cup +#include "..\script_component.hpp" diff --git a/addons/compatibility/cwr3/CfgWargay.hpp b/addons/compatibility/cwr3/CfgWargay.hpp new file mode 100644 index 0000000..9829b64 --- /dev/null +++ b/addons/compatibility/cwr3/CfgWargay.hpp @@ -0,0 +1,114 @@ +#define ARMOR(FRONT,SIDES,BACK,TOP) armor[] = { FRONT, SIDES, BACK, TOP } +#define VEHICLE_LIKE(otherVehicleClass,vehicleClass) class vehicleClass : otherVehicleClass {} +#define HAS_PENETRATOR(penetratorClass) NO_DAMAGE \ + { \ + child = QUOTE(penetratorClass);\ + } + +#define ARMA_NATO_MARKERS_DIR \A3\ui_f\data\map\markers\nato +#define WARGAY_NATO_MARKERS_DIR PATHTOEF(markers,assets) +#define ANTIAIR_ICON QUOTE(ARMA_NATO_MARKERS_DIR\b_antiair.paa) +#define ANTITANK_ICON QUOTE(WARGAY_NATO_MARKERS_DIR\b_antitank.paa) +#define ARMOR_ICON QUOTE(ARMA_NATO_MARKERS_DIR\b_armor.paa) +#define HELI_ICON QUOTE(ARMA_NATO_MARKERS_DIR\b_air.paa) +#define PLANE_ICON QUOTE(ARMA_NATO_MARKERS_DIR\b_air.paa) + +class CfgWargay +{ + class Ammo + { + class AA_HE; + + class cwr3_b_30mm_nr30_hedp_tracer_red : AA_HE {}; + }; + + class Vehicles + { + /* + USA + */ + // VEH + class cwr3_m901_itv_base + { + pointCost = 40; + hitpoints = 10; + ARMOR(2,2,1,1); + iconPath = ANTITANK_ICON; + markerType = "b_antitank"; + }; + + // HEL + class cwr3_ah1f_base + { + pointCost = 80; + hitpoints = 10; // Should be 6 according to Wargay + ARMOR(0,0,0,0); + iconPath = HELI_ICON; + markerType = "b_air"; + }; + + /* + Soviet Union + */ + + // SUP + class cwr3_mtlb_sa13_base + { + pointCost = 45; + hitpoints = 10; + ARMOR(1,1,1,1); + iconPath = ANTIAIR_ICON; + }; + + // TNK + class cwr3_t64b_base + { + pointCost = 65; + hitpoints = 10; + ARMOR(13,6,3,2); + iconPath = ARMOR_ICON; + markerType = "b_armor"; + }; + class cwr3_t72_base + { + pointCost = 40; + hitpoints = 10; + ARMOR(11,6,3,2); + iconPath = ARMOR_ICON; + markerType = "b_armor"; + }; + class cwr3_o_t72a : cwr3_t72_base + { + pointCost = 50; + ARMOR(13,7,3,2); + }; + class cwr3_o_t72b1 : cwr3_t72_base + { + pointCost = 85; + ARMOR(15,8,4,4); + // TODO: Ammo config + }; + + // PLA + class cwr3_mig23_base + { + pointCost = 90; + hitpoints = 10; + ARMOR(0,0,0,0); + iconPath = PLANE_ICON; + markerType = "b_air"; + }; + class cwr3_mig27_base : cwr3_mig23_base + { + pointCost = 115; + }; + class cwr3_su17_base : cwr3_mig23_base + { + pointCost = 70; + }; + class cwr3_su25_base : cwr3_mig23_base + { + pointCost = 130; + }; + }; +}; diff --git a/addons/compatibility/cwr3/README.md b/addons/compatibility/cwr3/README.md new file mode 100644 index 0000000..7753c73 --- /dev/null +++ b/addons/compatibility/cwr3/README.md @@ -0,0 +1,7 @@ +## CUP + +Compatibility addon for [French Armour Pack](https://steamcommunity.com/sharedfiles/filedetails/?id=3317407146). + +### Notes + +This mod uses vanilla ammo classes, thus might result in degraded experience in combination with other mods that use vanilla ammo. diff --git a/addons/compatibility/cwr3/config.cpp b/addons/compatibility/cwr3/config.cpp new file mode 100644 index 0000000..9355d41 --- /dev/null +++ b/addons/compatibility/cwr3/config.cpp @@ -0,0 +1,21 @@ +#include "script_component.hpp" + +class CfgPatches { + class SUBADDON { + name = COMPONENT_NAME; + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = { + "afwg_compatibility", + "CUP_Vehicles_LoadOrder", + "afwg_compatibility_cup" + }; + skipWhenMissingDependencies = 1; + author = "ArmaForces"; + authors[] = {"3Mydlo3"}; + VERSION_CONFIG; + }; +}; + +#include "CfgWargay.hpp" diff --git a/addons/compatibility/cwr3/script_component.hpp b/addons/compatibility/cwr3/script_component.hpp new file mode 100644 index 0000000..81ae33c --- /dev/null +++ b/addons/compatibility/cwr3/script_component.hpp @@ -0,0 +1,2 @@ +#define SUBCOMPONENT cwr3 +#include "..\script_component.hpp" diff --git a/addons/compatibility/french_armour_pack/CfgWargay.hpp b/addons/compatibility/french_armour_pack/CfgWargay.hpp index 6888289..0e25660 100644 --- a/addons/compatibility/french_armour_pack/CfgWargay.hpp +++ b/addons/compatibility/french_armour_pack/CfgWargay.hpp @@ -18,6 +18,7 @@ class CfgWargay class Ammo { class NO_DAMAGE; + class Tank_HE; class Sh_105mm_APFSDS_T_Red { @@ -32,11 +33,7 @@ class CfgWargay type = "HEAT"; }; - class Sh_120mm_HE_Tracer_Red - { - damage = 3; - type = "HE"; - }; + class Sh_120mm_HE_Tracer_Red : Tank_HE {}; class 4Rnd_hot2_ammo : HAS_PENETRATOR(ammo_Penetrator_Titan_AT_long); class ammo_Penetrator_Titan_AT_long diff --git a/addons/icons/config.cpp b/addons/icons/config.cpp index 08519ec..1543844 100644 --- a/addons/icons/config.cpp +++ b/addons/icons/config.cpp @@ -8,7 +8,8 @@ class CfgPatches { requiredVersion = REQUIRED_VERSION; requiredAddons[] = { "afwg_common", - "afwg_hud" + "afwg_hud", + "afwg_markers" }; author = "ArmaForces"; VERSION_CONFIG; From 73ce2cdd2ca920b649795dcf2908d8de8f0bc6ee Mon Sep 17 00:00:00 2001 From: 3Mydlo3 Date: Wed, 18 Dec 2024 14:50:10 +0100 Subject: [PATCH 29/47] Fix bug ammo info not shown on first unit info popup --- addons/common/functions/fnc_getAmmoInfo.sqf | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/addons/common/functions/fnc_getAmmoInfo.sqf b/addons/common/functions/fnc_getAmmoInfo.sqf index dec0940..505a079 100644 --- a/addons/common/functions/fnc_getAmmoInfo.sqf +++ b/addons/common/functions/fnc_getAmmoInfo.sqf @@ -28,12 +28,12 @@ private _ammoInfo = _vehicleInfo getOrDefault [AMMO_PROPERTY, objNull]; if (_ammoInfo isEqualTo objNull) then { private _vehicleClassName = _vehicleInfo get CLASS_NAME_PROPERTY; - // diag_log format ["DDd %1", _vehicleClassName]; + LOG_1("Searching ammo info for %1",_vehicleClassName); private _magazines = getArray (configFile >> "CfgVehicles" >> _vehicleClassName >> "Turrets" >> "MainTurret" >> "magazines"); _magazines = _magazines arrayIntersect _magazines; - // diag_log format ["Ddd mags: %1", str _magazines]; + LOG_1("Found mags: %1",str _magazines); private _ammo = _magazines apply { MagazineTypes getOrDefault [toUpper _x, objNull] @@ -48,17 +48,18 @@ if (_ammoInfo isEqualTo objNull) then { _x select 1 }; - // diag_log ["Ddd ammo: %1", str _ammo]; + LOG_1("Found ammo: %1",str _ammo); - private _ammoInfo = createHashMap; + _ammoInfo = createHashMap; { _ammoInfo set [_x get CLASS_NAME_PROPERTY, _x]; } forEach _ammo; - // diag_log ["Ddd ammo info: %1", str _ammoInfo]; + LOG_1("Created ammo info: %1",str _ammoInfo); _vehicleInfo set [AMMO_PROPERTY, _ammoInfo]; - // diag_log ["Ddd vehicle info: %1", str _vehicleInfo]; + + LOG_1("Updated vehicle info: %1",str _vehicleInfo); }; _ammoInfo From 191a78f2d3a4febb5f4b7d44d5fc14ab0ee39295 Mon Sep 17 00:00:00 2001 From: 3Mydlo3 Date: Wed, 18 Dec 2024 14:51:07 +0100 Subject: [PATCH 30/47] Remove test config --- addons/common/CfgTest.hpp | 28 ---------------------------- addons/common/config.cpp | 1 - 2 files changed, 29 deletions(-) delete mode 100644 addons/common/CfgTest.hpp diff --git a/addons/common/CfgTest.hpp b/addons/common/CfgTest.hpp deleted file mode 100644 index 15dfb9f..0000000 --- a/addons/common/CfgTest.hpp +++ /dev/null @@ -1,28 +0,0 @@ -#define HAS_PENETRATOR(penetratorClass) NO_DAMAGE \ - { \ - child = penetratorClass;\ - } - -class CfgTest -{ - westMarkerColor[] = { - __EVAL(96/255), - __EVAL(159/255), - __EVAL(197/255), - 0.85 - }; - - class NO_DAMAGE - { - damage = 0; - type = "NONE"; - }; - - class Test : HAS_PENETRATOR(TestPenetrator); - - class TestPenetrator - { - damage = 2; - type = "HEAT"; - }; -}; diff --git a/addons/common/config.cpp b/addons/common/config.cpp index e50c24f..212e50f 100644 --- a/addons/common/config.cpp +++ b/addons/common/config.cpp @@ -15,5 +15,4 @@ class CfgPatches { }; #include "CfgEventHandlers.hpp" -// #include "CfgTest.hpp" #include "CfgWargay.hpp" From a23ca7312770f3d202a2bd0baa18de663bd2cd81 Mon Sep 17 00:00:00 2001 From: 3Mydlo3 Date: Wed, 18 Dec 2024 15:00:04 +0100 Subject: [PATCH 31/47] Fill GM compat + unify macros --- addons/common/CfgWargay.hpp | 795 +----------------- addons/compatibility/cup/CfgWargay.hpp | 15 - addons/compatibility/cwr3/CfgWargay.hpp | 15 - .../french_armour_pack/CfgWargay.hpp | 13 - .../global_mobilization/CfgWargay.hpp | 794 +++++++++++++++++ addons/compatibility/script_component.hpp | 1 + addons/compatibility/script_macros.hpp | 33 + 7 files changed, 829 insertions(+), 837 deletions(-) create mode 100644 addons/compatibility/script_macros.hpp diff --git a/addons/common/CfgWargay.hpp b/addons/common/CfgWargay.hpp index 0db5e47..ae5de64 100644 --- a/addons/common/CfgWargay.hpp +++ b/addons/common/CfgWargay.hpp @@ -1,17 +1,5 @@ +// TODO: This is duplicated in /z/afwg/addons/compatibility, remove from here when feasible #define ARMOR(FRONT,SIDES,BACK,TOP) armor[] = { FRONT, SIDES, BACK, TOP } -#define VEHICLE(cost,vehicleClass,armorFront,armorSides,armorBack,armorTop) class vehicleClass \ - { \ - pointCost = cost;\ - hitpoints = 10;\ - ARMOR(armorFront,armorSides,armorBack,armorTop);\ - } -#define VEHICLE_RECON(cost,vehicleClass,armorFront,armorSides,armorBack,armorTop) class vehicleClass \ - { \ - pointCost = cost;\ - hitpoints = 10;\ - ARMOR(armorFront,armorSides,armorBack,armorTop);\ - isRecon = 1;\ - } #define VEHICLE_LIKE(otherVehicleClass,vehicleClass) class vehicleClass : otherVehicleClass {} #define HAS_PENETRATOR(penetratorClass) NO_DAMAGE \ { \ @@ -162,325 +150,6 @@ class CfgWargay class B_127x107_Ball : SMALL_ARMS {}; class B_762x51_Tracer_Red : SMALL_ARMS {}; - /* - Western Germany - */ - // LARS-2 - class gm_rocket_mlrs_110mm_he_dm21 : HAS_PENETRATOR(gm_warhead_mlrs_110mm_he_dm21); - class gm_warhead_mlrs_110mm_he_dm21 - { - damage = 7; - type = "HE"; - }; - - class gm_rocket_mlrs_110mm_icm_dm602 : HAS_PENETRATOR(gm_penetrator_m77); - class gm_penetrator_m77 - { - damage = 6; - type = "HEAT"; - }; - - // M-109G - class gm_shell_155mm_he_dm21 : HAS_PENETRATOR(gm_warhead_155mm_he_dm21); - class gm_warhead_155mm_he_dm21 - { - damage = 7; - type = "HE"; - }; - - class gm_shell_155mm_icm_602 : HAS_PENETRATOR(gm_warhead_155mm_icm_602); - class gm_warhead_155mm_icm_602 - { - damage = 6; - type = "HEAT"; - }; - - // Flakpanzer Gepard 1A1 - class gm_bullet_35x228mm_hei_t_DM21 : AA_HE {}; - class gm_bullet_35x228mm_hvapds_t_DM23 : AA_HE {}; - - // Luchs & Marder 1 - class gm_bullet_20x139mm_hei_t_dm81 : HMG_HE {}; - class gm_bullet_20x139mm_apds_t_dm63 - { - damage = 2; - type = "AP"; - }; - - /* Leopard 1 family */ - class gm_shell_105x617mm_apds_t_dm13 - { - damage = 11; - type = "AP"; - }; - - class gm_shell_105x617mm_heat_mp_t_dm12 : HAS_PENETRATOR(gm_penetrator_105x617mm_heat_dm12); - class gm_penetrator_105x617mm_heat_dm12 - { - damage = 11; - type = "HEAT"; - }; - - class gm_shell_105x617mm_apfsds_t_dm23 : gm_shell_105x617mm_apds_t_dm13 {}; - - // Leopard 1A3/4 - class gm_shell_105x617mm_apfsds_t_dm33 - { - damage = 12; - type = "AP"; - }; - - // Leopard 1A5 - class gm_shell_105x617mm_apfsds_t_dm63 - { - damage = 16; - type = "AP"; - }; - - // Milan - class gm_missile_milan_heat_dm92 : HAS_PENETRATOR(gm_penetrator_milan_HEAT_dm92); - class gm_penetrator_milan_HEAT_dm82 - { - damage = 17; - type = "HEAT"; - }; - class gm_penetrator_milan_HEAT_dm92 : gm_penetrator_milan_HEAT_dm82 {}; - - // Hot 1 & 2 - class gm_missile_hot_heat_dm72 : HAS_PENETRATOR(gm_penetrator_hot_HEAT_dm72); - class gm_missile_hot_heat_dm102 : HAS_PENETRATOR(gm_penetrator_hot_HEAT_dm102); - class gm_penetrator_hot_HEAT_dm72 - { - damage = 22; - type = "HEAT"; - }; - class gm_penetrator_hot_HEAT_dm102 - { - damage = 25; - type = "HEAT"; - }; - - // PzF 44 - class gm_rocket_44x537mm_HEAT_dm32 : HAS_PENETRATOR(gm_penetrator_44x537mm_HEAT_dm32); - class gm_penetrator_44x537mm_HEAT_dm32 - { - damage = 16; - type = "HEAT"; - }; - - // PzF 3 - class gm_rocket_60mm_HEAT_dm12 : HAS_PENETRATOR(gm_penetrator_60mm_HEAT_dm12); - class gm_rocket_60mm_HEAT_dm22 : HAS_PENETRATOR(gm_penetrator_60mm_HEAT_dm22); - class gm_rocket_60mm_HEAT_dm32 : HAS_PENETRATOR(gm_penetrator_60mm_HEAT_dm32); - class gm_penetrator_60mm_HEAT_dm12 - { - damage = 24; - type = "HEAT"; - }; - class gm_penetrator_60mm_HEAT_dm22 : gm_penetrator_60mm_HEAT_dm12 - { - damage = 26; - }; - class gm_penetrator_60mm_HEAT_dm32 : gm_penetrator_60mm_HEAT_dm12 - { - damage = 28; - }; - - // PzF 84 (Carl Gustav M2) - class gm_rocket_84x245mm_HEAT_T_DM12 : HAS_PENETRATOR(gm_penetrator_84x245mm_HEAT_DM12); - class gm_rocket_84x245mm_HEAT_T_DM12A1 : HAS_PENETRATOR(gm_penetrator_84x245mm_HEAT_DM12A1); - class gm_rocket_84x245mm_HEAT_T_DM22 : HAS_PENETRATOR(gm_penetrator_84x245mm_HEAT_DM22); - class gm_rocket_84x245mm_HEAT_T_DM32 : HAS_PENETRATOR(gm_penetrator_84x245mm_HEAT_DM32); - - class gm_penetrator_84x245mm_HEAT_DM12 - { - damage = 18; - type = "HEAT"; - }; - class gm_penetrator_84x245mm_HEAT_DM12A1 : gm_penetrator_84x245mm_HEAT_DM12 {}; - class gm_penetrator_84x245mm_HEAT_DM22 : gm_penetrator_84x245mm_HEAT_DM12 - { - damage = 20; - }; - class gm_penetrator_84x245mm_HEAT_DM32 : gm_penetrator_84x245mm_HEAT_DM12 - { - damage = 22; - }; - - // M72A3 LAW - class gm_rocket_66mm_HEAT_m72a3 : HAS_PENETRATOR(gm_penetrator_66mm_HEAT_m72a3); - - class gm_penetrator_66mm_HEAT_m72a3 - { - damage = 13; - type = "HEAT"; - }; - - // FIM-43 (Redeye) - class gm_rocket_70mm_HE_m585 - { - damage = 3; - type = "HE"; - }; - - /* - Eastern Germany - */ - - /* PT-76B */ - class gm_shell_76x385mm_he_of350 : Small_HE {}; - class gm_shell_76x385mm_HVAP_T_br354p - { - damage = 10; - type = "AP"; - }; - class gm_shell_76x385mm_HEAT_T_bk350m - { - damage = 10; - type = "HEAT"; - }; - - /* T-55 family */ - class gm_shell_100x695mm_apfsds_t_bm8 - { - damage = 11; - type = "AP"; - }; - - class gm_shell_100x695mm_he_of412 : Tank_HE {}; - - // T-55A - class gm_shell_100x695mm_heat_t_bk5m : HAS_PENETRATOR(gm_penetrator_100x695mm_HEAT_T_bk5m); - class gm_penetrator_100x695mm_HEAT_T_bk5m - { - damage = 11; - type = "HEAT"; - }; - - class gm_shell_100x695mm_apfsds_t_bm20 - { - damage = 11; - type = "AP"; - }; - - // T-55AK/T-55AM2/T-55AM2B - class gm_shell_100x695mm_apfsds_t_bm25 - { - damage = 15; - type = "AP"; - }; - - // ZSU-23-4 - class gm_bullet_23x152mm_hei_t_ofzt : AA_HE {}; - class gm_bullet_23x152mm_api_t_bzt : gm_bullet_23x152mm_hei_t_ofzt {}; - - // SFL 2S1 - class gm_shell_122x447mm_he_of462 : HAS_PENETRATOR(gm_warhead_122x447mm_he_of462); - class gm_warhead_122x447mm_he_of462 - { - damage = 6; - type = "HE"; - }; - - class gm_shell_122x447mm_heat_t_bk13 : HAS_PENETRATOR(gm_penetrator_122x447mm_heat_t_bk13); - class gm_penetrator_122x447mm_heat_bk6m - { - damage = 9; - type = "HEAT"; - }; - class gm_penetrator_122x447mm_heat_t_bk13 : gm_penetrator_122x447mm_heat_bk6m {}; - - // BM-21 - class gm_rocket_mlrs_122mm_he_9m22u : HAS_PENETRATOR(gm_warhead_122mm_he_9m22u); - class gm_warhead_122mm_he_9m22u - { - damage = 7; - type = "HE"; - }; - - class gm_rocket_mlrs_122mm_icm_9m218 : HAS_PENETRATOR(gm_penetrator_3b30); - class gm_penetrator_3b30 - { - damage = 5; - type = "HEAT"; - }; - - // 2P16 - class gm_rocket_luna_he_3r9 - { - damage = 15; - type = "HE"; - }; - - // BMP-1 & SPG-9 - class gm_shell_73mm_heat_pg15v - { - damage = 12; - type = "HEAT"; - }; - class gm_shell_73mm_he_og15v : Small_HE {}; - - class gm_missile_maljutka_heat_9m14m : HAS_PENETRATOR(gm_penetrator_maljutka_HEAT_9m14m); - class gm_penetrator_maljutka_HEAT_9m14 - { - damage = 15; - type = "HEAT"; - }; - class gm_penetrator_maljutka_HEAT_9m14m : gm_penetrator_maljutka_HEAT_9m14 {}; - - // SPW-60PB - class gm_bullet_145x114mm_AP_B32 : HMG_AP {}; - class gm_bullet_145x114mm_HEI_T_MDZ : HMG_HE {}; - - // Fagot - class gm_missile_fagot_heat_9m111 : HAS_PENETRATOR(gm_penetrator_fagot_HEAT_9m111); - class gm_penetrator_fagot_HEAT_9m111 - { - damage = 16; - type = "HEAT"; - }; - - - class gm_rocket_40mm_HEAT_pg7v : HAS_PENETRATOR(gm_penetrator_40mm_HEAT_pg7v); - class gm_penetrator_40mm_HEAT_pg7v - { - damage = 14; - type = "HEAT"; - }; - - class gm_rocket_40mm_HEAT_pg7v1 : HAS_PENETRATOR(gm_penetrator_40mm_HEAT_pg7v1); - class gm_penetrator_40mm_HEAT_pg7v1 - { - damage = 17; - type = "HEAT"; - }; - - class gm_rocket_55mm_HE_s5 - { - damage = 1; - type = "HE"; - }; - - class gm_rocket_55mm_heat_s5k : HAS_PENETRATOR(gm_penetrator_55mm_heat_s5k); - class gm_penetrator_55mm_heat_s5k - { - damage = 2; - type = "HEAT"; - }; - - class gm_rocket_64mm_HEAT_pg18 : HAS_PENETRATOR(gm_penetrator_64mm_HEAT_pg18); - class gm_penetrator_64mm_HEAT_pg18 - { - damage = 15; - type = "HEAT"; - }; - - // Strela-2 - class gm_rocket_72mm_HE_9m32m : gm_rocket_70mm_HE_m585 {}; - - // DShKM - class gm_bullet_127x108mm_API_T_BZT : SMALL_ARMS {}; - /* Soviet Union */ @@ -574,259 +243,6 @@ class CfgWargay West Germany */ - // LOG - class gm_ge_army_m113a1g_command - { - pointCost = 105; - hitpoints = 10; - ARMOR(1,1,1,1); - iconPath = CV_ARMOR_ICON; - markerType = "b_cv_armor"; - isCommandVehicle = 1; - }; - class gm_iltis_cargo_base - { - pointCost = 110; - hitpoints = 5; - ARMOR(0,0,0,0); - iconPath = CV_ICON; - markerType = "b_cv"; - isCommandVehicle = 1; - }; - class gm_fuchsa0_command_base - { - pointCost = 120; - hitpoints = 10; - ARMOR(1,1,1,1); - iconPath = CV_ARMOR_ICON; - markerType = "b_cv_armor"; - isCommandVehicle = 1; - }; - - class gm_kat1_451_reammo_base - { - pointCost = 30; - hitpoints = 10; - ARMOR(0,0,0,0); - iconPath = LOG_ICON; - markerType = "b_support"; - isLogistics = 1; - }; - VEHICLE_LIKE(gm_kat1_451_reammo_base,gm_kat1_451_refuel_base); - VEHICLE_LIKE(gm_kat1_451_reammo_base,gm_kat1_451_container_base); - class gm_kat1_452_container_base : gm_kat1_451_reammo_base - { - pointCost = 35; - }; - class gm_kat1_454_cargo_base : gm_kat1_451_reammo_base - { - pointCost = 40; - }; - class gm_u1300l_repair_base : gm_kat1_451_reammo_base - { - pointCost = 10; - hitpoints = 5; - }; - VEHICLE_LIKE(gm_u1300l_repair_base,gm_u1300l_container_base); - VEHICLE_LIKE(gm_u1300l_repair_base,gm_u1300l_medic_base); - - // TNK - class gm_Leopard1_base - { - pointCost = 30; - hitpoints = 10; - ARMOR(6,2,2,1); - iconPath = ARMOR_ICON; - markerType = "b_armor"; - }; - VEHICLE_LIKE(gm_Leopard1_base,gm_Leopard1a1_base); // 1A1 should be recon with 5/2/2/1 - - class gm_BPz2_base : gm_Leopard1_base - { - pointCost = 40; - iconPath = LOG_ARMOR_ICON; - markerType = "b_support"; - isLogistics = 1; - }; - class gm_Leopard1a3_base - { - pointCost = 40; - hitpoints = 10; - ARMOR(8,3,2,2); - iconPath = ARMOR_ICON; - markerType = "b_armor"; - }; - class gm_leopard1a5_base - { - pointCost = 65; - hitpoints = 10; - ARMOR(10,3,2,2); - iconPath = ARMOR_ICON; - markerType = "b_armor"; - }; - - // SUP - class gm_Gepard1a1_base - { - pointCost = 55; - hitpoints = 10; - ARMOR(3,2,2,1); - iconPath = ANTIAIR_SPAAG_RADAR_ICON; - markerType = "b_antiair_spaag_radar"; - }; - class gm_m109g_base - { - pointCost = 50; - hitpoints = 10; - ARMOR(2,1,1,1); - iconPath = ART_ICON; - markerType = "b_art"; - }; - class gm_kat1_463_mlrs_base - { - pointCost = 70; - hitpoints = 10; - ARMOR(0,0,0,0); - iconPath = ART_ROCKET_ICON; - markerType = "b_art_rocket"; - }; - - // VEH - class gm_iltis_base - { - pointCost = 5; - hitpoints = 5; - ARMOR(0,0,0,0); - iconPath = MOTOR_INF_ICON; - markerType = "b_motor_inf"; - }; - class gm_iltis_milan_base : gm_iltis_base - { - pointCost = 20; - iconPath = ANTITANK_ICON; - markerType = "b_antitank"; - }; - class gm_kat1_base - { - pointCost = 5; - hitpoints = 10; - ARMOR(0,0,0,0); - iconPath = MOTOR_INF_ICON; - markerType = "b_motor_inf"; - }; - class gm_u1300l_base : gm_kat1_base - { - hitpoints = 5; - }; - - class gm_marder1_base - { - pointCost = 15; - hitpoints = 10; - ARMOR(4,2,1,1); - iconPath = MECH_INF_ARMED_ICON; - markerType = "b_mech_inf_armed"; - }; - class gm_marder1a1plus_base : gm_marder1_base - { - pointCost = 15; - ARMOR(4,2,2,1); - }; - class gm_marder1a2_base : gm_marder1_base - { - pointCost = 20; - ARMOR(5,3,2,2); - }; - class gm_m113_base - { - pointCost = 5; - hitpoints = 10; - ARMOR(1,1,1,1); - iconPath = MECH_INF_ICON; - markerType = "b_mech_inf"; - }; - class gm_m113a1g_apc_milan_base : gm_m113_base - { - pointCost = 20; - iconPath = ANTITANK_ARMOR_ICON; - markerType = "b_antitank_armor"; - }; - class gm_m113a1g_medic_base : gm_m113_base - { - pointCost = 15; - iconPath = LOG_ARMOR_ICON; - markerType = "b_med"; - isLogistics = 1; - }; - class gm_fuchs_base : gm_m113_base - { - iconPath = MOTOR_INF_ICON; - markerType = "b_motor_inf"; - }; - class gm_fuchsa0_engineer_base : gm_fuchs_base - { - pointCost = 20; - iconPath = LOG_ARMOR_ICON; - markerType = "b_support"; - isLogistics = 1; - }; - - // REC - class gm_iltis_mg3_base : gm_iltis_base - { - pointCost = 25; - iconPath = RECON_ICON; - markerType = "b_recon"; - isRecon = 1; - }; - class gm_luchs_base - { - pointCost = 25; - hitpoints = 10; - ARMOR(2,1,1,1); - iconPath = RECON_ARMOR_ICON; - markerType = "b_recon_armor"; - isRecon = 1; - }; - class gm_fuchsa0_reconnaissance_base : gm_luchs_base - { - pointCost = 10; - ARMOR(1,1,1,1); - iconPath = RECON_ANTITANK_ICON; - markerType = "b_recon_antitank"; - }; - class gm_bo105m_base - { - pointCost = 45; - hitpoints = 10; // Should be 4 according to Wargay - ARMOR(0,0,0,0); - iconPath = RECON_AIR_ICON; - markerType = "b_recon_air"; - isRecon = 1; - }; - - // HEL - class gm_bo105p_base - { - pointCost = 50; - hitpoints = 10; // Should be 4 according to Wargay - ARMOR(0,0,0,0); - iconPath = HELI_ICON; - markerType = "b_air"; - }; - class gm_bo105p_pah1a1_base : gm_bo105p_base - { - pointCost = 60; - }; - class gm_ch53_base - { - pointCost = 20; - hitpoints = 10; - ARMOR(0,0,0,0); - iconPath = HELI_ICON; // TODO: Consider Heli cargo vs heli attack icon - markerType = "b_air"; - }; - // PLA class sab_alphajet_base { @@ -836,215 +252,6 @@ class CfgWargay iconPath = PLANE_ICON; markerType = "b_air"; }; - - /* - East Germany - */ - - // LOG - class gm_uaz469_cargo_base - { - pointCost = 100; - hitpoints = 5; - ARMOR(0,0,0,0); - iconPath = CV_ICON; - markerType = "b_cv"; - isCommandVehicle = 1; - }; - class gm_btr60pu12_base - { - pointCost = 110; - hitpoints = 10; - ARMOR(1,1,1,1); - iconPath = CV_ARMOR_ICON; - markerType = "b_cv_armor"; - isCommandVehicle = 1; - }; - class gm_brdm2um_base - { - pointCost = 120; - hitpoints = 10; - ARMOR(1,1,1,1); - iconPath = CV_ARMOR_ICON; - markerType = "b_cv_armor"; - isCommandVehicle = 1; - }; - class gm_t55ak_base - { - pointCost = 120; - hitpoints = 10; - ARMOR(7,3,2,1); - iconPath = CV_ARMOR_ICON; - markerType = "b_cv_armor"; - isCommandVehicle = 1; - }; - class gm_ural4320_repair_base - { - pointCost = 20; - hitpoints = 5; - ARMOR(0,0,0,0); - iconPath = LOG_ICON; - markerType = "b_support"; - isLogistics = 1; - }; - VEHICLE_LIKE(gm_ural4320_repair_base,gm_ural4320_reammo_base); - class gm_ural375d_refuel_base : gm_ural4320_repair_base - { - pointCost = 15; - }; - VEHICLE_LIKE(gm_ural375d_refuel_base,gm_ural375d_medic_base); - - // SUP - class gm_zsu234_base - { - pointCost = 35; - hitpoints = 10; - ARMOR(1,1,1,1); - iconPath = ANTIAIR_SPAAG_RADAR_ICON; - markerType = "b_antiair_spaag_radar"; - }; - class gm_2s1_base - { - pointCost = 55; - hitpoints = 10; - ARMOR(1,1,1,1); - iconPath = ART_ICON; - markerType = "b_art"; - }; - class gm_2p16_base - { - pointCost = 130; - hitpoints = 10; - ARMOR(1,1,1,1); - iconPath = ART_ROCKET_ICON; - markerType = "b_art_rocket"; - }; - class gm_ural375d_mlrs_base - { - pointCost = 65; - hitpoints = 5; - ARMOR(0,0,0,0); - iconPath = ART_ROCKET_ICON; - markerType = "b_art_rocket"; - }; - - // TNK - class gm_t55_base - { - pointCost = 25; - hitpoints = 10; - ARMOR(7,3,2,1); - iconPath = ARMOR_ICON; - markerType = "b_armor"; - }; - VEHICLE_LIKE(gm_t55_base,gm_t55a_base); - class gm_t55am2_base : gm_t55_base - { - pointCost = 50; - ARMOR(10,4,2,2); - }; - class gm_t55am2b_base - { - pointCost = 55; - ARMOR(10,5,2,2); - }; - - // VEH - class gm_ural4320_base - { - pointCost = 5; - hitpoints = 5; - ARMOR(0,0,0,0); - iconPath = MOTOR_INF_ICON; - markerType = "b_motor_inf"; - }; - class gm_uaz469_base - { - pointCost = 5; - hitpoints = 5; - ARMOR(0,0,0,0); - iconPath = MOTOR_INF_ICON; - markerType = "b_motor_inf"; - }; - class gm_uaz469_spg9_base : gm_uaz469_base - { - pointCost = 10; - iconPath = ANTITANK_ICON; - markerType = "b_antitank"; - }; - class gm_bmp1_base - { - pointCost = 10; - hitpoints = 10; - ARMOR(1,1,1,1); - iconPath = MECH_INF_ARMED_ICON; - markerType = "b_mech_inf_armed"; - }; - class gm_btr60_base - { - pointCost = 10; - hitpoints = 10; - ARMOR(1,1,1,1); - iconPath = MOTOR_INF_ICON; - markerType = "b_motor_inf"; - }; - class gm_btr60pb_base : gm_btr60_base - { - pointCost = 15; - iconPath = MECH_INF_ARMED_ICON;// TODO: Consider MOTOR_INF_ARMED_ICON; - markerType = "b_mech_inf_armed"; - }; - - // REC - class gm_pt76_base - { - pointCost = 15; - hitpoints = 10; - ARMOR(2,1,1,1); - iconPath = RECON_ARMOR_ICON; - markerType = "b_recon_armor"; - isRecon = 1; - }; - class gm_brdm2_base - { - pointCost = 15; - hitpoints = 10; - ARMOR(1,1,1,1); - iconPath = RECON_ARMOR_ICON; - markerType = "b_recon_armor"; - isRecon = 1; - }; - class gm_mi2p_base - { - pointCost = 40; - hitpoints = 10; // Should be 4 according to Wargay - ARMOR(0,0,0,0); - iconPath = RECON_AIR_ICON; - markerType = "b_recon_air"; - isRecon = 1; - }; - - // HEL - class gm_mi2_base - { - pointCost = 10; - hitpoints = 10; // Should be 4 according to Wargay - ARMOR(0,0,0,0); - iconPath = HELI_ICON; - markerType = "b_air"; - }; - class gm_mi2t_base : gm_mi2_base - { - pointCost = 15; - }; - class gm_mi2us_base : gm_mi2_base - { - pointCost = 20; - }; - class gm_mi2urn_base : gm_mi2_base - { - pointCost = 30; - }; }; }; diff --git a/addons/compatibility/cup/CfgWargay.hpp b/addons/compatibility/cup/CfgWargay.hpp index 9d77aa2..9ea6720 100644 --- a/addons/compatibility/cup/CfgWargay.hpp +++ b/addons/compatibility/cup/CfgWargay.hpp @@ -1,18 +1,3 @@ -#define ARMOR(FRONT,SIDES,BACK,TOP) armor[] = { FRONT, SIDES, BACK, TOP } -#define VEHICLE_LIKE(otherVehicleClass,vehicleClass) class vehicleClass : otherVehicleClass {} -#define HAS_PENETRATOR(penetratorClass) NO_DAMAGE \ - { \ - child = QUOTE(penetratorClass);\ - } - -#define ARMA_NATO_MARKERS_DIR \A3\ui_f\data\map\markers\nato -#define WARGAY_NATO_MARKERS_DIR PATHTOEF(markers,assets) -#define ANTIAIR_SPAAG_RADAR_ICON QUOTE(WARGAY_NATO_MARKERS_DIR\b_antiair_spaag_radar.paa) -#define ANTITANK_ICON QUOTE(WARGAY_NATO_MARKERS_DIR\b_antitank.paa) -#define ARMOR_ICON QUOTE(ARMA_NATO_MARKERS_DIR\b_armor.paa) -#define CV_ARMOR_ICON QUOTE(WARGAY_NATO_MARKERS_DIR\b_cv_armor.paa) -#define HELI_ICON QUOTE(ARMA_NATO_MARKERS_DIR\b_air.paa) - class CfgWargay { class Ammo diff --git a/addons/compatibility/cwr3/CfgWargay.hpp b/addons/compatibility/cwr3/CfgWargay.hpp index 9829b64..47efb83 100644 --- a/addons/compatibility/cwr3/CfgWargay.hpp +++ b/addons/compatibility/cwr3/CfgWargay.hpp @@ -1,18 +1,3 @@ -#define ARMOR(FRONT,SIDES,BACK,TOP) armor[] = { FRONT, SIDES, BACK, TOP } -#define VEHICLE_LIKE(otherVehicleClass,vehicleClass) class vehicleClass : otherVehicleClass {} -#define HAS_PENETRATOR(penetratorClass) NO_DAMAGE \ - { \ - child = QUOTE(penetratorClass);\ - } - -#define ARMA_NATO_MARKERS_DIR \A3\ui_f\data\map\markers\nato -#define WARGAY_NATO_MARKERS_DIR PATHTOEF(markers,assets) -#define ANTIAIR_ICON QUOTE(ARMA_NATO_MARKERS_DIR\b_antiair.paa) -#define ANTITANK_ICON QUOTE(WARGAY_NATO_MARKERS_DIR\b_antitank.paa) -#define ARMOR_ICON QUOTE(ARMA_NATO_MARKERS_DIR\b_armor.paa) -#define HELI_ICON QUOTE(ARMA_NATO_MARKERS_DIR\b_air.paa) -#define PLANE_ICON QUOTE(ARMA_NATO_MARKERS_DIR\b_air.paa) - class CfgWargay { class Ammo diff --git a/addons/compatibility/french_armour_pack/CfgWargay.hpp b/addons/compatibility/french_armour_pack/CfgWargay.hpp index 0e25660..080b70f 100644 --- a/addons/compatibility/french_armour_pack/CfgWargay.hpp +++ b/addons/compatibility/french_armour_pack/CfgWargay.hpp @@ -1,16 +1,3 @@ -#define ARMOR(FRONT,SIDES,BACK,TOP) armor[] = { FRONT, SIDES, BACK, TOP } -#define VEHICLE_LIKE(otherVehicleClass,vehicleClass) class vehicleClass : otherVehicleClass {} -#define HAS_PENETRATOR(penetratorClass) NO_DAMAGE \ - { \ - child = QUOTE(penetratorClass);\ - } - -#define ARMA_NATO_MARKERS_DIR \A3\ui_f\data\map\markers\nato -#define WARGAY_NATO_MARKERS_DIR PATHTOEF(markers,assets) -#define ANTITANK_ICON QUOTE(WARGAY_NATO_MARKERS_DIR\b_antitank.paa) -#define ARMOR_ICON QUOTE(ARMA_NATO_MARKERS_DIR\b_armor.paa) -#define RECON_ARMOR_ICON QUOTE(WARGAY_NATO_MARKERS_DIR\b_recon_armor.paa) - class CfgWargay { // Mod uses vanilla ammo, so it might be incompatible in some scenarios diff --git a/addons/compatibility/global_mobilization/CfgWargay.hpp b/addons/compatibility/global_mobilization/CfgWargay.hpp index 23a9022..684d1da 100644 --- a/addons/compatibility/global_mobilization/CfgWargay.hpp +++ b/addons/compatibility/global_mobilization/CfgWargay.hpp @@ -2,9 +2,803 @@ class CfgWargay { class Ammo { + class NO_DAMAGE; class SMALL_ARMS; + class HMG_AP; + class HMG_HE; + class Small_HE; + class AA_HE; + class Tank_HE; class ace_frag_small; class gm_HandGrenade_frag_dm51a1 : ace_frag_small {}; + + /* + Western Germany + */ + // LARS-2 + class gm_rocket_mlrs_110mm_he_dm21 : HAS_PENETRATOR(gm_warhead_mlrs_110mm_he_dm21); + class gm_warhead_mlrs_110mm_he_dm21 + { + damage = 7; + type = "HE"; + }; + + class gm_rocket_mlrs_110mm_icm_dm602 : HAS_PENETRATOR(gm_penetrator_m77); + class gm_penetrator_m77 + { + damage = 6; + type = "HEAT"; + }; + + // M-109G + class gm_shell_155mm_he_dm21 : HAS_PENETRATOR(gm_warhead_155mm_he_dm21); + class gm_warhead_155mm_he_dm21 + { + damage = 7; + type = "HE"; + }; + + class gm_shell_155mm_icm_602 : HAS_PENETRATOR(gm_warhead_155mm_icm_602); + class gm_warhead_155mm_icm_602 + { + damage = 6; + type = "HEAT"; + }; + + // Flakpanzer Gepard 1A1 + class gm_bullet_35x228mm_hei_t_DM21 : AA_HE {}; + class gm_bullet_35x228mm_hvapds_t_DM23 : AA_HE {}; + + // Luchs & Marder 1 + class gm_bullet_20x139mm_hei_t_dm81 : HMG_HE {}; + class gm_bullet_20x139mm_apds_t_dm63 + { + damage = 2; + type = "AP"; + }; + + /* Leopard 1 family */ + class gm_shell_105x617mm_apds_t_dm13 + { + damage = 11; + type = "AP"; + }; + + class gm_shell_105x617mm_heat_mp_t_dm12 : HAS_PENETRATOR(gm_penetrator_105x617mm_heat_dm12); + class gm_penetrator_105x617mm_heat_dm12 + { + damage = 11; + type = "HEAT"; + }; + + class gm_shell_105x617mm_apfsds_t_dm23 : gm_shell_105x617mm_apds_t_dm13 {}; + + // Leopard 1A3/4 + class gm_shell_105x617mm_apfsds_t_dm33 + { + damage = 12; + type = "AP"; + }; + + // Leopard 1A5 + class gm_shell_105x617mm_apfsds_t_dm63 + { + damage = 16; + type = "AP"; + }; + + // Milan + class gm_missile_milan_heat_dm92 : HAS_PENETRATOR(gm_penetrator_milan_HEAT_dm92); + class gm_penetrator_milan_HEAT_dm82 + { + damage = 17; + type = "HEAT"; + }; + class gm_penetrator_milan_HEAT_dm92 : gm_penetrator_milan_HEAT_dm82 {}; + + // Hot 1 & 2 + class gm_missile_hot_heat_dm72 : HAS_PENETRATOR(gm_penetrator_hot_HEAT_dm72); + class gm_missile_hot_heat_dm102 : HAS_PENETRATOR(gm_penetrator_hot_HEAT_dm102); + class gm_penetrator_hot_HEAT_dm72 + { + damage = 22; + type = "HEAT"; + }; + class gm_penetrator_hot_HEAT_dm102 + { + damage = 25; + type = "HEAT"; + }; + + // PzF 44 + class gm_rocket_44x537mm_HEAT_dm32 : HAS_PENETRATOR(gm_penetrator_44x537mm_HEAT_dm32); + class gm_penetrator_44x537mm_HEAT_dm32 + { + damage = 16; + type = "HEAT"; + }; + + // PzF 3 + class gm_rocket_60mm_HEAT_dm12 : HAS_PENETRATOR(gm_penetrator_60mm_HEAT_dm12); + class gm_rocket_60mm_HEAT_dm22 : HAS_PENETRATOR(gm_penetrator_60mm_HEAT_dm22); + class gm_rocket_60mm_HEAT_dm32 : HAS_PENETRATOR(gm_penetrator_60mm_HEAT_dm32); + class gm_penetrator_60mm_HEAT_dm12 + { + damage = 24; + type = "HEAT"; + }; + class gm_penetrator_60mm_HEAT_dm22 : gm_penetrator_60mm_HEAT_dm12 + { + damage = 26; + }; + class gm_penetrator_60mm_HEAT_dm32 : gm_penetrator_60mm_HEAT_dm12 + { + damage = 28; + }; + + // PzF 84 (Carl Gustav M2) + class gm_rocket_84x245mm_HEAT_T_DM12 : HAS_PENETRATOR(gm_penetrator_84x245mm_HEAT_DM12); + class gm_rocket_84x245mm_HEAT_T_DM12A1 : HAS_PENETRATOR(gm_penetrator_84x245mm_HEAT_DM12A1); + class gm_rocket_84x245mm_HEAT_T_DM22 : HAS_PENETRATOR(gm_penetrator_84x245mm_HEAT_DM22); + class gm_rocket_84x245mm_HEAT_T_DM32 : HAS_PENETRATOR(gm_penetrator_84x245mm_HEAT_DM32); + + class gm_penetrator_84x245mm_HEAT_DM12 + { + damage = 18; + type = "HEAT"; + }; + class gm_penetrator_84x245mm_HEAT_DM12A1 : gm_penetrator_84x245mm_HEAT_DM12 {}; + class gm_penetrator_84x245mm_HEAT_DM22 : gm_penetrator_84x245mm_HEAT_DM12 + { + damage = 20; + }; + class gm_penetrator_84x245mm_HEAT_DM32 : gm_penetrator_84x245mm_HEAT_DM12 + { + damage = 22; + }; + + // M72A3 LAW + class gm_rocket_66mm_HEAT_m72a3 : HAS_PENETRATOR(gm_penetrator_66mm_HEAT_m72a3); + + class gm_penetrator_66mm_HEAT_m72a3 + { + damage = 13; + type = "HEAT"; + }; + + // FIM-43 (Redeye) + class gm_rocket_70mm_HE_m585 + { + damage = 3; + type = "HE"; + }; + + /* + Eastern Germany + */ + + /* PT-76B */ + class gm_shell_76x385mm_he_of350 : Small_HE {}; + class gm_shell_76x385mm_HVAP_T_br354p + { + damage = 10; + type = "AP"; + }; + class gm_shell_76x385mm_HEAT_T_bk350m + { + damage = 10; + type = "HEAT"; + }; + + /* T-55 family */ + class gm_shell_100x695mm_apfsds_t_bm8 + { + damage = 11; + type = "AP"; + }; + + class gm_shell_100x695mm_he_of412 : Tank_HE {}; + + // T-55A + class gm_shell_100x695mm_heat_t_bk5m : HAS_PENETRATOR(gm_penetrator_100x695mm_HEAT_T_bk5m); + class gm_penetrator_100x695mm_HEAT_T_bk5m + { + damage = 11; + type = "HEAT"; + }; + + class gm_shell_100x695mm_apfsds_t_bm20 + { + damage = 11; + type = "AP"; + }; + + // T-55AK/T-55AM2/T-55AM2B + class gm_shell_100x695mm_apfsds_t_bm25 + { + damage = 15; + type = "AP"; + }; + + // ZSU-23-4 + class gm_bullet_23x152mm_hei_t_ofzt : AA_HE {}; + class gm_bullet_23x152mm_api_t_bzt : gm_bullet_23x152mm_hei_t_ofzt {}; + + // SFL 2S1 + class gm_shell_122x447mm_he_of462 : HAS_PENETRATOR(gm_warhead_122x447mm_he_of462); + class gm_warhead_122x447mm_he_of462 + { + damage = 6; + type = "HE"; + }; + + class gm_shell_122x447mm_heat_t_bk13 : HAS_PENETRATOR(gm_penetrator_122x447mm_heat_t_bk13); + class gm_penetrator_122x447mm_heat_bk6m + { + damage = 9; + type = "HEAT"; + }; + class gm_penetrator_122x447mm_heat_t_bk13 : gm_penetrator_122x447mm_heat_bk6m {}; + + // BM-21 + class gm_rocket_mlrs_122mm_he_9m22u : HAS_PENETRATOR(gm_warhead_122mm_he_9m22u); + class gm_warhead_122mm_he_9m22u + { + damage = 7; + type = "HE"; + }; + + class gm_rocket_mlrs_122mm_icm_9m218 : HAS_PENETRATOR(gm_penetrator_3b30); + class gm_penetrator_3b30 + { + damage = 5; + type = "HEAT"; + }; + + // 2P16 + class gm_rocket_luna_he_3r9 + { + damage = 15; + type = "HE"; + }; + + // BMP-1 & SPG-9 + class gm_shell_73mm_heat_pg15v + { + damage = 12; + type = "HEAT"; + }; + class gm_shell_73mm_he_og15v : Small_HE {}; + + class gm_missile_maljutka_heat_9m14m : HAS_PENETRATOR(gm_penetrator_maljutka_HEAT_9m14m); + class gm_penetrator_maljutka_HEAT_9m14 + { + damage = 15; + type = "HEAT"; + }; + class gm_penetrator_maljutka_HEAT_9m14m : gm_penetrator_maljutka_HEAT_9m14 {}; + + // SPW-60PB + class gm_bullet_145x114mm_AP_B32 : HMG_AP {}; + class gm_bullet_145x114mm_HEI_T_MDZ : HMG_HE {}; + + // Fagot + class gm_missile_fagot_heat_9m111 : HAS_PENETRATOR(gm_penetrator_fagot_HEAT_9m111); + class gm_penetrator_fagot_HEAT_9m111 + { + damage = 16; + type = "HEAT"; + }; + + + class gm_rocket_40mm_HEAT_pg7v : HAS_PENETRATOR(gm_penetrator_40mm_HEAT_pg7v); + class gm_penetrator_40mm_HEAT_pg7v + { + damage = 14; + type = "HEAT"; + }; + + class gm_rocket_40mm_HEAT_pg7v1 : HAS_PENETRATOR(gm_penetrator_40mm_HEAT_pg7v1); + class gm_penetrator_40mm_HEAT_pg7v1 + { + damage = 17; + type = "HEAT"; + }; + + class gm_rocket_55mm_HE_s5 + { + damage = 1; + type = "HE"; + }; + + class gm_rocket_55mm_heat_s5k : HAS_PENETRATOR(gm_penetrator_55mm_heat_s5k); + class gm_penetrator_55mm_heat_s5k + { + damage = 2; + type = "HEAT"; + }; + + class gm_rocket_64mm_HEAT_pg18 : HAS_PENETRATOR(gm_penetrator_64mm_HEAT_pg18); + class gm_penetrator_64mm_HEAT_pg18 + { + damage = 15; + type = "HEAT"; + }; + + // Strela-2 + class gm_rocket_72mm_HE_9m32m : gm_rocket_70mm_HE_m585 {}; + + // DShKM + class gm_bullet_127x108mm_API_T_BZT : SMALL_ARMS {}; + }; + + class Vehicles + { + /* + West Germany + */ + + // LOG + class gm_ge_army_m113a1g_command + { + pointCost = 105; + hitpoints = 10; + ARMOR(1,1,1,1); + iconPath = CV_ARMOR_ICON; + markerType = "b_cv_armor"; + isCommandVehicle = 1; + }; + class gm_iltis_cargo_base + { + pointCost = 110; + hitpoints = 5; + ARMOR(0,0,0,0); + iconPath = CV_ICON; + markerType = "b_cv"; + isCommandVehicle = 1; + }; + class gm_fuchsa0_command_base + { + pointCost = 120; + hitpoints = 10; + ARMOR(1,1,1,1); + iconPath = CV_ARMOR_ICON; + markerType = "b_cv_armor"; + isCommandVehicle = 1; + }; + + class gm_kat1_451_reammo_base + { + pointCost = 30; + hitpoints = 10; + ARMOR(0,0,0,0); + iconPath = LOG_ICON; + markerType = "b_support"; + isLogistics = 1; + }; + VEHICLE_LIKE(gm_kat1_451_reammo_base,gm_kat1_451_refuel_base); + VEHICLE_LIKE(gm_kat1_451_reammo_base,gm_kat1_451_container_base); + class gm_kat1_452_container_base : gm_kat1_451_reammo_base + { + pointCost = 35; + }; + class gm_kat1_454_cargo_base : gm_kat1_451_reammo_base + { + pointCost = 40; + }; + class gm_u1300l_repair_base : gm_kat1_451_reammo_base + { + pointCost = 10; + hitpoints = 5; + }; + VEHICLE_LIKE(gm_u1300l_repair_base,gm_u1300l_container_base); + VEHICLE_LIKE(gm_u1300l_repair_base,gm_u1300l_medic_base); + + // TNK + class gm_Leopard1_base + { + pointCost = 30; + hitpoints = 10; + ARMOR(6,2,2,1); + iconPath = ARMOR_ICON; + markerType = "b_armor"; + }; + VEHICLE_LIKE(gm_Leopard1_base,gm_Leopard1a1_base); // 1A1 should be recon with 5/2/2/1 + + class gm_BPz2_base : gm_Leopard1_base + { + pointCost = 40; + iconPath = LOG_ARMOR_ICON; + markerType = "b_support"; + isLogistics = 1; + }; + class gm_Leopard1a3_base + { + pointCost = 40; + hitpoints = 10; + ARMOR(8,3,2,2); + iconPath = ARMOR_ICON; + markerType = "b_armor"; + }; + class gm_leopard1a5_base + { + pointCost = 65; + hitpoints = 10; + ARMOR(10,3,2,2); + iconPath = ARMOR_ICON; + markerType = "b_armor"; + }; + + // SUP + class gm_Gepard1a1_base + { + pointCost = 55; + hitpoints = 10; + ARMOR(3,2,2,1); + iconPath = ANTIAIR_SPAAG_RADAR_ICON; + markerType = "b_antiair_spaag_radar"; + }; + class gm_m109g_base + { + pointCost = 50; + hitpoints = 10; + ARMOR(2,1,1,1); + iconPath = ART_ICON; + markerType = "b_art"; + }; + class gm_kat1_463_mlrs_base + { + pointCost = 70; + hitpoints = 10; + ARMOR(0,0,0,0); + iconPath = ART_ROCKET_ICON; + markerType = "b_art_rocket"; + }; + + // VEH + class gm_iltis_base + { + pointCost = 5; + hitpoints = 5; + ARMOR(0,0,0,0); + iconPath = MOTOR_INF_ICON; + markerType = "b_motor_inf"; + }; + class gm_iltis_milan_base : gm_iltis_base + { + pointCost = 20; + iconPath = ANTITANK_ICON; + markerType = "b_antitank"; + }; + class gm_kat1_base + { + pointCost = 5; + hitpoints = 10; + ARMOR(0,0,0,0); + iconPath = MOTOR_INF_ICON; + markerType = "b_motor_inf"; + }; + class gm_u1300l_base : gm_kat1_base + { + hitpoints = 5; + }; + + class gm_marder1_base + { + pointCost = 15; + hitpoints = 10; + ARMOR(4,2,1,1); + iconPath = MECH_INF_ARMED_ICON; + markerType = "b_mech_inf_armed"; + }; + class gm_marder1a1plus_base : gm_marder1_base + { + pointCost = 15; + ARMOR(4,2,2,1); + }; + class gm_marder1a2_base : gm_marder1_base + { + pointCost = 20; + ARMOR(5,3,2,2); + }; + class gm_m113_base + { + pointCost = 5; + hitpoints = 10; + ARMOR(1,1,1,1); + iconPath = MECH_INF_ICON; + markerType = "b_mech_inf"; + }; + class gm_m113a1g_apc_milan_base : gm_m113_base + { + pointCost = 20; + iconPath = ANTITANK_ARMOR_ICON; + markerType = "b_antitank_armor"; + }; + class gm_m113a1g_medic_base : gm_m113_base + { + pointCost = 15; + iconPath = LOG_ARMOR_ICON; + markerType = "b_med"; + isLogistics = 1; + }; + class gm_fuchs_base : gm_m113_base + { + iconPath = MOTOR_INF_ICON; + markerType = "b_motor_inf"; + }; + class gm_fuchsa0_engineer_base : gm_fuchs_base + { + pointCost = 20; + iconPath = LOG_ARMOR_ICON; + markerType = "b_support"; + isLogistics = 1; + }; + + // REC + class gm_iltis_mg3_base : gm_iltis_base + { + pointCost = 25; + iconPath = RECON_ICON; + markerType = "b_recon"; + isRecon = 1; + }; + class gm_luchs_base + { + pointCost = 25; + hitpoints = 10; + ARMOR(2,1,1,1); + iconPath = RECON_ARMOR_ICON; + markerType = "b_recon_armor"; + isRecon = 1; + }; + class gm_fuchsa0_reconnaissance_base : gm_luchs_base + { + pointCost = 10; + ARMOR(1,1,1,1); + iconPath = RECON_ANTITANK_ICON; + markerType = "b_recon_antitank"; + }; + class gm_bo105m_base + { + pointCost = 45; + hitpoints = 10; // Should be 4 according to Wargay + ARMOR(0,0,0,0); + iconPath = RECON_AIR_ICON; + markerType = "b_recon_air"; + isRecon = 1; + }; + + // HEL + class gm_bo105p_base + { + pointCost = 50; + hitpoints = 10; // Should be 4 according to Wargay + ARMOR(0,0,0,0); + iconPath = HELI_ICON; + markerType = "b_air"; + }; + class gm_bo105p_pah1a1_base : gm_bo105p_base + { + pointCost = 60; + }; + class gm_ch53_base + { + pointCost = 20; + hitpoints = 10; + ARMOR(0,0,0,0); + iconPath = HELI_ICON; // TODO: Consider Heli cargo vs heli attack icon + markerType = "b_air"; + }; + + /* + East Germany + */ + + // LOG + class gm_uaz469_cargo_base + { + pointCost = 100; + hitpoints = 5; + ARMOR(0,0,0,0); + iconPath = CV_ICON; + markerType = "b_cv"; + isCommandVehicle = 1; + }; + class gm_btr60pu12_base + { + pointCost = 110; + hitpoints = 10; + ARMOR(1,1,1,1); + iconPath = CV_ARMOR_ICON; + markerType = "b_cv_armor"; + isCommandVehicle = 1; + }; + class gm_brdm2um_base + { + pointCost = 120; + hitpoints = 10; + ARMOR(1,1,1,1); + iconPath = CV_ARMOR_ICON; + markerType = "b_cv_armor"; + isCommandVehicle = 1; + }; + class gm_t55ak_base + { + pointCost = 120; + hitpoints = 10; + ARMOR(7,3,2,1); + iconPath = CV_ARMOR_ICON; + markerType = "b_cv_armor"; + isCommandVehicle = 1; + }; + class gm_ural4320_repair_base + { + pointCost = 20; + hitpoints = 5; + ARMOR(0,0,0,0); + iconPath = LOG_ICON; + markerType = "b_support"; + isLogistics = 1; + }; + VEHICLE_LIKE(gm_ural4320_repair_base,gm_ural4320_reammo_base); + class gm_ural375d_refuel_base : gm_ural4320_repair_base + { + pointCost = 15; + }; + VEHICLE_LIKE(gm_ural375d_refuel_base,gm_ural375d_medic_base); + + // SUP + class gm_zsu234_base + { + pointCost = 35; + hitpoints = 10; + ARMOR(1,1,1,1); + iconPath = ANTIAIR_SPAAG_RADAR_ICON; + markerType = "b_antiair_spaag_radar"; + }; + class gm_2s1_base + { + pointCost = 55; + hitpoints = 10; + ARMOR(1,1,1,1); + iconPath = ART_ICON; + markerType = "b_art"; + }; + class gm_2p16_base + { + pointCost = 130; + hitpoints = 10; + ARMOR(1,1,1,1); + iconPath = ART_ROCKET_ICON; + markerType = "b_art_rocket"; + }; + class gm_ural375d_mlrs_base + { + pointCost = 65; + hitpoints = 5; + ARMOR(0,0,0,0); + iconPath = ART_ROCKET_ICON; + markerType = "b_art_rocket"; + }; + + // TNK + class gm_t55_base + { + pointCost = 25; + hitpoints = 10; + ARMOR(7,3,2,1); + iconPath = ARMOR_ICON; + markerType = "b_armor"; + }; + VEHICLE_LIKE(gm_t55_base,gm_t55a_base); + class gm_t55am2_base : gm_t55_base + { + pointCost = 50; + ARMOR(10,4,2,2); + }; + class gm_t55am2b_base + { + pointCost = 55; + ARMOR(10,5,2,2); + }; + + // VEH + class gm_ural4320_base + { + pointCost = 5; + hitpoints = 5; + ARMOR(0,0,0,0); + iconPath = MOTOR_INF_ICON; + markerType = "b_motor_inf"; + }; + class gm_uaz469_base + { + pointCost = 5; + hitpoints = 5; + ARMOR(0,0,0,0); + iconPath = MOTOR_INF_ICON; + markerType = "b_motor_inf"; + }; + class gm_uaz469_spg9_base : gm_uaz469_base + { + pointCost = 10; + iconPath = ANTITANK_ICON; + markerType = "b_antitank"; + }; + class gm_bmp1_base + { + pointCost = 10; + hitpoints = 10; + ARMOR(1,1,1,1); + iconPath = MECH_INF_ARMED_ICON; + markerType = "b_mech_inf_armed"; + }; + class gm_btr60_base + { + pointCost = 10; + hitpoints = 10; + ARMOR(1,1,1,1); + iconPath = MOTOR_INF_ICON; + markerType = "b_motor_inf"; + }; + class gm_btr60pb_base : gm_btr60_base + { + pointCost = 15; + iconPath = MECH_INF_ARMED_ICON;// TODO: Consider MOTOR_INF_ARMED_ICON; + markerType = "b_mech_inf_armed"; + }; + + // REC + class gm_pt76_base + { + pointCost = 15; + hitpoints = 10; + ARMOR(2,1,1,1); + iconPath = RECON_ARMOR_ICON; + markerType = "b_recon_armor"; + isRecon = 1; + }; + class gm_brdm2_base + { + pointCost = 15; + hitpoints = 10; + ARMOR(1,1,1,1); + iconPath = RECON_ARMOR_ICON; + markerType = "b_recon_armor"; + isRecon = 1; + }; + class gm_mi2p_base + { + pointCost = 40; + hitpoints = 10; // Should be 4 according to Wargay + ARMOR(0,0,0,0); + iconPath = RECON_AIR_ICON; + markerType = "b_recon_air"; + isRecon = 1; + }; + + // HEL + class gm_mi2_base + { + pointCost = 10; + hitpoints = 10; // Should be 4 according to Wargay + ARMOR(0,0,0,0); + iconPath = HELI_ICON; + markerType = "b_air"; + }; + class gm_mi2t_base : gm_mi2_base + { + pointCost = 15; + }; + class gm_mi2us_base : gm_mi2_base + { + pointCost = 20; + }; + class gm_mi2urn_base : gm_mi2_base + { + pointCost = 30; + }; }; }; diff --git a/addons/compatibility/script_component.hpp b/addons/compatibility/script_component.hpp index 5c816a2..df4f976 100644 --- a/addons/compatibility/script_component.hpp +++ b/addons/compatibility/script_component.hpp @@ -12,3 +12,4 @@ #endif #include "\z\afwg\addons\main\script_macros.hpp" +#include "\z\afwg\addons\compatibility\script_macros.hpp" diff --git a/addons/compatibility/script_macros.hpp b/addons/compatibility/script_macros.hpp new file mode 100644 index 0000000..cab003f --- /dev/null +++ b/addons/compatibility/script_macros.hpp @@ -0,0 +1,33 @@ +// Macros used for CfgWargay.hpp to avoid duplication and improve consistency + +#define ARMOR(FRONT,SIDES,BACK,TOP) armor[] = { FRONT, SIDES, BACK, TOP } +#define VEHICLE_LIKE(otherVehicleClass,vehicleClass) class vehicleClass : otherVehicleClass {} +#define HAS_PENETRATOR(penetratorClass) NO_DAMAGE \ + { \ + child = QUOTE(penetratorClass);\ + } + +// Icon macros +#define ARMA_NATO_MARKERS_DIR \A3\ui_f\data\map\markers\nato +#define WARGAY_NATO_MARKERS_DIR PATHTOEF(markers,assets) +#define ANTIAIR_ICON QUOTE(ARMA_NATO_MARKERS_DIR\b_antiair.paa) +#define ANTIAIR_SPAAG_ICON QUOTE(WARGAY_NATO_MARKERS_DIR\b_antiair_spaag.paa) +#define ANTIAIR_SPAAG_RADAR_ICON QUOTE(WARGAY_NATO_MARKERS_DIR\b_antiair_spaag_radar.paa) +#define ANTITANK_ICON QUOTE(WARGAY_NATO_MARKERS_DIR\b_antitank.paa) +#define ANTITANK_ARMOR_ICON QUOTE(WARGAY_NATO_MARKERS_DIR\b_antitank_armor.paa) +#define ART_ICON QUOTE(ARMA_NATO_MARKERS_DIR\b_art.paa) +#define ART_ROCKET_ICON QUOTE(WARGAY_NATO_MARKERS_DIR\b_art_rocket.paa) +#define ARMOR_ICON QUOTE(ARMA_NATO_MARKERS_DIR\b_armor.paa) +#define CV_ARMOR_ICON QUOTE(WARGAY_NATO_MARKERS_DIR\b_cv_armor.paa) +#define CV_ICON QUOTE(WARGAY_NATO_MARKERS_DIR\b_cv.paa) +#define HELI_ICON QUOTE(ARMA_NATO_MARKERS_DIR\b_air.paa) +#define LOG_ARMOR_ICON QUOTE(ARMA_NATO_MARKERS_DIR\b_support.paa) +#define LOG_ICON QUOTE(ARMA_NATO_MARKERS_DIR\b_support.paa) +#define MECH_INF_ICON QUOTE(ARMA_NATO_MARKERS_DIR\b_mech_inf.paa) +#define MECH_INF_ARMED_ICON QUOTE(WARGAY_NATO_MARKERS_DIR\b_mech_inf_armed.paa) +#define MOTOR_INF_ICON QUOTE(ARMA_NATO_MARKERS_DIR\b_motor_inf.paa) +#define PLANE_ICON QUOTE(ARMA_NATO_MARKERS_DIR\b_air.paa) +#define RECON_AIR_ICON QUOTE(WARGAY_NATO_MARKERS_DIR\b_recon_air.paa) +#define RECON_ANTITANK_ICON QUOTE(WARGAY_NATO_MARKERS_DIR\b_recon_antitank.paa) +#define RECON_ARMOR_ICON QUOTE(WARGAY_NATO_MARKERS_DIR\b_recon_armor.paa) +#define RECON_ICON QUOTE(WARGAY_NATO_MARKERS_DIR\b_recon.paa) From 7f89d179ddaa0772638d5bdcc0acf4bdbc070ecc Mon Sep 17 00:00:00 2001 From: 3Mydlo3 Date: Wed, 18 Dec 2024 15:07:45 +0100 Subject: [PATCH 32/47] Update compat readmes --- addons/compatibility/README.md | 4 +++- addons/compatibility/cup/README.md | 8 ++++---- addons/compatibility/cwr3/README.md | 8 ++++---- addons/compatibility/french_armour_pack/README.md | 6 +++--- addons/compatibility/global_mobilization/README.md | 7 +++++++ 5 files changed, 21 insertions(+), 12 deletions(-) create mode 100644 addons/compatibility/global_mobilization/README.md diff --git a/addons/compatibility/README.md b/addons/compatibility/README.md index ecbc442..dc66ee5 100644 --- a/addons/compatibility/README.md +++ b/addons/compatibility/README.md @@ -1,3 +1,5 @@ # Compatiblity -Adds compatiblity for various mods, loaded as needed thanks to `skipWhenMissingDependencies` +Adds compatiblity for various mods and cDLCs, loaded as needed thanks to `skipWhenMissingDependencies`. + +Please pay attention to any warnings or incorrect unit stats (basic cost, no armor for tanks etc.). Feel free to contribute. diff --git a/addons/compatibility/cup/README.md b/addons/compatibility/cup/README.md index 7753c73..c3dd3fe 100644 --- a/addons/compatibility/cup/README.md +++ b/addons/compatibility/cup/README.md @@ -1,7 +1,7 @@ -## CUP +# CUP -Compatibility addon for [French Armour Pack](https://steamcommunity.com/sharedfiles/filedetails/?id=3317407146). +Compatibility addon for [CUP Vehicles](https://steamcommunity.com/sharedfiles/filedetails/?id=541888371). -### Notes +## Notes -This mod uses vanilla ammo classes, thus might result in degraded experience in combination with other mods that use vanilla ammo. +Not all classes are covered by this compat. Pay attention to warnings and incorrect unit stats (like basic cost or no armor for a tank). Feel free to contribute. diff --git a/addons/compatibility/cwr3/README.md b/addons/compatibility/cwr3/README.md index 7753c73..66813f3 100644 --- a/addons/compatibility/cwr3/README.md +++ b/addons/compatibility/cwr3/README.md @@ -1,7 +1,7 @@ -## CUP +# Cold War Rearmed III -Compatibility addon for [French Armour Pack](https://steamcommunity.com/sharedfiles/filedetails/?id=3317407146). +Compatibility addon for [Cold War Rearmed III](https://steamcommunity.com/workshop/filedetails/?id=2316343124). -### Notes +## Notes -This mod uses vanilla ammo classes, thus might result in degraded experience in combination with other mods that use vanilla ammo. +Not all classes are covered by this compat. Pay attention to warnings and incorrect unit stats (like basic cost or no armor for a tank). Feel free to contribute. diff --git a/addons/compatibility/french_armour_pack/README.md b/addons/compatibility/french_armour_pack/README.md index 3cb6904..5099d15 100644 --- a/addons/compatibility/french_armour_pack/README.md +++ b/addons/compatibility/french_armour_pack/README.md @@ -1,7 +1,7 @@ -## French Armour Pack +# French Armour Pack Compatibility addon for [French Armour Pack](https://steamcommunity.com/sharedfiles/filedetails/?id=3317407146). -### Notes +## Notes -This mod uses vanilla ammo classes, thus might result in degraded experience in combination with other mods that use vanilla ammo. +This mod uses vanilla ammo classes, thus might result in degraded experience in combination with other mods that use vanilla ammo. Feel free to contribute and update this addon with custom ammo classes (can be derived from vanilla ones), so that it can work flawlessly with other mods. diff --git a/addons/compatibility/global_mobilization/README.md b/addons/compatibility/global_mobilization/README.md new file mode 100644 index 0000000..3fbd519 --- /dev/null +++ b/addons/compatibility/global_mobilization/README.md @@ -0,0 +1,7 @@ +# Global Mobilization + +Compatibility addon for [Arma 3 Creator DLC: Global Mobilization - Cold War Germany](https://store.steampowered.com/app/1042220/Arma_3_Creator_DLC_Global_Mobilization__Cold_War_Germany/). + +## Notes + +A lot of West German and East German classes are covered. Pay attention to warnings and incorrect unit stats (like basic cost or no armor for a tank). Feel free to contribute. From 675339341d46288a67686510a7260e7d26905872 Mon Sep 17 00:00:00 2001 From: 3Mydlo3 Date: Wed, 18 Dec 2024 18:33:16 +0100 Subject: [PATCH 33/47] Add SKOT config --- addons/compatibility/global_mobilization/CfgWargay.hpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/addons/compatibility/global_mobilization/CfgWargay.hpp b/addons/compatibility/global_mobilization/CfgWargay.hpp index 684d1da..9efdf35 100644 --- a/addons/compatibility/global_mobilization/CfgWargay.hpp +++ b/addons/compatibility/global_mobilization/CfgWargay.hpp @@ -750,6 +750,9 @@ class CfgWargay markerType = "b_mech_inf_armed"; }; + // SKOT-2A https://wargame.fandom.com/wiki/SKOT-2A + class gm_ot64_base : gm_btr60_base {}; + // REC class gm_pt76_base { From 91d5b616a8ce8bdba96c158e2393462381c7ef21 Mon Sep 17 00:00:00 2001 From: 3Mydlo3 Date: Wed, 18 Dec 2024 18:33:30 +0100 Subject: [PATCH 34/47] Fix healing --- addons/damage/XEH_PREP.hpp | 1 - addons/repair/XEH_PREP.hpp | 1 + addons/{damage => repair}/functions/fnc_healDamage.sqf | 0 3 files changed, 1 insertion(+), 1 deletion(-) rename addons/{damage => repair}/functions/fnc_healDamage.sqf (100%) diff --git a/addons/damage/XEH_PREP.hpp b/addons/damage/XEH_PREP.hpp index 7703aac..2eba20f 100644 --- a/addons/damage/XEH_PREP.hpp +++ b/addons/damage/XEH_PREP.hpp @@ -1,7 +1,6 @@ PREP(applyDamage); PREP(calculateAndApplyDamage); PREP(getHitDir); -PREP(healDamage); PREP(heatDamage); PREP(heDamage); PREP(keDamage); diff --git a/addons/repair/XEH_PREP.hpp b/addons/repair/XEH_PREP.hpp index 5fc37cc..97fa3ea 100644 --- a/addons/repair/XEH_PREP.hpp +++ b/addons/repair/XEH_PREP.hpp @@ -1,6 +1,7 @@ PREP(addRepairAction); PREP(canRepair); PREP(completeRepair); +PREP(healDamage); PREP(interruptedRepair); PREP(progressRepair); PREP(startRepair); diff --git a/addons/damage/functions/fnc_healDamage.sqf b/addons/repair/functions/fnc_healDamage.sqf similarity index 100% rename from addons/damage/functions/fnc_healDamage.sqf rename to addons/repair/functions/fnc_healDamage.sqf From 185c51050ca742180f5803609e035b486c4670cc Mon Sep 17 00:00:00 2001 From: 3Mydlo3 Date: Wed, 18 Dec 2024 18:33:48 +0100 Subject: [PATCH 35/47] Add some help to field manual --- addons/help/$PBOPREFIX$ | 1 + addons/help/CfgEventHandlers.hpp | 21 +++++ addons/help/CfgHintCategories.hpp | 7 ++ addons/help/CfgHints.hpp | 143 ++++++++++++++++++++++++++++++ addons/help/XEH_PREP.hpp | 0 addons/help/XEH_postInit.sqf | 1 + addons/help/XEH_preInit.sqf | 10 +++ addons/help/XEH_preStart.sqf | 2 + addons/help/config.cpp | 19 ++++ addons/help/initSettings.inc.sqf | 8 ++ addons/help/script_component.hpp | 14 +++ addons/help/stringtable.xml | 17 ++++ 12 files changed, 243 insertions(+) create mode 100644 addons/help/$PBOPREFIX$ create mode 100644 addons/help/CfgEventHandlers.hpp create mode 100644 addons/help/CfgHintCategories.hpp create mode 100644 addons/help/CfgHints.hpp create mode 100644 addons/help/XEH_PREP.hpp create mode 100644 addons/help/XEH_postInit.sqf create mode 100644 addons/help/XEH_preInit.sqf create mode 100644 addons/help/XEH_preStart.sqf create mode 100644 addons/help/config.cpp create mode 100644 addons/help/initSettings.inc.sqf create mode 100644 addons/help/script_component.hpp create mode 100644 addons/help/stringtable.xml diff --git a/addons/help/$PBOPREFIX$ b/addons/help/$PBOPREFIX$ new file mode 100644 index 0000000..16d68ca --- /dev/null +++ b/addons/help/$PBOPREFIX$ @@ -0,0 +1 @@ +z\afwg\addons\help \ No newline at end of file diff --git a/addons/help/CfgEventHandlers.hpp b/addons/help/CfgEventHandlers.hpp new file mode 100644 index 0000000..e5bcd3c --- /dev/null +++ b/addons/help/CfgEventHandlers.hpp @@ -0,0 +1,21 @@ +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); + }; +}; +class Extended_PreInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); + }; +}; +class Extended_PostInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); + }; +}; + +class Extended_DisplayLoad_EventHandlers { + class RscUnitInfo { + MDL_Wargay = QUOTE(call FUNC(initHitpointsDisplay)); + }; +}; diff --git a/addons/help/CfgHintCategories.hpp b/addons/help/CfgHintCategories.hpp new file mode 100644 index 0000000..8ac3a18 --- /dev/null +++ b/addons/help/CfgHintCategories.hpp @@ -0,0 +1,7 @@ +class CfgHintCategories +{ + class AFWG_help + { + displayName = ECSTRING(main,DisplayName); + }; +}; diff --git a/addons/help/CfgHints.hpp b/addons/help/CfgHints.hpp new file mode 100644 index 0000000..76126ee --- /dev/null +++ b/addons/help/CfgHints.hpp @@ -0,0 +1,143 @@ +class CfgHints +{ + class GVAR(concepts) + { + category = "AFWG_help"; + displayName = "Concepts"; + + class Spotting + { + displayName = "Spotting enemy units"; + displayNameShort = "Spotting"; + description = "Press %11 to spot enemy unit when aiming at it."; + tip = ""; + arguments[] = { + {{ "revealTarget" }} + }; + }; + + class UnitInfo + { + displayName = "Showing unit information"; + displayNameShort = "Unit info"; + description = "Press %11 when aiming at a unit to show its unit card in a hint."; + tip = "Use unit card to judge danger that enemy unit poses."; + arguments[] = { + { "TAB" } + }; + }; + + // class Vehicles + // { + // displayName = "Vehicles"; + // }; + }; + + class GVAR(damage) + { + category = "AFWG_help"; + displayName = "Damage"; + + class Armor + { + displayName = "Armor (AV) System"; + description = "Armor (AV) is resistance of a vehicle to the damage. It might be different for different sides of the vehicle.%1 + Small arms can shred through 0 AV.%1 + 1 AV is enough to be safe from small arms fire (although crew can still be killed if there are windows!).%1 + As a rule of thumb, 2 AV from all sides makes vehicle relatively safe from several HE hits nearby. Strong top armor makes vehicle more resistant to artillery (especially cluster).%1 + Due to technical limitations, hit armor direction is determined using relative hull orientation. This means that if a tank has the turret aiming backwards and gets hit in rear turret armor, the front armor is getting hit (rather than rear)."; + tip = "Armor values are always shown as [FRONT/SIDE/REAR/TOP]"; + }; + + class Damage + { + displayName = "Damage System"; + description = "Default arma damage system is turned off (except for collisions!) and replaced with Wargame-like system, where vehicles are either destroyed or not (no track or turret damage). This means even vehicle with 1 HP is as deadly as with 10 HP."; + tip = "There are 3 different damage types: KE (Kinetic Energy), HE (High Explosive) and HEAT (High Explosive Anti Tank)"; + }; + + class DamageHE + { + displayName = "Damage (HE)"; + description = "All explosions are treated as HE damage, dealing decreased damage the further it is from the target. For every 1 HE damage of a weapon, target receives damage respectively to AV being hit. + %1%2Below 2 AV - full damage. + %1%2For 2 AV - 0.4 damage + %1%2For 3 AV - 0.3 damage + %1%2For 4 AV - 0.2 damage + %1%2For 5 AV - 0.15 damage + %1%2Up to 7 AV - 0.1 damage + %1%2Up to 13 AV - 0.05 damage + %1%2Above 14 AV - 0.01 damage"; + tip = "While damage values might be much smaller, it almost always deals some damage. This makes rapid firing vehicles really dangerous flankers."; + }; + + class DamageHEAT + { + displayName = "Damage (HEAT)"; + description = "Weapons with tandem warheads are treated as HEAT damage, always having the same damage potential. Damage dealt increases by 0.5 for every 1 potential damage above target AV. Over 10 difference and it increases by 1 for every difference from armor value."; + tip = "HEAT weapons deal consistent damage no matter the distance to the target. Moreover HEAT always deals at least 1 damage, even if armor cannot be penetrated."; + }; + + class DamageKE + { + displayName = "Damage (KE)"; + description = "APFSDS and similar are treated as KE (or AP) damage, which damage potential depends on distance to the target. Damage dealt increases by 0.5 for every 1 potential damage above target AV."; + tip = "The closer you are to the target, the more power your shell has. It can sometimes penetrate and damage multiple targets."; + }; + + class Hitpoints + { + displayName = "Hitpoints"; + description = ""; + tip = "Some vehicles might have less than 10 hitpoints, which makes them extra vulnerable."; + }; + }; + + class GVAR(logisics) + { + category = "AFWG_help"; + displayName = "Logistics"; + + class Rearm + { + + }; + + class Refuel + { + + }; + + class Repair + { + + }; + }; + + class GVAR(vehicleTypes) + { + category = "AFWG_help"; + displayName = "Unit Classes"; + + class Logistics + { + displayName = "Logistics"; + displayNameShort = "LOG"; + description = "Various command vehicles (CV) and logistic vehicles are available."; + }; + + class Infantry + { + displayName = "Infantry"; + displayNameShort = "INF"; + description = "Just some meat, in this mod there's nothing special about it. Shouldn't be ignored though, their AT weapons can surprise you."; + }; + + class Tanks + { + displayName = "Tanks"; + displayNameShort = "TNK"; + description = "Main force of the battlefield, but can easily end up in tough situations."; + }; + }; +}; diff --git a/addons/help/XEH_PREP.hpp b/addons/help/XEH_PREP.hpp new file mode 100644 index 0000000..e69de29 diff --git a/addons/help/XEH_postInit.sqf b/addons/help/XEH_postInit.sqf new file mode 100644 index 0000000..421c54b --- /dev/null +++ b/addons/help/XEH_postInit.sqf @@ -0,0 +1 @@ +#include "script_component.hpp" diff --git a/addons/help/XEH_preInit.sqf b/addons/help/XEH_preInit.sqf new file mode 100644 index 0000000..6706cf8 --- /dev/null +++ b/addons/help/XEH_preInit.sqf @@ -0,0 +1,10 @@ +#include "script_component.hpp" +ADDON = false; + +PREP_RECOMPILE_START; +#include "XEH_PREP.hpp" +PREP_RECOMPILE_END; + +#include "initSettings.inc.sqf" + +ADDON = true; diff --git a/addons/help/XEH_preStart.sqf b/addons/help/XEH_preStart.sqf new file mode 100644 index 0000000..a51262a --- /dev/null +++ b/addons/help/XEH_preStart.sqf @@ -0,0 +1,2 @@ +#include "script_component.hpp" +#include "XEH_PREP.hpp" diff --git a/addons/help/config.cpp b/addons/help/config.cpp new file mode 100644 index 0000000..ae6d826 --- /dev/null +++ b/addons/help/config.cpp @@ -0,0 +1,19 @@ +#include "script_component.hpp" + +class CfgPatches { + class ADDON { + name = COMPONENT_NAME; + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = { + "afwg_common" + }; + author = "ArmaForces"; + VERSION_CONFIG; + }; +}; + +#include "CfgEventHandlers.hpp" +#include "CfgHintCategories.hpp" +#include "CfgHints.hpp" diff --git a/addons/help/initSettings.inc.sqf b/addons/help/initSettings.inc.sqf new file mode 100644 index 0000000..e184efd --- /dev/null +++ b/addons/help/initSettings.inc.sqf @@ -0,0 +1,8 @@ +[ + QGVAR(enableHints), + "CHECKBOX", + ["Enable hints", "Controls whether mod-related hints should be shown even if turned off in game settings"], + [LSTRING(DisplayName)], + true, + false +] call CBA_fnc_addSetting; diff --git a/addons/help/script_component.hpp b/addons/help/script_component.hpp new file mode 100644 index 0000000..cdc5a3d --- /dev/null +++ b/addons/help/script_component.hpp @@ -0,0 +1,14 @@ +#define COMPONENT help +#include "\z\afwg\addons\main\script_mod.hpp" + +// #define DEBUG_MODE_FULL +// #define DISABLE_COMPILE_CACHE + +#ifdef DEBUG_ENABLED_HELP + #define DEBUG_MODE_FULL +#endif + #ifdef DEBUG_SETTINGS_HELP + #define DEBUG_SETTINGS DEBUG_SETTINGS_HELP +#endif + +#include "\z\afwg\addons\main\script_macros.hpp" diff --git a/addons/help/stringtable.xml b/addons/help/stringtable.xml new file mode 100644 index 0000000..6406377 --- /dev/null +++ b/addons/help/stringtable.xml @@ -0,0 +1,17 @@ + + + + + ArmaForces Wargame - Help + ArmaForces Wargame - Help + + + Enable component + Włącz komponent + + + Controls whether this component is active. + Pozwala kontrolować czy komponent jest włączony. + + + From 90798a5b345f3a7dd3c32c41cfb6355efc7d4675 Mon Sep 17 00:00:00 2001 From: 3Mydlo3 Date: Wed, 18 Dec 2024 18:34:30 +0100 Subject: [PATCH 36/47] Missing script_component --- addons/help/functions/script_component.hpp | 1 + 1 file changed, 1 insertion(+) create mode 100644 addons/help/functions/script_component.hpp diff --git a/addons/help/functions/script_component.hpp b/addons/help/functions/script_component.hpp new file mode 100644 index 0000000..ed37ac7 --- /dev/null +++ b/addons/help/functions/script_component.hpp @@ -0,0 +1 @@ +#include "\z\afwg\addons\help\script_component.hpp" From c9a2230bab364e7fbafd9d8b3f9bf56c8b70032b Mon Sep 17 00:00:00 2001 From: 3Mydlo3 Date: Wed, 18 Dec 2024 18:34:49 +0100 Subject: [PATCH 37/47] Disable isTest by default --- addons/init/XEH_postInit.sqf | 5 ++++- addons/main/stringtable.xml | 20 ++++++++------------ 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/addons/init/XEH_postInit.sqf b/addons/init/XEH_postInit.sqf index 134ec39..7f7068e 100644 --- a/addons/init/XEH_postInit.sqf +++ b/addons/init/XEH_postInit.sqf @@ -1,6 +1,9 @@ #include "script_component.hpp" -GVAR(isTest) = true; +// Allow mission init to specify whether is it test run or not. +if (isNil QGVAR(isTest)) then { + GVAR(isTest) = false; +}; AmmoTypes = createHashMapFromArray ("true" configClasses (configFile >> "CfgWargay" >> "Ammo") diff --git a/addons/main/stringtable.xml b/addons/main/stringtable.xml index ac4d8dd..027ca2f 100644 --- a/addons/main/stringtable.xml +++ b/addons/main/stringtable.xml @@ -1,23 +1,19 @@ - - Mydlana Kampania Wargay - Mydlana Kampania Wargay - - - Mydlana Kampania Wargay - Client - Mydlana Kampania Wargay - Klient - - ArmaForces Wargame Attributes - Atrybuty Wargame ArmaForces + Arma Wargame Attributes + Atrybuty Arma Wargame - ArmaForces Wargame + Armas Wargame + + + Arma Wargame + Arma Wargame - ArmaForces Wargame + Arma Wargame Wiki From fa774cf364d2ec96a7d9a07627e426850c0e30f0 Mon Sep 17 00:00:00 2001 From: 3Mydlo3 Date: Wed, 18 Dec 2024 18:55:43 +0100 Subject: [PATCH 38/47] Fix kills not yielding experience --- addons/damage/functions/fnc_applyDamage.sqf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/damage/functions/fnc_applyDamage.sqf b/addons/damage/functions/fnc_applyDamage.sqf index 4fd3f91..2adb3a4 100644 --- a/addons/damage/functions/fnc_applyDamage.sqf +++ b/addons/damage/functions/fnc_applyDamage.sqf @@ -24,7 +24,7 @@ if (_newHp <= 0) exitWith { // Add experience for players first if (isPlayer _shooter) then { if ([side _shooter, side _unit] call BIS_fnc_sideIsEnemy) then { - [_shooter, _unit] call FUNC(addExperienceForKill); + [_shooter, _unit] call EFUNC(stats,addExperienceForKill); } else { // TODO: Handle friendly-fire // TODO: Consider removing XP for damaging friendly units too From 3aa4b21edaad38e4e13e962ad7b1788ae10a1527 Mon Sep 17 00:00:00 2001 From: 3Mydlo3 Date: Wed, 18 Dec 2024 18:56:18 +0100 Subject: [PATCH 39/47] Bump version 0.1.1 --- addons/main/script_version.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/main/script_version.hpp b/addons/main/script_version.hpp index 9859d34..e93dced 100644 --- a/addons/main/script_version.hpp +++ b/addons/main/script_version.hpp @@ -1,3 +1,3 @@ #define MAJOR 0 #define MINOR 1 -#define PATCH 0 +#define PATCH 1 From 5a6fece705c2e47edb5fdd16c41dd1bc6ba35c58 Mon Sep 17 00:00:00 2001 From: 3Mydlo3 Date: Wed, 18 Dec 2024 21:46:49 +0100 Subject: [PATCH 40/47] Fix logistic functions --- addons/rearm/functions/fnc_canRearm.sqf | 2 +- addons/refuel/functions/fnc_canRefuel.sqf | 2 +- addons/repair/functions/fnc_canRepair.sqf | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/rearm/functions/fnc_canRearm.sqf b/addons/rearm/functions/fnc_canRearm.sqf index be845c5..37ab29c 100644 --- a/addons/rearm/functions/fnc_canRearm.sqf +++ b/addons/rearm/functions/fnc_canRearm.sqf @@ -15,7 +15,7 @@ params ["_caller", "_target"]; alive _target && { - _caller call FUNC(isEngineer) && { + _caller call EFUNC(common,isEngineer) && { vehicle _caller isEqualTo _caller && { _caller distance _target < 5 && { ((_target getVariable ["MDL_lastCombatActive", -GVAR(repairMinNoCombatTime)]) + GVAR(repairMinNoCombatTime)) < CBA_missionTime diff --git a/addons/refuel/functions/fnc_canRefuel.sqf b/addons/refuel/functions/fnc_canRefuel.sqf index 6c3b7a9..dc376a3 100644 --- a/addons/refuel/functions/fnc_canRefuel.sqf +++ b/addons/refuel/functions/fnc_canRefuel.sqf @@ -15,7 +15,7 @@ params ["_caller", "_target"]; alive _target && { - _caller call FUNC(isEngineer) && { + _caller call EFUNC(common,isEngineer) && { vehicle _caller isEqualTo _caller && { _caller distance _target < 5 && { fuel _target < 1 && { diff --git a/addons/repair/functions/fnc_canRepair.sqf b/addons/repair/functions/fnc_canRepair.sqf index a0f560b..f405a8d 100644 --- a/addons/repair/functions/fnc_canRepair.sqf +++ b/addons/repair/functions/fnc_canRepair.sqf @@ -15,7 +15,7 @@ params ["_caller", "_target"]; alive _target && { - _caller call FUNC(isEngineer) && { + _caller call EFUNC(common,isEngineer) && { vehicle _caller isEqualTo _caller && { _caller distance _target < 5 && { (_target getVariable ['MDL_currentHp', 0]) < (_target getVariable ['MDL_maxHp', 0]) && { From fbd173652bcb17349b2a35439108327fbc12539d Mon Sep 17 00:00:00 2001 From: 3Mydlo3 Date: Wed, 18 Dec 2024 22:18:56 +0100 Subject: [PATCH 41/47] Fix return types --- addons/debug/functions/fnc_drawHitDebug.sqf | 2 ++ addons/debug/functions/fnc_initDebug.sqf | 2 ++ addons/hud/functions/fnc_currentHpString.sqf | 2 +- addons/icons/functions/fnc_getIconPath.sqf | 2 +- addons/markers/functions/fnc_createVehicleMarker.sqf | 6 +++--- addons/stats/functions/fnc_getPlayerStats.sqf | 2 +- addons/stats/functions/fnc_saveAllStats.sqf | 2 +- 7 files changed, 11 insertions(+), 7 deletions(-) diff --git a/addons/debug/functions/fnc_drawHitDebug.sqf b/addons/debug/functions/fnc_drawHitDebug.sqf index c78b422..37d7749 100644 --- a/addons/debug/functions/fnc_drawHitDebug.sqf +++ b/addons/debug/functions/fnc_drawHitDebug.sqf @@ -36,3 +36,5 @@ drawLine3D [_position, _position vectorAdd vectorNormalized _vector, [0,1,1,1]]; } forEach TargetDirVectors; #endif + +nil diff --git a/addons/debug/functions/fnc_initDebug.sqf b/addons/debug/functions/fnc_initDebug.sqf index efc39a1..4088174 100644 --- a/addons/debug/functions/fnc_initDebug.sqf +++ b/addons/debug/functions/fnc_initDebug.sqf @@ -20,3 +20,5 @@ ProjectileRelPosVectors = []; SurfaceVectors = []; VelocityVectors = []; #endif + +nil diff --git a/addons/hud/functions/fnc_currentHpString.sqf b/addons/hud/functions/fnc_currentHpString.sqf index 9072301..9009e07 100644 --- a/addons/hud/functions/fnc_currentHpString.sqf +++ b/addons/hud/functions/fnc_currentHpString.sqf @@ -9,7 +9,7 @@ * 1: Optional character for non-damaged squares * * Return Value: - * None + * Stringified HP boxes display * * Public: No */ diff --git a/addons/icons/functions/fnc_getIconPath.sqf b/addons/icons/functions/fnc_getIconPath.sqf index d65f1bb..c6b443a 100644 --- a/addons/icons/functions/fnc_getIconPath.sqf +++ b/addons/icons/functions/fnc_getIconPath.sqf @@ -7,7 +7,7 @@ * 0: Vehicle * * Return Value: - * None + * Path to vehicle icon * * Public: No */ diff --git a/addons/markers/functions/fnc_createVehicleMarker.sqf b/addons/markers/functions/fnc_createVehicleMarker.sqf index 36a1834..a828482 100644 --- a/addons/markers/functions/fnc_createVehicleMarker.sqf +++ b/addons/markers/functions/fnc_createVehicleMarker.sqf @@ -1,13 +1,13 @@ #include "script_component.hpp" /* * Author: 3Mydlo3 - * + * Creates local marker for given vehicle. * * Arguments: - * + * 0: Vehicle to create marker for * * Return Value: - * None + * Name of the created marker * * Public: No */ diff --git a/addons/stats/functions/fnc_getPlayerStats.sqf b/addons/stats/functions/fnc_getPlayerStats.sqf index 8d2decb..b563d81 100644 --- a/addons/stats/functions/fnc_getPlayerStats.sqf +++ b/addons/stats/functions/fnc_getPlayerStats.sqf @@ -8,7 +8,7 @@ * 0: Player UID * * Return Value: - * None + * Map containing player statistics * * Public: No */ diff --git a/addons/stats/functions/fnc_saveAllStats.sqf b/addons/stats/functions/fnc_saveAllStats.sqf index 77758bc..54707de 100644 --- a/addons/stats/functions/fnc_saveAllStats.sqf +++ b/addons/stats/functions/fnc_saveAllStats.sqf @@ -16,4 +16,4 @@ if (GVAR(isTest) || {!isServer}) exitWith {}; -saveProfileNamespace +saveProfileNamespace; From 9534fa0a6183b717459118d9ae8601bb1c72bc22 Mon Sep 17 00:00:00 2001 From: 3Mydlo3 Date: Wed, 18 Dec 2024 22:25:52 +0100 Subject: [PATCH 42/47] Fix actions --- .github/workflows/arma.yml | 15 ++++++++------- .github/workflows/release-drafter.yml | 2 +- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/workflows/arma.yml b/.github/workflows/arma.yml index 74449f3..e7db166 100644 --- a/.github/workflows/arma.yml +++ b/.github/workflows/arma.yml @@ -23,20 +23,21 @@ jobs: - name: Check for BOM uses: arma-actions/bom-check@master - lint: + build-linux: runs-on: ubuntu-latest steps: - name: Checkout the source code - uses: actions/checkout@master - - name: Lint (sqflint) - uses: arma-actions/sqflint@master - continue-on-error: true # No failure due to many false-positives + uses: actions/checkout@v4 + - name: Setup HEMTT + uses: arma-actions/hemtt@v1 + - name: Run HEMTT build + run: hemtt build build: runs-on: windows-2022 steps: - name: Checkout the source code - uses: actions/checkout@master + uses: actions/checkout@v4 - name: Pull Arma3Tools run: | echo ${{ secrets.CR_PAT }} | docker login -u ${{ secrets.CR_USER }} --password-stdin ghcr.io @@ -45,7 +46,7 @@ jobs: run: | docker run -v "$(pwd):c:/workdir" -e CI=$True ghcr.io/armaforces/arma3tools:v2 hemtt release - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v4 with: name: armaforces_wargame path: | diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml index 5e28ae1..59ee3b0 100644 --- a/.github/workflows/release-drafter.yml +++ b/.github/workflows/release-drafter.yml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Release Drafter - if: github.repository == 'ArmaForces/Wargame' + if: github.repository == 'ArmaForces/Arma-Wargame' uses: release-drafter/release-drafter@v5 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From ed5544124f5e221ddd7dbfa88864776b254fbf13 Mon Sep 17 00:00:00 2001 From: 3Mydlo3 Date: Wed, 18 Dec 2024 22:36:14 +0100 Subject: [PATCH 43/47] Update workflows like in Mission Framework --- .github/workflows/arma.yml | 21 +++------------ .github/workflows/release.yml | 51 +++++------------------------------ 2 files changed, 10 insertions(+), 62 deletions(-) diff --git a/.github/workflows/arma.yml b/.github/workflows/arma.yml index e7db166..4a8467b 100644 --- a/.github/workflows/arma.yml +++ b/.github/workflows/arma.yml @@ -32,23 +32,8 @@ jobs: uses: arma-actions/hemtt@v1 - name: Run HEMTT build run: hemtt build - - build: - runs-on: windows-2022 - steps: - - name: Checkout the source code - uses: actions/checkout@v4 - - name: Pull Arma3Tools - run: | - echo ${{ secrets.CR_PAT }} | docker login -u ${{ secrets.CR_USER }} --password-stdin ghcr.io - docker pull ghcr.io/armaforces/arma3tools:v2 - - name: Build using HEMTT - run: | - docker run -v "$(pwd):c:/workdir" -e CI=$True ghcr.io/armaforces/arma3tools:v2 hemtt release - - uses: actions/upload-artifact@v4 with: - name: armaforces_wargame - path: | - releases/*.zip - !releases/afwg-latest.zip + name: afwg_${{ github.sha }}-nobin + path: .hemttout/@* + include-hidden-files: true # Because .hemttout is a hidden directory diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c479ea3..07fb001 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -7,64 +7,27 @@ on: jobs: build_addon: - runs-on: windows-2022 - steps: - - name: Set VERSION env - run: echo VERSION=${GITHUB_REF:11} >> $GITHUB_ENV - - - uses: actions/checkout@v2 - - - name: Pull Arma3Tools - run: | - echo ${{ secrets.CR_PAT }} | docker login -u ${{ secrets.CR_USER }} --password-stdin ghcr.io - docker pull ghcr.io/armaforces/arma3tools:v2 - - - name: Build using HEMTT - run: | - docker run -v "$(pwd):c:/workdir" -e CI=$True ghcr.io/armaforces/arma3tools:v2 hemtt release - - - uses: actions/upload-artifact@v2 - with: - name: hemttout - path: .hemttout/ - if-no-files-found: error - retention-days: 1 - - - uses: actions/upload-artifact@v2 - with: - name: releases - path: releases/ - if-no-files-found: error - retention-days: 7 - - release_addon: runs-on: ubuntu-latest - needs: build_addon steps: + - uses: actions/checkout@v4 - name: Set VERSION env run: echo VERSION=${GITHUB_REF:11} >> $GITHUB_ENV - + - name: Setup HEMTT + uses: arma-actions/hemtt@v1 + - name: Run HEMTT release + run: hemtt release # Upload to GitHub - - uses: actions/download-artifact@v2 - with: - name: releases - path: releases - uses: softprops/action-gh-release@v1 with: files: 'releases/afwg-${{ env.VERSION }}-*.zip' env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - # Upload to Steam Workshop - - uses: actions/download-artifact@v2 - with: - name: hemttout - path: .hemttout - uses: arma-actions/workshop-upload@v1 with: - itemId: '1934142795' # Id of item to update + itemId: '2377030287' # Id of item to update contentPath: '.hemttout/release' - changelog: 'https://github.com/ArmaForces/Wargame/releases/tag/v${{ env.VERSION }}' + changelog: 'https://github.com/ArmaForces/Arma-Wargame/releases/tag/v${{ env.VERSION }}' env: STEAM_USERNAME: ${{ secrets.STEAM_USERNAME }} STEAM_PASSWORD: ${{ secrets.STEAM_PASSWORD }} From 933c710ac0d7e2d37b4bff758c0b0bbd3e64fa40 Mon Sep 17 00:00:00 2001 From: 3Mydlo3 Date: Wed, 18 Dec 2024 22:47:06 +0100 Subject: [PATCH 44/47] Print component_folder_name in stringtable_validator.py --- tools/stringtable_validator.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tools/stringtable_validator.py b/tools/stringtable_validator.py index bfdc162..d5b3fa9 100644 --- a/tools/stringtable_validator.py +++ b/tools/stringtable_validator.py @@ -53,8 +53,11 @@ def check_stringtable(filepath): print(" ERROR: Package name attribute '{}' is all lowercase, should be in titlecase.".format(package_name)) errors += 1 - if package_name.lower() != os.path.basename(os.path.dirname(filepath)): - print(" ERROR: Package name attribute '{}' does not match the component folder name.".format(package_name)) + component_folder_name = os.path.basename(os.path.dirname(filepath)) + + if package_name.lower() != component_folder_name: + # TODO: Check if it might be subaddon + print(" ERROR: Package name attribute '{}' does not match the component folder name '{}'.".format(package_name, component_folder_name)) errors += 1 # Get all keys contained in the stringtable From 38b18cde17ac2b391ee403848a1ae9591ec341d8 Mon Sep 17 00:00:00 2001 From: 3Mydlo3 Date: Wed, 18 Dec 2024 22:56:16 +0100 Subject: [PATCH 45/47] Try to handle subcomponent in stringtable_validator.py --- tools/stringtable_validator.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/stringtable_validator.py b/tools/stringtable_validator.py index d5b3fa9..bde27a6 100644 --- a/tools/stringtable_validator.py +++ b/tools/stringtable_validator.py @@ -57,8 +57,10 @@ def check_stringtable(filepath): if package_name.lower() != component_folder_name: # TODO: Check if it might be subaddon - print(" ERROR: Package name attribute '{}' does not match the component folder name '{}'.".format(package_name, component_folder_name)) - errors += 1 + subcomponent_folder_name = os.path.join(os.path.dirname(os.path.dirname(filepath)), component_folder_name) + if package_name.lower() != subcomponent_folder_name: + print(" ERROR: Package name attribute '{}' does not match any of component folder name '{}' and subcomponent '{}'.".format(package_name, component_folder_name, subcomponent_folder_name)) + errors += 1 # Get all keys contained in the stringtable keys = package.findall("Key") From 5cfd94ac0f1bc3465793264a59efb2a88b12e722 Mon Sep 17 00:00:00 2001 From: 3Mydlo3 Date: Wed, 18 Dec 2024 23:03:32 +0100 Subject: [PATCH 46/47] Maybe this time --- tools/stringtable_validator.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tools/stringtable_validator.py b/tools/stringtable_validator.py index bde27a6..ad61b9a 100644 --- a/tools/stringtable_validator.py +++ b/tools/stringtable_validator.py @@ -57,9 +57,10 @@ def check_stringtable(filepath): if package_name.lower() != component_folder_name: # TODO: Check if it might be subaddon - subcomponent_folder_name = os.path.join(os.path.dirname(os.path.dirname(filepath)), component_folder_name) - if package_name.lower() != subcomponent_folder_name: - print(" ERROR: Package name attribute '{}' does not match any of component folder name '{}' and subcomponent '{}'.".format(package_name, component_folder_name, subcomponent_folder_name)) + parent_component_folder_name = os.path.basename(os.path.dirname(os.path.dirname(filepath))) + subcomponent_name = f"{parent_component_folder_name}_{component_folder_name}" + if package_name.lower() != subcomponent_name: + print(" ERROR: Package name attribute '{}' does not match any of component folder name '{}' and subcomponent '{}'.".format(package_name, component_folder_name, subcomponent_name)) errors += 1 # Get all keys contained in the stringtable From 25d63ed67ca613761aeff306c59641392f1274ce Mon Sep 17 00:00:00 2001 From: 3Mydlo3 Date: Wed, 18 Dec 2024 23:06:08 +0100 Subject: [PATCH 47/47] Add message that subaddon was detected --- tools/stringtable_validator.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/stringtable_validator.py b/tools/stringtable_validator.py index ad61b9a..207f09d 100644 --- a/tools/stringtable_validator.py +++ b/tools/stringtable_validator.py @@ -56,12 +56,13 @@ def check_stringtable(filepath): component_folder_name = os.path.basename(os.path.dirname(filepath)) if package_name.lower() != component_folder_name: - # TODO: Check if it might be subaddon parent_component_folder_name = os.path.basename(os.path.dirname(os.path.dirname(filepath))) subcomponent_name = f"{parent_component_folder_name}_{component_folder_name}" if package_name.lower() != subcomponent_name: print(" ERROR: Package name attribute '{}' does not match any of component folder name '{}' and subcomponent '{}'.".format(package_name, component_folder_name, subcomponent_name)) errors += 1 + else: + print(f" INFO: Detected subaddon '{subcomponent_name}' used in Package name attribute.") # Get all keys contained in the stringtable keys = package.findall("Key")