Lua - when removing registered functions, remove functions reigstered to a script of the same path (or the same thread)

This commit is contained in:
adelikat 2019-11-29 15:11:40 -06:00
parent f36d69e6b0
commit 50cad2067f
1 changed files with 2 additions and 1 deletions

View File

@ -59,7 +59,8 @@ namespace BizHawk.Client.Common
public static IEnumerable<NamedLuaFunction> ForFile(this IEnumerable<NamedLuaFunction> list, LuaFile luaFile)
{
return list
.Where(l => l.LuaFile.Thread == luaFile.Thread);
.Where(l => l.LuaFile.Path == luaFile.Path
|| l.LuaFile.Thread == luaFile.Thread);
}
public static IEnumerable<NamedLuaFunction> ForEvent(this IEnumerable<NamedLuaFunction> list, string eventName)