mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Dragging - Add Keybind for Carry (#7746)
* add carry keybind * Corrected canCarry Check * Removed 'False' in key up parameter * removed newline
This commit is contained in:
parent
3a13dd416a
commit
c39992199a
@ -53,6 +53,26 @@ if (isNil "ACE_maxWeightCarry") then {
|
|||||||
|
|
||||||
[ACE_player, _cursor] call FUNC(startDrag);
|
[ACE_player, _cursor] call FUNC(startDrag);
|
||||||
false
|
false
|
||||||
}, {
|
}, {}, [-1, [false, false, false]]] call CBA_fnc_addKeybind; // UNBOUND
|
||||||
|
|
||||||
|
["ACE3 Common", QGVAR(carry), (localize LSTRING(CarryKeybind)), {
|
||||||
|
if (!alive ACE_player) exitWith {false};
|
||||||
|
if !([ACE_player, objNull, ["isNotDragging", "isNotCarrying"]] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||||
|
|
||||||
|
// If we are drag/carrying something right now then just drop it:
|
||||||
|
if (ACE_player getVariable [QGVAR(isDragging), false]) exitWith {
|
||||||
|
[ACE_player, ACE_player getVariable [QGVAR(draggedObject), objNull]] call FUNC(dropObject);
|
||||||
false
|
false
|
||||||
}, [-1, [false, false, false]]] call CBA_fnc_addKeybind; // UNBOUND
|
};
|
||||||
|
if (ACE_player getVariable [QGVAR(isCarrying), false]) exitWith {
|
||||||
|
[ACE_player, ACE_player getVariable [QGVAR(carriedObject), objNull]] call FUNC(dropObject_carry);
|
||||||
|
false
|
||||||
|
};
|
||||||
|
|
||||||
|
private _cursor = cursorObject;
|
||||||
|
if ((isNull _cursor) || {(_cursor distance ACE_player) > 2.6}) exitWith {false};
|
||||||
|
if (!([ACE_player, _cursor] call FUNC(canCarry))) exitWith {false};
|
||||||
|
|
||||||
|
[ACE_player, _cursor] call FUNC(startCarry);
|
||||||
|
false
|
||||||
|
}, {}, [-1, [false, false, false]]] call CBA_fnc_addKeybind; // UNBOUND
|
||||||
|
@ -52,6 +52,9 @@
|
|||||||
<Chinesesimp>拖拉/放开物品</Chinesesimp>
|
<Chinesesimp>拖拉/放开物品</Chinesesimp>
|
||||||
<Turkish>Objeyi Sürükle/Bırak</Turkish>
|
<Turkish>Objeyi Sürükle/Bırak</Turkish>
|
||||||
</Key>
|
</Key>
|
||||||
|
<Key ID="STR_ACE_Dragging_CarryKeybind">
|
||||||
|
<English>Carry/Release Object</English>
|
||||||
|
</Key>
|
||||||
<Key ID="STR_ACE_Dragging_UnableToDrag">
|
<Key ID="STR_ACE_Dragging_UnableToDrag">
|
||||||
<English>Item too heavy</English>
|
<English>Item too heavy</English>
|
||||||
<German>Gegenstand ist zu schwer</German>
|
<German>Gegenstand ist zu schwer</German>
|
||||||
|
Loading…
Reference in New Issue
Block a user