haha forgot to push,,,

This commit is contained in:
2025-09-11 19:54:25 -04:00
parent d45fc2c953
commit 9318ac75d6
25 changed files with 296 additions and 86 deletions

View File

@@ -1,17 +1,15 @@
using System;
using System.Collections.Generic;
using System.Reflection;
using HarmonyLib;
using undead_universal_patch_il2cpp.Core;
using undead_universal_patch_il2cpp.Core.Config;
using undead_universal_patch_il2cpp.Core.Content.UndeadGameManager;
namespace undead_universal_patch_il2cpp.Patches.UndeadGameManager;
[HarmonyPatch]
public class FreeSpawnsPatch_Array
{
public static List<string> config = GameFreeSpawns.config.Get();
public static List<string> spawns = null;
static PatchTypesResult patchResult = Util.ConfigPreparePatchTypes(
GameManagerConfig.AnyGameFreeSpawn,
@@ -26,6 +24,12 @@ public class FreeSpawnsPatch_Array
public static void Postfix(ref GamePlayerSpawnPoint __instance)
{
if (spawns == null)
{
Util.ConditionalDebug("FreeSpawns was not yet fetched!");
return;
}
Util.ConditionalDebug("Attempting FreeSpawns patch");
GameManager man = NetworkedSingletonMonoBehaviour<GameManager>.instance;
@@ -39,7 +43,7 @@ public class FreeSpawnsPatch_Array
Util.ConditionalDebug("CurrentGameConfiguration.configurationData was null");
return;
}
if (!config.Contains(man.CurrentGameConfiguration.configurationData.Name))
if (!spawns.Contains(man.CurrentGameConfiguration.configurationData.Name))
{
Util.ConditionalDebug($"Game '{man.CurrentGameConfiguration.configurationData.Name}' is not specified by GameFreeSpawns");
return;