diff --git a/Docs/Luadoc/Lua.xml b/Docs/Luadoc/Lua.xml index cbcd85d52b..ff7beb128f 100644 --- a/Docs/Luadoc/Lua.xml +++ b/Docs/Luadoc/Lua.xml @@ -2361,6 +2361,18 @@ + + + + + + + + + + + + diff --git a/Docs/Luadoc/LuaDocumentation.xml b/Docs/Luadoc/LuaDocumentation.xml index d063c59940..1f668554e9 100644 --- a/Docs/Luadoc/LuaDocumentation.xml +++ b/Docs/Luadoc/LuaDocumentation.xml @@ -1978,6 +1978,9 @@ save yourself some time, copy this for undocumented things: + + This singleton is accessible to Lua via ANNOUNCER. + Returns true if Announcer sAnnouncer exists. @@ -1992,6 +1995,9 @@ save yourself some time, copy this for undocumented things: + + This singleton is accessible to Lua via HOOKS. + Returns true if the application presently has focus. @@ -2183,6 +2189,9 @@ save yourself some time, copy this for undocumented things: + + This singleton is accessible to Lua via CHARMAN. + Returns a table of all characters installed. @@ -2331,6 +2340,9 @@ save yourself some time, copy this for undocumented things: + + This singleton is accessible to Lua via CRYPTMAN. + Generates a random UUID (version 4). @@ -2633,6 +2645,9 @@ save yourself some time, copy this for undocumented things: + + This singleton is accessible to Lua via GAMEMAN. + Return the first for the specified game. @@ -2656,6 +2671,9 @@ save yourself some time, copy this for undocumented things: + + This singleton is accessible to Lua via SOUND. + Set the music volume to fVolume for fDuration seconds. @@ -2686,6 +2704,9 @@ save yourself some time, copy this for undocumented things: + + This singleton is accessible to Lua via GAMESTATE. + Adds another stage to the specifed player. @@ -3195,6 +3216,9 @@ save yourself some time, copy this for undocumented things: + + This singleton is accessible to Lua via INPUTFILTER. + Returns the mouse wheel value. @@ -3231,6 +3255,9 @@ save yourself some time, copy this for undocumented things: + + This singleton is accessible to Lua via MEMCARDMAN. + Returns true if player pn's card is locked. @@ -3275,6 +3302,9 @@ save yourself some time, copy this for undocumented things: + + This singleton is accessible to Lua via MESSAGEMAN. + Broadcast the message to all listeners subscribed to sMessage. The second argument is an optional table of parameters. It may be omitted or explicitly @@ -3339,6 +3369,9 @@ save yourself some time, copy this for undocumented things: + + This singleton is accessible to Lua via NOTESKIN. + Returns a string from the specified element and value. @@ -4117,6 +4150,9 @@ save yourself some time, copy this for undocumented things: + + This singleton is accessible to Lua via PREFSMAN. + Return the value of the preference sPreference. @@ -4339,6 +4375,9 @@ save yourself some time, copy this for undocumented things: + + This singleton is accessible to Lua via PROFILEMAN. + Returns the Profile for the specified profile ID. @@ -4438,6 +4477,9 @@ save yourself some time, copy this for undocumented things: + + This singleton is accessible to Lua via DISPLAY. + Return the height of the display. @@ -4517,6 +4559,9 @@ save yourself some time, copy this for undocumented things: + + This singleton is accessible to Lua via FILEMAN. + Returns true if a file exists at sPath. @@ -4531,6 +4576,9 @@ save yourself some time, copy this for undocumented things: + + This singleton is accessible to Lua via INPUTMAN. + Return an array of connected input device descriptions. @@ -4759,6 +4807,9 @@ save yourself some time, copy this for undocumented things: + + This singleton is accessible to Lua via SCREENMAN. + Adds a screen at the top of the screen stack. (sMessage is an optional ScreenMessage posted once the new screen is finished.) @@ -5140,6 +5191,9 @@ save yourself some time, copy this for undocumented things: + + This singleton is accessible to Lua via SONGMAN. + Returns true if the specified course group exists. @@ -5469,6 +5523,9 @@ save yourself some time, copy this for undocumented things: + + This singleton is accessible to Lua via STATSMAN. + Returns the accumulated played StageStats. @@ -5699,6 +5756,9 @@ save yourself some time, copy this for undocumented things: + + This singleton is accessible to Lua via THEME. + Returns true if the specified language exists in the current theme. @@ -5988,6 +6048,9 @@ save yourself some time, copy this for undocumented things: + + This singleton is accessible to Lua via UNLOCKMAN. + Returns true if there are any unlocks to celebrate. @@ -6087,6 +6150,20 @@ save yourself some time, copy this for undocumented things: + + StepMania's enums are exposed to Lua as global tables. Note that although the enum values start at 0, these global Lua tables are indexed starting at 1.
+ Functions that require enums as arguments will accept either the string constant or number value.
+ For example, accepts a PlayerNumber and Difficulty as arguments. + Each of these is valid way to set P1's preferred difficulty to hard:
+

+-- using strings
+GAMESTATE:SetPreferredDifficulty( "PlayerNumber_P1", "Difficulty_Hard" )
+-- using values
+GAMESTATE:SetPreferredDifficulty( 0, 3 )
+-- using global Lua tables
+GAMESTATE:SetPreferredDifficulty( PlayerNumber[1], Difficulty[4] )
+
+
Blending modes. See . @@ -6103,4 +6180,20 @@ save yourself some time, copy this for undocumented things:
+ + + + + The StepMania engine uses singletons internally when it needs only one instance of a class.
+ Each singleton has a class name (e.g. RageDisplay, NoteSkinManager, etc.) from the C++ engine, and a similar (but different) userdata name available to Lua (e.g. DISPLAY, NOTESKIN, etc.).
+Simple examples: +

+-- use GameState's singleton to get the current song
+local song = GAMESTATE:GetCurrentSong()
+
+-- use ScreenManager's singleton to briefly show text on-screen
+SCREENMAN:SystemMessage("hello from Lua!")
+
+
+