From c8ca3a2a24923910866299dd5373c7661e4d6d6c Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Wed, 11 Aug 2010 00:40:28 -0500 Subject: [PATCH] update lua documentation --- Docs/Luadoc/Lua.xml | 3 +- Docs/Luadoc/LuaDocumentation.xml | 169 +++++++++++++++++++++++++++++-- 2 files changed, 161 insertions(+), 11 deletions(-) diff --git a/Docs/Luadoc/Lua.xml b/Docs/Luadoc/Lua.xml index 6ab21c1aa2..a2faa19685 100644 --- a/Docs/Luadoc/Lua.xml +++ b/Docs/Luadoc/Lua.xml @@ -868,6 +868,7 @@ + @@ -1896,5 +1897,5 @@ sm-ssc v1.0 rc1.5 - 2010-08-07 + 2010-08-10 diff --git a/Docs/Luadoc/LuaDocumentation.xml b/Docs/Luadoc/LuaDocumentation.xml index a217fc715f..fea04b7c6b 100644 --- a/Docs/Luadoc/LuaDocumentation.xml +++ b/Docs/Luadoc/LuaDocumentation.xml @@ -56,6 +56,15 @@ hex ("#FFFFFFFF") or 0..1 values ("1.0,1.0,1.0,1.0"), in RGBA order. + + [03 Gameplay.lua] Determines what TapNoteScore allows for continuing the combo. + + + [03 Gameplay.lua] Determines what TapNoteScore allows for maintaining the combo. + + + [03 Gameplay.lua] Determines if combo should be per row (Jump = 1) or per column (Jump = 2). + Tries to connect to the server at sAddress. @@ -68,15 +77,30 @@ [01 base.lua] "Override Lua's dofile to use our loadfile." + + [02 Utilities.lua] Find a key in tab with the given value. + + + [02 Utilities.lua] Return the index of a true value in list. + Returns the number passed to the function followed by its suffix ("th", "nd", and so on). Returns fPercentDancePoints formatted as a percentage. + + [03 Gameplay.lua] Returns a list of valid styles for the current gametype. + Returns the corresponding CustomDifficulty string for a StepsType/Difficulty (/optional CourseType) combination. + + [03 EnvUtils2.lua] Returns the value of name from the Env table. + + + [03 Gameplay.lua] Returns the number at which the Extra color should be used. + Returns a corresponding for the given percentage. @@ -86,15 +110,42 @@ Returns a string representing the name of the operating system being used. (e.g. "Xbox", "Windows", "Linux", "Mac, "Unknown") + + [03 ThemePrefs.lua] Returns true if player pn is using ProTiming. + Returns the theme's aspect ratio. + + [03 UserPreferences2.lua] Themer-facing function for getting a user preference. + + + [03 UserPreferences2.lua] Themer-facing function for getting a user preference as a boolean. + + + [03 UserPreferences2.lua] Themer-facing function for getting a user preference as a color. + + + [03 UserPreferences2.lua] Themer-facing function for getting a user preference as a number. + Returns the current hour. + + [03 ThemePrefs.lua] Initializes various user preferences. + + + [03 ProductivityHelpers.lua] Returns true if the coin mode is not set to CoinMode_Home. + Returns true if Event Mode is turned on. + + [03 ProductivityHelpers.lua] Returns true if Arcade and the coin mode is CoinMode_Free. + + + [03 ProductivityHelpers.lua] Returns true if the coin mode is set to CoinMode_Home. + Returns true if connected to the Internet. @@ -105,9 +156,15 @@ Returns true if Player pn is logged on to a SMOnline server. + + [04 WidescreenHelpers.lua] Returns true if the aspect ratio is 16:10 (1.6) or higher. + [01 base.lua] "Like ipairs(), but returns only values." + + [02 Utilities.lua] Joins a table, splitting each item with delimiter, returning a string of the results. + Returns an Actor definition for the actor at sPath. If sPath points to a Lua file, any additional arguments will be passed to that script. @@ -141,9 +198,24 @@ Returns Month m as a string. + + [03 ProductivityHelpers.lua] Converts a PlayerNumber into a short string (e.g. "P1", "P2"). + + + [00 init.lua] + [02 ActorDef.lua] + + [03 UserPreferences2.lua] (internal) Reads the specified user preference from its config file. + + + [02 Utilities.lua] Round a number. + + + [03 Gameplay.lua] Returns the primary ScoreKeeper class to use. + Returns the current second. @@ -153,9 +225,21 @@ [02 Branches.lua] Determines the correct music/course selection screen to use and returns it. + + [03 Gameplay.lua] (soon to be deprecated) Returns a list of codes to use on ScreenSelectProfile. + + + [03 EnvUtils2.lua] Sets the value of name to value in the Env table. + + + [03 UserPreferences2.lua] Themer-facing function for setting a user preference. + [02 ActorDef.lua] Returns true if a decoration should be shown on the current screen or not. + + [02 Utilities.lua] Splits a string at every occurence of delimiter, returning a table of the results. + [02 ActorDef.lua] @@ -165,8 +249,14 @@ [02 ActorDef.lua] - - [02 Other.lua] This function defines how the TextBanner is laid out. + + [02 Utilities.lua] Look up each value in a table, returning a table with the resulting strings. + + + [02 TextBanner.lua] This function defines how the TextBanner is laid out. + + + [03 ProductivityHelpers.lua] Converts a string or number to a bool. [02 Enum.lua] Returns a string representing an enum starting from '_'. For example, passing PlayerNumber_P1 to this function will return P1. @@ -177,12 +267,18 @@ [01 base.lua] Alias for lua.GetThreadVariable. - - Alias for . + + [00 init.lua] Alias for . + + + [04 WidescreenHelpers.lua] Depending on the screen width, scales between ar43 (4:3; 640px) and ar169 (16:9; 854px). [02 ActorDef.lua] Wraps the children in an ActorFrame. + + [03 UserPreferences2.lua] (internal) Writes user preference prefName to its config file with value being tostring'd. + Returns the current year. @@ -211,7 +307,6 @@ Returns a string with characters escaped for URLs. (e.g. a space becomes '%20') - [03 CustomSpeedMods.lua] Returns a Lua option row with the custom speed mods defined in SpeedMods.txt. @@ -223,6 +318,28 @@ [04 FileUtils.lua] Writes buf to the file at path. + + + [03 ThemePrefs.lua] Returns a Lua option row for ProTiming. + + + [03 ThemePrefs.lua] Returns a Lua option row for toggling AutoSetStyle. + + + [03 ThemePrefs.lua] Returns a Lua option row for displaying the score on ScreenGameplay. + + + [03 ThemePrefs.lua] Returns a Lua option row for displaying the StepsDisplay on ScreenGameplay. + + + [03 ThemePrefs.lua] Returns a Lua option row for determining the fail length. + + + [03 ThemePrefs.lua] Returns a Lua option row for determining the receptor arrow position. + + + [03 ThemePrefs.lua] Returns a Lua option row determining how deep the player options menu should go. + @@ -522,6 +639,12 @@ Returns the Actor's base X zoom value. + + Returns the Actor's base Y zoom value. + + + Returns the Actor's base Z zoom value. + Returns true if the Actor has a command named sCmdName. @@ -537,6 +660,9 @@ Returns the Actor's current effect magnitude as three floats (not one; I hate Lua.xsd). + + Returns the Actor's current glow color. + Returns the Actor's horizontal alignment as a number in the range 0..1. @@ -772,7 +898,7 @@ Returns the child with a name of sName. - Returns an table of all the children in the ActorFrame. + Returns a table of all the children in the ActorFrame. Gets the ActorFrame's Draw function. @@ -1156,6 +1282,9 @@ Returns the Course's directory. + + Returns a table of CourseEntry items. + Gets the CourseEntry at iIndex from the Course. @@ -1258,7 +1387,7 @@ Sets the DifficultyIcon's state from the difficulty passed in. - + Sets the DifficultyIcon's Player to pn, then sets the DifficultyIcon's state from the difficulty of Steps pSteps @@ -1381,6 +1510,9 @@ Return the current . + + Returns the current stage index (starts at 0). + Return the current for the specified Player. @@ -1497,6 +1629,9 @@ Returns true if the song is currently in a freeze. + + Returns the song options for the specified ModsLevel as a string. + Returns the song options as a string. @@ -1876,6 +2011,9 @@ Returns how long the player has been alive. + + Returns the best tap note score for a full combo. + Returns the number of calories burned. @@ -1951,6 +2089,7 @@ Returns the number of judgments for a specified TapNoteScore. + Returns the max combo for this performance. @@ -1980,12 +2120,15 @@ Returns the player number for this PlayerState. - - Sets the player options to sPlayerOptions for the specified ModsLevel. - Returns a string of player options for the specified ModsLevel. + + Returns a table of strings, containing the player options for the specified ModsLevel. + + + Sets the player options to sPlayerOptions for the specified ModsLevel. + @@ -2323,6 +2466,9 @@ + + Adds a screen at the top of the screen stack. + Gets the screen at the top of the screen stack. @@ -2935,6 +3081,9 @@ Returns the Trail's difficulty. + + Returns a table of TrailEntry items. + Returns the Trail's difficulty rating.