ACE3/addons/reloadlaunchers/XEH_postInit.sqf
johnb432 b90d0379ca
Reload Launcher - Improve various aspects (#9335)
* Add notifications to reloadLauncher

- Add notifications to reloadLauncher
- Also set _reloadTime to `magazineReloadTime min 2.5` instead of just 2.5 if there is no `buddyReloadTime` set

* Change message format

* Add setting displayStatusText for reloadLaunchers

* reloadlauncher improvements

* Comments

* Updated so it's similar to reload addon

* Added failure message

* Update addons/reloadlaunchers/functions/fnc_reloadLauncher.sqf

Co-authored-by: PabstMirror <pabstmirror@gmail.com>

* Changed reload conditions

* Tweaked notifications

---------

Co-authored-by: Drofseh <Drofseh@users.noreply.github.com>
Co-authored-by: PabstMirror <pabstmirror@gmail.com>
2023-08-28 15:14:45 -03:00

27 lines
946 B
Plaintext

// by commy2
#include "script_component.hpp"
[QGVAR(reloadStarted), {
params ["_unit", "_target"];
// Don't show notification if target is local AI
if (GVAR(displayStatusText) && {!local _unit} && {_target call EFUNC(common,isPlayer)}) then {
private _message = format [LLSTRING(LoadingStarted), _unit call EFUNC(common,getName)];
[_message] call EFUNC(common,displayTextStructured);
};
}] call CBA_fnc_addEventHandler;
[QGVAR(reloadAborted), {
params ["_unit", "_target"];
// Don't show notification if target is local AI
if (GVAR(displayStatusText) && {!local _unit} && {_target call EFUNC(common,isPlayer)}) then {
private _message = format [LLSTRING(LoadingAborted), _unit call EFUNC(common,getName)];
[_message] call EFUNC(common,displayTextStructured);
};
}] call CBA_fnc_addEventHandler;
[QGVAR(reloadLauncher), LINKFUNC(reloadLauncher)] call CBA_fnc_addEventHandler;