Add documentation for GreenzoneInvalidated and update Lua's documentation.

This commit is contained in:
SuuperW 2025-07-05 00:36:49 -05:00
parent 46225fbbd7
commit 6c2421f93d
No known key found for this signature in database
2 changed files with 6 additions and 1 deletions

View File

@ -21,6 +21,11 @@ namespace BizHawk.Client.Common
int LastEditedFrame { get; }
bool LastEditWasRecording { get; }
/// <summary>
/// Called whenever the movie is modified in a way that could invalidate savestates in the movie's state history.
/// Called regardless of whether any states were actually invalidated.
/// The parameter is the last frame number who's savestate (if it exists) is still valid. That is, the first of the modified frames.
/// </summary>
Action<int> GreenzoneInvalidated { get; set; }
string DisplayValue(int frame, string buttonName);

View File

@ -544,7 +544,7 @@ namespace BizHawk.Client.EmuHawk
}
[LuaMethodExample("tastudio.ongreenzoneinvalidated( function( currentindex )\r\n\tconsole.log( \"Called whenever the greenzone is invalidated.\" );\r\nend );")]
[LuaMethod("ongreenzoneinvalidated", "Called whenever the greenzone is invalidated. Your callback can have 1 parameter, which will be the index of the last row before the invalidated ones.")]
[LuaMethod("ongreenzoneinvalidated", "Called whenever the movie is modified in a way that could invalidate savestates in the movie's state history. Called regardless of whether any states were actually invalidated. Your callback can have 1 parameter, which will be the last frame before the invalidated ones. That is, the first of the modified frames.")]
public void OnGreenzoneInvalidated(LuaFunction luaf)
{
if (Engaged())