Explosives - Use full magazine name in interaction menu (#10192)

* Force better names in explosives placing menu

* Revert "Force better names in explosives placing menu"

This reverts commit 29af35ae8b.

* Use `displayName` instead of `displayNameShort`
This commit is contained in:
johnb432 2024-08-17 09:30:32 +02:00 committed by GitHub
parent 8e2398d7cc
commit e5178fe6fd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 14 deletions

View File

@ -119,11 +119,7 @@ if (_detonator != "ACE_DeadManSwitch") then {
if (_connectedInventoryExplosive != "") then {
//Add the disconnect action
private _magConfig = configFile >> "CfgMagazines" >> _connectedInventoryExplosive;
private _name = if ((getText (_magConfig >> "displayNameShort")) != "") then {
getText (_magConfig >> "displayNameShort")
} else {
getText(_magConfig >> "displayName")
};
private _name = getText (_magConfig >> "displayName");
private _picture = getText (_magConfig >> "picture");
_children pushBack [
@ -152,11 +148,7 @@ if (_detonator != "ACE_DeadManSwitch") then {
private _magConfig = configFile >> "CfgMagazines" >> _mag;
private _supportedTriggers = getArray (_magConfig >> "ACE_Triggers" >> "SupportedTriggers");
if (({_x == "DeadmanSwitch"} count _supportedTriggers) == 1) then { //case insensitive search
private _name = if ((getText (_magConfig >> "displayNameShort")) != "") then {
getText (_magConfig >> "displayNameShort")
} else {
getText(_magConfig >> "displayName")
};
private _name = getText (_magConfig >> "displayName");
private _picture = getText (_magConfig >> "picture");
_children pushBack [

View File

@ -27,11 +27,8 @@
{
private _config = _cfgMagazines >> _x;
if (getNumber (_config >> QGVAR(Placeable)) == 1) then {
private _name = getText (_config >> "displayNameShort");
private _name = getText (_config >> "displayName");
private _picture = getText (_config >> "picture");
if (_name isEqualTo "") then {
_name = getText (_config >> "displayName");
};
private _action = [_x, format ["%1 (%2)", _name, _totalCount - count (_magazines - [_x])], _picture, {[{_this call FUNC(setupExplosive)}, _this] call CBA_fnc_execNextFrame}, {true}, {}, _x] call EFUNC(interact_menu,createAction);
_actions pushBack [_action, [], _player];