This commit is contained in:
PabstMirror 2015-03-26 20:05:30 -05:00
parent 9ae4f39d05
commit efe57461b5
3 changed files with 11 additions and 8 deletions

View File

@ -4,9 +4,9 @@
class ACE_MainActions { \
class GVAR(AttachVehicle) { \
displayName = "$STR_ACE_Attach_AttachDetach"; \
condition = QUOTE(([ARR_3(_player, _target, '')] call FUNC(canAttach))); \
condition = QUOTE(([ARR_2(_player, _target)] call FUNC(canAttach))); \
statement = QUOTE( [ARR_2(_player, _target)] call FUNC(openAttachUI);); \
exceptions[] = {"isNotDragging"}; \
exceptions[] = {}; \
showDisabled = 0; \
priority = 0; \
icon = PATHTOF(UI\attach_ca.paa); \
@ -16,7 +16,7 @@
displayName = "$STR_ACE_Attach_Detach"; \
condition = QUOTE(([ARR_2(_player, _target)] call FUNC(canDetach))); \
statement = QUOTE( [ARR_2(_player, _target)] call FUNC(detach) ); \
exceptions[] = {"isNotDragging"}; \
exceptions[] = {}; \
showDisabled = 0; \
priority = 0; \
icon = PATHTOF(UI\detach_ca.paa); \
@ -55,7 +55,7 @@ class CfgVehicles {
class ACE_Equipment {
class GVAR(Attach) {
displayName = "$STR_ACE_Attach_AttachDetach";
condition = QUOTE(([ARR_3(_player, _player, '')] call FUNC(canAttach)));
condition = QUOTE(([ARR_2(_player, _player)] call FUNC(canAttach)));
statement = QUOTE( [ARR_2(_player, _player)] call FUNC(openAttachUI); );
exceptions[] = {"isNotDragging"};
showDisabled = 0;

View File

@ -83,8 +83,10 @@ if (_unit == _attachToVehicle) then { //Self Attachment
}] call BIS_fnc_addStackedEventHandler; // @todo replace with CBA PFH
//had to delay the mouseHint, not sure why
[{[localize "STR_ACE_Attach_PlaceAction", localize "STR_ACE_Attach_CancelAction"] call EFUNC(interaction,showMouseHint)}, [], 0, 0] call EFUNC(common,waitAndExecute);
// [{[localize "STR_ACE_Attach_PlaceAction", localize "STR_ACE_Attach_CancelAction"] call EFUNC(interaction,showMouseHint)}, [], 0, 0] call EFUNC(common,waitAndExecute);
//RMB is unusable for now, so don't show it:
[{[localize "STR_ACE_Attach_PlaceAction", ""] call EFUNC(interaction,showMouseHint)}, [], 0, 0] call EFUNC(common,waitAndExecute);
_unit setVariable [QGVAR(placeActionEH), [_unit, "DefaultAction", {GVAR(pfeh_running) && {!isNull (GVAR(setupObject))}}, {call FUNC(placeApprove);}] call EFUNC(common,AddActionEventHandler)];
_unit setVariable [QGVAR(cancelActionEH), [_unit, "MenuBack", {GVAR(pfeh_running) && {!isNull (GVAR(setupObject))}}, {call FUNC(placeCancel);}] call EFUNC(common,AddActionEventHandler)];
// _unit setVariable [QGVAR(cancelActionEH), [_unit, "MenuBack", {GVAR(pfeh_running) && {!isNull (GVAR(setupObject))}}, {call FUNC(placeCancel);}] call EFUNC(common,AddActionEventHandler)];
};

View File

@ -5,7 +5,7 @@
* Arguments:
* 0: unit doing the attach (player) <OBJECT>
* 1: vehicle that it will be attached to (player or vehicle) <OBJECT>
* 2: Name of the attachable item <STRING>
* 2: Name of the attachable item <STRING><OPTIONAL>
*
* Return Value:
* Boolean <BOOL>
@ -17,7 +17,8 @@
*/
#include "script_component.hpp"
PARAMS_3(_unit,_attachToVehicle,_item);
PARAMS_2(_unit,_attachToVehicle);
DEFAULT_PARAM(2,_item,"");
private ["_attachLimit", "_attachedObjects"];