mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Refactor
This commit is contained in:
parent
37cd98a4ee
commit
a7d5ba6336
@ -1,7 +1,7 @@
|
||||
PREP(addActions);
|
||||
PREP(carriesFlag);
|
||||
PREP(carryFlag);
|
||||
PREP(furlFlag);
|
||||
PREP(getActions);
|
||||
PREP(getFlags);
|
||||
PREP(handleScrollWheel);
|
||||
PREP(pickupFlag);
|
||||
|
@ -1,7 +1,7 @@
|
||||
#include "script_component.hpp"
|
||||
/*
|
||||
* Author: Timi007
|
||||
* Stops carrying flag and add flag item to unit.
|
||||
* Stops carrying flag and adds flag item back to unit.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Unit <OBJECT>
|
||||
|
@ -1,7 +1,7 @@
|
||||
#include "script_component.hpp"
|
||||
/*
|
||||
* Author: Timi007
|
||||
* Adds the child actions for placing and carring flags.
|
||||
* Gets the child actions for placing and carring flags.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Player <OBJECT>
|
||||
@ -10,7 +10,7 @@
|
||||
* Actions <ARRAY>
|
||||
*
|
||||
* Example:
|
||||
* [player] call ace_flags_fnc_addActions
|
||||
* [player] call ace_flags_fnc_getActions
|
||||
*
|
||||
* Public: No
|
||||
*/
|
@ -17,7 +17,9 @@
|
||||
|
||||
params ["_scrollAmount"];
|
||||
|
||||
if (GVAR(isPlacing) isNotEqualTo PLACE_WAITING) exitWith {false};
|
||||
if (GVAR(isPlacing) isNotEqualTo PLACE_WAITING) exitWith {
|
||||
false
|
||||
};
|
||||
|
||||
// Move object height 10cm per scroll
|
||||
GVAR(objectHeight) = GVAR(objectHeight) + (_scrollAmount * 0.1);
|
||||
|
@ -20,10 +20,9 @@
|
||||
params ["_player", "_item"];
|
||||
TRACE_2("Placing flag", _player, _item);
|
||||
|
||||
// Create local object
|
||||
private _flag = "FlagChecked_F" createVehicle [0, 0, 0];
|
||||
|
||||
// Set object start height
|
||||
// Set flag start height
|
||||
GVAR(objectHeight) = MIN_HEIGHT;
|
||||
|
||||
GVAR(isPlacing) = PLACE_WAITING;
|
||||
@ -56,7 +55,7 @@ private _mouseClickID = [_player, "DefaultAction", {
|
||||
[_player, "DefaultAction", _mouseClickID] call EFUNC(common,removeActionEventHandler);
|
||||
|
||||
if (GVAR(isPlacing) isEqualTo PLACE_APPROVE) then {
|
||||
// End position of the object
|
||||
// End position of the flag
|
||||
|
||||
GVAR(isPlacing) = PLACE_CANCEL;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user