using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Security;
using System.Security.Permissions;
using System.Threading;
using Atlas.Loaders;
using Atlas.MappingComponents;
using Atlas.MappingComponents.Sandbox;
using Atlas.MappingComponents.TakeAndHold;
using BepInEx;
using BepInEx.Logging;
using FistVR;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using MonoMod.RuntimeDetour;
using On.FistVR;
using Sodalite.Api;
using Sodalite.Utilities;
using UnityEngine;
using UnityEngine.SceneManagement;
using UnityEngine.UI;
using Valve.Newtonsoft.Json;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyCompany("Atlas")]
[assembly: AssemblyConfiguration("Runtime")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0+a55d304310eb38b449eab3c2a6aa71a7b61c7498")]
[assembly: AssemblyProduct("Atlas")]
[assembly: AssemblyTitle("Atlas")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
internal sealed class EmbeddedAttribute : Attribute
{
}
}
namespace System.Runtime.CompilerServices
{
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)]
internal sealed class NullableAttribute : Attribute
{
public readonly byte[] NullableFlags;
public NullableAttribute(byte P_0)
{
NullableFlags = new byte[1] { P_0 };
}
public NullableAttribute(byte[] P_0)
{
NullableFlags = P_0;
}
}
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)]
internal sealed class NullableContextAttribute : Attribute
{
public readonly byte Flag;
public NullableContextAttribute(byte P_0)
{
Flag = P_0;
}
}
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
internal sealed class RefSafetyRulesAttribute : Attribute
{
public readonly int Version;
public RefSafetyRulesAttribute(int P_0)
{
Version = P_0;
}
}
}
namespace System.Diagnostics.CodeAnalysis
{
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter, Inherited = false)]
[DebuggerNonUserCode]
internal sealed class AllowNullAttribute : Attribute
{
}
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter, Inherited = false)]
[DebuggerNonUserCode]
internal sealed class DisallowNullAttribute : Attribute
{
}
[AttributeUsage(AttributeTargets.Method, Inherited = false)]
[DebuggerNonUserCode]
internal sealed class DoesNotReturnAttribute : Attribute
{
}
[AttributeUsage(AttributeTargets.Parameter, Inherited = false)]
[DebuggerNonUserCode]
internal sealed class DoesNotReturnIfAttribute : Attribute
{
public bool ParameterValue { get; }
public DoesNotReturnIfAttribute(bool parameterValue)
{
ParameterValue = parameterValue;
}
}
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter | AttributeTargets.ReturnValue, Inherited = false)]
[DebuggerNonUserCode]
internal sealed class MaybeNullAttribute : Attribute
{
}
[AttributeUsage(AttributeTargets.Parameter, Inherited = false)]
[DebuggerNonUserCode]
internal sealed class MaybeNullWhenAttribute : Attribute
{
public bool ReturnValue { get; }
public MaybeNullWhenAttribute(bool returnValue)
{
ReturnValue = returnValue;
}
}
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Property, Inherited = false, AllowMultiple = true)]
[DebuggerNonUserCode]
internal sealed class MemberNotNullAttribute : Attribute
{
public string[] Members { get; }
public MemberNotNullAttribute(string member)
{
Members = new string[1] { member };
}
public MemberNotNullAttribute(params string[] members)
{
Members = members;
}
}
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Property, Inherited = false, AllowMultiple = true)]
[DebuggerNonUserCode]
internal sealed class MemberNotNullWhenAttribute : Attribute
{
public bool ReturnValue { get; }
public string[] Members { get; }
public MemberNotNullWhenAttribute(bool returnValue, string member)
{
ReturnValue = returnValue;
Members = new string[1] { member };
}
public MemberNotNullWhenAttribute(bool returnValue, params string[] members)
{
ReturnValue = returnValue;
Members = members;
}
}
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter | AttributeTargets.ReturnValue, Inherited = false)]
[DebuggerNonUserCode]
internal sealed class NotNullAttribute : Attribute
{
}
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Parameter | AttributeTargets.ReturnValue, AllowMultiple = true, Inherited = false)]
[DebuggerNonUserCode]
internal sealed class NotNullIfNotNullAttribute : Attribute
{
public string ParameterName { get; }
public NotNullIfNotNullAttribute(string parameterName)
{
ParameterName = parameterName;
}
}
[AttributeUsage(AttributeTargets.Parameter, Inherited = false)]
[DebuggerNonUserCode]
internal sealed class NotNullWhenAttribute : Attribute
{
public bool ReturnValue { get; }
public NotNullWhenAttribute(bool returnValue)
{
ReturnValue = returnValue;
}
}
}
namespace Atlas
{
public static class AtlasConstants
{
public const string Name = "Atlas";
public const string Guid = "nrgill28.Atlas";
public const string Version = "1.0.1";
internal const string LoaderSandbox = "sandbox";
internal const string LoaderTakeAndHold = "takeandhold";
}
[BepInPlugin("nrgill28.Atlas", "Atlas", "1.0.1")]
[BepInDependency("nrgill28.Sodalite", "1.3.0")]
[BepInProcess("h3vr.exe")]
public class AtlasPlugin : BaseUnityPlugin
{
[CompilerGenerated]
private static class <>O
{
public static hook_Awake <0>__FVRSceneSettingsOnAwake;
public static hook_Start <1>__TNH_ManagerOnStart;
}
[Serializable]
[CompilerGenerated]
private sealed class <>c
{
public static readonly <>c <>9 = new <>c();
public static Func<Vector3, bool> <>9__5_2;
public static Func<Vector3, float> <>9__5_3;
public static Func<Vector3, float> <>9__5_4;
public static Func<Vector3, bool> <>9__5_5;
public static Func<CustomSceneInfo, bool> <>9__5_6;
public static hook_CheckPlayerEnvironment <>9__19_0;
public static hook_Update <>9__19_1;
public static Func<CustomSceneInfo, bool> <>9__25_0;
internal bool <SceneManagerOnSceneLoaded>b__5_2(Vector3 x)
{
//IL_0000: Unknown result type (might be due to invalid IL or missing references)
return x.z < -7f;
}
internal float <SceneManagerOnSceneLoaded>b__5_3(Vector3 x)
{
//IL_0000: Unknown result type (might be due to invalid IL or missing references)
return 0f - x.z;
}
internal float <SceneManagerOnSceneLoaded>b__5_4(Vector3 x)
{
//IL_0000: Unknown result type (might be due to invalid IL or missing references)
return Mathf.Abs(x.y - 4.15f);
}
internal bool <SceneManagerOnSceneLoaded>b__5_5(Vector3 p)
{
//IL_0000: Unknown result type (might be due to invalid IL or missing references)
return p.x > 0f;
}
internal bool <SceneManagerOnSceneLoaded>b__5_6(CustomSceneInfo x)
{
return x.DisplayMode == "sandbox";
}
internal void <ApplyHooks>b__19_0(orig_CheckPlayerEnvironment orig, FVRReverbSystem self)
{
if (Object.op_Implicit((Object)(object)GM.CurrentPlayerBody))
{
orig.Invoke(self);
}
}
internal void <ApplyHooks>b__19_1(orig_Update orig, FVRAmbienceController self)
{
if (Object.op_Implicit((Object)(object)GM.CurrentPlayerBody))
{
orig.Invoke(self);
}
}
internal bool <TNH_UIManagerOnStart>b__25_0(CustomSceneInfo s)
{
return s.DisplayMode == "takeandhold";
}
}
[CompilerGenerated]
private sealed class <>c__DisplayClass24_0
{
public MainMenuScreen self;
public orig_LoadScene orig;
}
[CompilerGenerated]
private sealed class <LoadBundleThen>d__29 : IEnumerator<object>, IDisposable, IEnumerator
{
private int <>1__state;
private object <>2__current;
public CustomSceneInfo sceneInfo;
public Action continueWith;
private AssetBundleCreateRequest <request>5__1;
object IEnumerator<object>.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
object IEnumerator.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
[DebuggerHidden]
public <LoadBundleThen>d__29(int <>1__state)
{
this.<>1__state = <>1__state;
}
[DebuggerHidden]
void IDisposable.Dispose()
{
<request>5__1 = null;
<>1__state = -2;
}
private bool MoveNext()
{
switch (<>1__state)
{
default:
return false;
case 0:
<>1__state = -1;
if (!Object.op_Implicit((Object)(object)sceneInfo.SceneBundle))
{
<request>5__1 = AssetBundle.LoadFromFileAsync(sceneInfo.SceneBundleFile.FullName);
<>2__current = <request>5__1;
<>1__state = 1;
return true;
}
break;
case 1:
<>1__state = -1;
sceneInfo.SceneBundle = <request>5__1.assetBundle;
<request>5__1 = null;
break;
}
continueWith();
return false;
}
bool IEnumerator.MoveNext()
{
//ILSpy generated this explicit interface implementation from .override directive in MoveNext
return this.MoveNext();
}
[DebuggerHidden]
void IEnumerator.Reset()
{
throw new NotSupportedException();
}
}
[CompilerGenerated]
private sealed class <LoadCustomScene_Internal>d__18 : IEnumerator<object>, IDisposable, IEnumerator
{
private int <>1__state;
private object <>2__current;
public CustomSceneInfo sceneInfo;
private string <sceneName>5__1;
private AssetBundleCreateRequest <request>5__2;
object IEnumerator<object>.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
object IEnumerator.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
[DebuggerHidden]
public <LoadCustomScene_Internal>d__18(int <>1__state)
{
this.<>1__state = <>1__state;
}
[DebuggerHidden]
void IDisposable.Dispose()
{
<sceneName>5__1 = null;
<request>5__2 = null;
<>1__state = -2;
}
private bool MoveNext()
{
switch (<>1__state)
{
default:
return false;
case 0:
<>1__state = -1;
if (!Object.op_Implicit((Object)(object)sceneInfo.SceneBundle))
{
<request>5__2 = AssetBundle.LoadFromFileAsync(sceneInfo.SceneBundleFile.FullName);
<>2__current = <request>5__2;
<>1__state = 1;
return true;
}
break;
case 1:
<>1__state = -1;
sceneInfo.SceneBundle = <request>5__2.assetBundle;
<request>5__2 = null;
break;
}
LastLoadedScene = sceneInfo;
<sceneName>5__1 = sceneInfo.SceneBundle.GetAllScenePaths()[0];
SteamVR_LoadLevel.Begin(<sceneName>5__1, false, 0.5f, 0f, 0f, 0f, 1f);
return false;
}
bool IEnumerator.MoveNext()
{
//ILSpy generated this explicit interface implementation from .override directive in MoveNext
return this.MoveNext();
}
[DebuggerHidden]
void IEnumerator.Reset()
{
throw new NotSupportedException();
}
}
[CompilerGenerated]
private sealed class <SceneManagerOnSceneLoaded>d__5 : IEnumerator<object>, IDisposable, IEnumerator
{
private int <>1__state;
private object <>2__current;
public Scene scene;
public AtlasPlugin <>4__this;
private GameObject <sceneScreenBase>5__1;
private GameObject <labelBase>5__2;
private List<Vector3> <screenPositions>5__3;
private GameObject <moddedScenesLabel>5__4;
private CustomSceneInfo[] <sandboxScenes>5__5;
private int <mainTex>5__6;
private int <ii>5__7;
private int <jj>5__8;
private int <i>5__9;
private MainMenuScenePointable <screen>5__10;
private MainMenuScenePointable <screenComponent>5__11;
private CustomSceneInfo <sceneInfo>5__12;
private CustomMainMenuSceneDef <def>5__13;
object IEnumerator<object>.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
object IEnumerator.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
[DebuggerHidden]
public <SceneManagerOnSceneLoaded>d__5(int <>1__state)
{
this.<>1__state = <>1__state;
}
[DebuggerHidden]
void IDisposable.Dispose()
{
<sceneScreenBase>5__1 = null;
<labelBase>5__2 = null;
<screenPositions>5__3 = null;
<moddedScenesLabel>5__4 = null;
<sandboxScenes>5__5 = null;
<screen>5__10 = null;
<screenComponent>5__11 = null;
<sceneInfo>5__12 = null;
<def>5__13 = null;
<>1__state = -2;
}
private bool MoveNext()
{
//IL_009f: Unknown result type (might be due to invalid IL or missing references)
//IL_01d6: Unknown result type (might be due to invalid IL or missing references)
//IL_01fb: Unknown result type (might be due to invalid IL or missing references)
//IL_02aa: Unknown result type (might be due to invalid IL or missing references)
//IL_02da: Unknown result type (might be due to invalid IL or missing references)
//IL_02f0: Unknown result type (might be due to invalid IL or missing references)
//IL_0307: Unknown result type (might be due to invalid IL or missing references)
//IL_032d: Unknown result type (might be due to invalid IL or missing references)
//IL_0332: Unknown result type (might be due to invalid IL or missing references)
//IL_035f: Unknown result type (might be due to invalid IL or missing references)
//IL_0364: Unknown result type (might be due to invalid IL or missing references)
if (<>1__state != 0)
{
return false;
}
<>1__state = -1;
if (((Scene)(ref scene)).name != "MainMenu3")
{
return false;
}
<sceneScreenBase>5__1 = GameObject.Find("SceneScreen_GDC");
<labelBase>5__2 = GameObject.Find("Label_Description_1_Title (5)");
<screenPositions>5__3 = new List<Vector3>();
for (<ii>5__7 = 0; <ii>5__7 < 360; <ii>5__7 += 13)
{
<jj>5__8 = 0;
while (<jj>5__8 < 4)
{
<screenPositions>5__3.Add(new Vector3(<SceneManagerOnSceneLoaded>g__CircleX|5_0(<ii>5__7), 0.5f + (float)(<jj>5__8 * 2), <SceneManagerOnSceneLoaded>g__CircleZ|5_1(<ii>5__7)));
<jj>5__8++;
}
}
<screenPositions>5__3 = (from x in <screenPositions>5__3
where x.z < -7f
orderby 0f - x.z descending, Mathf.Abs(x.y - 4.15f)
select x).ToList();
<screenPositions>5__3 = <screenPositions>5__3.Where((Vector3 p) => p.x > 0f).ToList();
<moddedScenesLabel>5__4 = Object.Instantiate<GameObject>(<labelBase>5__2, <labelBase>5__2.transform.parent);
<moddedScenesLabel>5__4.transform.position = new Vector3(4f, 8.3f, -15.5f);
<moddedScenesLabel>5__4.transform.localEulerAngles = new Vector3(-180f, -30f, 180f);
<moddedScenesLabel>5__4.GetComponent<Text>().text = "Atlas Sandbox Scenes";
<sandboxScenes>5__5 = RegisteredScenes.Where((CustomSceneInfo x) => x.DisplayMode == "sandbox").ToArray();
<mainTex>5__6 = Shader.PropertyToID("_MainTex");
<i>5__9 = 0;
while (<i>5__9 < <sandboxScenes>5__5.Length)
{
<screen>5__10 = Object.Instantiate<GameObject>(<sceneScreenBase>5__1, <sceneScreenBase>5__1.transform.parent).GetComponent<MainMenuScenePointable>();
((Component)<screen>5__10).transform.position = <screenPositions>5__3[<i>5__9];
((Component)<screen>5__10).transform.localEulerAngles = new Vector3(0f, 180f - 57.29578f * Mathf.Atan((0f - ((Component)<screen>5__10).transform.position.x) / ((Component)<screen>5__10).transform.position.z), 0f);
((Component)<screen>5__10).transform.localScale = 0.5f * ((Component)<screen>5__10).transform.localScale;
<screenComponent>5__11 = ((Component)<screen>5__10).GetComponent<MainMenuScenePointable>();
<screenComponent>5__11.m_startScale = ((Component)<screen>5__10).transform.localScale;
<sceneInfo>5__12 = <sandboxScenes>5__5[<i>5__9];
<def>5__13 = ScriptableObject.CreateInstance<CustomMainMenuSceneDef>();
((MainMenuSceneDef)<def>5__13).Name = <sceneInfo>5__12.DisplayName;
((MainMenuSceneDef)<def>5__13).Type = <sceneInfo>5__12.Author;
((MainMenuSceneDef)<def>5__13).Desciption = <sceneInfo>5__12.Description;
((MainMenuSceneDef)<def>5__13).Image = <sceneInfo>5__12.ThumbnailSprite;
<def>5__13.CustomSceneInfo = <sceneInfo>5__12;
<screen>5__10.Def = (MainMenuSceneDef)(object)<def>5__13;
((Renderer)((Component)<screen>5__10).GetComponent<MeshRenderer>()).material.SetTexture(<mainTex>5__6, (Texture)(object)<sceneInfo>5__12.ThumbnailTexture);
<screen>5__10 = null;
<screenComponent>5__11 = null;
<sceneInfo>5__12 = null;
<def>5__13 = null;
<i>5__9++;
}
return false;
}
bool IEnumerator.MoveNext()
{
//ILSpy generated this explicit interface implementation from .override directive in MoveNext
return this.MoveNext();
}
[DebuggerHidden]
void IEnumerator.Reset()
{
throw new NotSupportedException();
}
}
internal static ManualLogSource Logger = null;
internal static AtlasPlugin Instance = null;
internal static IDisposable? LeaderboardLock;
internal static CustomSceneInfo? LastLoadedScene;
private static readonly List<CustomSceneInfo> RegisteredScenes = new List<CustomSceneInfo>();
public static readonly IDictionary<string, ISceneLoader> Loaders = new Dictionary<string, ISceneLoader>();
private static Hook DetourTnhUiManager_LoadLevel = null;
private static Hook DetourSceneLoader_LoadMG = null;
public static CustomSceneInfo? CurrentScene { get; internal set; }
public static ICollection<CustomSceneInfo> CustomSceneInfos => RegisteredScenes.AsReadOnly();
public void Awake()
{
Logger = ((BaseUnityPlugin)this).Logger;
Instance = this;
ApplyHooks();
Loaders["sandbox"] = new SandboxLoader();
Loaders["takeandhold"] = new TakeAndHoldLoader();
SceneManager.sceneLoaded += delegate(Scene scene, LoadSceneMode _)
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
((MonoBehaviour)this).StartCoroutine(SceneManagerOnSceneLoaded(scene));
};
}
private IEnumerator SceneManagerOnSceneLoaded(Scene scene)
{
//IL_000e: Unknown result type (might be due to invalid IL or missing references)
//IL_000f: Unknown result type (might be due to invalid IL or missing references)
//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
return new <SceneManagerOnSceneLoaded>d__5(0)
{
<>4__this = this,
scene = scene
};
}
public static void RegisterScene(string sceneBundleFilePath)
{
FileInfo fileInfo = new FileInfo(sceneBundleFilePath);
Logger.LogDebug((object)("Attempting to load scene from bundle at: " + sceneBundleFilePath));
if (!fileInfo.Exists)
{
throw new FileNotFoundException("Path points to non-existing file!");
}
CustomSceneInfo customSceneInfo = new CustomSceneInfo(fileInfo);
RegisteredScenes.Add(customSceneInfo);
Logger.LogInfo((object)("Registered " + customSceneInfo.DisplayName + " by " + customSceneInfo.Author + "."));
}
public static CustomSceneInfo? GetCustomScene(string identifier)
{
string identifier2 = identifier;
return RegisteredScenes.FirstOrDefault((CustomSceneInfo x) => x.Identifier == identifier2);
}
public static void LoadCustomScene(CustomSceneInfo sceneInfo)
{
((MonoBehaviour)Instance).StartCoroutine(LoadCustomScene_Internal(sceneInfo));
}
public static void LoadCustomScene(string identifier)
{
CustomSceneInfo customScene = GetCustomScene(identifier);
if (customScene != null)
{
LoadCustomScene(customScene);
}
}
private static IEnumerator LoadCustomScene_Internal(CustomSceneInfo sceneInfo)
{
//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
return new <LoadCustomScene_Internal>d__18(0)
{
sceneInfo = sceneInfo
};
}
private void ApplyHooks()
{
//IL_0011: Unknown result type (might be due to invalid IL or missing references)
//IL_0016: Unknown result type (might be due to invalid IL or missing references)
//IL_001c: Expected O, but got Unknown
//IL_004a: Unknown result type (might be due to invalid IL or missing references)
//IL_0054: Expected O, but got Unknown
//IL_005c: Unknown result type (might be due to invalid IL or missing references)
//IL_0066: Expected O, but got Unknown
//IL_006e: Unknown result type (might be due to invalid IL or missing references)
//IL_0078: Expected O, but got Unknown
//IL_0032: Unknown result type (might be due to invalid IL or missing references)
//IL_0037: Unknown result type (might be due to invalid IL or missing references)
//IL_003d: Expected O, but got Unknown
//IL_008d: Unknown result type (might be due to invalid IL or missing references)
//IL_0092: Unknown result type (might be due to invalid IL or missing references)
//IL_0098: Expected O, but got Unknown
//IL_00b2: Unknown result type (might be due to invalid IL or missing references)
//IL_00b7: Unknown result type (might be due to invalid IL or missing references)
//IL_00bd: Expected O, but got Unknown
//IL_0147: Unknown result type (might be due to invalid IL or missing references)
//IL_0151: Expected O, but got Unknown
//IL_0107: Unknown result type (might be due to invalid IL or missing references)
//IL_0111: Expected O, but got Unknown
object obj = <>O.<0>__FVRSceneSettingsOnAwake;
if (obj == null)
{
hook_Awake val = FVRSceneSettingsOnAwake;
<>O.<0>__FVRSceneSettingsOnAwake = val;
obj = (object)val;
}
FVRSceneSettings.Awake += (hook_Awake)obj;
object obj2 = <>O.<1>__TNH_ManagerOnStart;
if (obj2 == null)
{
hook_Start val2 = TNH_ManagerOnStart;
<>O.<1>__TNH_ManagerOnStart = val2;
obj2 = (object)val2;
}
TNH_Manager.Start += (hook_Start)obj2;
MainMenuScreen.LoadScene += new hook_LoadScene(MainMenuScreenOnLoadScene);
TNH_UIManager.Start += new hook_Start(TNH_UIManagerOnStart);
TNH_UIManager.UpdateLevelSelectDisplayAndLoader += new hook_UpdateLevelSelectDisplayAndLoader(TNH_UIManagerOnUpdateLevelSelectDisplayAndLoader);
object obj3 = <>c.<>9__19_0;
if (obj3 == null)
{
hook_CheckPlayerEnvironment val3 = delegate(orig_CheckPlayerEnvironment orig, FVRReverbSystem self)
{
if (Object.op_Implicit((Object)(object)GM.CurrentPlayerBody))
{
orig.Invoke(self);
}
};
<>c.<>9__19_0 = val3;
obj3 = (object)val3;
}
FVRReverbSystem.CheckPlayerEnvironment += (hook_CheckPlayerEnvironment)obj3;
object obj4 = <>c.<>9__19_1;
if (obj4 == null)
{
hook_Update val4 = delegate(orig_Update orig, FVRAmbienceController self)
{
if (Object.op_Implicit((Object)(object)GM.CurrentPlayerBody))
{
orig.Invoke(self);
}
};
<>c.<>9__19_1 = val4;
obj4 = (object)val4;
}
FVRAmbienceController.Update += (hook_Update)obj4;
if (GameAPI.BuildId >= 20345029)
{
MethodInfo methodInfo = AccessTools.Method(typeof(TNH_UIManager), "LoadCurrentlySelectedLevel", (Type[])null, (Type[])null);
MethodInfo methodInfo2 = AccessTools.Method(typeof(AtlasPlugin), "TNH_UIManagerOnLoadCurrentlySelectedLevel", (Type[])null, (Type[])null);
DetourTnhUiManager_LoadLevel = new Hook((MethodBase)methodInfo, methodInfo2);
}
else
{
MethodInfo methodInfo3 = AccessTools.Method(typeof(SceneLoader), "LoadMG", (Type[])null, (Type[])null);
MethodInfo methodInfo4 = AccessTools.Method(typeof(AtlasPlugin), "SceneLoader_LoadMG", (Type[])null, (Type[])null);
DetourSceneLoader_LoadMG = new Hook((MethodBase)methodInfo3, methodInfo4);
}
}
private static void FVRSceneSettingsOnAwake(orig_Awake orig, FVRSceneSettings self)
{
SceneSettingsOverride sceneSettingsOverride = Object.FindObjectOfType<SceneSettingsOverride>();
if (Object.op_Implicit((Object)(object)sceneSettingsOverride))
{
sceneSettingsOverride.ApplyOverrides(self);
ManagerSingleton<GM>.Instance.InitScene();
if (LeaderboardLock == null)
{
LeaderboardLock = LeaderboardAPI.LeaderboardDisabled.TakeLock();
}
}
else
{
CurrentScene = null;
LeaderboardLock?.Dispose();
LeaderboardLock = null;
}
orig.Invoke(self);
}
private static void TNH_ManagerOnStart(orig_Start orig, TNH_Manager self)
{
if (CurrentScene != null)
{
TNH_ManagerOverride tNH_ManagerOverride = Object.FindObjectOfType<TNH_ManagerOverride>();
if (Object.op_Implicit((Object)(object)tNH_ManagerOverride))
{
tNH_ManagerOverride.ApplyOverrides(self);
}
else
{
Logger.LogError((object)"TNH_Manager overrides were missing, you need one in your scene!");
}
}
orig.Invoke(self);
}
private void MainMenuScreenOnLoadScene(orig_LoadScene orig, MainMenuScreen self)
{
<>c__DisplayClass24_0 CS$<>8__locals0 = new <>c__DisplayClass24_0();
CS$<>8__locals0.self = self;
CS$<>8__locals0.orig = orig;
if (CS$<>8__locals0.self.m_def is CustomMainMenuSceneDef customMainMenuSceneDef)
{
((MonoBehaviour)this).StartCoroutine(LoadBundleThenScene(customMainMenuSceneDef.CustomSceneInfo));
}
else
{
CS$<>8__locals0.orig.Invoke(CS$<>8__locals0.self);
}
IEnumerator LoadBundleThenScene(CustomSceneInfo sceneInfo)
{
//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
return new <>c__DisplayClass24_0.<<MainMenuScreenOnLoadScene>g__LoadBundleThenScene|0>d(0)
{
<>4__this = CS$<>8__locals0,
sceneInfo = sceneInfo
};
}
}
private void TNH_UIManagerOnStart(orig_Start orig, TNH_UIManager self)
{
foreach (CustomSceneInfo item in RegisteredScenes.Where((CustomSceneInfo s) => s.DisplayMode == "takeandhold"))
{
self.Levels.Add((LevelData)(object)new CustomLevelData(item));
}
orig.Invoke(self);
}
private void TNH_UIManagerOnUpdateLevelSelectDisplayAndLoader(orig_UpdateLevelSelectDisplayAndLoader orig, TNH_UIManager self)
{
if (self.GetLevelData(self.CurLevelID) is CustomLevelData customLevelData)
{
LastLoadedScene = customLevelData.SceneInfo;
if (LeaderboardLock == null)
{
LeaderboardLock = LeaderboardAPI.LeaderboardDisabled.TakeLock();
}
}
else
{
LastLoadedScene = null;
LeaderboardLock?.Dispose();
LeaderboardLock = null;
}
orig.Invoke(self);
}
private static void TNH_UIManagerOnLoadCurrentlySelectedLevel(Action<TNH_UIManager> orig, TNH_UIManager self)
{
TNH_UIManager self2 = self;
Action<TNH_UIManager> orig2 = orig;
if (LastLoadedScene == null)
{
orig2(self2);
return;
}
((MonoBehaviour)Instance).StartCoroutine(LoadBundleThen(LastLoadedScene, delegate
{
self2.LevelName = LastLoadedScene.SceneBundle.GetAllScenePaths()[0];
orig2(self2);
}));
}
private static void SceneLoader_LoadMG(Action<SceneLoader> orig, SceneLoader self)
{
//IL_0015: Unknown result type (might be due to invalid IL or missing references)
//IL_001a: Unknown result type (might be due to invalid IL or missing references)
SceneLoader self2 = self;
Action<SceneLoader> orig2 = orig;
Scene activeScene = SceneManager.GetActiveScene();
if (((Scene)(ref activeScene)).name != "TakeAndHold_Lobby_2" || LastLoadedScene == null)
{
orig2(self2);
return;
}
((MonoBehaviour)Instance).StartCoroutine(LoadBundleThen(LastLoadedScene, delegate
{
self2.LevelName = LastLoadedScene.SceneBundle.GetAllScenePaths()[0];
orig2(self2);
}));
}
private static IEnumerator LoadBundleThen(CustomSceneInfo sceneInfo, Action continueWith)
{
//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
return new <LoadBundleThen>d__29(0)
{
sceneInfo = sceneInfo,
continueWith = continueWith
};
}
[CompilerGenerated]
internal static float <SceneManagerOnSceneLoaded>g__CircleX|5_0(float x)
{
return 14.13f * Mathf.Cos((float)Math.PI / 180f * x) - 0.39f;
}
[CompilerGenerated]
internal static float <SceneManagerOnSceneLoaded>g__CircleZ|5_1(float z)
{
return 14.13f * Mathf.Sin((float)Math.PI / 180f * z) - 2.98f;
}
}
[JsonObject(/*Could not decode attribute arguments.*/)]
public class CustomSceneInfo
{
internal AssetBundle? SceneBundle;
[JsonProperty]
public string DisplayName { get; private set; } = "";
[JsonProperty]
public string Identifier { get; private set; } = "";
[JsonProperty]
private string Mode
{
set
{
DisplayMode = value;
}
}
[JsonProperty]
public string GameMode { get; private set; } = "";
[JsonProperty]
public string DisplayMode { get; private set; } = "";
[JsonProperty]
public string Author { get; private set; } = "";
[JsonProperty]
public string Description { get; private set; } = "";
public Texture2D? ThumbnailTexture { get; }
public Sprite? ThumbnailSprite { get; }
internal FileInfo SceneBundleFile { get; }
internal CustomSceneInfo(FileInfo sceneBundle)
{
//IL_00e5: Unknown result type (might be due to invalid IL or missing references)
//IL_00ef: Expected O, but got Unknown
//IL_012f: Unknown result type (might be due to invalid IL or missing references)
//IL_013e: Unknown result type (might be due to invalid IL or missing references)
SceneBundleFile = sceneBundle;
FileInfo fileInfo = new FileInfo(sceneBundle.FullName + ".json");
FileInfo fileInfo2 = new FileInfo(sceneBundle.FullName + ".png");
if (!fileInfo.Exists)
{
throw new FileNotFoundException(fileInfo.Name + " is missing! It should be beside the scene bundle file.");
}
JsonConvert.PopulateObject(File.ReadAllText(fileInfo.FullName), (object)this);
if (!fileInfo2.Exists)
{
AtlasPlugin.Logger.LogWarning((object)("No " + fileInfo2.Name + " was found. This scene will not have a thumbnail."));
return;
}
ThumbnailTexture = new Texture2D(1, 1);
ThumbnailTexture.LoadImage(File.ReadAllBytes(fileInfo2.FullName));
ThumbnailSprite = Sprite.Create(ThumbnailTexture, new Rect(0f, 0f, (float)((Texture)ThumbnailTexture).width, (float)((Texture)ThumbnailTexture).height), new Vector2(0f, 0f));
}
}
public static class Extensions
{
[CompilerGenerated]
private sealed class <IterateChildren>d__0 : IEnumerable<GameObject>, IEnumerable, IEnumerator<GameObject>, IDisposable, IEnumerator
{
private int <>1__state;
private GameObject <>2__current;
private int <>l__initialThreadId;
private GameObject go;
public GameObject <>3__go;
private int <i>5__1;
GameObject IEnumerator<GameObject>.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
object IEnumerator.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
[DebuggerHidden]
public <IterateChildren>d__0(int <>1__state)
{
this.<>1__state = <>1__state;
<>l__initialThreadId = Thread.CurrentThread.ManagedThreadId;
}
[DebuggerHidden]
void IDisposable.Dispose()
{
<>1__state = -2;
}
private bool MoveNext()
{
switch (<>1__state)
{
default:
return false;
case 0:
<>1__state = -1;
<i>5__1 = 0;
break;
case 1:
<>1__state = -1;
<i>5__1++;
break;
}
if (<i>5__1 < go.transform.childCount)
{
<>2__current = ((Component)go.transform.GetChild(<i>5__1)).gameObject;
<>1__state = 1;
return true;
}
return false;
}
bool IEnumerator.MoveNext()
{
//ILSpy generated this explicit interface implementation from .override directive in MoveNext
return this.MoveNext();
}
[DebuggerHidden]
void IEnumerator.Reset()
{
throw new NotSupportedException();
}
[DebuggerHidden]
IEnumerator<GameObject> IEnumerable<GameObject>.GetEnumerator()
{
<IterateChildren>d__0 <IterateChildren>d__;
if (<>1__state == -2 && <>l__initialThreadId == Thread.CurrentThread.ManagedThreadId)
{
<>1__state = 0;
<IterateChildren>d__ = this;
}
else
{
<IterateChildren>d__ = new <IterateChildren>d__0(0);
}
<IterateChildren>d__.go = <>3__go;
return <IterateChildren>d__;
}
[DebuggerHidden]
IEnumerator IEnumerable.GetEnumerator()
{
return ((IEnumerable<GameObject>)this).GetEnumerator();
}
}
[CompilerGenerated]
private sealed class <IterateChildren>d__1 : IEnumerable<Transform>, IEnumerable, IEnumerator<Transform>, IDisposable, IEnumerator
{
private int <>1__state;
private Transform <>2__current;
private int <>l__initialThreadId;
private Transform go;
public Transform <>3__go;
private int <i>5__1;
Transform IEnumerator<Transform>.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
object IEnumerator.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
[DebuggerHidden]
public <IterateChildren>d__1(int <>1__state)
{
this.<>1__state = <>1__state;
<>l__initialThreadId = Thread.CurrentThread.ManagedThreadId;
}
[DebuggerHidden]
void IDisposable.Dispose()
{
<>1__state = -2;
}
private bool MoveNext()
{
switch (<>1__state)
{
default:
return false;
case 0:
<>1__state = -1;
<i>5__1 = 0;
break;
case 1:
<>1__state = -1;
<i>5__1++;
break;
}
if (<i>5__1 < ((Component)go).transform.childCount)
{
<>2__current = ((Component)go).transform.GetChild(<i>5__1);
<>1__state = 1;
return true;
}
return false;
}
bool IEnumerator.MoveNext()
{
//ILSpy generated this explicit interface implementation from .override directive in MoveNext
return this.MoveNext();
}
[DebuggerHidden]
void IEnumerator.Reset()
{
throw new NotSupportedException();
}
[DebuggerHidden]
IEnumerator<Transform> IEnumerable<Transform>.GetEnumerator()
{
<IterateChildren>d__1 <IterateChildren>d__;
if (<>1__state == -2 && <>l__initialThreadId == Thread.CurrentThread.ManagedThreadId)
{
<>1__state = 0;
<IterateChildren>d__ = this;
}
else
{
<IterateChildren>d__ = new <IterateChildren>d__1(0);
}
<IterateChildren>d__.go = <>3__go;
return <IterateChildren>d__;
}
[DebuggerHidden]
IEnumerator IEnumerable.GetEnumerator()
{
return ((IEnumerable<Transform>)this).GetEnumerator();
}
}
public static IEnumerable<GameObject> IterateChildren(this GameObject go)
{
//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
return new <IterateChildren>d__0(-2)
{
<>3__go = go
};
}
public static IEnumerable<Transform> IterateChildren(this Transform go)
{
//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
return new <IterateChildren>d__1(-2)
{
<>3__go = go
};
}
public static void GenericGizmoCube(Color color, Vector3 center, Vector3 size, Vector3 forward, params Transform[] markers)
{
//IL_0001: Unknown result type (might be due to invalid IL or missing references)
//IL_0025: Unknown result type (might be due to invalid IL or missing references)
//IL_0030: Unknown result type (might be due to invalid IL or missing references)
//IL_0031: Unknown result type (might be due to invalid IL or missing references)
//IL_0038: Unknown result type (might be due to invalid IL or missing references)
//IL_0039: Unknown result type (might be due to invalid IL or missing references)
//IL_003a: Unknown result type (might be due to invalid IL or missing references)
//IL_003b: Unknown result type (might be due to invalid IL or missing references)
Gizmos.color = color;
foreach (Transform val in markers)
{
if (Object.op_Implicit((Object)(object)val))
{
Gizmos.matrix = val.localToWorldMatrix;
Gizmos.DrawCube(center, size);
Gizmos.DrawLine(center, center + forward);
}
}
}
public static void GenericGizmoCubeOutline(Color color, Vector3 center, Vector3 size, params Transform[] markers)
{
//IL_0001: Unknown result type (might be due to invalid IL or missing references)
//IL_0024: Unknown result type (might be due to invalid IL or missing references)
//IL_002f: Unknown result type (might be due to invalid IL or missing references)
//IL_0030: Unknown result type (might be due to invalid IL or missing references)
Gizmos.color = color;
foreach (Transform val in markers)
{
if (Object.op_Implicit((Object)(object)val))
{
Gizmos.matrix = val.localToWorldMatrix;
Gizmos.DrawWireCube(center, size);
}
}
}
public static void GenericGizmoSphere(Color color, Vector3 center, float radius, params Transform[] markers)
{
//IL_0001: Unknown result type (might be due to invalid IL or missing references)
//IL_0024: Unknown result type (might be due to invalid IL or missing references)
//IL_002f: Unknown result type (might be due to invalid IL or missing references)
Gizmos.color = color;
foreach (Transform val in markers)
{
if (Object.op_Implicit((Object)(object)val))
{
Gizmos.matrix = val.localToWorldMatrix;
Gizmos.DrawSphere(center, radius);
}
}
}
}
internal class CustomMainMenuSceneDef : MainMenuSceneDef
{
public CustomSceneInfo CustomSceneInfo = null;
}
internal class CustomLevelData : LevelData
{
public readonly CustomSceneInfo SceneInfo;
public CustomLevelData(CustomSceneInfo info)
{
base.IsModLevel = true;
base.LevelAuthor = info.Author;
base.LevelDescription = info.Description;
base.LevelDisplayName = info.DisplayName;
base.LevelID = info.Identifier;
base.LevelImage = info.ThumbnailSprite;
SceneInfo = info;
}
}
}
namespace Atlas.MappingComponents
{
public class AtlasPMat : PMat
{
public enum MatDefEnum
{
_Air = -366646783,
_Impenetrable = 1725752409,
Armor_Solid = 1242992293,
Armor_Thick = -134865591,
Armor_Thin = 1827179403,
Claypot = 1943035998,
ConcreteBarrier = 1461872896,
Floor_CarpetOverConcrete = -1661987665,
Floor_CarpetOverWood = -1942452169,
Floor_Concrete = 757445278,
Floor_Metal = 1483923932,
Floor_MetalGrating = -1690371124,
Floor_TileOverConcrete = 1213917816,
Floor_TileOverConcreteSolid = 434755139,
Floor_TileOverWood = 1335110134,
Floor_Wood = 1960591488,
GasMask = 1752877821,
GasMask_heavy = 367776345,
Ground_Dirt = -1675716207,
Ground_Grass = 1942859388,
Ground_Sand = -1487240928,
Ground_Water = 383750667,
HeavyArmor_Metal = -1347286364,
HeavyFabric = 644301452,
Hedge = 432136527,
LightArmor_Kevlar = -1669265951,
Meat = -871205235,
MediumArmor_Metal = -635266500,
MediumArmor_Padded = 332398969,
Melee_Metal = 942411018,
Melee_Polymer = 2144447471,
Melee_Wood = -1896619314,
Metal_Plate = 666790754,
Metal_Sheet = -1853667375,
Metal_Strut = -321340768,
Paper = -1779142660,
PlasticTableTop = -1149654923,
Rock_Large = 1211416655,
Rock_Small = -34193051,
RotMeat = 1273826288,
Sandbag = 1417815362,
Solid_Armor = -529192027,
Solid_Concrete = 1454812933,
Solid_Metal = -213122109,
Testing_MEat = 1985703140,
Testing_Soft = 1729971855,
Tires = -649847075,
Wall_Brick = 892418936,
Wall_DryWall = -1898909600,
Wall_GlassBrick = -1258062406,
Wall_GlassWindow = -1217966965,
Wall_SheetMetal = 761218943,
Wall_WoodSolid = 1081916419,
Wall_WoodThick = -1271050433,
Wall_WoodThin = 10600013,
Water = -1779147911,
WaterMelon = 610581220,
WoodProp = -2101361410
}
public MatDefEnum AtlasMatDef;
private static readonly Dictionary<MatDefEnum, string> MatDefResources = new Dictionary<MatDefEnum, string>
{
{
MatDefEnum._Air,
"matdefs\\_Air"
},
{
MatDefEnum._Impenetrable,
"matdefs\\structural\\_Impenetrable"
},
{
MatDefEnum.Armor_Solid,
"matdefs\\structural\\Armor_Solid"
},
{
MatDefEnum.Armor_Thick,
"matdefs\\structural\\Armor_Thick"
},
{
MatDefEnum.Armor_Thin,
"matdefs\\structural\\Armor_Thin"
},
{
MatDefEnum.Claypot,
"matdefs\\props\\Claypot"
},
{
MatDefEnum.ConcreteBarrier,
"matdefs\\structural\\ConcreteBarrier"
},
{
MatDefEnum.Floor_CarpetOverConcrete,
"matdefs\\structural\\Floor_CarpetOverConcrete"
},
{
MatDefEnum.Floor_CarpetOverWood,
"matdefs\\structural\\Floor_CarpetOverWood"
},
{
MatDefEnum.Floor_Concrete,
"matdefs\\structural\\Floor_Concrete"
},
{
MatDefEnum.Floor_Metal,
"matdefs\\structural\\Floor_Metal"
},
{
MatDefEnum.Floor_MetalGrating,
"matdefs\\structural\\Floor_MetalGrating"
},
{
MatDefEnum.Floor_TileOverConcrete,
"matdefs\\structural\\Floor_TileOverConcrete"
},
{
MatDefEnum.Floor_TileOverConcreteSolid,
"matdefs\\structural\\Floor_TileOverConcreteSolid"
},
{
MatDefEnum.Floor_TileOverWood,
"matdefs\\structural\\Floor_TileOverWood"
},
{
MatDefEnum.Floor_Wood,
"matdefs\\structural\\Floor_Wood"
},
{
MatDefEnum.GasMask,
"matdefs\\agents\\GasMask"
},
{
MatDefEnum.GasMask_heavy,
"matdefs\\agents\\GasMask_heavy"
},
{
MatDefEnum.Ground_Dirt,
"matdefs\\nature\\Ground_Dirt"
},
{
MatDefEnum.Ground_Grass,
"matdefs\\nature\\Ground_Grass"
},
{
MatDefEnum.Ground_Sand,
"matdefs\\nature\\Ground_Sand"
},
{
MatDefEnum.Ground_Water,
"matdefs\\nature\\Ground_Water"
},
{
MatDefEnum.HeavyArmor_Metal,
"matdefs\\agents\\HeavyArmor_Metal"
},
{
MatDefEnum.HeavyFabric,
"matdefs\\agents\\HeavyFabric"
},
{
MatDefEnum.Hedge,
"matdefs\\nature\\Hedge"
},
{
MatDefEnum.LightArmor_Kevlar,
"matdefs\\agents\\LightArmor_Kevlar"
},
{
MatDefEnum.Meat,
"matdefs\\agents\\Meat"
},
{
MatDefEnum.MediumArmor_Metal,
"matdefs\\agents\\MediumArmor_Metal"
},
{
MatDefEnum.MediumArmor_Padded,
"matdefs\\agents\\MediumArmor_Padded"
},
{
MatDefEnum.Melee_Metal,
"matdefs\\heldobjects\\Melee_Metal"
},
{
MatDefEnum.Melee_Polymer,
"matdefs\\heldobjects\\Melee_Polymer"
},
{
MatDefEnum.Melee_Wood,
"matdefs\\heldobjects\\Melee_Wood"
},
{
MatDefEnum.Metal_Plate,
"matdefs\\structural\\Metal_Plate"
},
{
MatDefEnum.Metal_Sheet,
"matdefs\\structural\\Metal_Sheet"
},
{
MatDefEnum.Metal_Strut,
"matdefs\\structural\\Metal_Strut"
},
{
MatDefEnum.Paper,
"matdefs\\props\\Paper"
},
{
MatDefEnum.PlasticTableTop,
"matdefs\\props\\PlasticTableTop"
},
{
MatDefEnum.Rock_Large,
"matdefs\\nature\\Rock_Large"
},
{
MatDefEnum.Rock_Small,
"matdefs\\nature\\Rock_Small"
},
{
MatDefEnum.RotMeat,
"matdefs\\agents\\RotMeat"
},
{
MatDefEnum.Sandbag,
"matdefs\\structural\\Sandbag"
},
{
MatDefEnum.Solid_Armor,
"matdefs\\structural\\Solid_Armor"
},
{
MatDefEnum.Solid_Concrete,
"matdefs\\structural\\Solid_Concrete"
},
{
MatDefEnum.Solid_Metal,
"matdefs\\structural\\Solid_Metal"
},
{
MatDefEnum.Testing_MEat,
"matdefs\\heldobjects\\Testing_MEat"
},
{
MatDefEnum.Testing_Soft,
"matdefs\\heldobjects\\Testing_Soft"
},
{
MatDefEnum.Tires,
"matdefs\\props\\Tires"
},
{
MatDefEnum.Wall_Brick,
"matdefs\\structural\\Wall_Brick"
},
{
MatDefEnum.Wall_DryWall,
"matdefs\\structural\\Wall_DryWall"
},
{
MatDefEnum.Wall_GlassBrick,
"matdefs\\structural\\Wall_GlassBrick"
},
{
MatDefEnum.Wall_GlassWindow,
"matdefs\\structural\\Wall_GlassWindow"
},
{
MatDefEnum.Wall_SheetMetal,
"matdefs\\structural\\Wall_SheetMetal"
},
{
MatDefEnum.Wall_WoodSolid,
"matdefs\\structural\\Wall_WoodSolid"
},
{
MatDefEnum.Wall_WoodThick,
"matdefs\\structural\\Wall_WoodThick"
},
{
MatDefEnum.Wall_WoodThin,
"matdefs\\structural\\Wall_WoodThin"
},
{
MatDefEnum.Water,
"matdefs\\structural\\Water"
},
{
MatDefEnum.WaterMelon,
"matdefs\\props\\WaterMelon"
},
{
MatDefEnum.WoodProp,
"matdefs\\props\\WoodProp"
}
};
private void Awake()
{
if (!Object.op_Implicit((Object)(object)base.MatDef))
{
base.MatDef = Resources.Load<MatDef>(MatDefResources[AtlasMatDef]);
}
}
}
public class SceneSettingsOverride : MonoBehaviour
{
[CompilerGenerated]
private sealed class <Start>d__39 : IEnumerator<object>, IDisposable, IEnumerator
{
private int <>1__state;
private object <>2__current;
public SceneSettingsOverride <>4__this;
private List<AudioSource>.Enumerator <>s__1;
private AudioSource <source>5__2;
object IEnumerator<object>.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
object IEnumerator.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
[DebuggerHidden]
public <Start>d__39(int <>1__state)
{
this.<>1__state = <>1__state;
}
[DebuggerHidden]
void IDisposable.Dispose()
{
<>s__1 = default(List<AudioSource>.Enumerator);
<source>5__2 = null;
<>1__state = -2;
}
private bool MoveNext()
{
switch (<>1__state)
{
default:
return false;
case 0:
<>1__state = -1;
<>2__current = null;
<>1__state = 1;
return true;
case 1:
<>1__state = -1;
<>2__current = AtlasPlugin.Loaders[<>4__this.GameMode].Start();
<>1__state = 2;
return true;
case 2:
<>1__state = -1;
<>s__1 = <>4__this._audioSources.GetEnumerator();
try
{
while (<>s__1.MoveNext())
{
<source>5__2 = <>s__1.Current;
((Behaviour)<source>5__2).enabled = true;
<source>5__2 = null;
}
}
finally
{
((IDisposable)<>s__1).Dispose();
}
<>s__1 = default(List<AudioSource>.Enumerator);
return false;
}
}
bool IEnumerator.MoveNext()
{
//ILSpy generated this explicit interface implementation from .override directive in MoveNext
return this.MoveNext();
}
[DebuggerHidden]
void IEnumerator.Reset()
{
throw new NotSupportedException();
}
}
[SerializeField]
[HideInInspector]
private string GameMode = "";
[Header("Player Affordance")]
public bool IsSpawnLockingEnabled = true;
public bool AreHitBoxesEnabled;
public bool DoesDamageGetRegistered;
public float MaxPointingDistance = 2f;
public float MaxProjectileRange = 500f;
public bool ForcesCasingDespawn;
public bool IsGravityForced;
public GravityMode ForcedPhysGravity;
[Header("Locomotion Options")]
public bool IsLocoTeleportAllowed = true;
public bool IsLocoSlideAllowed = true;
public bool IsLocoDashAllowed = true;
public bool IsLocoTouchpadAllowed = true;
public bool IsLocoArmSwingerAllowed = true;
public bool DoesTeleportUseCooldown;
public bool DoesAllowAirControl;
public bool UseMaxSpeedClamp;
public float MaxSpeedClamp = 3f;
[Header("Player Catching Options")]
public bool UsesPlayerCatcher = true;
public float CatchHeight = -50f;
[Header("Player Respawn Options")]
public int DefaultPlayerIFF;
public bool DoesPlayerRespawnOnDeath = true;
public float PlayerDeathFade = 3f;
public float PlayerRespawnLoadDelay = 3.5f;
public string SceneToLoadOnDeath = "";
public bool DoesUseHealthBar;
public bool IsQuickbeltSwappingAllowed = true;
public bool AreQuickbeltSlotsEnabled = true;
public bool ConfigQuickbeltOnLoad;
public int QuickbeltToConfig;
public bool IsSceneLowLight;
public bool IsAmmoInfinite;
public bool AllowsInfiniteAmmoMags = true;
public bool UsesUnlockSystem;
[Header("Audio Stuff")]
public float BaseLoudness = 5f;
public bool UsesWeaponHandlingAISound;
public float MaxImpactSoundEventDistance = 15f;
private readonly List<AudioSource> _audioSources = new List<AudioSource>();
private void Awake()
{
AtlasPlugin.CurrentScene = AtlasPlugin.LastLoadedScene;
if (string.IsNullOrEmpty(GameMode))
{
GameMode = AtlasPlugin.CurrentScene.GameMode;
}
AtlasPlugin.Loaders[GameMode].Awake();
AudioSource[] array = Object.FindObjectsOfType<AudioSource>();
foreach (AudioSource val in array)
{
if (((Behaviour)val).enabled)
{
((Behaviour)val).enabled = false;
_audioSources.Add(val);
}
}
}
private IEnumerator Start()
{
//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
return new <Start>d__39(0)
{
<>4__this = this
};
}
internal void ApplyOverrides(FVRSceneSettings self)
{
//IL_0057: Unknown result type (might be due to invalid IL or missing references)
//IL_005c: Unknown result type (might be due to invalid IL or missing references)
//IL_018f: Unknown result type (might be due to invalid IL or missing references)
self.IsSpawnLockingEnabled = IsSpawnLockingEnabled;
self.AreHitboxesEnabled = AreHitBoxesEnabled;
self.DoesDamageGetRegistered = DoesDamageGetRegistered;
self.MaxPointingDistance = MaxPointingDistance;
self.MaxProjectileRange = MaxProjectileRange;
self.ForcesCasingDespawn = ForcesCasingDespawn;
self.IsGravityForced = IsGravityForced;
self.ForcedPhysGravity = ForcedPhysGravity;
self.IsLocoTeleportAllowed = IsLocoTeleportAllowed;
self.IsLocoSlideAllowed = IsLocoSlideAllowed;
self.IsLocoDashAllowed = IsLocoDashAllowed;
self.IsLocoTouchpadAllowed = IsLocoTouchpadAllowed;
self.IsLocoArmSwingerAllowed = IsLocoArmSwingerAllowed;
self.DoesTeleportUseCooldown = DoesTeleportUseCooldown;
self.DoesAllowAirControl = DoesAllowAirControl;
self.UsesMaxSpeedClamp = UseMaxSpeedClamp;
self.MaxSpeedClamp = MaxSpeedClamp;
self.UsesPlayerCatcher = UsesPlayerCatcher;
self.CatchHeight = CatchHeight;
self.DefaultPlayerIFF = DefaultPlayerIFF;
self.DoesPlayerRespawnOnDeath = DoesPlayerRespawnOnDeath;
self.PlayerDeathFade = PlayerDeathFade;
self.PlayerRespawnLoadDelay = PlayerRespawnLoadDelay;
self.SceneToLoadOnDeath = SceneToLoadOnDeath;
self.DoesUseHealthBar = DoesUseHealthBar;
self.IsQuickbeltSwappingAllowed = IsQuickbeltSwappingAllowed;
self.AreQuickbeltSlotsEnabled = AreQuickbeltSlotsEnabled;
self.ConfigQuickbeltOnLoad = ConfigQuickbeltOnLoad;
self.QuickbeltToConfig = QuickbeltToConfig;
self.IsSceneLowLight = IsSceneLowLight;
self.IsAmmoInfinite = IsAmmoInfinite;
self.AllowsInfiniteAmmoMags = AllowsInfiniteAmmoMags;
self.UsesUnlockSystem = UsesUnlockSystem;
self.DefaultSoundEnvironment = (FVRSoundEnvironment)0;
self.BaseLoudness = BaseLoudness;
self.UsesWeaponHandlingAISound = UsesWeaponHandlingAISound;
self.MaxImpactSoundEventDistance = MaxImpactSoundEventDistance;
}
private void OnValidate()
{
if (!string.IsNullOrEmpty(GameMode))
{
GameMode = "";
}
}
}
}
namespace Atlas.MappingComponents.TakeAndHold
{
public class AtlasHoldPoint : MonoBehaviour
{
public List<Transform> Bounds = null;
public GameObject NavBlockers = null;
public List<Transform> BarrierPoints = null;
public List<AttackVector> AttackVectors = null;
[Header("Spawn Points")]
public Transform SystemNode = null;
public List<Transform> Targets = null;
public List<Transform> Turrets = null;
public List<Transform> SosigDefense = null;
private void OnDrawGizmos()
{
//IL_004d: Unknown result type (might be due to invalid IL or missing references)
//IL_0052: Unknown result type (might be due to invalid IL or missing references)
//IL_0057: Unknown result type (might be due to invalid IL or missing references)
//IL_0081: Unknown result type (might be due to invalid IL or missing references)
//IL_0086: Unknown result type (might be due to invalid IL or missing references)
//IL_00b5: Unknown result type (might be due to invalid IL or missing references)
//IL_00ba: Unknown result type (might be due to invalid IL or missing references)
//IL_00e9: Unknown result type (might be due to invalid IL or missing references)
//IL_00ee: Unknown result type (might be due to invalid IL or missing references)
//IL_0102: Unknown result type (might be due to invalid IL or missing references)
//IL_0107: Unknown result type (might be due to invalid IL or missing references)
//IL_0131: Unknown result type (might be due to invalid IL or missing references)
//IL_0145: Unknown result type (might be due to invalid IL or missing references)
//IL_0159: Unknown result type (might be due to invalid IL or missing references)
//IL_015e: Unknown result type (might be due to invalid IL or missing references)
//IL_001f: Unknown result type (might be due to invalid IL or missing references)
//IL_0029: Unknown result type (might be due to invalid IL or missing references)
//IL_002e: Unknown result type (might be due to invalid IL or missing references)
//IL_01a3: Unknown result type (might be due to invalid IL or missing references)
//IL_01a8: Unknown result type (might be due to invalid IL or missing references)
//IL_01e6: Unknown result type (might be due to invalid IL or missing references)
//IL_01eb: Unknown result type (might be due to invalid IL or missing references)
//IL_01f5: Unknown result type (might be due to invalid IL or missing references)
//IL_01fa: Unknown result type (might be due to invalid IL or missing references)
//IL_01ff: Unknown result type (might be due to invalid IL or missing references)
if (Object.op_Implicit((Object)(object)SystemNode))
{
Extensions.GenericGizmoSphere(new Color(0f, 0.8f, 0.8f), 1.5f * Vector3.up, 0.25f, SystemNode);
}
Extensions.GenericGizmoCubeOutline(Color.white, Vector3.zero, Vector3.one, Bounds.ToArray());
Extensions.GenericGizmoSphere(new Color(0.8f, 0f, 0f, 0.5f), Vector3.zero, 0.25f, SosigDefense.ToArray());
Extensions.GenericGizmoSphere(new Color(0.8f, 0f, 0f, 0.1f), Vector3.zero, 0.25f, Turrets.ToArray());
Extensions.GenericGizmoCube(new Color(1f, 0f, 0f, 0.5f), Vector3.zero, new Vector3(0.1f, 0.5f, 0.1f), Vector3.zero, Targets.ToArray());
Extensions.GenericGizmoCube(new Color(0f, 0.6f, 0f, 0.5f), new Vector3(0f, 1f, 0f), new Vector3(1f, 2f, 0.1f), Vector3.forward, BarrierPoints.ToArray());
foreach (AttackVector attackVector in AttackVectors)
{
Extensions.GenericGizmoSphere(new Color(0.8f, 0f, 0f, 0.5f), Vector3.zero, 0.25f, attackVector.SpawnPoints_Sosigs_Attack.ToArray());
if (Object.op_Implicit((Object)(object)attackVector.GrenadeVector))
{
Extensions.GenericGizmoCube(new Color(0.1f, 0.5f, 0.1f, 0.5f), Vector3.zero, 0.5f * Vector3.one, Vector3.forward, attackVector.GrenadeVector);
}
}
}
}
public class AtlasSupplyPoint : MonoBehaviour
{
public Transform Bounds = null;
[Header("Spawn Points")]
public Transform Player = null;
public List<Transform> SosigDefense = null;
public List<Transform> Turrets = null;
public List<Transform> Panels = null;
public List<Transform> Boxes = null;
public List<Transform> Tables = null;
public Transform CaseLarge = null;
public Transform CaseSmall = null;
public Transform Melee = null;
public List<Transform> SmallItem = null;
public Transform Shield = null;
[Header("Atlas Settings")]
[Tooltip("If checked, this supply point will become the spawn point of every sequence if the sequences are generated.")]
public bool ForceSpawnHere;
[Tooltip("If checked, this supply point will only be used for the initial spawn and then never again.")]
public bool OnlySpawn;
private void OnDrawGizmos()
{
//IL_0001: Unknown result type (might be due to invalid IL or missing references)
//IL_0006: Unknown result type (might be due to invalid IL or missing references)
//IL_000b: Unknown result type (might be due to invalid IL or missing references)
//IL_0039: Unknown result type (might be due to invalid IL or missing references)
//IL_004d: Unknown result type (might be due to invalid IL or missing references)
//IL_0061: Unknown result type (might be due to invalid IL or missing references)
//IL_0066: Unknown result type (might be due to invalid IL or missing references)
//IL_0090: Unknown result type (might be due to invalid IL or missing references)
//IL_00a4: Unknown result type (might be due to invalid IL or missing references)
//IL_00b8: Unknown result type (might be due to invalid IL or missing references)
//IL_00bd: Unknown result type (might be due to invalid IL or missing references)
//IL_00eb: Unknown result type (might be due to invalid IL or missing references)
//IL_00ff: Unknown result type (might be due to invalid IL or missing references)
//IL_0113: Unknown result type (might be due to invalid IL or missing references)
//IL_0118: Unknown result type (might be due to invalid IL or missing references)
//IL_0146: Unknown result type (might be due to invalid IL or missing references)
//IL_015a: Unknown result type (might be due to invalid IL or missing references)
//IL_016e: Unknown result type (might be due to invalid IL or missing references)
//IL_0173: Unknown result type (might be due to invalid IL or missing references)
//IL_019d: Unknown result type (might be due to invalid IL or missing references)
//IL_01a2: Unknown result type (might be due to invalid IL or missing references)
//IL_01ac: Unknown result type (might be due to invalid IL or missing references)
//IL_01b1: Unknown result type (might be due to invalid IL or missing references)
//IL_01b6: Unknown result type (might be due to invalid IL or missing references)
//IL_01e0: Unknown result type (might be due to invalid IL or missing references)
//IL_01e5: Unknown result type (might be due to invalid IL or missing references)
//IL_0214: Unknown result type (might be due to invalid IL or missing references)
//IL_0219: Unknown result type (might be due to invalid IL or missing references)
//IL_024d: Unknown result type (might be due to invalid IL or missing references)
//IL_0252: Unknown result type (might be due to invalid IL or missing references)
//IL_0285: Unknown result type (might be due to invalid IL or missing references)
//IL_028a: Unknown result type (might be due to invalid IL or missing references)
//IL_02b9: Unknown result type (might be due to invalid IL or missing references)
//IL_02be: Unknown result type (might be due to invalid IL or missing references)
//IL_02f1: Unknown result type (might be due to invalid IL or missing references)
//IL_02f6: Unknown result type (might be due to invalid IL or missing references)
//IL_030a: Unknown result type (might be due to invalid IL or missing references)
//IL_030f: Unknown result type (might be due to invalid IL or missing references)
Extensions.GenericGizmoCubeOutline(Color.white, Vector3.zero, Vector3.one, Bounds);
Extensions.GenericGizmoCube(new Color(0.4f, 0.4f, 0.9f, 0.5f), new Vector3(0f, 1.5f, 0.25f), new Vector3(2.3f, 1.2f, 0.5f), Vector3.forward, Panels.ToArray());
Extensions.GenericGizmoCube(new Color(1f, 0.4f, 0f, 0.5f), new Vector3(0f, 0.12f, 0f), new Vector3(1.4f, 0.24f, 0.35f), Vector3.forward, CaseLarge);
Extensions.GenericGizmoCube(new Color(1f, 0.4f, 0f, 0.5f), new Vector3(0f, 0.12f, 0f), new Vector3(0.6f, 0.24f, 0.35f), Vector3.forward, CaseSmall);
Extensions.GenericGizmoCube(new Color(0.5f, 0.5f, 0.5f, 0.5f), new Vector3(0f, 0.4f, 0.1f), new Vector3(0.7f, 0.8f, 1.5f), Vector3.zero, Tables.ToArray());
Extensions.GenericGizmoCube(new Color(0.7f, 0.7f, 0.7f, 0.5f), Vector3.zero, 0.5f * Vector3.one, Vector3.zero, Boxes.ToArray());
Extensions.GenericGizmoSphere(new Color(0.8f, 0f, 0f, 0.5f), Vector3.zero, 0.25f, SosigDefense.ToArray());
Extensions.GenericGizmoSphere(new Color(0.8f, 0f, 0f, 0.1f), Vector3.zero, 0.25f, Turrets.AsEnumerable().ToArray());
Extensions.GenericGizmoSphere(new Color(0f, 0.8f, 0f, 0.5f), Vector3.zero, 0.2f, Melee);
Extensions.GenericGizmoSphere(new Color(0f, 0.8f, 0f, 0.5f), Vector3.zero, 0.1f, SmallItem.ToArray());
Extensions.GenericGizmoSphere(new Color(0f, 0.8f, 0.8f, 0.5f), Vector3.zero, 0.25f, Player);
Extensions.GenericGizmoCube(new Color(0f, 0.8f, 0f, 0.1f), Vector3.zero, new Vector3(0.4f, 0.6f, 0.1f), Vector3.zero, Shield);
}
}
public class TNH_ManagerOverride : MonoBehaviour
{
[Header("System Connections")]
public List<AtlasHoldPoint> HoldPoints = null;
public List<AtlasSupplyPoint> SupplyPoints = null;
public Transform ScoreDisplayPoint = null;
internal void ApplyOverrides(TNH_Manager manager)
{
GameObject val = GameObject.Find("SupplyPoint_0");
GameObject val2 = GameObject.Find("HoldPoint_0");
GameObject gameObject = ((Component)val2.transform.Find("Barrier_SpawnPoint")).gameObject;
List<TNH_HoldPoint> realHoldPoints = new List<TNH_HoldPoint>();
List<TNH_SupplyPoint> realSupplyPoints = new List<TNH_SupplyPoint>();
InitializeHoldPoints(val2, gameObject, realHoldPoints);
InitializeSupplyPoints(val, realSupplyPoints);
InitializeManager(manager, realHoldPoints, realSupplyPoints);
InitializeState(manager);
Object.Destroy((Object)(object)val2);
Object.Destroy((Object)(object)val);
}
private TNH_SafePositionMatrix GenerateSafePositionMatrix(TNH_Manager manager)
{
//IL_0025: Unknown result type (might be due to invalid IL or missing references)
//IL_002a: Unknown result type (might be due to invalid IL or missing references)
//IL_0035: Unknown result type (might be due to invalid IL or missing references)
//IL_0041: Expected O, but got Unknown
TNH_SafePositionMatrix val = ScriptableObject.CreateInstance<TNH_SafePositionMatrix>();
val.Entries_HoldPoints = new List<PositionEntry>();
val.Entries_SupplyPoints = new List<PositionEntry>();
for (int i = 0; i < manager.HoldPoints.Count; i++)
{
PositionEntry val2 = new PositionEntry
{
SafePositions_HoldPoints = new List<bool>(),
SafePositions_SupplyPoints = new List<bool>()
};
val.Entries_HoldPoints.Add(val2);
for (int j = 0; j < manager.HoldPoints.Count; j++)
{
val2.SafePositions_HoldPoints.Add(i != j);
}
foreach (AtlasSupplyPoint supplyPoint in SupplyPoints)
{
val2.SafePositions_SupplyPoints.Add(!supplyPoint.OnlySpawn);
}
}
val.GenereateSupplyPointsData();
for (int k = 0; k < manager.SupplyPoints.Count; k++)
{
PositionEntry val3 = val.Entries_SupplyPoints[k];
for (int l = 0; l < manager.SupplyPoints.Count; l++)
{
AtlasSupplyPoint atlasSupplyPoint = SupplyPoints[l];
val3.SafePositions_SupplyPoints.Add(k != l && !atlasSupplyPoint.OnlySpawn);
}
}
return val;
}
private TNH_PointSequence GeneratePointSequence()
{
TNH_PointSequence val = ScriptableObject.CreateInstance<TNH_PointSequence>();
AtlasSupplyPoint atlasSupplyPoint = SupplyPoints.FirstOrDefault((AtlasSupplyPoint s) => s.ForceSpawnHere);
val.StartSupplyPointIndex = SupplyPoints.IndexOf(Object.op_Implicit((Object)(object)atlasSupplyPoint) ? atlasSupplyPoint : SodaliteUtils.GetRandom<AtlasSupplyPoint>((IList<AtlasSupplyPoint>)SupplyPoints));
val.HoldPoints = (from x in HoldPoints.OrderBy((AtlasHoldPoint _) => Random.Range(0, 100)).Take(5)
select HoldPoints.IndexOf(x)).ToList();
return val;
}
private void InitializeHoldPoints(GameObject templateHoldPoint, GameObject templateBarrierSpawnPoint, List<TNH_HoldPoint> realHoldPoints)
{
//IL_0034: Unknown result type (might be due to invalid IL or missing references)
//IL_003f: Unknown result type (might be due to invalid IL or missing references)
//IL_011e: Unknown result type (might be due to invalid IL or missing references)
//IL_012a: Unknown result type (might be due to invalid IL or missing references)
foreach (AtlasHoldPoint holdPoint in HoldPoints)
{
TNH_HoldPoint component = Object.Instantiate<GameObject>(templateHoldPoint).GetComponent<TNH_HoldPoint>();
((Component)component).transform.SetPositionAndRotation(((Component)holdPoint).transform.position, ((Component)holdPoint).transform.rotation);
foreach (GameObject item in ((Component)component).gameObject.IterateChildren())
{
Object.Destroy((Object)(object)item);
}
component.Bounds = holdPoint.Bounds;
component.NavBlockers = holdPoint.NavBlockers;
component.SpawnPoint_SystemNode = holdPoint.SystemNode;
component.SpawnPoints_Targets = holdPoint.Targets;
component.SpawnPoints_Turrets = holdPoint.Turrets;
component.AttackVectors = holdPoint.AttackVectors;
component.SpawnPoints_Sosigs_Defense = holdPoint.SosigDefense;
component.BarrierPoints.Clear();
foreach (Transform barrierPoint in holdPoint.BarrierPoints)
{
TNH_DestructibleBarrierPoint component2 = Object.Instantiate<GameObject>(templateBarrierSpawnPoint, ((Component)component).transform).GetComponent<TNH_DestructibleBarrierPoint>();
((Component)component2).transform.SetPositionAndRotation(((Component)barrierPoint).transform.position, ((Component)barrierPoint).transform.rotation);
component.BarrierPoints.Add(component2);
}
realHoldPoints.Add(component);
}
}
private void InitializeSupplyPoints(GameObject templateSupplyPoint, List<TNH_SupplyPoint> realSupplyPoints)
{
foreach (AtlasSupplyPoint supplyPoint in SupplyPoints)
{
TNH_SupplyPoint component = Object.Instantiate<GameObject>(templateSupplyPoint).GetComponent<TNH_SupplyPoint>();
foreach (GameObject item in ((Component)component).gameObject.IterateChildren())
{
Object.Destroy((Object)(object)item);
}
component.Bounds = supplyPoint.Bounds;
component.SpawnPoint_PlayerSpawn = supplyPoint.Player;
component.SpawnPoints_Sosigs_Defense = supplyPoint.SosigDefense;
component.SpawnPoints_Turrets = supplyPoint.Turrets;
component.SpawnPoints_Panels = supplyPoint.Panels;
component.SpawnPoints_Boxes = supplyPoint.Boxes;
component.SpawnPoint_Tables = supplyPoint.Tables;
component.SpawnPoint_CaseLarge = supplyPoint.CaseLarge;
component.SpawnPoint_CaseSmall = supplyPoint.CaseSmall;
component.SpawnPoint_Melee = supplyPoint.Melee;
component.SpawnPoints_SmallItem = supplyPoint.SmallItem;
component.SpawnPoint_Shield = supplyPoint.Shield;
realSupplyPoints.Add(component);
}
}
private void InitializeManager(TNH_Manager manager, List<TNH_HoldPoint> realHoldPoints, List<TNH_SupplyPoint> realSupplyPoints)
{
manager.LevelName = AtlasPlugin.CurrentScene?.Identifier;
manager.HoldPoints = realHoldPoints;
manager.SupplyPoints = realSupplyPoints;
manager.ScoreDisplayPoint = ScoreDisplayPoint;
manager.IsBigLevel = false;
manager.UsesClassicPatrolBehavior = true;
}
private void InitializeState(TNH_Manager manager)
{
//IL_0001: Unknown result type (might be due to invalid IL or missing references)
//IL_0006: Unknown result type (might be due to invalid IL or missing references)
//IL_0057: Unknown result type (might be due to invalid IL or missing references)
State state = Random.state;
Random.InitState(AtlasPlugin.CurrentScene.Identifier.GetHashCode());
manager.PossibleSequnces = new List<TNH_PointSequence>();
for (int i = 0; i < 10; i++)
{
manager.PossibleSequnces.Add(GeneratePointSequence());
}
manager.SafePosMatrix = GenerateSafePositionMatrix(manager);
Random.state = state;
}
}
}
namespace Atlas.MappingComponents.Sandbox
{
public class ObjectSpawnPoint : MonoBehaviour
{
[CompilerGenerated]
private sealed class <SpawnAsync>d__4 : IEnumerator<object>, IDisposable, IEnumerator
{
private int <>1__state;
private object <>2__current;
public ObjectSpawnPoint <>4__this;
private FVRObject <obj>5__1;
private AnvilCallback<GameObject> <callback>5__2;
object IEnumerator<object>.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
object IEnumerator.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
[DebuggerHidden]
public <SpawnAsync>d__4(int <>1__state)
{
this.<>1__state = <>1__state;
}
[DebuggerHidden]
void IDisposable.Dispose()
{
<obj>5__1 = null;
<callback>5__2 = null;
<>1__state = -2;
}
private bool MoveNext()
{
//IL_00ad: Unknown result type (might be due to invalid IL or missing references)
//IL_00bd: Unknown result type (might be due to invalid IL or missing references)
switch (<>1__state)
{
default:
return false;
case 0:
<>1__state = -1;
if (!IM.OD.TryGetValue(<>4__this.ObjectId, out <obj>5__1))
{
AtlasPlugin.Logger.LogWarning((object)("No object found with id '" + <>4__this.ObjectId + "'."));
return false;
}
<callback>5__2 = ((AnvilAsset)<obj>5__1).GetGameObjectAsync();
<>2__current = <callback>5__2;
<>1__state = 1;
return true;
case 1:
<>1__state = -1;
Object.Instantiate<GameObject>(<callback>5__2.Result, ((Component)<>4__this).transform.position, ((Component)<>4__this).transform.rotation).SetActive(true);
return false;
}
}
bool IEnumerator.MoveNext()
{
//ILSpy generated this explicit interface implementation from .override directive in MoveNext
return this.MoveNext();
}
[DebuggerHidden]
void IEnumerator.Reset()
{
throw new NotSupportedException();
}
}
[CompilerGenerated]
private sealed class <Start>d__2 : IEnumerator<object>, IDisposable, IEnumerator
{
private int <>1__state;
private object <>2__current;
public ObjectSpawnPoint <>4__this;
object IEnumerator<object>.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
object IEnumerator.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
[DebuggerHidden]
public <Start>d__2(int <>1__state)
{
this.<>1__state = <>1__state;
}
[DebuggerHidden]
void IDisposable.Dispose()
{
<>1__state = -2;
}
private bool MoveNext()
{
switch (<>1__state)
{
default:
return false;
case 0:
<>1__state = -1;
if (!<>4__this.SpawnOnStart)
{
return false;
}
<>2__current = null;
<>1__state = 1;
return true;
case 1:
<>1__state = -1;
<>2__current = <>4__this.SpawnAsync();
<>1__state = 2;
return true;
case 2:
<>1__state = -1;
return false;
}
}
bool IEnumerator.MoveNext()
{
//ILSpy generated this explicit interface implementation from .override directive in MoveNext
return this.MoveNext();
}
[DebuggerHidden]
void IEnumerator.Reset()
{
throw new NotSupportedException();
}
}
public string ObjectId = "";
public bool SpawnOnStart = true;
private IEnumerator Start()
{
//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
return new <Start>d__2(0)
{
<>4__this = this
};
}
public void Spawn()
{
((MonoBehaviour)this).StartCoroutine(SpawnAsync());
}
private IEnumerator SpawnAsync()
{
//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
return new <SpawnAsync>d__4(0)
{
<>4__this = this
};
}
private void OnDrawGizmos()
{
//IL_0015: Unknown result type (might be due to invalid IL or missing references)
//IL_0026: Unknown result type (might be due to invalid IL or missing references)
//IL_003c: Unknown result type (might be due to invalid IL or missing references)
//IL_0047: Unknown result type (might be due to invalid IL or missing references)
//IL_0052: Unknown result type (might be due to invalid IL or missing references)
//IL_005c: Unknown result type (might be due to invalid IL or missing references)
//IL_0061: Unknown result type (might be due to invalid IL or missing references)
Gizmos.color = new Color(0f, 0f, 0.6f, 0.5f);
Gizmos.DrawSphere(((Component)this).transform.position, 0.1f);
Gizmos.DrawLine(((Component)this).transform.position, ((Component)this).transform.position + ((Component)this).transform.forward * 0.25f);
}
}
public class PlayerResetPoint : MonoBehaviour
{
[CompilerGenerated]
private sealed class <Start>d__0 : IEnumerator<object>, IDisposable, IEnumerator
{
private int <>1__state;
private object <>2__current;
public PlayerResetPoint <>4__this;
private Transform <deathResetPoint>5__1;
object IEnumerator<object>.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
object IEnumerator.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
[DebuggerHidden]
public <Start>d__0(int <>1__state)
{
this.<>1__state = <>1__state;
}
[DebuggerHidden]
void IDisposable.Dispose()
{
<deathResetPoint>5__1 = null;
<>1__state = -2;
}
private bool MoveNext()
{
//IL_0067: Unknown result type (might be due to invalid IL or missing references)
//IL_0077: Unknown result type (might be due to invalid IL or missing references)
switch (<>1__state)
{
default:
return false;
case 0:
<>1__state = -1;
<>2__current = null;
<>1__state = 1;
return true;
case 1:
<>1__state = -1;
<deathResetPoint>5__1 = GM.CurrentSceneSettings.DeathResetPoint;
if (Object.op_Implicit((Object)(object)<deathResetPoint>5__1))
{
<deathResetPoint>5__1.SetPositionAndRotation(((Component)<>4__this).transform.position, ((Component)<>4__this).transform.rotation);
}
else
{
GM.CurrentSceneSettings.DeathResetPoint = ((Component)<>4__this).transform;
}
return false;
}
}
bool IEnumerator.MoveNext()
{
//ILSpy generated this explicit interface implementation from .override directive in MoveNext
return this.MoveNext();
}
[DebuggerHidden]
void IEnumerator.Reset()
{
throw new NotSupportedException();
}
}
private IEnumerator Start()
{
//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
return new <Start>d__0(0)
{
<>4__this = this
};
}
}
public class PlayerSpawnPoint : MonoBehaviour
{
[CompilerGenerated]
private sealed class <Start>d__0 : IEnumerator<object>, IDisposable, IEnumerator
{
private int <>1__state;
private object <>2__current;
public PlayerSpawnPoint <>4__this;
object IEnumerator<object>.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
object IEnumerator.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
[DebuggerHidden]
public <Start>d__0(int <>1__state)
{
this.<>1__state = <>1__state;
}
[DebuggerHidden]
void IDisposable.Dispose()
{
<>1__state = -2;
}
private bool MoveNext()
{
//IL_0047: Unknown result type (might be due to invalid IL or missing references)
//IL_0058: Unknown result type (might be due to invalid IL or missing references)
//IL_0068: Unknown result type (might be due to invalid IL or missing references)
//IL_006d: Unknown result type (might be due to invalid IL or missing references)
switch (<>1__state)
{
default:
return false;
case 0:
<>1__state = -1;
<>2__current = null;
<>1__state = 1;
return true;
case 1:
<>1__state = -1;
GM.CurrentMovementManager.TeleportToPoint(((Component)<>4__this).transform.position, true, ((Component)<>4__this).transform.position + ((Component)<>4__this).transform.forward);
return false;
}
}
bool IEnumerator.MoveNext()
{
//ILSpy generated this explicit interface implementation from .override directive in MoveNext
return this.MoveNext();
}
[DebuggerHidden]
void IEnumerator.Reset()
{
throw new NotSupportedException();
}
}
private IEnumerator Start()
{
//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
return new <Start>d__0(0)
{
<>4__this = this
};
}
private void OnDrawGizmos()
{
//IL_0015: Unknown result type (might be due to invalid IL or missing references)
//IL_0026: Unknown result type (might be due to invalid IL or missing references)
//IL_003c: Unknown result type (might be due to invalid IL or missing references)
//IL_0047: Unknown result type (might be due to invalid IL or missing references)
//IL_0052: Unknown result type (might be due to invalid IL or missing references)
//IL_005c: Unknown result type (might be due to invalid IL or missing references)
//IL_0061: Unknown result type (might be due to invalid IL or missing references)
Gizmos.color = new Color(0.2f, 0.8f, 0.2f, 0.5f);
Gizmos.DrawSphere(((Component)this).transform.position, 0.1f);
Gizmos.DrawLine(((Component)this).transform.position, ((Component)this).transform.position + ((Component)this).transform.forward * 0.25f);
}
}
public class PrefabSpawnPoint : MonoBehaviour
{
public enum PrefabType
{
ItemSpawner,
Destructobin,
SosigSpawner,
WhizzBangADinger,
BangerDetonator
}
[CompilerGenerated]
private sealed class <Start>d__4 : IEnumerator<object>, IDisposable, IEnumerator
{
private int <>1__state;
private object <>2__current;
public PrefabSpawnPoint <>4__this;
private Vector3 <spawnPosition>5__1;
private GameObject <obj>5__2;
object IEnumerator<object>.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
object IEnumerator.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
[DebuggerHidden]
public <Start>d__4(int <>1__state)
{
this.<>1__state = <>1__state;
}
[DebuggerHidden]
void IDisposable.Dispose()
{
<obj>5__2 = null;
<>1__state = -2;
}
private bool MoveNext()
{
//IL_0051: Unknown result type (might be due to invalid IL or missing references)
//IL_0056: Unknown result type (might be due to invalid IL or missing references)
//IL_0070: Unknown result type (might be due to invalid IL or missing references)
//IL_0080: Unknown result type (might be due to invalid IL or missing references)
//IL_008a: Unknown result type (might be due to invalid IL or missing references)
//IL_008f: Unknown result type (might be due to invalid IL or missing references)
//IL_0094: Unknown result type (might be due to invalid IL or missing references)
//IL_00ea: Unknown result type (might be due to invalid IL or missing references)
//IL_00fa: Unknown result type (might be due to invalid IL or missing references)
switch (<>1__state)
{
default:
return false;
case 0:
<>1__state = -1;
break;
case 1:
<>1__state = -1;
break;
}
if (!ObjectsCached)
{
<>2__current = null;
<>1__state = 1;
return true;
}
<spawnPosition>5__1 = ((Component)<>4__this).transform.position;
if (<>4__this.Type == PrefabType.ItemSpawner)
{
<spawnPosition>5__1 += ((Component)<>4__this).transform.forward * 0.025f;
}
if (CachedObjects.ContainsKey(<>4__this.Type) && Object.op_Implicit((Object)(object)CachedObjects[<>4__this.Type]))
{
<obj>5__2 = Object.Instantiate<GameObject>(CachedObjects[<>4__this.Type], <spawnPosition>5__1, ((Component)<>4__this).transform.rotation);
<obj>5__2.SetActive(true);
<obj>5__2 = null;
}
return false;
}
bool IEnumerator.MoveNext()
{
//ILSpy generated this explicit interface implementation from .override directive in MoveNext
return this.MoveNext();
}
[DebuggerHidden]
void IEnumerator.Reset()
{
throw new NotSupportedException();
}
}
internal static readonly Dictionary<PrefabType, GameObject> CachedObjects = new Dictionary<PrefabType, GameObject>();
internal static bool ObjectsCached = false;
public PrefabType Type;
private IEnumerator Start()
{
//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
return new <Start>d__4(0)
{
<>4__this = this
};
}
private void OnDrawGizmos()
{
//IL_0015: Unknown result type (might be due to invalid IL or missing references)
//IL_0026: Unknown result type (might be due to invalid IL or missing references)
//IL_0087: Unknown result type (might be due to invalid IL or missing references)
//IL_008c: Unknown result type (might be due to invalid IL or missing references)
//IL_00be: Unknown result type (might be due to invalid IL or missing references)
//IL_00c3: Unknown result type (might be due to invalid IL or missing references)
//IL_00f5: Unknown result type (might be due to invalid IL or missing references)
//IL_00fa: Unknown result type (might be due to invalid IL or missing references)
//IL_0129: Unknown result type (might be due to invalid IL or missing references)
//IL_012e: Unknown result type (might be due to invalid IL or missing references)
//IL_015d: Unknown result type (might be due to invalid IL or missing references)
//IL_0162: Unknown result type (might be due to invalid IL or missing references)
//IL_016b: Unknown result type (might be due to invalid IL or missing references)
//IL_016c: Unknown result type (might be due to invalid IL or missing references)
//IL_0173: Unknown result type (might be due to invalid IL or missing references)
//IL_0174: Unknown result type (might be due to invalid IL or missing references)
//IL_0175: Unknown result type (might be due to invalid IL or missing references)
//IL_017b: Unknown result type (might be due to invalid IL or missing references)
//IL_0180: Unknown result type (might be due to invalid IL or missing references)
Gizmos.color = new Color(0.4f, 0.4f, 0.9f, 0.5f);
Gizmos.matrix = ((Component)this).transform.localToWorldMatrix;
Vector3 val = default(Vector3);
Vector3 val2 = default(Vector3);
Vector3 val3;
switch (Type)
{
case PrefabType.ItemSpawner:
((Vector3)(ref val))..ctor(0f, 0.7f, 0.25f);
((Vector3)(ref val2))..ctor(2.3f, 1.2f, 0.5f);
val3 = Vector3.forward;
break;
case PrefabType.Destructobin:
((Vector3)(ref val))..ctor(0f, 0.525f, 0f);
((Vector3)(ref val2))..ctor(0.65f, 1.05f, 0.65f);
val3 = Vector3.left;
break;
case PrefabType.SosigSpawner:
((Vector3)(ref val))..ctor(0f, 0.11f, 0f);
((Vector3)(ref val2))..ctor(0.3f, 0.43f, 0.05f);
val3 = Vector3.forward;
break;
case PrefabType.WhizzBangADinger:
((Vector3)(ref val))..ctor(0f, 0.425f, -0.05f);
((Vector3)(ref val2))..ctor(0.4f, 0.85f, 0.5f);
val3 = Vector3.forward;
break;
case PrefabType.BangerDetonator:
((Vector3)(ref val))..ctor(0f, 0f, 0.1f);
((Vector3)(ref val2))..ctor(0.05f, 0.05f, 0.33f);
val3 = Vector3.forward;
break;
default:
throw new ArgumentOutOfRangeException();
}
Gizmos.DrawCube(val, val2);
Gizmos.DrawLine(val, val + val3 * 0.5f);
}
}
public class SosigSpawnPoint : MonoBehaviour
{
[CompilerGenerated]
private sealed class <Start>d__5 : IEnumerator<object>, IDisposable, IEnumerator
{
private int <>1__state;
private object <>2__current;
public SosigSpawnPoint <>4__this;
object IEnumerator<object>.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
object IEnumerator.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
[DebuggerHidden]
public <Start>d__5(int <>1__state)
{
this.<>1__state = <>1__state;
}
[DebuggerHidden]
void IDisposable.Dispose()
{
<>1__state = -2;
}
private bool MoveNext()
{
//IL_0021: Unknown result type (might be due to invalid IL or missing references)
//IL_002b: Expected O, but got Unknown
switch (<>1__state)
{
default:
return false;
case 0:
<>1__state = -1;
<>2__current = (object)new WaitForEndOfFrame();
<>1__state = 1;
return true;
case 1:
<>1__state = -1;
if (<>4__this.SpawnOnStart)
{
<>4__this.Spawn();
}
return false;
}
}
bool IEnumerator.MoveNext()
{
//ILSpy generated this explicit interface implementation from .override directive in MoveNext
return this.MoveNext();
}
[DebuggerHidden]
void IEnumerator.Reset()
{
throw new NotSupportedException();
}
}
[Header("Spawn Options")]
public bool SpawnOnStart = true;
[Header("Sosig Options")]
public SosigEnemyID SosigType;
public int IFF;
public bool SpawnActive;
public SosigOrder SpawnState;
public IEnumerator Start()
{
//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
return new <Start>d__5(0)
{
<>4__this = this
};
}
public void Spawn()
{
//IL_0001: Unknown result type (might be due to invalid IL or missing references)
//IL_0006: Unknown result type (might be due to invalid IL or missing references)
//IL_0013: Unknown result type (might be due to invalid IL or missing references)
//IL_0015: Unknown result type (might be due to invalid IL or missing references)
//IL_0020: Unknown result type (might be due to invalid IL or missing references)
//IL_002d: Unknown result type (might be due to invalid IL or missing references)
//IL_0035: Unknown result type (might be due to invalid IL or missing references)
//IL_003d: Unknown result type (might be due to invalid IL or missing references)
//IL_0044: Unknown result type (might be due to invalid IL or missing references)
//IL_004f: Unknown result type (might be due to invalid IL or missing references)
//IL_0056: Unknown result type (might be due to invalid IL or missing references)
//IL_0062: Expected O, but got Unknown
//IL_006d: Unknown result type (might be due to invalid IL or missing references)
//IL_007e: Unknown result type (might be due to invalid IL or missing references)
//IL_0089: Unknown result type (might be due to invalid IL or missing references)
SpawnOptions val = new SpawnOptions
{
SpawnActivated = SpawnActive,
SpawnState = SpawnState,
IFF = IFF,
SpawnWithFullAmmo = true,
EquipmentMode = (EquipmentSlots)7,
SosigTargetPosition = ((Component)this).transform.position,
SosigTargetRotation = ((Component)this).transform.eulerAngles
};
SosigAPI.Spawn(ManagerSingleton<IM>.Instance.odicSosigObjsByID[SosigType], val, ((Component)this).transform.position, ((Component)this).transform.rotation);
}
private void OnDrawGizmos()
{
//IL_0015: Unknown result type (might be due to invalid IL or missing references)
//IL_0026: Unknown result type (might be due to invalid IL or missing references)
//IL_003c: Unknown result type (might be due to invalid IL or missing references)
//IL_0047: Unknown result type (might be due to invalid IL or missing references)
//IL_0052: Unknown result type (might be due to invalid IL or missing references)
//IL_005c: Unknown result type (might be due to invalid IL or missing references)
//IL_0061: Unknown result type (might be due to invalid IL or missing references)
Gizmos.color = new Color(0.8f, 0.2f, 0.2f, 0.5f);
Gizmos.DrawSphere(((Component)this).transform.position, 0.1f);
Gizmos.DrawLine(((Component)this).transform.position, ((Component)this).transform.position + ((Component)this).transform.forward * 0.25f);
}
}
}
namespace Atlas.Loaders
{
public interface ISceneLoader
{
void Awake();
IEnumerator Start();
}
public class SandboxLoader : ISceneLoader
{
[CompilerGenerated]
private sealed class <Start>d__1 : IEnumerator<object>, IDisposable, IEnumerator
{
private int <>1__state;
private object <>2__current;
public SandboxLoader <>4__this;
private GameObject[] <objects>5__1;
private Dictionary<PrefabSpawnPoint.PrefabType, GameObject>.ValueCollection.Enumerator <>s__2;
private GameObject <obj>5__3;
object IEnumerator<object>.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
object IEnumerator.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
[DebuggerHidden]
public <Start>d__1(int <>1__state)
{
this.<>1__state = <>1__state;
}
[DebuggerHidden]
void IDisposable.Dispose()
{
<objects>5__1 = null;
<>s__2 = default(Dictionary<PrefabSpawnPoint.PrefabType, GameObject>.ValueCollection.Enumerator);
<obj>5__3 = null;
<>1__state = -2;
}
private bool MoveNext()
{
//IL_001e: Unknown result type (might be due to invalid IL or missing references)
//IL_0023: Unknown result type (might be due to invalid IL or missing references)
if (<>1__state != 0)
{
return false;
}
<>1__state = -1;
Scene sceneByName = SceneManager.GetSceneByName("ModBlank_Simple");
<objects>5__1 = ((Scene)(ref sceneByName)).GetRootGameObjects();
PrefabSpawnPoint.CachedObjects[PrefabSpawnPoint.PrefabType.ItemSpawner] = IM.Prefab_ItemSpawner;
PrefabSpawnPoint.CachedObjects[PrefabSpawnPoint.PrefabType.Destructobin] = <objects>5__1.First((GameObject x) => ((Object)x).name == "Destructobin");
PrefabSpawnPoint.CachedObjects[PrefabSpawnPoint.PrefabType.SosigSpawner] = <objects>5__1.First((GameObject x) => ((Object)x).name == "SosigSpawner");
PrefabSpawnPoint.CachedObjects[PrefabSpawnPoint.PrefabType.BangerDetonator] = <objects>5__1.First((GameObject x) => ((Object)x).name == "BangerDetonator");
PrefabSpawnPoint.CachedObjects[PrefabSpawnPoint.PrefabType.WhizzBangADinger] = <objects>5__1.First((GameObject x) => ((Object)x).name == "WhizzBangADinger2");
<>s__2 = PrefabSpawnPoint.CachedObjects.Values.GetEnumerator();
try
{
while (<>s__2.MoveNext())
{
<obj>5__3 = <>s__2.Current;
<obj>5__3.SetActive(false);
<obj>5__3 = null;
}
}
finally
{
((IDisposable)<>s__2).Dispose();
}
<>s__2 = default(Dictionary<PrefabSpawnPoint.PrefabType, GameObject>.ValueCollection.Enumerator);
PrefabSpawnPoint.ObjectsCached = true;
return false;
}
bool IEnumerator.MoveNext()
{
//ILSpy generated this explicit interface implementation from .override directive in MoveNext
return this.MoveNext();
}
[DebuggerHidden]
void IEnumerator.Reset()
{
throw new NotSupportedException();
}
}
public virtual void Awake()
{
PrefabSpawnPoint.ObjectsCached = false;
SceneManager.LoadScene("ModBlank_Simple", (LoadSceneMode)1);
}
public virtual IEnumerator Start()
{
//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
return new <Start>d__1(0)
{
<>4__this = this
};
}
}
public class TakeAndHoldLoader : ISceneLoader
{
[CompilerGenerated]
private sealed class <Start>d__1 : IEnumerator<object>, IDisposable, IEnumerator
{
private int <>1__state;
private object <>2__current;
public TakeAndHoldLoader <>4__this;
object IEnumerator<object>.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
object IEnumerator.Current
{
[DebuggerHidden]
get
{
return <>2__current;
}
}
[DebuggerHidden]
public <Start>d__1(int <>1__state)
{
this.<>1__state = <>1__state;
}
[DebuggerHidden]
void IDisposable.Dispose()
{
<>1__state = -2;
}
private bool MoveNext()
{
//IL_001d: Unknown result type (might be due to invalid IL or missing references)
//IL_0023: Invalid comparison between Unknown and I4
if (<>1__state != 0)
{
return false;
}
<>1__state = -1;
if ((int)GM.TNH_Manager.ItemSpawnerMode == 1)
{
PrefabSpawnPoint.CachedObjects[PrefabSpawnPoint.PrefabType.ItemSpawner] = GM.TNH_Manager.ItemSpawner;
}
PrefabSpawnPoint.ObjectsCached = true;
return false;
}
bool IEnumerator.MoveNext()
{
//ILSpy generated this explicit interface implementation from .override directive in MoveNext
return this.MoveNext();
}
[DebuggerHidden]
void IEnumerator.Reset()
{
throw new NotSupportedException();
}
}
public virtual void Awake()
{
PrefabSpawnPoint.ObjectsCached = false;
SceneManager.LoadScene("ModBlank_Take&Hold", (LoadSceneMode)1);
}
public virtual IEnumerator Start()
{
//yield-return decompiler failed: Unexpected instruction in Iterator.Dispose()
return new <Start>d__1(0)
{
<>4__this = this
};
}
}
}