mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-01 03:32:38 +00:00
Revert "QSBMessageManager: init after addons"
This reverts commit 74945dbeb4
.
This commit is contained in:
parent
74945dbeb4
commit
d58195da63
@ -33,7 +33,7 @@ public static class QSBMessageManager
|
||||
private static string _rxPath;
|
||||
private static string _txPath;
|
||||
|
||||
public static void InitTypes()
|
||||
static QSBMessageManager()
|
||||
{
|
||||
foreach (var type in typeof(QSBMessage).GetDerivedTypes())
|
||||
{
|
||||
@ -44,7 +44,7 @@ public static class QSBMessageManager
|
||||
}
|
||||
}
|
||||
|
||||
public static void InitHandlers()
|
||||
public static void Init()
|
||||
{
|
||||
NetworkServer.RegisterHandler<Wrapper>((_, wrapper) => OnServerReceive(wrapper));
|
||||
NetworkClient.RegisterHandler<Wrapper>(wrapper => OnClientReceive(wrapper));
|
||||
|
@ -122,8 +122,6 @@ public class QSBCore : ModBehaviour
|
||||
|
||||
public void Awake()
|
||||
{
|
||||
// TODO: try manually loading steam dll for xbox. need to move all the steam stuff to new method or else it tries to load it first :(
|
||||
|
||||
// no, we cant localize this - languages are loaded after the splash screen
|
||||
UIHelper.ReplaceUI(UITextType.PleaseUseController,
|
||||
"<color=orange>Quantum Space Buddies</color> is best experienced with friends...");
|
||||
@ -253,8 +251,6 @@ public class QSBCore : ModBehaviour
|
||||
|
||||
// init again to get addon patches
|
||||
QSBPatchManager.Init();
|
||||
// have to register message after addons get added dummy
|
||||
QSBMessageManager.InitTypes();
|
||||
|
||||
MenuApi = ModHelper.Interaction.TryGetModApi<IMenuAPI>(ModHelper.Manifest.Dependencies[0]);
|
||||
|
||||
|
@ -291,7 +291,7 @@ public class QSBNetworkManager : NetworkManager, IAddComponentOnStart
|
||||
|
||||
OnClientConnected?.SafeInvoke();
|
||||
|
||||
QSBMessageManager.InitHandlers();
|
||||
QSBMessageManager.Init();
|
||||
|
||||
gameObject.AddComponent<RespawnOnDeath>();
|
||||
gameObject.AddComponent<ServerStateManager>();
|
||||
|
Loading…
Reference in New Issue
Block a user