lua - implement movie.InsertFrame(int index, string logEntry), for now, will only work on .bk2 movies (.bkm and .tasproj will crash)
This commit is contained in:
parent
0b4dfb0ba0
commit
383a462207
|
@ -14,6 +14,19 @@ namespace BizHawk.Client.Common
|
|||
|
||||
public override string Name { get { return "movie"; } }
|
||||
|
||||
[LuaMethodAttributes(
|
||||
"insertframe",
|
||||
"Inserts a log entry string into the specified index of the movie input log"
|
||||
)]
|
||||
public void InsertFrame(int index, string logEntry)
|
||||
{
|
||||
if (Global.MovieSession.Movie.IsActive)
|
||||
{
|
||||
// TODO: don't make this bk2 specific, and don't expose the log as the means to do this!
|
||||
(Global.MovieSession.Movie as Bk2Movie).Log.Insert(index, logEntry);
|
||||
}
|
||||
}
|
||||
|
||||
[LuaMethodAttributes(
|
||||
"filename",
|
||||
"Returns the file name including path of the currently loaded movie"
|
||||
|
|
|
@ -42,6 +42,8 @@ namespace BizHawk.Client.Common
|
|||
}
|
||||
}
|
||||
|
||||
public List<string> Log { get { return _log; } }
|
||||
|
||||
public string Name { get; private set; }
|
||||
|
||||
public virtual string PreferredExtension { get { return Extension; } }
|
||||
|
|
Loading…
Reference in New Issue