RegisterNotRequiredForAllPlayers: check NetworkBehaviour too

This commit is contained in:
JohnCorby 2023-08-08 20:26:46 -07:00
parent 2b2eddd462
commit 42a033249a

View File

@ -242,7 +242,9 @@ public class QSBCore : ModBehaviour
foreach (var type in addonAssembly.GetTypes()) foreach (var type in addonAssembly.GetTypes())
{ {
if (typeof(WorldObjectManager).IsAssignableFrom(type) || typeof(IWorldObject).IsAssignableFrom(type)) if (typeof(WorldObjectManager).IsAssignableFrom(type) ||
typeof(IWorldObject).IsAssignableFrom(type) ||
typeof(NetworkBehaviour).IsAssignableFrom(type))
{ {
DebugLog.ToConsole($"Addon \"{uniqueName}\" cannot be cosmetic, as it creates networking objects.", MessageType.Error); DebugLog.ToConsole($"Addon \"{uniqueName}\" cannot be cosmetic, as it creates networking objects.", MessageType.Error);
return; return;