-
Notifications
You must be signed in to change notification settings - Fork 737
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cargo - Add object variable for custom interaction delay (#10308)
- Loading branch information
1 parent
6c2eacc
commit 038dce8
Showing
6 changed files
with
46 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#include "..\script_component.hpp" | ||
/* | ||
* Author: tcvm | ||
* Gets the delay duration an item should take to load/unload. | ||
* | ||
* Arguments: | ||
* 0: Item <OBJECT> or <TEXT> | ||
* 1: If delay is for paradrop context <BOOLEAN> | ||
* | ||
* Return Value: | ||
* Item load/unload duration <NUMBER> | ||
* | ||
* Example: | ||
* [cursorObject, false] call ace_cargo_fnc_getDelayItem | ||
* | ||
* Public: No | ||
*/ | ||
|
||
params ["_item", "_isParadrop"]; | ||
|
||
if ((_item isEqualType objNull) && {_item getVariable [QGVAR(delay), -1] >= 0}) exitWith { | ||
_item getVariable QGVAR(delay) // return | ||
}; | ||
|
||
([GVAR(loadTimeCoefficient), GVAR(paradropTimeCoefficent)] select _isParadrop) * (_item call FUNC(getSizeItem)) // return | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters