mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
dbe372cb48
* Code cleanup * Moved keybinds to initKeybinds.sqf * Update addons/dragging/initKeybinds.sqf Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com> * Update addons/dragging/functions/fnc_carryObject.sqf Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com> * Update addons/dragging/functions/fnc_getWeight.sqf Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com> * Rephrasing and adjustments for dragging --------- Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com>
35 lines
960 B
Plaintext
35 lines
960 B
Plaintext
#include "script_component.hpp"
|
|
/*
|
|
* Author: commy2
|
|
* Initializes variables for draggable / carryable objects. Called from init EH.
|
|
*
|
|
* Arguments:
|
|
* 0: Object <OBJECT>
|
|
*
|
|
* Return Value:
|
|
* None
|
|
*
|
|
* Example:
|
|
* [cursorTarget] call ace_dragging_fnc_initObject;
|
|
*
|
|
* Public: No
|
|
*/
|
|
|
|
params ["_object"];
|
|
|
|
private _config = configOf _object;
|
|
|
|
if (getNumber (_config >> QGVAR(canDrag)) == 1) then {
|
|
private _position = [_config >> QGVAR(dragPosition), "ARRAY", [0, 1.5, 0]] call CBA_fnc_getConfigEntry;
|
|
private _direction = getNumber (_config >> QGVAR(dragDirection));
|
|
|
|
[_object, true, _position, _direction] call FUNC(setDraggable);
|
|
};
|
|
|
|
if (getNumber (_config >> QGVAR(canCarry)) == 1) then {
|
|
private _position = [_config >> QGVAR(carryPosition), "ARRAY", [0, 1, 1]] call CBA_fnc_getConfigEntry;
|
|
private _direction = getNumber (_config >> QGVAR(carryDirection));
|
|
|
|
[_object, true, _position, _direction] call FUNC(setCarryable);
|
|
};
|