mirror of
https://github.com/All-Of-Us-Mods/MiraAPI.git
synced 2026-10-19 15:51:48 +00:00
Fix initialize patch for gamemodes
This commit is contained in:
1 parent
877fc15aec
commit
4c38189444
2 files changed
+10
-2
No files matched your search
@@ -243,9 +243,7 @@ public class HideAndSeekMode : AbstractGameMode
|
||||
|
||||
public override IEnumerator IntroCutscene(IntroCutscene __instance)
|
||||
{
|
||||
deadPlayerCount = 0;
|
||||
SoundManager.Instance.PlaySound(__instance.IntroStinger, false, 1f, null);
|
||||
ShipStatus.Instance.BreakEmergencyButton();
|
||||
Logger.GlobalInstance.Info("IntroCutscene :: CoBegin() :: Game Mode: Hide and Seek (MiraAPI)", null);
|
||||
__instance.LogPlayerRoleData();
|
||||
__instance.HideAndSeekPanels.SetActive(true);
|
||||
@@ -393,6 +391,11 @@ public class HideAndSeekMode : AbstractGameMode
|
||||
ShipStatus.Instance.StartSFX();
|
||||
UnityEngine.Object.Destroy(__instance.gameObject);
|
||||
}
|
||||
public override void Initialize()
|
||||
{
|
||||
deadPlayerCount = 0;
|
||||
ShipStatus.Instance.BreakEmergencyButton();
|
||||
}
|
||||
|
||||
public override PlayerBodyTypes GetBodyType(PlayerControl player)
|
||||
{
|
||||
|
||||
@@ -3,6 +3,7 @@ using HarmonyLib;
|
||||
using Il2CppInterop.Runtime.InteropTypes;
|
||||
using MiraAPI.Events;
|
||||
using MiraAPI.Events.Vanilla.Gameplay;
|
||||
using MiraAPI.GameModes;
|
||||
using MiraAPI.Roles;
|
||||
using MiraAPI.Utilities;
|
||||
|
||||
@@ -122,6 +123,10 @@ public static class IntroCutscenePatches
|
||||
}
|
||||
|
||||
Info("IntroCutscene ended");
|
||||
if (CustomGameModeManager.ActiveMode != null)
|
||||
{
|
||||
CustomGameModeManager.ActiveMode.Initialize();
|
||||
}
|
||||
|
||||
MiraEventManager.InvokeEvent(new IntroEndEvent(introCutscene));
|
||||
|
||||
|
||||
Reference in new issue
Block a user