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