diff --git a/addons/killtracker/CfgEventHandlers.hpp b/addons/killtracker/CfgEventHandlers.hpp index 9cc1b0427b..4300a157b9 100644 --- a/addons/killtracker/CfgEventHandlers.hpp +++ b/addons/killtracker/CfgEventHandlers.hpp @@ -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)); diff --git a/addons/killtracker/XEH_postInit.sqf b/addons/killtracker/XEH_postInit.sqf index 9cef418ece..c5adc26692 100644 --- a/addons/killtracker/XEH_postInit.sqf +++ b/addons/killtracker/XEH_postInit.sqf @@ -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; diff --git a/addons/killtracker/XEH_preInit.sqf b/addons/killtracker/XEH_preInit.sqf new file mode 100644 index 0000000000..7c7b764686 --- /dev/null +++ b/addons/killtracker/XEH_preInit.sqf @@ -0,0 +1,7 @@ +#include "script_component.hpp" + +ADDON = false; + +#include "initSettings.inc.sqf" + +ADDON = true; diff --git a/addons/killtracker/initSettings.inc.sqf b/addons/killtracker/initSettings.inc.sqf new file mode 100644 index 0000000000..ebe1e55ccb --- /dev/null +++ b/addons/killtracker/initSettings.inc.sqf @@ -0,0 +1,8 @@ +[ + QGVAR(trackAI), + "CHECKBOX", + [LSTRING(TrackAI_DisplayName), LSTRING(TrackAI_Description)], + LSTRING(Category), + true, + 1 +] call CBA_fnc_addSetting; diff --git a/addons/killtracker/stringtable.xml b/addons/killtracker/stringtable.xml index 4aa7308924..b4b1f5c2f5 100644 --- a/addons/killtracker/stringtable.xml +++ b/addons/killtracker/stringtable.xml @@ -1,6 +1,10 @@ + + ACE Kill Tracker + ACE Kill Tracker + ACE Killed Events ACE キルトラッカー @@ -86,5 +90,13 @@ 同士討ち Dost Atışı + + Track AI units killed by player + Sledovat AI zabité hráči + + + Defines if killed AIs will be shown in the kill tracker during mission debriefing. + Udává zdali se zabité AI budou ukazovat v kill trackeru v průběhu debriefingu po misi. +