From 50cad2067ffe6a1d1abf29bfd489b37a2f428c92 Mon Sep 17 00:00:00 2001 From: adelikat Date: Fri, 29 Nov 2019 15:11:40 -0600 Subject: [PATCH] Lua - when removing registered functions, remove functions reigstered to a script of the same path (or the same thread) --- BizHawk.Client.Common/lua/LuaFunctionList.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/BizHawk.Client.Common/lua/LuaFunctionList.cs b/BizHawk.Client.Common/lua/LuaFunctionList.cs index ab78b6fd3c..7d93144f9d 100644 --- a/BizHawk.Client.Common/lua/LuaFunctionList.cs +++ b/BizHawk.Client.Common/lua/LuaFunctionList.cs @@ -59,7 +59,8 @@ namespace BizHawk.Client.Common public static IEnumerable ForFile(this IEnumerable 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 ForEvent(this IEnumerable list, string eventName)