explosives: Fix #32

This commit is contained in:
Nicolás Badano 2015-01-15 16:13:12 -03:00
parent d1d12804f4
commit 1d5201c0d7
15 changed files with 63 additions and 63 deletions

View File

@ -10,39 +10,39 @@ class CfgACE_Triggers {
*/
class Command {
displayName = $STR_ACE_Explosives_clacker_displayName;
picture = QUOTE( PATHTOF(Data\UI\Clacker.paa) );
onPlace = QUOTE( _this call FUNC(AddClacker);false );
picture = PATHTOF(Data\UI\Clacker.paa);
onPlace = QUOTE(_this call FUNC(AddClacker);false);
requires[] = {"ACE_Clacker"};
};
class MK16_Transmitter:Command {
displayName = $STR_ACE_Explosives_MK16_displayName;
picture = QUOTE( PATHTOF(Data\UI\MK16_Reciever_ca.paa) );
picture = PATHTOF(Data\UI\MK16_Reciever_ca.paa);
requires[] = {"ACE_M26_Clacker"};
};
class DeadManSwitch:Command {
displayName = $STR_ACE_Explosives_DeadManSwitch_displayName;
picture = QUOTE( PATHTOF(Data\UI\DeadmanSwitch.paa) );
picture = PATHTOF(Data\UI\DeadmanSwitch.paa);
requires[] = {"ACE_DeadManSwitch"};
};
class PressurePlate {
displayName = $STR_ACE_Explosives_PressurePlate;
picture = QUOTE( PATHTOF(Data\UI\PressurePlate.paa) );
picture = PATHTOF(Data\UI\PressurePlate.paa);
onPlace = "_dist=GetNumber(ConfigFile >> 'CfgMagazines' >> (_this select 2) >> 'ACE_Triggers' >> 'PressurePlate' >> 'digDistance');_ex=_this select 1;_ex setPosATL ((getPosATL _ex) vectorDiff ((VectorUp _ex) vectorCrossProduct [0,0,_dist]));false";
};
class IRSensor {
displayName = $STR_ACE_Explosives_IRSensor;
picture = QUOTE( PATHTOF(Data\UI\PressurePlate.paa) );
picture = PATHTOF(Data\UI\PressurePlate.paa);
onPlace = "false";
};
class Timer {
displayName = $STR_ACE_Explosives_timerName;
picture = "ACE_Explosives\data\UI\Timer.paa";
onPlace = QUOTE( [ARR_2(_this select 1,(_this select 3) select 0)] call FUNC(startTimer);false );
onSetup = QUOTE( _this call FUNC(openTimerSetUI);true );
picture = PATHTOF(data\UI\Timer.paa);
onPlace = QUOTE([ARR_2(_this select 1,(_this select 3) select 0)] call FUNC(startTimer);false);
onSetup = QUOTE(_this call FUNC(openTimerSetUI);true);
};
class Tripwire {
displayName = $STR_ACE_Explosives_TripWire;
picture = QUOTE( PATHTOF(Data\UI\Tripwire.paa) );
picture = PATHTOF(Data\UI\Tripwire.paa);
onPlace = "false";
};
};

View File

@ -1,11 +1,11 @@
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE( call COMPILE_FILE(XEH_preInit) );
init = QUOTE(call COMPILE_FILE(XEH_preInit));
};
};
class Extended_PostInit_EventHandlers {
class ADDON {
init = QUOTE( call COMPILE_FILE(XEH_postInit) );
init = QUOTE(call COMPILE_FILE(XEH_postInit));
};
};

View File

@ -3,10 +3,10 @@ class ACE_ModuleExplosive: Module_F {
author = "ACE Team";
category = "ACE";
displayName = "Explosive System";
function = QUOTE( FUNC(module) );
function = QUOTE(FUNC(module));
scope = 2;
isGlobal = 1;
icon = QUOTE( PATHTOF(UI\IconExplosives_ca.paa) );
icon = PATHTOF(UI\IconExplosives_ca.paa);
class Arguments {
class RequireSpecialist {
displayName = "Require specialists?";

View File

@ -10,42 +10,42 @@ class CfgVehicles {
class ACE_SelfActions {
class ACE_Explosives {
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 = "";
exceptions[] = {"ACE_Interaction_isNotSwimming"};
showDisabled = 1;
priority = 4;
icon = QUOTE( PATHTOF(UI\Explosives_Menu_ca.paa) );
icon = PATHTOF(UI\Explosives_Menu_ca.paa);
subMenu[] = {"ACE_Explosives", 1};
hotkey = "X";
//Sub-menu items
class ACE_Detonate {
displayName = $STR_ACE_Explosives_Detonate;
condition = QUOTE( [_player] call FUNC(canDetonate) );
statement = QUOTE( [_player] call FUNC(openTransmitterUI); );
condition = QUOTE([_player] call FUNC(canDetonate));
statement = QUOTE([_player] call FUNC(openTransmitterUI););
exceptions[] = {"ACE_Interaction_isNotSwimming"};
showDisabled = 1;
icon = QUOTE( PATHTOF(UI\Explosives_Menu_ca.paa) );
icon = PATHTOF(UI\Explosives_Menu_ca.paa);
priority = 2;
hotkey = "T";
};
class ACE_Place {
displayName = $STR_ACE_Explosives_Place;
condition = QUOTE( (vehicle _player == _player) and {[_player] call FUNC(hasExplosives)} );
statement = QUOTE( [_player] call FUNC(openPlaceUI); );
condition = QUOTE((vehicle _player == _player) and {[_player] call FUNC(hasExplosives)});
statement = QUOTE([_player] call FUNC(openPlaceUI););
exceptions[] = {"ACE_Interaction_isNotSwimming"};
showDisabled = 1;
icon = QUOTE( PATHTOF(UI\Place_Explosive_ca.paa) );
icon = PATHTOF(UI\Place_Explosive_ca.paa);
priority = 1;
hotkey = "P";
};
class ACE_Defuse {
displayName = $STR_ACE_Explosives_Defuse;
condition = QUOTE( [_player] call FUNC(canDefuse) );
statement = QUOTE( [ARR_2(_player,EGVAR(Interaction,Target))] call FUNC(startDefuse); );
condition = QUOTE([_player] call FUNC(canDefuse));
statement = QUOTE([ARR_2(_player,EGVAR(Interaction,Target))] call FUNC(startDefuse););
exceptions[] = {"ACE_Interaction_isNotSwimming"};
showDisabled = 0;
icon = QUOTE( PATHTOF(UI\Defuse_ca.paa) );
icon = PATHTOF(UI\Defuse_ca.paa);
priority = 0.8;
hotkey = "F";
};

View File

@ -11,7 +11,7 @@ class CfgWeapons {
scope = 2;
displayName = $STR_ACE_Explosives_clacker_displayName;
descriptionShort = $STR_ACE_Explosives_clacker_description;
picture = QUOTE( PATHTOF(Data\UI\Clacker.paa) );
picture = PATHTOF(Data\UI\Clacker.paa);
model = "\A3\weapons_F\ammo\mag_univ.p3d";
ACE_Range = 250;
ACE_Detonator = 1;
@ -23,14 +23,14 @@ class CfgWeapons {
};
class ACE_M26_Clacker: ACE_Clacker {
displayName = $STR_ACE_Explosives_M26_displayName;
picture = QUOTE( PATHTOF(Data\UI\MK26_Transmitter_ca.paa) );
picture = PATHTOF(Data\UI\MK26_Transmitter_ca.paa);
ACE_Range = 5000;
};
class ACE_DefusalKit: ACE_ItemCore {
scope = 2;
displayName = $STR_ACE_Explosives_DefusalKit_displayName;
descriptionShort = $STR_ACE_Explosives_DefusalKit_description;
picture = QUOTE( PATHTOF(Data\UI\Pliers.paa) );
picture = PATHTOF(Data\UI\Pliers.paa);
model = "\A3\Structures_F\Items\Tools\Pliers_F.p3d";
class ItemInfo: ACE_ExplosiveItem {
@ -42,7 +42,7 @@ class CfgWeapons {
scope = 2;
displayName = $STR_ACE_Explosives_DeadManSwitch_displayName;
descriptionShort = $STR_ACE_Explosives_DeadManSwitch_description;
picture = QUOTE( PATHTOF(Data\UI\DeadmanSwitch.paa) );
picture = PATHTOF(Data\UI\DeadmanSwitch.paa);
model = "\A3\weapons_F\ammo\mag_univ.p3d";
ACE_Range = 100;
ACE_Detonator = 1;

View File

@ -31,10 +31,10 @@ _distBase = _unit distance _mineBase;
_distance = 10;
if (_distCore < _distBase) then {
_distance = _distCore;
EGVAR(Interaction,Target) = _timeBombCore;
EGVAR(interaction,Target) = _timeBombCore;
}else{
_distance = _distBase;
EGVAR(Interaction,Target) = _mineBase;
EGVAR(interaction,Target) = _mineBase;
};
if (isNil "_distance") exitWith {false};
_distance < 4

View File

@ -18,14 +18,14 @@
*/
#include "script_component.hpp"
private ["_unit","_result", "_item"];
call EFUNC(Interaction,hideMenu);
call EFUNC(interaction,hideMenu);
_unit = _this select 0;
_detonator = _this select 1;
_range = GetNumber (ConfigFile >> "CfgWeapons" >> _detonator >> "ACE_Range");
_result = [_unit] call FUNC(getPlacedExplosives);
_actions = [localize "STR_ACE_Explosives_DetonateMenu", localize "STR_ACE_Explosives_Detonate"]
call EFUNC(Interaction,prepareSelectMenu);
call EFUNC(interaction,prepareSelectMenu);
_count = 0;
{
if (!isNull(_x select 0)) then {
@ -37,7 +37,7 @@ _count = 0;
_x select 2,
getText(_item >> "picture"),
[_foreachIndex, _range]
] call EFUNC(Interaction,AddSelectableItem);
] call EFUNC(interaction,AddSelectableItem);
_count = _count + 1;
};
};
@ -52,12 +52,12 @@ if (_count > 0) then {
(ACE_player getVariable [QGVAR(Clackers), []]) select ([_this select 0] call EFUNC(common,toNumber)),
false
] call FUNC(detonateExplosive);
call EFUNC(Interaction,hideMenu);
call EFUNC(interaction,hideMenu);
},
{[ACE_player] call FUNC(openTransmitterUI);}
] call EFUNC(Interaction,openSelectMenu);
] call EFUNC(interaction,openSelectMenu);
}else{
call EFUNC(Interaction,hideMenu);
call EFUNC(interaction,hideMenu);
[ACE_player] call FUNC(openTransmitterUI);
[localize "STR_ACE_Explosives_NoExplosivesAvailable"] call EFUNC(common,displayTextStructured);
};

View File

@ -36,14 +36,14 @@ _itemCount = [];
};
} forEach _mags;
_actions = [localize "STR_ACE_Explosives_PlaceMenu", localize "STR_ACE_Explosives_Place"]
call EFUNC(Interaction,prepareSelectMenu);
call EFUNC(interaction,prepareSelectMenu);
{
_actions = [
_actions,
format [getText(_x >> "displayName") + " (%1)", _itemCount select _foreachIndex],
getText(_x >> "picture"),
configName _x
] call EFUNC(Interaction,AddSelectableItem);
] call EFUNC(interaction,AddSelectableItem);
} foreach _list;
[
@ -52,9 +52,9 @@ _actions = [localize "STR_ACE_Explosives_PlaceMenu", localize "STR_ACE_Explosive
[_this] call FUNC(openTriggerSelectionUI);
},
{
call EFUNC(Interaction,hideMenu);
if !(profileNamespace getVariable [QUOTE( EGVAR(Interaction,AutoCloseMenu) ), false]) then {
"ACE_Explosives" call EFUNC(Interaction,openMenuSelf);
call EFUNC(interaction,hideMenu);
if !(profileNamespace getVariable [EGVAR(interaction,AutoCloseMenu), false]) then {
"ACE_Explosives" call EFUNC(interaction,openMenuSelf);
};
}
] call EFUNC(Interaction,openSelectMenu);
] call EFUNC(interaction,openSelectMenu);

View File

@ -21,7 +21,7 @@ _unit = _this select 0;
_items = (items _unit);
_actions = [localize "STR_ACE_Explosives_TriggerMenu", localize "STR_ACE_Explosives_SelectTrigger"]
call EFUNC(Interaction,prepareSelectMenu);
call EFUNC(interaction,prepareSelectMenu);
_detonators = [_unit] call FUNC(getDetonators);
{
_config = ConfigFile >> "CfgWeapons" >> _x;
@ -30,12 +30,12 @@ _detonators = [_unit] call FUNC(getDetonators);
getText(_config >> "displayName"),
getText(_config >> "picture"),
_x
] call EFUNC(Interaction,addSelectableItem);
] call EFUNC(interaction,addSelectableItem);
} count _detonators;
if (count _detonators == 0) then {
call EFUNC(Interaction,hideMenu);
"ACE_Explosives" call EFUNC(Interaction,openMenuSelf);
call EFUNC(interaction,hideMenu);
"ACE_Explosives" call EFUNC(interaction,openMenuSelf);
[format[localize "STR_ACE_Explosives_NoTriggersAvailable", "player"]] call EFUNC(Common,displayTextStructured);
}else{
[
@ -44,10 +44,10 @@ if (count _detonators == 0) then {
[ACE_player, _this] call FUNC(openDetonateUI);
},
{
call EFUNC(Interaction,hideMenu);
if !(profileNamespace getVariable [QUOTE( EGVAR(Interaction,AutoCloseMenu) ), false]) then {
"ACE_Explosives" call EFUNC(Interaction,openMenuSelf);
call EFUNC(interaction,hideMenu);
if !(profileNamespace getVariable [QUOTE(EGVAR(interaction,AutoCloseMenu)), false]) then {
"ACE_Explosives" call EFUNC(interaction,openMenuSelf);
};
}
] call EFUNC(Interaction,openSelectMenu);
] call EFUNC(interaction,openSelectMenu);
};

View File

@ -23,7 +23,7 @@ _detonators = [ACE_player] call FUNC(getDetonators);
_triggerTypes = [_magazine] call FUNC(triggerType);
_magTriggers = ConfigFile >> "CfgMagazines" >> _magazine >> "ACE_Triggers";
_actions = [localize "STR_ACE_Explosives_TriggerMenu", localize "STR_ACE_Explosives_SelectTrigger"]
call EFUNC(Interaction,prepareSelectMenu);
call EFUNC(interaction,prepareSelectMenu);
_count = 0;
{
_required = getArray (_x >> "requires");
@ -39,7 +39,7 @@ _count = 0;
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")},
[configName _x, _magazine]
] call EFUNC(Interaction,addSelectableItem);
] call EFUNC(interaction,addSelectableItem);
_count = _count + 1;
};
} count _triggerTypes;
@ -55,5 +55,5 @@ if (_count == 0) then {
[_this select 1, _this select 0] call FUNC(selectTrigger);
},
{[ACE_player] call FUNC(openPlaceUI);}
] call EFUNC(Interaction,openSelectMenu);
] call EFUNC(interaction,openSelectMenu);
};

View File

@ -29,7 +29,7 @@ GVAR(placer) = objNull;
_player = ACE_player;
[_player, "DefaultAction", _player getVariable [QGVAR(Place), -1]] call EFUNC(Common,removeActionEventHandler);
[_player, "MenuBack", _player getVariable [QGVAR(Cancel), -1]] call EFUNC(Common,removeActionEventHandler);
call EFUNC(Interaction,hideMouseHint);
call EFUNC(interaction,hideMouseHint);
if ((_setup getVariable [QGVAR(Class), ""]) != "") then {
_dir = (getDir _setup);
if (_dir > 180) then {

View File

@ -30,6 +30,6 @@ if (isNil {GVAR(placer)}) then {
};
[GVAR(placer), "ACE_Explosives", false] call EFUNC(Common,setForceWalkStatus);
GVAR(placer) = objNull;
call EFUNC(Interaction,hideMouseHint);
call EFUNC(interaction,hideMouseHint);
[ACE_player, "DefaultAction", ACE_player getVariable [QGVAR(Place), -1]] call EFUNC(Common,removeActionEventHandler);
[ACE_player, "MenuBack", ACE_player getVariable [QGVAR(Cancel), -1]] call EFUNC(Common,removeActionEventHandler);

View File

@ -22,7 +22,7 @@ closeDialog 0;
_magazine = _this select 0;
_trigger = _this select 1;
_config = ConfigFile >> "CfgACE_Triggers" >> _trigger;
call EFUNC(Interaction,hideMenu);
call EFUNC(interaction,hideMenu);
// If the onSetup function returns true, it is handled elsewhere
if (isText(_config >> "onSetup") && {[_magazine] call compile getText (_config >> "onSetup")}) exitWith {};

View File

@ -60,7 +60,7 @@ GVAR(TweakedAngle) = 180;
};
}] call CALLSTACK(BIS_fnc_addStackedEventHandler);
[localize "STR_ACE_Explosives_PlaceAction", localize "STR_ACE_Explosives_CancelAction",
localize "STR_ACE_Explosives_ScrollAction"] call EFUNC(Interaction,showMouseHint);
localize "STR_ACE_Explosives_ScrollAction"] call EFUNC(interaction,showMouseHint);
_unit setVariable [QGVAR(Place), [_unit, "DefaultAction",
{GVAR(pfeh_running) AND !isNull (GVAR(Setup))}, {call FUNC(place_Approve);}] call EFUNC(common,AddActionEventHandler)];
_unit setVariable [QGVAR(Cancel), [_unit, "MenuBack",

View File

@ -530,7 +530,7 @@ class RscTitles {
class controls {
class RearIcon: RscInteractionIcon{
idc = 999;
text = PATHTOF(\UI\CenterIcon_ca.paa);
text = PATHTOF(UI\CenterIcon_ca.paa);
x = 17.9 * GUI_GRID_W;
y = 10 * GUI_GRID_H;
w = 3.7 * GUI_GRID_H;
@ -570,7 +570,7 @@ class RscTitles {
};
class BackIcon: RscInteractionIcon{
idc = 1210;
text = PATHTOF(\UI\backArrow_ca.paa);
text = PATHTOF(UI\backArrow_ca.paa);
x = 18.25 * GUI_GRID_W;
y = 12.69 * GUI_GRID_H;
w = 0.5 * GUI_GRID_W;
@ -599,7 +599,7 @@ class RscTitles {
class controls {
class SelectIcon: RscInteractionHelperIcon{
idc = 1200;
text = PATHTOF(\UI\mouse_left_ca.paa);
text = PATHTOF(UI\mouse_left_ca.paa);
y = 17.5 * GUI_GRID_H;
};
class SelectText: RscInteractionText{
@ -609,7 +609,7 @@ class RscTitles {
};
class GoBackIcon: RscInteractionHelperIcon{
idc = 1201;
text = PATHTOF(\UI\mouse_right_ca.paa);
text = PATHTOF(UI\mouse_right_ca.paa);
y = 19.5 * GUI_GRID_H;
};
class GoBackText: RscInteractionText{
@ -619,7 +619,7 @@ class RscTitles {
};
class ScrollIcon: RscInteractionHelperIcon{
idc = 1202;
text = PATHTOF(\UI\mouse_scroll_ca.paa);
text = PATHTOF(UI\mouse_scroll_ca.paa);
y = 18.5 * GUI_GRID_H;
};
class ScrollText: RscInteractionText{