Fixed small errors that expressed themselves when getting explosives in game.

This commit is contained in:
Garth L-H de Wet 2015-01-13 23:49:27 +02:00
parent 0e09d5de67
commit 66eeba7df1
6 changed files with 12 additions and 12 deletions

View File

@ -37,7 +37,7 @@ class CfgACE_Triggers {
class Timer { class Timer {
displayName = $STR_ACE_Explosives_timerName; displayName = $STR_ACE_Explosives_timerName;
picture = "ACE_Explosives\data\UI\Timer.paa"; picture = "ACE_Explosives\data\UI\Timer.paa";
onPlace = QUOTE( [ARR_2(_this select 1, (_this select 3) select 0)] call FUNC(startTimer);false ); onPlace = QUOTE( [ARR_2(_this select 1,(_this select 3) select 0)] call FUNC(startTimer);false );
onSetup = QUOTE( _this call FUNC(openTimerSetUI);true ); onSetup = QUOTE( _this call FUNC(openTimerSetUI);true );
}; };
class Tripwire { class Tripwire {

View File

@ -10,7 +10,7 @@ class CfgVehicles {
class ACE_SelfActions { class ACE_SelfActions {
class GVAR(Explosives) { class GVAR(Explosives) {
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[] = {"ACE_Interaction_isNotSwimming"}; exceptions[] = {"ACE_Interaction_isNotSwimming"};
showDisabled = 1; showDisabled = 1;
@ -42,7 +42,7 @@ class CfgVehicles {
class ACE_Defuse { class ACE_Defuse {
displayName = $STR_ACE_Explosives_Defuse; displayName = $STR_ACE_Explosives_Defuse;
condition = QUOTE( [_player] call FUNC(canDefuse) ); condition = QUOTE( [_player] call FUNC(canDefuse) );
statement = QUOTE( [ARR_2(_player, EGVAR(Interaction,Target))] call FUNC(startDefuse); ); statement = QUOTE( [ARR_2(_player,EGVAR(Interaction,Target))] call FUNC(startDefuse); );
exceptions[] = {"ACE_Interaction_isNotSwimming"}; exceptions[] = {"ACE_Interaction_isNotSwimming"};
showDisabled = 0; showDisabled = 0;
icon = QUOTE( PATHTOF(UI\Defuse_ca.paa) ); icon = QUOTE( PATHTOF(UI\Defuse_ca.paa) );

View File

@ -20,7 +20,7 @@
private ["_obj"]; private ["_obj"];
if (isNull(GVAR(Setup)) || {ACE_Modifier == 0} || !GVAR(pfeh_running)) exitWith {false}; if (isNull(GVAR(Setup)) || {ACE_Modifier == 0} || !GVAR(pfeh_running)) exitWith {false};
_this = _this * 5; _this = _this * 5;
GVAR(Setup) setDir ((getDir GVAR(Setup) + _this); GVAR(Setup) setDir ((getDir GVAR(Setup)) + _this);
GVAR(TweakedAngle) = GVAR(TweakedAngle) + _this; GVAR(TweakedAngle) = GVAR(TweakedAngle) + _this;
true true

View File

@ -22,7 +22,7 @@ createDialog "RscACE_SelectTimeUI";
sliderSetRange [8845, 5, 900]; // 5seconds - 15minutes sliderSetRange [8845, 5, 900]; // 5seconds - 15minutes
sliderSetPosition [8845, 30]; sliderSetPosition [8845, 30];
buttonSetAction [8860, format[QUOTE([ACE_player, '%1', 'Timer', floor(sliderPosition 8845)] call FUNC(setupExplosive);closeDialog 0;), _mag]]; buttonSetAction [8860, format[QUOTE([ARR_4(ACE_player,'%1','Timer',floor sliderPosition 8845)] call FUNC(setupExplosive);closeDialog 0;), _mag]];
buttonSetAction [8855, format[QUOTE(['%1'] call FUNC(openTriggerSelectionUI);), _mag]]; buttonSetAction [8855, format[QUOTE(['%1'] call FUNC(openTriggerSelectionUI);), _mag]];
ctrlSetText [8870, format[localize "STR_ACE_Explosives_TimerMenu",0, 30]]; ctrlSetText [8870, format[localize "STR_ACE_Explosives_TimerMenu",0, 30]];

View File

@ -30,7 +30,7 @@ GVAR(placer) = _unit;
// Would require custom config entries (ACE_ExplosiveSpecialist/ACE_Specialist) which excludes custom mods. // Would require custom config entries (ACE_ExplosiveSpecialist/ACE_Specialist) which excludes custom mods.
//if (ACE_Explosives_RequireSpecialist && {!([_unit] call ACE_Core_fnc_isEOD)}) exitWith {}; //if (ACE_Explosives_RequireSpecialist && {!([_unit] call ACE_Core_fnc_isEOD)}) exitWith {};
if (isNil "_config") then { if (isNil "_config") then {
_config = getArray(ConfigFile >> "CfgMagazines" >> _class >> "ACE_Triggers" >> "ACE_Triggers") select 0; _config = getArray(ConfigFile >> "CfgMagazines" >> _class >> "ACE_Triggers" >> "SupportedTriggers") select 0;
}; };
GVAR(Setup) = getText(ConfigFile >> "CfgMagazines" >> _class >> "ACE_SetupObject") createVehicleLocal [0,0,-10000]; GVAR(Setup) = getText(ConfigFile >> "CfgMagazines" >> _class >> "ACE_SetupObject") createVehicleLocal [0,0,-10000];
@ -49,7 +49,7 @@ GVAR(TweakedAngle) = 180;
private "_player"; private "_player";
_player = ACE_player; _player = ACE_player;
if (GVAR(placer) != _player) exitWith { if (GVAR(placer) != _player) exitWith {
call Func(place_Cancel); call FUNC(place_Cancel);
}; };
GVAR(pfeh_running) = true; GVAR(pfeh_running) = true;
_pos = (ASLtoATL eyePos _player) vectorAdd (positionCameraToWorld [0,0,1] vectorDiff positionCameraToWorld [0,0,0]); _pos = (ASLtoATL eyePos _player) vectorAdd (positionCameraToWorld [0,0,1] vectorDiff positionCameraToWorld [0,0,0]);
@ -62,6 +62,6 @@ GVAR(TweakedAngle) = 180;
[localize "STR_ACE_Explosives_PlaceAction", localize "STR_ACE_Explosives_CancelAction", [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", _unit setVariable [QGVAR(Place), [_unit, "DefaultAction",
{GVAR(pfeh_running) AND !isNull (GVAR(Setup))}, {call Func(place_Approve);}] call EFUNC(Core,AddActionEventHandler)]; {GVAR(pfeh_running) AND !isNull (GVAR(Setup))}, {call FUNC(place_Approve);}] call EFUNC(Core,AddActionEventHandler)];
_unit setVariable [QGVAR(Cancel), [_unit, "MenuBack", _unit setVariable [QGVAR(Cancel), [_unit, "MenuBack",
{GVAR(pfeh_running) AND !isNull (GVAR(Setup))}, {call Func(place_Cancel);}] call EFUNC(Core,AddActionEventHandler)]; {GVAR(pfeh_running) AND !isNull (GVAR(Setup))}, {call FUNC(place_Cancel);}] call EFUNC(Core,AddActionEventHandler)];

View File

@ -49,7 +49,7 @@ if (ACE_player != _unit) then {
(_this select 0) disableAI "MOVE"; (_this select 0) disableAI "MOVE";
(_this select 0) disableAI "TARGET"; (_this select 0) disableAI "TARGET";
sleep (_this select 2); sleep (_this select 2);
[(_this select 0), (_this select 1)] call Func(defuseExplosive); [(_this select 0), (_this select 1)] call FUNC(defuseExplosive);
(_this select 0) enableAI "MOVE"; (_this select 0) enableAI "MOVE";
(_this select 0) enableAI "TARGET"; (_this select 0) enableAI "TARGET";
}; };
@ -59,10 +59,10 @@ if (ACE_player != _unit) then {
if (GVAR(RequireSpecialist)) then { if (GVAR(RequireSpecialist)) then {
if ([_unit] call EFUNC(Common,isEOD)) then { if ([_unit] call EFUNC(Common,isEOD)) then {
[[true, _target] call _fnc_DefuseTime, [_unit,_target], [[true, _target] call _fnc_DefuseTime, [_unit,_target],
QUOTE(FUNC(defuseExplosive)), localize "STR_ACE_Explosives_DefusingExplosive"] call EFUNC(Common,progressBar); QFUNC(defuseExplosive), localize "STR_ACE_Explosives_DefusingExplosive"] call EFUNC(Common,progressBar);
}; };
} else { } else {
[[([_unit] call EFUNC(Common,isEOD)), _target] call _fnc_DefuseTime, [_unit,_target], [[([_unit] call EFUNC(Common,isEOD)), _target] call _fnc_DefuseTime, [_unit,_target],
QUOTE(FUNC(defuseExplosive)), localize "STR_ACE_Explosives_DefusingExplosive"] call EFUNC(Common,progressBar); QFUNC(defuseExplosive), localize "STR_ACE_Explosives_DefusingExplosive"] call EFUNC(Common,progressBar);
}; };
}; };