diff --git a/src/BizHawk.Client.Common/movie/interfaces/ITasMovie.cs b/src/BizHawk.Client.Common/movie/interfaces/ITasMovie.cs index 36b9da864a..b631d61126 100644 --- a/src/BizHawk.Client.Common/movie/interfaces/ITasMovie.cs +++ b/src/BizHawk.Client.Common/movie/interfaces/ITasMovie.cs @@ -21,6 +21,11 @@ namespace BizHawk.Client.Common int LastEditedFrame { get; } bool LastEditWasRecording { get; } + /// + /// 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. + /// Action GreenzoneInvalidated { get; set; } string DisplayValue(int frame, string buttonName); diff --git a/src/BizHawk.Client.EmuHawk/tools/Lua/Libraries/TAStudioLuaLibrary.cs b/src/BizHawk.Client.EmuHawk/tools/Lua/Libraries/TAStudioLuaLibrary.cs index be91c0e09f..f85049105e 100644 --- a/src/BizHawk.Client.EmuHawk/tools/Lua/Libraries/TAStudioLuaLibrary.cs +++ b/src/BizHawk.Client.EmuHawk/tools/Lua/Libraries/TAStudioLuaLibrary.cs @@ -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())