Decompiled source of Quarantine Cinema LITE v4.0.0

plugins/TheRisingSun.dll

Decompiled 10 months ago
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using System.Security.Permissions;
using BepInEx;
using Jotunn;
using Jotunn.Configs;
using Jotunn.Entities;
using Jotunn.Managers;
using Jotunn.Utils;
using TheRisingSun.Assets.BakedRecipes;
using TheRisingSun.Assets.BakedTranslations;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("TheRisingSun")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("TheRisingSun")]
[assembly: AssemblyCopyright("Copyright ©  2021")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("e3243d22-4307-4008-ba36-9f326008cde5")]
[assembly: AssemblyFileVersion("0.0.1.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.6.2", FrameworkDisplayName = ".NET Framework 4.6.2")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.0.1.0")]
namespace TheRisingSun
{
	[BepInPlugin("com.snixdev.TheRisingSun", "The Rising Sun", "1.0.0")]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	internal class TheRisingSun : BaseUnityPlugin
	{
		public const string PluginGUID = "com.snixdev.TheRisingSun";

		public const string PluginName = "The Rising Sun";

		public const string PluginVersion = "1.0.0";

		private AssetBundle samuraiArmorSetAB;

		private CustomItem item_SamuraiChest;

		private CustomItem item_SamuraiLegs;

		private CustomItem item_SamuraiHelmet;

		private void Awake()
		{
			LocalizationManager.Instance.AddLocalization(LocalizationCustom.Localizer());
			LoadAssets();
			CreateSamuraiArmorSet();
			AddRecipeList();
		}

		private void LoadAssets()
		{
			samuraiArmorSetAB = AssetUtils.LoadAssetBundleFromResources("samuraiarmorset");
			Logger.LogInfo((object)samuraiArmorSetAB);
		}

		private void CreateSamuraiArmorSet()
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Expected O, but got Unknown
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_001f: Expected O, but got Unknown
			//IL_003e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0048: Expected O, but got Unknown
			//IL_0067: Unknown result type (might be due to invalid IL or missing references)
			//IL_0071: Expected O, but got Unknown
			ItemConfig val = new ItemConfig();
			item_SamuraiChest = new CustomItem(samuraiArmorSetAB, "ArmorSamuraiChest", true, val);
			ItemManager.Instance.AddItem(item_SamuraiChest);
			item_SamuraiLegs = new CustomItem(samuraiArmorSetAB, "ArmorSamuraiLegs", true, val);
			ItemManager.Instance.AddItem(item_SamuraiLegs);
			item_SamuraiHelmet = new CustomItem(samuraiArmorSetAB, "SamuraiHelmet", true, val);
			ItemManager.Instance.AddItem(item_SamuraiHelmet);
		}

		private void AddRecipeList()
		{
			//IL_0020: Unknown result type (might be due to invalid IL or missing references)
			//IL_002a: Expected O, but got Unknown
			List<RecipeConfig> recipes = CustomRecipesLoader.GetRecipes();
			foreach (RecipeConfig item in recipes)
			{
				ItemManager.Instance.AddRecipe(new CustomRecipe(item));
			}
		}
	}
}
namespace TheRisingSun.Assets.BakedTranslations
{
	internal class LocalizationCustom
	{
		public static CustomLocalization Localizer()
		{
			//IL_0001: Unknown result type (might be due to invalid IL or missing references)
			//IL_0007: Expected O, but got Unknown
			CustomLocalization val = new CustomLocalization();
			string text = "English";
			val.AddTranslation(ref text, new Dictionary<string, string>
			{
				{ "item_helmet_samurai", "Devil's Horns" },
				{ "item_helmet_samurai_description", "The grinning of the devil" },
				{ "item_chest_samurai", "Steadfast" },
				{ "item_chest_samurai_description", "To stay and be the guard of the weak" },
				{ "item_legs_samurai", "Soft Breeze" },
				{ "item_legs_samurai_description", "Let the wind carry you" }
			});
			text = "German";
			val.AddTranslation(ref text, new Dictionary<string, string>
			{
				{ "item_helmet_samurai", "Teuflische Hörner" },
				{ "item_helmet_samurai_description", "Das lächeln des Teufels" },
				{ "item_chest_samurai", "Standhaft" },
				{ "item_chest_samurai_description", "Zu bleiben und die schwachen zu schützen" },
				{ "item_legs_samurai", "Sanfte Brise" },
				{ "item_legs_samurai_description", "Möge der Wind dich tragen" }
			});
			return val;
		}
	}
}
namespace TheRisingSun.Assets.BakedRecipes
{
	internal class CustomRecipesLoader
	{
		public static List<RecipeConfig> GetRecipes()
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_000d: Expected O, but got Unknown
			//IL_0036: Unknown result type (might be due to invalid IL or missing references)
			//IL_0040: 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_005d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0063: Expected O, but got Unknown
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: Expected O, but got Unknown
			//IL_00a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ac: Expected O, but got Unknown
			//IL_00b6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c0: Expected O, but got Unknown
			//IL_00c9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cf: Expected O, but got Unknown
			//IL_00f9: Unknown result type (might be due to invalid IL or missing references)
			//IL_0103: Expected O, but got Unknown
			//IL_010f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0119: Expected O, but got Unknown
			List<RecipeConfig> list = new List<RecipeConfig>();
			RecipeConfig val = new RecipeConfig();
			val.Item = "SamuraiHelmet";
			val.Amount = 1;
			val.CraftingStation = "piece_workbench";
			val.AddRequirement(new RequirementConfig("Bronze", 6, 3, false));
			val.AddRequirement(new RequirementConfig("DeerHide", 8, 6, false));
			list.Add(val);
			val = new RecipeConfig();
			val.Item = "ArmorSamuraiChest";
			val.Amount = 1;
			val.CraftingStation = "piece_workbench";
			val.AddRequirement(new RequirementConfig("Bronze", 4, 2, false));
			val.AddRequirement(new RequirementConfig("DeerHide", 12, 10, false));
			val.AddRequirement(new RequirementConfig("LeatherScraps", 8, 6, false));
			list.Add(val);
			val = new RecipeConfig();
			val.Item = "ArmorSamuraiLegs";
			val.Amount = 1;
			val.CraftingStation = "piece_workbench";
			val.AddRequirement(new RequirementConfig("LeatherScraps", 10, 8, false));
			val.AddRequirement(new RequirementConfig("FineWood", 16, 12, false));
			list.Add(val);
			return list;
		}
	}
}