You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: code/scripting/api/libs/async.cpp
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -396,8 +396,8 @@ ADE_FUNC(captureGameState,
396
396
397
397
ADE_FUNC(createLuaState,
398
398
l_Async_Context,
399
-
"function() => enumeration",
400
-
"Creates an execution state by storing the passed function and calling that when the state is required.",
399
+
"function() => enumeration /* CONTEXT_* */",
400
+
"Creates an execution state by storing the passed function and calling that when the state is required. The function must return a CONTEXT_* enumeration.",
401
401
"execution_context",
402
402
"The execution context or invalid handle on error")
"Returns whether the specified MOUSE_* buttons are up or down",
81
80
"boolean",
82
81
"Whether specified mouse buttons are down, or false if mouse is not initialized yet")
83
82
{
@@ -115,8 +114,8 @@ ADE_FUNC(isMouseButtonDown,
115
114
116
115
ADE_FUNC(mouseButtonDownCount,
117
116
l_Mouse,
118
-
"enumeration buttonCheck /* any one of MOUSE_LEFT_BUTTON, MOUSE_RIGHT_BUTTON, MOUSE_MIDDLE_BUTTON, MOUSE_X1_BUTTON, MOUSE_X2_BUTTON */, [boolean reset_count]",
119
-
"Returns the pressed count of the specified button. The count is then reset, unless reset_count (which defaults to true) is false.",
ADE_VIRTVAR(CurrentResizeMode, l_Graphics, "enumeration ResizeMode", "Current resize mode; uses GR_RESIZE_* enumerations. This resize mode will be used by the gr.* drawing methods.", "enumeration", nullptr)
281
+
ADE_VIRTVAR(CurrentResizeMode, l_Graphics, "enumeration /* GR_RESIZE_* */", "Current resize mode; uses GR_RESIZE_* enumerations. This resize mode will be used by the gr.* drawing methods.", "enumeration", nullptr)
ADE_FUNC(hasViewmode, l_Graphics, "enumeration", "Specifies if the current viemode has the specified flag, see VM_* enumeration", "boolean", "true if flag is present, false otherwise")
2049
+
ADE_FUNC(hasViewmode, l_Graphics, "enumeration /* VM_* */", "Specifies if the current viewmode has the specified flag.", "boolean", "true if flag is present, false otherwise")
2050
2050
{
2051
2051
enum_h *type = NULL;
2052
2052
@@ -2145,7 +2145,7 @@ ADE_FUNC(hasViewmode, l_Graphics, "enumeration", "Specifies if the current viemo
ADE_FUNC(setClip, l_Graphics, "number x, number y, number width, number height, [enumeration ResizeMode]", "Sets the clipping region to the specified rectangle. Most drawing functions are able to handle the offset.", "boolean", "true if successful, false otherwise")
2148
+
ADE_FUNC(setClip, l_Graphics, "number x, number y, number width, number height, [enumeration /* GR_RESIZE_* */]", "Sets the clipping region to the specified rectangle using GR_RESIZE_* enumerations. Most drawing functions are able to handle the offset.", "boolean", "true if successful, false otherwise")
ADE_FUNC(flashTargetBox, l_HUD, "enumeration section, [number duration_in_milliseconds]", "Flashes a section of the target box with a default duration of "SCP_TOKEN_TO_STR(TBOX_FLASH_DURATION) " milliseconds", nullptr, nullptr)
263
+
ADE_FUNC(flashTargetBox, l_HUD, "enumeration section /* TBOX_* */, [number duration_in_milliseconds]", "Flashes a section of the target box with a default duration of "SCP_TOKEN_TO_STR(TBOX_FLASH_DURATION) " milliseconds", nullptr, nullptr)
ADE_FUNC(getMusicScore, l_Mission, "enumeration score", "Returns the music.tbl entry name for the specified mission music score", "string", "The name, or nil if the score is invalid")
2710
+
ADE_FUNC(getMusicScore, l_Mission, "enumeration score/* SCORE_* */", "Returns the music.tbl entry name for the specified mission music score", "string", "The name, or nil if the score is invalid")
2711
2711
{
2712
2712
enum_h score;
2713
2713
if (!ade_get_args(L, "o", l_Enum.Get(&score)))
@@ -2728,7 +2728,7 @@ ADE_FUNC(getMusicScore, l_Mission, "enumeration score", "Returns the music.tbl e
2728
2728
return ade_set_args(L, "s", name);
2729
2729
}
2730
2730
2731
-
ADE_FUNC(setMusicScore, l_Mission, "enumeration score, string name", "Sets the music.tbl entry for the specified mission music score", nullptr, nullptr)
2731
+
ADE_FUNC(setMusicScore, l_Mission, "enumeration score/* SCORE_* */, string name", "Sets the music.tbl entry for the specified mission music score", nullptr, nullptr)
ADE_FUNC(maybePlayCutscene, l_UserInterface, "enumeration MovieType, boolean RestartMusic, number ScoreIndex", "Plays a cutscene, if one exists, for the appropriate state transition. If RestartMusic is true, then the music score at ScoreIndex will be started after the cutscene plays.", nullptr, "Returns nothing")
240
+
ADE_FUNC(maybePlayCutscene, l_UserInterface, "enumeration MovieType /* MOVIE_* */, boolean RestartMusic, number ScoreIndex", "Plays a cutscene, if one exists, for the appropriate state transition. If RestartMusic is true, then the music score at ScoreIndex will be started after the cutscene plays.", nullptr, "Returns nothing")
241
241
{
242
242
enum_h movie_type;
243
243
bool restart_music = false;
@@ -821,9 +821,9 @@ ADE_FUNC(skipTraining,
821
821
ADE_FUNC(commitToMission,
822
822
l_UserInterface_Brief,
823
823
nullptr,
824
-
"Commits to the current mission with current loadout data, and starts the mission. Returns one of the COMMIT_ enums to indicate any errors.",
824
+
"Commits to the current mission with current loadout data, and starts the mission.",
825
825
"enumeration",
826
-
"the error value")
826
+
"A COMMIT_* enumeration indicating any errors")
827
827
{
828
828
commit_pressed_status rc;
829
829
@@ -3447,8 +3447,8 @@ ADE_FUNC(setName,
3447
3447
3448
3448
ADE_FUNC(setGameType,
3449
3449
l_UserInterface_MultiStartGame,
3450
-
"enumeration type=MULTI_GAME_TYPE_OPEN, [string | number password_or_rank_index]",
3451
-
"Sets the game's type and, optionally, the password or rank index.",
3450
+
"enumeration type = MULTI_GAME_TYPE_OPEN /* MULTI_GAME_TYPE_* */, [string | number password_or_rank_index]",
3451
+
"Sets the game type and optionally the password or rank index.",
0 commit comments