private void InitGameIfNecessary() { ModEntry.Log("InitGameIfNecessary(" + isDeepWoodsGameRunning + ")", StardewModdingAPI.LogLevel.Trace); // Make sure our interceptor is set. // E.g. MTN overrides Game1.multiplayer instead of wrapping. Game1MultiplayerAccessProvider.InterceptMultiplayerIfNecessary(); if (isDeepWoodsGameRunning) { return; } if (Game1.IsMasterGame) { DeepWoodsSettings.DoLoad(); DeepWoodsManager.Add(); EasterEggFunctions.RestoreAllEasterEggsInGame(); WoodsObelisk.RestoreAllInGame(); isDeepWoodsGameRunning = true; } else { DeepWoodsManager.Remove(); hasRequestedInitMessageFromServer = true; Game1.MasterPlayer.queueMessage(Settings.Network.DeepWoodsMessageId, Game1.player, new object[] { NETWORK_MESSAGE_DEEPWOODS_INIT }); } }
private void InitGameIfNecessary() { ModEntry.Log("InitGameIfNecessary(" + isDeepWoodsGameRunning + ")", StardewModdingAPI.LogLevel.Trace); if (isDeepWoodsGameRunning) { return; } if (Game1.IsMasterGame) { DeepWoodsSettings.DoLoad(); DeepWoodsManager.Add(); EasterEggFunctions.RestoreAllEasterEggsInGame(); WoodsObelisk.RestoreAllInGame(); isDeepWoodsGameRunning = true; } else { DeepWoodsManager.Remove(); ModEntry.SendMessage(MessageId.RequestMetadata, Game1.MasterPlayer.UniqueMultiplayerID); } }