forked from zombieb/undead-universal-patch-il2cpp
haha forgot to push,,,
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace undead_universal_patch_il2cpp.Patches.UndeadGameManager;
|
||||
[HarmonyPatch]
|
||||
public class GameConfiguratorPatch
|
||||
{
|
||||
static Dictionary<string, GameConfigurationAssetDTO> gameConfig = GameConfigurator.config.Get();
|
||||
public static Dictionary<string, GameConfigurationAssetDTO> gameConfig = null;
|
||||
|
||||
static PatchTypesResult patchResult = Util.ConfigPreparePatchTypes(
|
||||
GameManagerConfig.StaticGameConfig,
|
||||
@@ -28,6 +28,12 @@ public class GameConfiguratorPatch
|
||||
|
||||
public static void Prefix(ref GameConfigurationAsset config, ref bool showNotification)
|
||||
{
|
||||
if (gameConfig == null)
|
||||
{
|
||||
Util.ConditionalDebug("gameconfigassets was not yet fetched!");
|
||||
return;
|
||||
}
|
||||
|
||||
var conf = config;
|
||||
showNotification = GenericConfig.PatchDebug.Value;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user