mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
b90d0379ca
* 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>
27 lines
946 B
Plaintext
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;
|