KillTracker - Add option to filter out AI unit kills (#9800)

* Add option to disable AI kills tracking in Kill Tracker

Add an option to disable tracking of kills of AI units when using ACE Kill Tracker. Configurable through Addon Settings

* Made setting global

* Requested changes

* Omitted optional default params

Co-authored-by: Filip Maciejewski <veteran29@users.noreply.github.com>

* Added missing dot

Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com>

* Added missing dot in Czech translation

* Update addons/killtracker/XEH_preInit.sqf

* Update addons/killtracker/XEH_preInit.sqf

---------

Co-authored-by: Filip Maciejewski <veteran29@users.noreply.github.com>
Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com>
This commit is contained in:
Sotirios Pupakis 2024-02-20 00:53:47 +01:00 committed by GitHub
parent fd5e56ffbc
commit fd7a5004f0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 37 additions and 2 deletions

View File

@ -1,3 +1,9 @@
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));

View File

@ -136,7 +136,9 @@ GVAR(killCount) = 0;
_unitName = format ["*AI* - %1", getText ((configOf _unit) >> "displayName")];
};
};
TRACE_3("send kill event",_killer,_unitName,_killInfo);
[QGVAR(kill), [_unitName, _killInfo], _killer] call CBA_fnc_targetEvent;
if (_unitIsPlayer || GVAR(trackAI)) then {
TRACE_3("send kill event",_killer,_unitName,_killInfo);
[QGVAR(kill), [_unitName, _killInfo], _killer] call CBA_fnc_targetEvent;
};
};
}] call CBA_fnc_addEventHandler;

View File

@ -0,0 +1,7 @@
#include "script_component.hpp"
ADDON = false;
#include "initSettings.inc.sqf"
ADDON = true;

View File

@ -0,0 +1,8 @@
[
QGVAR(trackAI),
"CHECKBOX",
[LSTRING(TrackAI_DisplayName), LSTRING(TrackAI_Description)],
LSTRING(Category),
true,
1
] call CBA_fnc_addSetting;

View File

@ -1,6 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<Project name="ACE">
<Package name="KillTracker">
<Key ID="STR_ACE_KillTracker_Category">
<English>ACE Kill Tracker</English>
<Czech>ACE Kill Tracker</Czech>
</Key>
<Key ID="STR_ACE_KillTracker_Title">
<English>ACE Killed Events</English>
<Japanese>ACE キルトラッカー</Japanese>
@ -86,5 +90,13 @@
<Japanese>同士討ち</Japanese>
<Turkish>Dost Atışı</Turkish>
</Key>
<Key ID="STR_ACE_KillTracker_TrackAI_DisplayName">
<English>Track AI units killed by player</English>
<Czech>Sledovat AI zabité hráči</Czech>
</Key>
<Key ID="STR_ACE_KillTracker_TrackAI_Description">
<English>Defines if killed AIs will be shown in the kill tracker during mission debriefing.</English>
<Czech>Udává zdali se zabité AI budou ukazovat v kill trackeru v průběhu debriefingu po misi.</Czech>
</Key>
</Package>
</Project>