2015-01-11 16:42:31 +00:00
|
|
|
/*
|
|
|
|
* Author: commy2
|
2015-09-21 11:08:10 +00:00
|
|
|
* Get the available firing modes of a weapon. Will ignore the AI helper modes.
|
2015-01-11 16:42:31 +00:00
|
|
|
*
|
2015-09-21 11:08:10 +00:00
|
|
|
* Arguments:
|
|
|
|
* 0: Weapon <STRING>
|
2015-01-11 16:42:31 +00:00
|
|
|
*
|
2015-09-21 11:08:10 +00:00
|
|
|
* Return Value:
|
|
|
|
* Firing Modes <ARRAY>
|
2015-01-11 16:42:31 +00:00
|
|
|
*
|
2015-09-21 11:08:10 +00:00
|
|
|
* Public: Yes
|
2015-01-11 16:42:31 +00:00
|
|
|
*/
|
2015-01-17 17:26:51 +00:00
|
|
|
#include "script_component.hpp"
|
2015-01-11 16:42:31 +00:00
|
|
|
|
2015-12-12 15:48:54 +00:00
|
|
|
params [["_weapon", "", [""]]];
|
2015-01-11 16:42:31 +00:00
|
|
|
|
2015-12-12 15:48:54 +00:00
|
|
|
private _config = configFile >> "CfgWeapons" >> _weapon;
|
2015-09-21 11:08:10 +00:00
|
|
|
|
2015-12-12 15:48:54 +00:00
|
|
|
private _modes = [];
|
2015-09-21 11:08:10 +00:00
|
|
|
|
2015-01-11 16:42:31 +00:00
|
|
|
{
|
2015-09-21 11:08:10 +00:00
|
|
|
if (getNumber (_config >> _x >> "showToPlayer") == 1) then {
|
2015-01-17 17:26:51 +00:00
|
|
|
_modes pushBack _x;
|
|
|
|
};
|
|
|
|
|
|
|
|
if (_x == "this") then {
|
|
|
|
_modes pushBack _weapon;
|
|
|
|
};
|
2015-09-21 11:08:10 +00:00
|
|
|
false
|
|
|
|
} count getArray (_config >> "modes");
|
2015-01-17 17:26:51 +00:00
|
|
|
|
2015-01-11 16:42:31 +00:00
|
|
|
_modes
|