diff --git a/addons/firesupport/Stringtable.xml b/addons/firesupport/Stringtable.xml index 7c72d59..ce8cb0c 100644 --- a/addons/firesupport/Stringtable.xml +++ b/addons/firesupport/Stringtable.xml @@ -987,5 +987,55 @@ Create marker to map. + + + No gun selected + No gun selected + No gun selected + No gun selected + No gun selected + No gun selected + No gun selected + No gun selected + No gun selected + No gun selected + + + No ammo selected + No ammo selected + No ammo selected + No ammo selected + No ammo selected + No ammo selected + No ammo selected + No ammo selected + No ammo selected + No ammo selected + + + Gun is bussy + Gun is bussy + Gun is bussy + Gun is bussy + Gun is bussy + Gun is bussy + Gun is bussy + Gun is bussy + Gun is bussy + Gun is bussy + + + Shell count is 0 + Shell count is 0 + Shell count is 0 + Shell count is 0 + Shell count is 0 + Shell count is 0 + Shell count is 0 + Shell count is 0 + Shell count is 0 + Shell count is 0 + + \ No newline at end of file diff --git a/addons/firesupport/functions/fnc_fire.sqf b/addons/firesupport/functions/fnc_fire.sqf index b134f54..be502db 100644 --- a/addons/firesupport/functions/fnc_fire.sqf +++ b/addons/firesupport/functions/fnc_fire.sqf @@ -22,7 +22,14 @@ if ( (ctrlText STATUS_IDC) in ["CANT FIRE", "Out of Range", "Out of Ammo", "Busy"] ) exitWith { hintSilent (ctrlText STATUS_IDC); - playSound "zoom_fail"; + playSound "3DEN_notificationWarning"; +}; + +private _index = lbCurSel ARTY_LIST_IDC; +//No gun selected +if (_index == -1) exitWith { + playSound "3DEN_notificationWarning"; + hintSilent localize "STR_tun_firesupport_NoGunSelected"; }; private _variables = switch (playerSide) do { @@ -48,11 +55,23 @@ private _variables = switch (playerSide) do { }; }; -private _index = lbCurSel ARTY_LIST_IDC; private _gun_module = _variables select _index; +//Gun is firing +if (_gun_module getVariable [QGVAR(is_firing), false]) exitWith { + playSound "3DEN_notificationWarning"; + hintSilent localize "STR_tun_firesupport_AlreadyFiring"; +}; + +private _ammoIndex = lbCurSel AMMO_TYPE_IDC; +//No ammo selected +if (_ammoIndex == -1) exitWith { + playSound "3DEN_notificationWarning"; + hintSilent localize "STR_tun_firesupport_NoAmmoSelected"; +}; + private _easting = ctrlText EASTING_IDC; private _northing = ctrlText NORTHING_IDC; -private _type = lbData [AMMO_TYPE_IDC, lbCurSel AMMO_TYPE_IDC]; +private _type = lbData [AMMO_TYPE_IDC, _ammoIndex]; private _count = parseNumber ctrlText COUNT_IDC; private _range = parseNumber ctrlText RANGE_IDC; private _delay = parseNumber ctrlText DELAY_IDC; @@ -62,6 +81,7 @@ private _firing_style = lbText [FIRING_TYPE_IDC,lbCurSel FIRING_TYPE_IDC]; if ( _count <= 0 ) exitWith { playSound "3DEN_notificationWarning"; + hintSilent localize "STR_tun_firesupport_NoShells"; }; _gun_module setVariable [QGVAR(is_firing), true]; diff --git a/addons/firesupport/script_component.hpp b/addons/firesupport/script_component.hpp index b7844d7..ae011f3 100644 --- a/addons/firesupport/script_component.hpp +++ b/addons/firesupport/script_component.hpp @@ -3,8 +3,8 @@ #define MAJOR 1 #define MINOR 0 -#define PATCHLVL 0 -#define BUILD 08022021 +#define PATCHLVL 1 +#define BUILD 22022021 #define VERSION MAJOR.MINOR.PATCHLVL.BUILD #define VERSION_AR MAJOR,MINOR,PATCHLVL,BUILD