Decompiled source of Raven Saga v0.1.3

RavenSaga.dll

Decompiled 2 weeks ago
using System;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Logging;
using CustomStoryLogs;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("RavenSaga")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyDescription("StoryLogs for RavenSaga.")]
[assembly: AssemblyFileVersion("0.0.1.0")]
[assembly: AssemblyInformationalVersion("0.0.1")]
[assembly: AssemblyProduct("RavenSaga")]
[assembly: AssemblyTitle("RavenSaga")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.0.1.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 RavenSaga
{
	public static class MyPluginInfo
	{
		public const string PLUGIN_GUID = "RavenSaga";

		public const string PLUGIN_NAME = "RavenSaga";

		public const string PLUGIN_VERSION = "0.0.1";
	}
}
namespace RavenSaga.src
{
	internal class Assets
	{
		public static AssetBundle StoryLogAsset;

		public static void PopulateAssets()
		{
			string directoryName = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
			StoryLogAsset = AssetBundle.LoadFromFile(Path.Combine(directoryName, "storylogassetRS"));
			if ((Object)(object)StoryLogAsset == (Object)null)
			{
				Plugin.Logger.LogError((object)"Failed to load assets from 'storylogassetRS'.");
			}
		}
	}
	[BepInPlugin("RavenSaga", "RavenSaga", "0.0.1")]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	public class Plugin : BaseUnityPlugin
	{
		public static Plugin Instance { get; private set; }

		internal static ManualLogSource Logger { get; private set; }

		internal static Harmony? Harmony { get; set; }

		private void Awake()
		{
			Logger = ((BaseUnityPlugin)this).Logger;
			Instance = this;
			Assets.PopulateAssets();
			GameObject val = Assets.StoryLogAsset.LoadAsset<GameObject>("StoryLog");
			int vanillaStoryLogModel = CustomStoryLogs.RegisterCustomLogModel(val);
			StoryLogs.RegisterLogs(vanillaStoryLogModel);
			Logger.LogInfo((object)"RavenSaga v0.0.1 has loaded!");
		}
	}
	internal class StoryLogs
	{
		public static void RegisterLogs(int vanillaStoryLogModel)
		{
			//IL_0032: Unknown result type (might be due to invalid IL or missing references)
			//IL_0046: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_0097: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e8: Unknown result type (might be due to invalid IL or missing references)
			//IL_0125: Unknown result type (might be due to invalid IL or missing references)
			//IL_0139: Unknown result type (might be due to invalid IL or missing references)
			//IL_0178: Unknown result type (might be due to invalid IL or missing references)
			//IL_018c: Unknown result type (might be due to invalid IL or missing references)
			//IL_01cb: Unknown result type (might be due to invalid IL or missing references)
			//IL_01df: Unknown result type (might be due to invalid IL or missing references)
			int num = CustomStoryLogs.RegisterCustomLog("RavenSaga", "Newly Alive - May 26, 1952", "They gave us the go ahead. We will be able to implement the SLM Mold in those new mechs we have. See if that’ll make them better suited for military and extermination usage. We need to sell to the ITDA and the Ninth Empire. We play both sides in this war to be honest, but that’s okay with me, as long as I’m not dying. These crystals fuse quickly, takes about 10 seconds before they connect with the electronics and start doing their thing. Hopefully those mechs don’t go rogue haha.\r\n\r\n\r\n\r\n", false, false);
			CustomStoryLogs.RegisterCustomLogCollectable("RavenSaga", num, "26 Feign", new Vector3(59.671f, 9.087f, 103.628f), new Vector3(-103.455f, -14.88501f, 164.435f), vanillaStoryLogModel);
			int num2 = CustomStoryLogs.RegisterCustomLog("RavenSaga", "Lost Military - April 2, 2380", "The exomoon March seems to hold a surprising artifact from long ago. Records indicate we never knew about this, but it seems to be hundreds of years old. The Galactic English Empire seems to want to label it as a interplanetary reserve to let the memory keep living its best days. Seemed to be a military base of some old civilization, we will do more research into this subject, hopefully before the moon gets classified to a reserve.\r\n\r\n\r\n\r\n", false, false);
			CustomStoryLogs.RegisterCustomLogCollectable("RavenSaga", num2, "61 March", new Vector3(-165.1656f, -3.691f, 11.36957f), new Vector3(-90f, 0f, 120f), vanillaStoryLogModel);
			int num3 = CustomStoryLogs.RegisterCustomLog("RavenSaga", "CI Mold - May 26, 1947", "We found something, a new type of fungus, something immensely powerful, a new revolution. Halden will be rich, we can finally make artificial intelligence. We have no idea what the capabilities are! But we found it merges with electronic equipment and it generates a network of strings and wires in its systems which seems to advance the intelligence of the equipment wildly. We talked to a computer, a computer! If only Halden would let us put it in a robot, but they said it was too dangerous as we don’t know the full capabilities just yet.\r\n\r\n\r\n\r\n", false, false);
			CustomStoryLogs.RegisterCustomLogCollectable("RavenSaga", num3, "127 Eden", new Vector3(54.574f, -27.857f, 88.471f), new Vector3(-105.43f, -61.121f, 166.602f), vanillaStoryLogModel);
			int num4 = CustomStoryLogs.RegisterCustomLog("RavenSaga", "Advertisement - Date Unknown", "Come down to the Halden storehouse and buy something! We have a variety of electronic and mechanical needs, such as washing machines, toilets, cars, trucks, mini robots, computer chips, hangar ships, and more! We specialize in all things electronic. Its Halden or Nothin!\r\n\r\n\r\n\r\n", false, false);
			CustomStoryLogs.RegisterCustomLogCollectable("RavenSaga", num4, "87 Haul", new Vector3(116.25f, 0f, -377.5f), new Vector3(-60.75f, -18.5f, 2.275f), vanillaStoryLogModel);
			int num5 = CustomStoryLogs.RegisterCustomLog("RavenSaga", "Automatons - July 22, 2383", "After various reports of strange signals being produced from this exomoon, our military decided it would be in our best interests to take a look around. My crew and I are here to investigate these reports on behalf of the English Military. Notes will be recorded. Report 68-a: Residue is found across the facility halls, it is oily in nature and seems to have some sort of fungus filled liquid flowing within. Report 68-b: Whirring and mechanical sounds seem to be heard within the facility and outside. Report 68-c: What seems to be a derelict robotic creature seems to be standing in the hills. Report 68-d: Soldier D-92870 is found to be missing after being coerced by what seems to be a child in distress, it has been 30 minutes since last contact. Report 68-e: Source of the distressed cries have been uncovered, the previously mentioned derelict automaton seems to create sounds to lure and hunt humans. Report 68-f: Soldier D-76209 is in distress, for the betterment of our task, the soldier has been executed. Report 68-g: After consulting with the General, the consensus of retreating becomes more clear. Automatons are becoming active with what seems to be a kill-on-sight instruction. Report 68-h: The rest of the crew and I have retreated, the General seems to be unhappy with our findings. More research will be conducted, the English Military has set up a base ground on 290 Summit to reconstruct these automatons if needed. Thus concludes the July 22, 2383 report of 68-Artifice.\r\n\r\n\r\n\r\n", false, false);
			CustomStoryLogs.RegisterCustomLogCollectable("RavenSaga", num5, "290 Summit", new Vector3(2.715f, -3.7f, -90f), new Vector3(-90f, 0f, 41.5f), vanillaStoryLogModel);
			int num6 = CustomStoryLogs.RegisterCustomLog("RavenSaga", "Reconstruction - May 30, 2387", "Roughly one year after the research site on 290 Summit was constructed, reconstruction of A16-L31, or their nickname, the old bird, went poorly. Rogue automatons were fixated on destroying the facility for some unknown reason. Although deactivated, the A16-L31s sent out what seemed to be a distress signal towards the exomoon Feign, which was previously known to be empty. Reasons to why this is the case is still unknown. Two observations were found, the first being that A16-L31 seems to hold some sort of artificial consciousness, making it near impossible to tamper with its internal code. Secondly, A16-L31 holds the technology and knowledge to ‘reproduce’. This artificial reproduction seems to allow them to upgrade themselves and colonize more of Thistle. Efforts will be made to prevent these monsters.\r\n\r\n\r\n\r\n", false, false);
			CustomStoryLogs.RegisterCustomLogCollectable("RavenSaga", num6, "68 Artifice", new Vector3(30.95f, 0.65f, 201.75f), new Vector3(-90f, -125f, 0f), vanillaStoryLogModel);
		}

		private StoryLogs()
		{
		}
	}
}