mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Renamed functions to be more inline with their purpose.
Removed legacy code.
This commit is contained in:
parent
c020128f0e
commit
7d5555a2e0
@ -6,7 +6,7 @@ class CfgVehicles {
|
||||
displayName = $STR_ACE_Explosives_Menu;
|
||||
condition = QUOTE(!(_player getVariable [ARR_2('ace_explosives_PlantingExplosive',false)]));
|
||||
statement = "";
|
||||
exceptions[] = {"isNotSwimming"};
|
||||
exceptions[] = {"isNotSwimming", "isNotInside"};
|
||||
showDisabled = 1;
|
||||
priority = 4;
|
||||
icon = PATHTOF(UI\Explosives_Menu_ca.paa);
|
||||
@ -16,8 +16,8 @@ class CfgVehicles {
|
||||
displayName = $STR_ACE_Explosives_Detonate;
|
||||
condition = QUOTE([_player] call FUNC(canDetonate));
|
||||
statement = "";
|
||||
insertChildren = QUOTE([_player] call FUNC(openTransmitterUI););
|
||||
exceptions[] = {"isNotSwimming"};
|
||||
insertChildren = QUOTE([_player] call FUNC(addTransmitterActions););
|
||||
exceptions[] = {"isNotSwimming", "isNotInside"};
|
||||
showDisabled = 1;
|
||||
icon = PATHTOF(UI\Explosives_Menu_ca.paa);
|
||||
priority = 2;
|
||||
@ -38,7 +38,7 @@ class CfgVehicles {
|
||||
displayName = $STR_ACE_Explosives_cellphone_displayName;
|
||||
condition = "('ACE_Cellphone' in (items ace_player))";
|
||||
statement = "closeDialog 0;createDialog 'Rsc_ACE_PhoneInterface';";
|
||||
exceptions[] = {"isNotSwimming"};
|
||||
exceptions[] = {"isNotSwimming", "isNotInside"};
|
||||
showDisabled = 0;
|
||||
icon = PATHTOF(Data\UI\Cellphone_UI.paa);
|
||||
priority = 0.8;
|
||||
@ -101,7 +101,7 @@ class CfgVehicles {
|
||||
distance = 4;
|
||||
condition = "true";
|
||||
statement = "";
|
||||
insertChildren = QUOTE([ARR_3(_target getVariable QUOTE(QGVAR(class)),_target,_player)] call FUNC(openTriggerSelectionUI););
|
||||
insertChildren = QUOTE([ARR_3(_target getVariable QUOTE(QGVAR(class)),_target,_player)] call FUNC(addTriggerActions););
|
||||
showDisabled = 0;
|
||||
exceptions[] = {};
|
||||
priority = 5;
|
||||
|
@ -19,8 +19,11 @@ ADDON = false;
|
||||
|
||||
PREP(addCellphoneIED);
|
||||
PREP(addClacker);
|
||||
PREP(addDetonateActions);
|
||||
PREP(addExplosiveActions);
|
||||
PREP(addToSpeedDial);
|
||||
PREP(addTransmitterActions);
|
||||
PREP(addTriggerActions);
|
||||
PREP(canDefuse);
|
||||
PREP(canDetonate);
|
||||
PREP(defuseExplosive);
|
||||
@ -39,10 +42,7 @@ PREP(getSpeedDialExplosive);
|
||||
|
||||
PREP(onLanded);
|
||||
|
||||
PREP(openDetonateUI);
|
||||
PREP(openTransmitterUI);
|
||||
PREP(openTimerSetUI);
|
||||
PREP(openTriggerSelectionUI);
|
||||
|
||||
PREP(place_Approve);
|
||||
PREP(place_Cancel);
|
||||
|
@ -5,7 +5,7 @@ class CfgPatches {
|
||||
units[] = {};
|
||||
weapons[] = {"ACE_Clacker", "ACE_DefusalKit", "ACE_M26_Clacker", "ACE_DeadManSwitch", "ACE_Cellphone"};
|
||||
requiredVersion = REQUIRED_VERSION;
|
||||
requiredAddons[] = {"ace_interaction", "ace_interact_menu"};
|
||||
requiredAddons[] = {"ace_interaction"};
|
||||
author[] = {"Garth 'L-H' de Wet"};
|
||||
authorUrl = "http://garth.snakebiteink.co.za/";
|
||||
VERSION_CONFIG;
|
||||
|
@ -10,7 +10,7 @@
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
* [player, "ACE_M26_Clacker"] call ACE_Explosives_fnc_openDetonateUI;
|
||||
* [player, "ACE_M26_Clacker"] call ACE_Explosives_fnc_addDetonateActions;
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
@ -23,7 +23,6 @@ _range = GetNumber (ConfigFile >> "CfgWeapons" >> _detonator >> "ACE_Range");
|
||||
|
||||
_result = [_unit] call FUNC(getPlacedExplosives);
|
||||
_children = [];
|
||||
_count = 0;
|
||||
{
|
||||
if (!isNull(_x select 0)) then {
|
||||
_required = getArray (ConfigFile >> "CfgACE_Triggers" >> (_x select 4) >> "requires");
|
||||
@ -44,13 +43,8 @@ _count = 0;
|
||||
[],
|
||||
ACE_Player
|
||||
];
|
||||
_count = _count + 1;
|
||||
};
|
||||
};
|
||||
} foreach _result;
|
||||
if (_count == 0) then {
|
||||
call EFUNC(interaction,hideMenu);
|
||||
[localize "STR_ACE_Explosives_NoExplosivesAvailable"] call EFUNC(common,displayTextStructured);
|
||||
};
|
||||
|
||||
_children
|
@ -34,11 +34,14 @@ _itemCount = [];
|
||||
_children = [];
|
||||
|
||||
{
|
||||
private "_name";
|
||||
_name = if(isText(_x >> "displayNameShort") && {getText(_x >> "displayNameShort") != ""}) then
|
||||
{getText (_x >> "displayNameShort")}else{getText(_x >> "displayName")};
|
||||
_children pushBack
|
||||
[
|
||||
[
|
||||
format ["Explosive_%1", _forEachIndex],
|
||||
format [getText(_x >> "displayName") + " (%1)", _itemCount select _foreachIndex],
|
||||
format [_name + " (%1)", _itemCount select _foreachIndex],
|
||||
getText(_x >> "picture"),
|
||||
{(_this select 2) call FUNC(setupExplosive);},
|
||||
{true},
|
||||
|
@ -9,12 +9,12 @@
|
||||
* Nothing
|
||||
*
|
||||
* Example:
|
||||
* [player] call ACE_Explosives_fnc_openTransmitterUI;
|
||||
* [player] call ACE_Explosives_fnc_addTransmitterActions;
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
private ["_items", "_unit", "_count", "_children", "_config"];
|
||||
private ["_items", "_unit", "_children", "_config"];
|
||||
_unit = _this select 0;
|
||||
_detonators = [_unit] call FUNC(getDetonators);
|
||||
_children = [];
|
||||
@ -28,7 +28,7 @@ _children = [];
|
||||
getText(_config >> "picture"),
|
||||
{},
|
||||
{true},
|
||||
{(_this select 2) call FUNC(openDetonateUI);},
|
||||
{(_this select 2) call FUNC(addDetonateActions);},
|
||||
[ACE_player,_x]
|
||||
] call EFUNC(interact_menu,createAction),
|
||||
[],
|
||||
@ -36,10 +36,4 @@ _children = [];
|
||||
];
|
||||
} foreach _detonators;
|
||||
|
||||
if (count _detonators == 0) then {
|
||||
call EFUNC(interaction,hideMenu);
|
||||
"ACE_Explosives" call EFUNC(interaction,openMenuSelf);
|
||||
[format[localize "STR_ACE_Explosives_NoTriggersAvailable", "player"]] call EFUNC(Common,displayTextStructured);
|
||||
};
|
||||
|
||||
_children
|
@ -10,7 +10,7 @@
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
* [lbData [8866, lbCurSel 8866], _explosive] call ACE_Explosives_fnc_openTriggerSelectionUI;
|
||||
* [lbData [8866, lbCurSel 8866], _explosive] call ACE_Explosives_fnc_addTriggerActions;
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
@ -22,7 +22,6 @@ _detonators = [ACE_player] call FUNC(getDetonators);
|
||||
|
||||
_triggerTypes = [_magazine] call FUNC(triggerType);
|
||||
_magTriggers = ConfigFile >> "CfgMagazines" >> _magazine >> "ACE_Triggers";
|
||||
_count = 0;
|
||||
_children = [];
|
||||
{
|
||||
_required = getArray (_x >> "requires");
|
||||
@ -37,8 +36,10 @@ _children = [];
|
||||
[
|
||||
[
|
||||
format ["Trigger_%1", _forEachIndex],
|
||||
if(isText(_magTriggers >> configName _x >> "displayName"))then{getText(_magTriggers >> configName _x >> "displayName")}else{getText(_x >> "displayName")},
|
||||
if(isText(_magTriggers >> configName _x >> "picture"))then{getText(_magTriggers >> configName _x >> "picture")}else{getText(_x >> "picture")},
|
||||
if(isText(_magTriggers >> configName _x >> "displayName"))then
|
||||
{getText(_magTriggers >> configName _x >> "displayName")}else{getText(_x >> "displayName")},
|
||||
if(isText(_magTriggers >> configName _x >> "picture"))then
|
||||
{getText(_magTriggers >> configName _x >> "picture")}else{getText(_x >> "picture")},
|
||||
{(_this select 2) call FUNC(selectTrigger);},
|
||||
{true},
|
||||
{},
|
||||
@ -47,13 +48,7 @@ _children = [];
|
||||
[],
|
||||
ACE_Player
|
||||
];
|
||||
_count = _count + 1;
|
||||
};
|
||||
} count _triggerTypes;
|
||||
|
||||
if (_count == 0) then {
|
||||
[format[localize "STR_ACE_Explosives_NoTriggersAvailable",
|
||||
getText(configFile >> "CfgMagazines" >> _magazine >> "DisplayName")]] call EFUNC(Common,displayTextStructured);
|
||||
};
|
||||
} foreach _triggerTypes;
|
||||
|
||||
_children
|
Loading…
Reference in New Issue
Block a user