Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arsenal - Add grenade fuse time stat #7694

Merged
merged 5 commits into from
Jun 8, 2020
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion addons/arsenal/ACE_Arsenal_Stats.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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}};
};
};
1 change: 1 addition & 0 deletions addons/arsenal/XEH_PREP.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
27 changes: 27 additions & 0 deletions addons/arsenal/functions/fnc_statTextStatement_explosionTime.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#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 _explosionTime = getNumber (configFile >> "CfgAmmo" >> getText (_config >> "ammo") >> "explosionTime");
mharis001 marked this conversation as resolved.
Show resolved Hide resolved

if (_explosionTime == -1) exitWith {
localize LSTRING(DetonatesOnImpact)
};

format ["%1s", _explosionTime]
7 changes: 7 additions & 0 deletions addons/arsenal/stringtable.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1189,5 +1189,12 @@
<Chinese>有效時間</Chinese>
<Czech>Time to live</Czech>
</Key>
<Key ID="STR_ACE_Arsenal_StatExplosionTime">
<English>Fuse Time</English>
mharis001 marked this conversation as resolved.
Show resolved Hide resolved
</Key>
<Key ID="STR_ACE_Arsenal_DetonatesOnImpact">
<English>Detonates on impact</English>
mharis001 marked this conversation as resolved.
Show resolved Hide resolved
<German>Aufschlagzünder</German>
mharis001 marked this conversation as resolved.
Show resolved Hide resolved
</Key>
</Package>
</Project>