332 Commits

Author SHA1 Message Date
Crash Cringle 4f0febb57c Rename DefaultSyncBias --> DefaultSyncOffset 2025-03-18 07:28:50 -07:00
teejusb 9933271eac Fix error in lua docs 2025-03-18 07:24:59 -07:00
DANDO\Aless 704c353741 Added since in lua documentation 2025-03-18 07:24:59 -07:00
DANDO\Aless bdcbbe1793 Added Lua documentation for hide light feature 2025-03-18 07:24:58 -07:00
Crash Cringle 6b50f9a90c Rename MachineSyncBias --> DefaultSyncBias 2025-03-16 15:42:41 -07:00
Crash Cringle 9529bfd142 Change MachineSyncBias prefs to an enum SyncBias, Changing this song triggers a reload of songs, added new option effect for reloading songs 2025-03-16 15:42:41 -07:00
Crash Cringle 17e4953d54 Add Luadocs for Group 2025-03-03 23:25:32 -08:00
teejusb 368c257e95 Rename to rate_scaling_enable_ + Expose functions to lua 2025-03-02 10:34:28 -08:00
phantom10111 3266fda819 GameState: Expose GetPlayerFailType() to Lua
FailType for a given Player can be overriden with respect to preferences, but
Lua has no way to check it. Expose a function to allow doing that, in order to
not accidentally submit invalid scores to GrooveStats.
2025-01-20 10:03:52 -08:00
quietly-turning f13abec73d fix typos in LuaDocumentation.xml 2024-03-20 13:29:43 -05:00
teejusb 0c1115350d Allow setting the alpha of the beatbars 2024-03-03 00:08:55 -08:00
Crash Cringle 6cd43782d5 Add lua docs for GetPreferredSortSongsBySectionName, update comment, remove duplicate code 2024-02-25 09:36:21 -08:00
tertu marybig acf8be530d Allow setting and getting beat bar status per NoteField from Lua 2024-02-15 13:22:26 -08:00
Martin Natano 8dc471f874 Update version information in Lua.xml 2023-03-19 11:12:38 +01:00
teejusb 971bcd84b4 This is version 0.6.0 2023-03-17 01:12:00 -07:00
teejusb fbed947b9c Allow PreferredSongs/PreferredCourses to be set from absolute paths 2023-03-17 01:12:00 -07:00
Crash Cringle f60c1c7f82 Add new Sorting Capabilities for Profile list 2023-03-13 19:56:07 -07:00
Martin Natano 61046ca539 Updates from quietly for lua docs 2022-06-29 19:11:05 +02:00
tertu marybig 9b348090a7 HyperShuffle implementation
Also add it to _fallback
2022-06-23 11:09:40 -07:00
Ivana Kellyerova 02b9925b12 Allow ScreenSelectProfile to Finish() with guest players
Passing a -3 as profile index to ScreenSelectProfile's SetProfileIndex now
allows a player to play without having a local or USB profile assigned.

Also adds a message (PlayerProfileSet) that's broadcast anytime a player selects
a profile or chooses to play as a guest and subscribes ScreenSelectMusic to it.
2022-06-11 22:53:07 +02:00
Martin Natano 6c5bb5f665 Update Lua.xml 2022-06-05 15:52:14 +02:00
Martin Natano 15b77ee278 Update documentation 2022-05-28 11:21:13 +02:00
Martin Natano d8586b02b2 Add NETWORK:WebSocket() 2022-05-27 23:42:37 +02:00
Martin Natano ee65b7b0c4 Replace logo and clean up packaging 2022-05-21 10:05:44 +02:00
Martin Natano 4c0aef69dd Remove legacy network code 2022-04-11 14:50:00 -07:00
Martin Natano 2586eec53f Update lua docs 2022-04-06 21:13:16 +02:00
Martin Natano 724b880dfa ITGmania 2022-04-03 22:25:01 +02:00
Martin Natano 65eb85b8e9 Sync LuaDocumentation.xml with 'Lua for SM5'
The LuaDocumentation.xml in the StepMania repository and
quietly-turning's 'Lua for SM5' diverged over time. This commit pulls in
a couple of documentation improvements from 'Lua for SM5'.

- Add documentation for previously undocumented functions
- Improved descriptions
- More crosslinking
2022-04-03 21:35:21 +02:00
Martin Natano d8055e59ab Update Lua.xml documentation 2022-04-03 19:59:29 +02:00
Martin Natano 02008eb469 Rename to ITGmania
- executable name:
  - linux: itgmania
  - windows: ITGmania.exe
  - macOS: ITGmania.app
- config path:
  - linux: ~/.itgmania
  - windows; %AppData%\ITGmania
  - macOS: ~/Library/Application Support/ITGmania
2022-04-02 20:14:57 -07:00
Jose_Varela 1b27032a38 Add GaveUp() 2022-03-28 20:11:53 -07:00
Martin Natano 1036d20e11 Implement FILEMAN:Copy(string fromPath, string toPath)
Copies a file from `fromPath` to `toPath`. Returns `true` if the file
was copied successfully.
2022-03-13 12:37:11 -07:00
Martin Natano 67d1c78450 Implement FILEMAN:Unzip(string zipPath, string targetPath, int strip)
Unzip zip file at `zipPath` to `targetPath`.
`strip` is optional and defaults to `0`. If set to a number larger than
`0`, that many components are removed from the paths of the extracted
files. e.g. `a/b/c` is replaced with `b/c` when stripping one component
or just `c` when stripping two.
Returns whether all files were extracted successfully.
2022-03-13 11:46:28 -07:00
Martin Natano ca86f80743 Add support for onProgress and downloadFile to NETWORK:HttpRequest() 2022-03-13 11:31:49 -07:00
Martin Natano 0861ed45c7 Merge /AdditionalSongs into /Songs, and /AdditionalCourses into /Courses
Includes a backwards-compatibility mechanism to adapt paths when loading
Stats.xml.
2022-03-11 22:35:31 +01:00
Martin Natano afb3836367 Remove unsafe package library
package.loadlib() can be used to load a dynamic C library allowing
arbitrary code execution in mod charts and themes.

So far I haven't found any theme that depends on the library, so I think
removing it shouldn't break anything.
2022-03-04 21:27:55 +01:00
Martin Natano bb826dc0b2 Allow cancellation of HTTP requests
`NETWORK::HttpRequest()` now returns a HttpRequestFuture with a
`Cancel()` method.
2022-01-15 22:56:22 +01:00
Martin Natano bc4a275510 Add parameter encoding helpers to NETWORK
This adds two more methods:
- `NETWORK:UrlEncode()`: Encode a single string value.
- `NETWORK:EncodeQueryParameters()`: Encode a table as query string.
2022-01-15 22:56:08 +01:00
Martin Natano dc49af3c59 Implement NetworkManager
For now there are two methods:

- `NETWORK:IsUrlAllowed()`: Check whether access to a certain URL is allowed.
- `NETWORK:HttpRequest()`: Perform an HTTP request.

By default access to the network is disabled for all target hosts. It
can be enabled by setting `HttpEnable=1` in the preferences. Individual
hosts have to be added to `HttpAllowHosts` as a comma separated list to
allow access.

See included docs for more details on usage.
2022-01-15 22:56:08 +01:00
teejusb a48a5b73ad Remove returned timing window table 2022-01-05 18:21:28 -08:00
teejusb 99ee1f2b84 Use bitset instead of map and adjust files accordingly. 2021-12-21 23:44:37 -08:00
Martin Natano b4f86a2052 Add json encoding/decoding functions to lua
This adds two global functions:

- `JsonEncode()`: Encode data as JSON. Optionally "minify" the result.
- `JsonDecode()`: Decode JSON data.
2021-10-13 19:33:02 +02:00
Martin Natano f18695df59 Track held misses
This adds a `HeldMiss` attribute to judgment messages and a GetHeld()
method to TapNoteResult.
2021-08-31 18:25:09 +02:00
quietly-turning 72cd6edf5c give Lua access to tomcrypt's SHA256
This adds Lua hooks to CryptManager for libtomcrypt's SHA256 hash
function.  It follows along with the C++ patterns Glenn wrote a decade
and a half ago for CryptMananger's MD5 and SHA1 hooks.

StepMania's CMakeProject-tomcrypt file has been updated to build with
sha256 symbols.  Invoking cmake to build with system tomcrypt works fine
as-is.

Note that these functions return binary formatted strings, but themers
can convert to hexadecimal format using the global Lua function
BinaryToHex().
2020-09-09 15:37:01 -04:00
quietly-turning df07b4c649 update Version, Date in Lua.xml
These elements are normally automatically updated when a new Lua.xml is
generated using the --ExportLuaInformation command line argument, but
I've manually updated them here.  It works for now.

Running --ExportLuaInformation will generate a new Lua.xml file with
everything available to Lua, including some repetitively-named functions
ported from notitg that were manually condensed down within Lua.xml.

We want to keep these condensed parts, so ExportLuaInformation should
probably be fixed/replaced in the future.
2020-06-25 05:14:11 -04:00
quietly-turning 4635973799 add grouping attr to Class elements in LuaDoc
These "grouping"s aren't part of the spec in Docs/Luadoc/Lua.xsd, so
they won't appear when Lua.xml is viewed in a web browser, but can still
be used by external API doc applications until ExportLuaInformation is
improved.
2020-06-25 05:10:25 -04:00
quietly-turning 5574113d63 tidy preformatted code examples in LuaDoc 2020-06-25 05:06:16 -04:00
quietly-turning 91bf61a178 update LuaDocs for Classes
Fix, clarify, and expand prose in LuaDocumentation.xml for classes made
available to Lua.

Add elements for DeviceList, InputList, Quad, and SongMeterDisplay to
Lua.xml.
2020-06-25 04:55:13 -04:00
quietly-turning d62797973f update LuaDocs for Singletons, Enums for 5.1-new 2020-06-25 04:49:09 -04:00
quietly-turning 7804efb103 update GlobalFunctions prose in LuaDocumentation
Expand and clarify the prose for many gloabl Lua functions described in
in LuaDocumentation.xml.

Get Lua.xml's GlobalFunctions listing current with 5_1-new.  Remove old
global functions (those moved to 5.1's "legacy" theme) from Lua.xml.
2020-06-25 04:24:24 -04:00