mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
99df791c43
* Arsenal - Add grenade fuse time stat * Add German translation Co-authored-by: Jo David <github@jonathandavid.de> * Add French translations Co-authored-by: Elgin675 <elgin675@hotmail.com> * Improve IR grenades handling Co-authored-by: PabstMirror <pabstmirror@gmail.com> * Get ammo config once Co-authored-by: Jo David <github@jonathandavid.de> Co-authored-by: Elgin675 <elgin675@hotmail.com> Co-authored-by: PabstMirror <pabstmirror@gmail.com>
34 lines
764 B
Plaintext
34 lines
764 B
Plaintext
#include "script_component.hpp"
|
|
/*
|
|
* Author: mharis001
|
|
* Text statement for the explosion time stat.
|
|
*
|
|
* Arguments:
|
|
* 0: Stats Array (not used) <ARRAY>
|
|
* 1: Item Config <CONFIG>
|
|
*
|
|
* Return Value:
|
|
* Stat Text <STRING>
|
|
*
|
|
* Example:
|
|
* [_stats, _config] call ace_arsenal_fnc_statTextStatement_explosionTime
|
|
*
|
|
* Public: No
|
|
*/
|
|
|
|
params ["", "_config"];
|
|
|
|
private _ammoConfig = configFile >> "CfgAmmo" >> getText (_config >> "ammo");
|
|
private _timeToLive = getNumber (_ammoConfig >> "timeToLive");
|
|
private _explosionTime = getNumber (_ammoConfig >> "explosionTime");
|
|
|
|
if (_explosionTime > _timeToLive) exitWith {
|
|
"-" // Handle IR grenades
|
|
};
|
|
|
|
if (_explosionTime == -1) exitWith {
|
|
localize LSTRING(DetonatesOnImpact)
|
|
};
|
|
|
|
format ["%1s", _explosionTime]
|