mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-18 13:23:05 +00:00
fix _patchedTypes having multiple of same type
This commit is contained in:
parent
9571b27ae0
commit
459929e4df
@ -84,10 +84,18 @@ namespace QSB.Patches
|
||||
|
||||
TypeToInstance = new Dictionary<QSBPatchTypes, Harmony>
|
||||
{
|
||||
{ QSBPatchTypes.OnClientConnect, new Harmony("QSB.Client") },
|
||||
{ QSBPatchTypes.OnServerClientConnect, new Harmony("QSB.Server") },
|
||||
{ QSBPatchTypes.OnNonServerClientConnect, new Harmony("QSB.NonServer") },
|
||||
{ QSBPatchTypes.RespawnTime, new Harmony("QSB.Death") }
|
||||
{
|
||||
QSBPatchTypes.OnClientConnect, new Harmony("QSB.Client")
|
||||
},
|
||||
{
|
||||
QSBPatchTypes.OnServerClientConnect, new Harmony("QSB.Server")
|
||||
},
|
||||
{
|
||||
QSBPatchTypes.OnNonServerClientConnect, new Harmony("QSB.NonServer")
|
||||
},
|
||||
{
|
||||
QSBPatchTypes.RespawnTime, new Harmony("QSB.Death")
|
||||
}
|
||||
};
|
||||
|
||||
DebugLog.DebugWrite("Patch Manager ready.", MessageType.Success);
|
||||
@ -109,13 +117,13 @@ namespace QSB.Patches
|
||||
try
|
||||
{
|
||||
patch.DoPatches(TypeToInstance[type]);
|
||||
_patchedTypes.Add(type);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
DebugLog.ToConsole($"Error while patching {patch.GetType().Name} :\r\n{ex}", MessageType.Error);
|
||||
}
|
||||
}
|
||||
_patchedTypes.Add(type);
|
||||
}
|
||||
|
||||
public static void DoUnpatchType(QSBPatchTypes type)
|
||||
|
Loading…
x
Reference in New Issue
Block a user