fix undefined identifiers in patches overriding each other
This commit is contained in:
@@ -327,7 +327,11 @@ namespace Barotrauma
|
|||||||
|
|
||||||
if (hookPrefixMethods.TryGetValue(funcAddr, out HashSet<(string, LuaCsFunc, ACsMod)> methodSet))
|
if (hookPrefixMethods.TryGetValue(funcAddr, out HashSet<(string, LuaCsFunc, ACsMod)> methodSet))
|
||||||
{
|
{
|
||||||
methodSet.RemoveWhere(tuple => tuple.Item1 == identifier);
|
if (identifier != "")
|
||||||
|
{
|
||||||
|
methodSet.RemoveWhere(tuple => tuple.Item1 == identifier);
|
||||||
|
}
|
||||||
|
|
||||||
methodSet.Add((identifier, patch, owner));
|
methodSet.Add((identifier, patch, owner));
|
||||||
}
|
}
|
||||||
else if (patch != null)
|
else if (patch != null)
|
||||||
@@ -355,7 +359,11 @@ namespace Barotrauma
|
|||||||
|
|
||||||
if (hookPostfixMethods.TryGetValue(funcAddr, out HashSet<(string, LuaCsFunc, ACsMod)> methodSet))
|
if (hookPostfixMethods.TryGetValue(funcAddr, out HashSet<(string, LuaCsFunc, ACsMod)> methodSet))
|
||||||
{
|
{
|
||||||
methodSet.RemoveWhere(tuple => tuple.Item1 == identifier);
|
if (identifier != "")
|
||||||
|
{
|
||||||
|
methodSet.RemoveWhere(tuple => tuple.Item1 == identifier);
|
||||||
|
}
|
||||||
|
|
||||||
methodSet.Add((identifier, patch, owner));
|
methodSet.Add((identifier, patch, owner));
|
||||||
}
|
}
|
||||||
else if (patch != null)
|
else if (patch != null)
|
||||||
|
|||||||
@@ -185,7 +185,11 @@ namespace Barotrauma
|
|||||||
|
|
||||||
if (compatHookPrefixMethods.TryGetValue(funcAddr, out HashSet<(string, LuaCsPatch, ACsMod)> methodSet))
|
if (compatHookPrefixMethods.TryGetValue(funcAddr, out HashSet<(string, LuaCsPatch, ACsMod)> methodSet))
|
||||||
{
|
{
|
||||||
methodSet.RemoveWhere(tuple => tuple.Item1 == identifier);
|
if (identifier != "")
|
||||||
|
{
|
||||||
|
methodSet.RemoveWhere(tuple => tuple.Item1 == identifier);
|
||||||
|
}
|
||||||
|
|
||||||
methodSet.Add((identifier, patch, owner));
|
methodSet.Add((identifier, patch, owner));
|
||||||
}
|
}
|
||||||
else if (patch != null)
|
else if (patch != null)
|
||||||
@@ -213,7 +217,11 @@ namespace Barotrauma
|
|||||||
|
|
||||||
if (compatHookPostfixMethods.TryGetValue(funcAddr, out HashSet<(string, LuaCsPatch, ACsMod)> methodSet))
|
if (compatHookPostfixMethods.TryGetValue(funcAddr, out HashSet<(string, LuaCsPatch, ACsMod)> methodSet))
|
||||||
{
|
{
|
||||||
methodSet.RemoveWhere(tuple => tuple.Item1 == identifier);
|
if (identifier != "")
|
||||||
|
{
|
||||||
|
methodSet.RemoveWhere(tuple => tuple.Item1 == identifier);
|
||||||
|
}
|
||||||
|
|
||||||
methodSet.Add((identifier, patch, owner));
|
methodSet.Add((identifier, patch, owner));
|
||||||
}
|
}
|
||||||
else if (patch != null)
|
else if (patch != null)
|
||||||
|
|||||||
Reference in New Issue
Block a user