mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Arsenal - Add grenade fuse time stat (#7694)
* 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>
This commit is contained in:
parent
e25b02263a
commit
99df791c43
@ -115,8 +115,17 @@ class GVAR(stats) {
|
||||
stats[] = {"ammo"};
|
||||
displayName = CSTRING(statTTL);
|
||||
showText = 1;
|
||||
textStatement= QUOTE(call FUNC(statTextStatement_smokeChemTTL));
|
||||
textStatement = QUOTE(call FUNC(statTextStatement_smokeChemTTL));
|
||||
condition = QUOTE((configName (_this select 1)) isKindOf [ARR_2('smokeShell', configFile >> 'CfgMagazines')]);
|
||||
tabs[] = {{}, {5}};
|
||||
};
|
||||
class ACE_explosionTime: statBase {
|
||||
scope = 2;
|
||||
priority = 3;
|
||||
displayName = CSTRING(StatExplosionTime);
|
||||
showText = 1;
|
||||
textStatement = QUOTE(call FUNC(statTextStatement_explosionTime));
|
||||
condition = QUOTE(true);
|
||||
tabs[] = {{}, {5}};
|
||||
};
|
||||
};
|
||||
|
@ -64,6 +64,7 @@ PREP(statBarStatement_default);
|
||||
PREP(statBarStatement_impact);
|
||||
PREP(statBarStatement_rateOfFIre);
|
||||
PREP(statTextStatement_accuracy);
|
||||
PREP(statTextStatement_explosionTime);
|
||||
PREP(statTextStatement_mass);
|
||||
PREP(statTextStatement_rateOfFire);
|
||||
PREP(statTextStatement_scopeMag);
|
||||
|
@ -0,0 +1,33 @@
|
||||
#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]
|
@ -1319,5 +1319,14 @@
|
||||
<Czech>Time to live</Czech>
|
||||
<Turkish>Bitme Süresi</Turkish>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Arsenal_StatExplosionTime">
|
||||
<English>Fuse Time</English>
|
||||
<French>Retard avant détonation</French>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Arsenal_DetonatesOnImpact">
|
||||
<English>Detonates on impact</English>
|
||||
<German>Aufschlagzünder</German>
|
||||
<French>Détonation à l'impact</French>
|
||||
</Key>
|
||||
</Package>
|
||||
</Project>
|
||||
|
Loading…
Reference in New Issue
Block a user