ACE3/addons/arsenal/functions/fnc_statBarStatement_rateOfFIre.sqf
PabstMirror eb53e7a2fe
Tools - document_functions.py: handle header sub indexs for arguments (#9303)
* tools - handle header sub indexs for arguements

* convert remaining

* Update coding-guidelines.md
2023-08-08 22:51:20 -05:00

37 lines
745 B
Plaintext

#include "script_component.hpp"
/*
* Author: Alganthe
* Rate of fire bar statement.
*
* Arguments:
* 0: Not used
* 1: Item config path <CONFIG>
* 2: Args <ARRAY>
* - 0: Stat limits <ARRAY of BOOLS>
* - 1: Bar limits <ARRAY of NUMBERS>
*
* Return Value:
* Number
*
* Public: No
*/
params ["", "_config", "_args"];
_args params ["_statMinMax", "_barLimits"];
private _fireRate = [];
{
private _n = log (getNumber (_config >> _x >> "reloadTime"));
if (!finite _n) then {
_n = 0;
};
_fireRate pushBackUnique _n;
} forEach (getArray (_config >> "modes"));
_fireRate sort true;
linearConversion [_statMinMax select 0, _statMinMax select 1, _fireRate param [0, 0], _barLimits select 0, _barLimits select 1]