From efe57461b5da6e03826ab3f0376a33a9516f4a9f Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Thu, 26 Mar 2015 20:05:30 -0500 Subject: [PATCH] misc --- addons/attach/CfgVehicles.hpp | 8 ++++---- addons/attach/functions/fnc_attach.sqf | 6 ++++-- addons/attach/functions/fnc_canAttach.sqf | 5 +++-- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/addons/attach/CfgVehicles.hpp b/addons/attach/CfgVehicles.hpp index 15eca2fb62..328ec851ed 100644 --- a/addons/attach/CfgVehicles.hpp +++ b/addons/attach/CfgVehicles.hpp @@ -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; diff --git a/addons/attach/functions/fnc_attach.sqf b/addons/attach/functions/fnc_attach.sqf index 655cac598b..733a9c81eb 100644 --- a/addons/attach/functions/fnc_attach.sqf +++ b/addons/attach/functions/fnc_attach.sqf @@ -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)]; }; diff --git a/addons/attach/functions/fnc_canAttach.sqf b/addons/attach/functions/fnc_canAttach.sqf index 1c33f7b112..d4095570ef 100644 --- a/addons/attach/functions/fnc_canAttach.sqf +++ b/addons/attach/functions/fnc_canAttach.sqf @@ -5,7 +5,7 @@ * Arguments: * 0: unit doing the attach (player) * 1: vehicle that it will be attached to (player or vehicle) - * 2: Name of the attachable item + * 2: Name of the attachable item * * Return Value: * Boolean @@ -17,7 +17,8 @@ */ #include "script_component.hpp" -PARAMS_3(_unit,_attachToVehicle,_item); +PARAMS_2(_unit,_attachToVehicle); +DEFAULT_PARAM(2,_item,""); private ["_attachLimit", "_attachedObjects"];