From 3a6b42278a30bf26ab9198acff2f6989b4b77735 Mon Sep 17 00:00:00 2001 From: YoshiRulz Date: Sun, 23 Mar 2025 04:14:27 +1000 Subject: [PATCH] Revert "TAStudio marker lua (#4272)" This reverts commit eb79f2e735d325b2f2f9a3d78ca264a61fad4199. --- .../tools/Lua/Libraries/TAStudioLuaLibrary.cs | 69 ------------------- 1 file changed, 69 deletions(-) diff --git a/src/BizHawk.Client.EmuHawk/tools/Lua/Libraries/TAStudioLuaLibrary.cs b/src/BizHawk.Client.EmuHawk/tools/Lua/Libraries/TAStudioLuaLibrary.cs index 113c2e8802..44c258e4c8 100644 --- a/src/BizHawk.Client.EmuHawk/tools/Lua/Libraries/TAStudioLuaLibrary.cs +++ b/src/BizHawk.Client.EmuHawk/tools/Lua/Libraries/TAStudioLuaLibrary.cs @@ -459,75 +459,6 @@ namespace BizHawk.Client.EmuHawk return ""; } - [LuaMethodExample("local markerframe = tastudio.getmarkerabove(100).Frame")] - [LuaMethod("getmarkerabove", "returns a table of the marker at or above the given frame with fields Frame and Text")] - public LuaTable GetMarkerAbove(int frame) - { - var table = _th.CreateTable(); - if (!Engaged()) return table; - - var marker = Tastudio.CurrentTasMovie.Markers.PreviousOrCurrent(frame); - table["Frame"] = marker.Frame; - table["Text"] = marker.Message; - - return table; - } - - [LuaMethodExample("local branchmarkertext = tastudio.getbranchmarkerabove(0, 100).Text")] - [LuaMethod("getbranchmarkerabove", "returns a table of the marker at or above the given frame for the given branch index, starting at 0, with fields Frame and Text")] - public LuaTable GetBranchMarkerAbove(int index, int frame) - { - var table = _th.CreateTable(); - if (!Engaged()) return table; - - if (index >= Tastudio.CurrentTasMovie.Branches.Count) return table; - - var branch = Tastudio.CurrentTasMovie.Branches[index]; - var marker = branch.Markers.PreviousOrCurrent(frame); - table["Frame"] = marker.Frame; - table["Text"] = marker.Message; - - return table; - } - - [LuaMethodExample("local markertext = tastudio.getmarkers()[0].Text")] - [LuaMethod("getmarkers", "returns a table of all markers with fields Frame and Text")] - public LuaTable GetMarkers() - { - if (!Engaged()) return _th.CreateTable(); - - return _th.EnumerateToLuaTable( - Tastudio.CurrentTasMovie.Markers.Select(m => - { - var table = _th.CreateTable(); - table["Frame"] = m.Frame; - table["Text"] = m.Message; - return table; - }), - indexFrom: 0); - } - - [LuaMethodExample("local branchmarkerframe = tastudio.getmarkers(0)[0].Frame")] - [LuaMethod("getbranchmarkers", "returns a table of all markers for the given branch index, starting at 0, with fields Frame and Text")] - public LuaTable GetBranchMarkers(int index) - { - if (!Engaged()) return _th.CreateTable(); - - if (index >= Tastudio.CurrentTasMovie.Branches.Count) return _th.CreateTable(); - - var branch = Tastudio.CurrentTasMovie.Branches[index]; - - return _th.EnumerateToLuaTable( - branch.Markers.Select(m => - { - var table = _th.CreateTable(); - table["Frame"] = m.Frame; - table["Text"] = m.Message; - return table; - }), - indexFrom: 0); - } - [LuaMethodExample("tastudio.removemarker( 500 );")] [LuaMethod("removemarker", "if there is a marker for the given frame, it will be removed")] public void RemoveMarker(int frame)