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 HarmonyLib;
using Microsoft.CodeAnalysis;
using PluginConfig.API;
using PluginConfig.API.Fields;
using UnityEngine;
using UnityEngine.SceneManagement;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: IgnoresAccessChecksTo("Assembly-CSharp")]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("CustomTOD")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("CustomTOD")]
[assembly: AssemblyTitle("CustomTOD")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
[CompilerGenerated]
[Embedded]
internal sealed class EmbeddedAttribute : Attribute
{
}
}
namespace System.Runtime.CompilerServices
{
[CompilerGenerated]
[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 CustomTOD
{
public class Configs
{
private static PluginConfigurator config;
public static BoolField enabler;
public static StringField prelude1;
public static StringField prelude2;
public static StringField prelude3;
public static StringField prelude4;
public static StringField prelude5;
public static StringField limbo1;
public static StringField limbo2;
public static StringField limbo3;
public static StringField limbo4;
public static StringField lust1;
public static StringField lust2;
public static StringField lust3;
public static StringField lust4;
public static StringField gluttony1;
public static StringField gluttony2;
public static StringField greed1;
public static StringField greed2;
public static StringField greed3;
public static StringField greed4;
public static StringField wrath1;
public static StringField wrath2;
public static StringField wrath3;
public static StringField wrath4;
public static StringField heresy1;
public static StringField heresy2;
public static StringField violence1;
public static StringField violence2;
public static StringField violence3;
public static StringField violence4;
public static StringField violenceS;
public static StringField fraud1;
public static StringField fraud2;
public static StringField fraud3;
public static StringField fraud4;
public static StringField prime1;
public static StringField prime2;
public static StringField encore1;
public static StringField encore2;
public static string defaultValue = "You can set the tips in PluginConfigurator.<br><br>See https://github.com/x3rt for rich text options.";
public static void CreateConfig()
{
//IL_004e: Unknown result type (might be due to invalid IL or missing references)
//IL_0058: Expected O, but got Unknown
//IL_0071: Unknown result type (might be due to invalid IL or missing references)
//IL_007b: Expected O, but got Unknown
//IL_0094: Unknown result type (might be due to invalid IL or missing references)
//IL_009e: Expected O, but got Unknown
//IL_00b7: Unknown result type (might be due to invalid IL or missing references)
//IL_00c1: Expected O, but got Unknown
//IL_00da: Unknown result type (might be due to invalid IL or missing references)
//IL_00e4: Expected O, but got Unknown
//IL_00fd: Unknown result type (might be due to invalid IL or missing references)
//IL_0107: Expected O, but got Unknown
//IL_0120: Unknown result type (might be due to invalid IL or missing references)
//IL_012a: Expected O, but got Unknown
//IL_0143: Unknown result type (might be due to invalid IL or missing references)
//IL_014d: Expected O, but got Unknown
//IL_0166: Unknown result type (might be due to invalid IL or missing references)
//IL_0170: Expected O, but got Unknown
//IL_0189: Unknown result type (might be due to invalid IL or missing references)
//IL_0193: Expected O, but got Unknown
//IL_01ac: Unknown result type (might be due to invalid IL or missing references)
//IL_01b6: Expected O, but got Unknown
//IL_01cf: Unknown result type (might be due to invalid IL or missing references)
//IL_01d9: Expected O, but got Unknown
//IL_01f2: Unknown result type (might be due to invalid IL or missing references)
//IL_01fc: Expected O, but got Unknown
//IL_0215: Unknown result type (might be due to invalid IL or missing references)
//IL_021f: Expected O, but got Unknown
//IL_0238: Unknown result type (might be due to invalid IL or missing references)
//IL_0242: Expected O, but got Unknown
//IL_025b: Unknown result type (might be due to invalid IL or missing references)
//IL_0265: Expected O, but got Unknown
//IL_027e: Unknown result type (might be due to invalid IL or missing references)
//IL_0288: Expected O, but got Unknown
//IL_02a1: Unknown result type (might be due to invalid IL or missing references)
//IL_02ab: Expected O, but got Unknown
//IL_02c4: Unknown result type (might be due to invalid IL or missing references)
//IL_02ce: Expected O, but got Unknown
//IL_02e7: Unknown result type (might be due to invalid IL or missing references)
//IL_02f1: Expected O, but got Unknown
//IL_030a: Unknown result type (might be due to invalid IL or missing references)
//IL_0314: Expected O, but got Unknown
//IL_032d: Unknown result type (might be due to invalid IL or missing references)
//IL_0337: Expected O, but got Unknown
//IL_0350: Unknown result type (might be due to invalid IL or missing references)
//IL_035a: Expected O, but got Unknown
//IL_0373: Unknown result type (might be due to invalid IL or missing references)
//IL_037d: Expected O, but got Unknown
//IL_0396: Unknown result type (might be due to invalid IL or missing references)
//IL_03a0: Expected O, but got Unknown
//IL_03b9: Unknown result type (might be due to invalid IL or missing references)
//IL_03c3: Expected O, but got Unknown
//IL_03dc: Unknown result type (might be due to invalid IL or missing references)
//IL_03e6: Expected O, but got Unknown
//IL_03ff: Unknown result type (might be due to invalid IL or missing references)
//IL_0409: Expected O, but got Unknown
//IL_0422: Unknown result type (might be due to invalid IL or missing references)
//IL_042c: Expected O, but got Unknown
//IL_0445: Unknown result type (might be due to invalid IL or missing references)
//IL_044f: Expected O, but got Unknown
//IL_0468: Unknown result type (might be due to invalid IL or missing references)
//IL_0472: Expected O, but got Unknown
//IL_048b: Unknown result type (might be due to invalid IL or missing references)
//IL_0495: Expected O, but got Unknown
//IL_04ae: Unknown result type (might be due to invalid IL or missing references)
//IL_04b8: Expected O, but got Unknown
//IL_04d1: Unknown result type (might be due to invalid IL or missing references)
//IL_04db: Expected O, but got Unknown
//IL_04f4: Unknown result type (might be due to invalid IL or missing references)
//IL_04fe: Expected O, but got Unknown
//IL_0517: Unknown result type (might be due to invalid IL or missing references)
//IL_0521: Expected O, but got Unknown
//IL_053a: Unknown result type (might be due to invalid IL or missing references)
//IL_0544: Expected O, but got Unknown
//IL_055d: Unknown result type (might be due to invalid IL or missing references)
//IL_0567: Expected O, but got Unknown
config = PluginConfigurator.Create("Custom Tips Of The Day", "CustomTOD");
config.SetIconWithURL(Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "icon.png"));
enabler = new BoolField(config.rootPanel, "Enabled", "enabler", true);
prelude2 = new StringField(config.rootPanel, "0-2", "prelude2", defaultValue);
prelude3 = new StringField(config.rootPanel, "0-3", "prelude3", defaultValue);
prelude4 = new StringField(config.rootPanel, "0-4", "prelude4", defaultValue);
prelude5 = new StringField(config.rootPanel, "0-5", "prelude5", defaultValue);
limbo1 = new StringField(config.rootPanel, "1-1", "limbo1", defaultValue);
limbo2 = new StringField(config.rootPanel, "1-2", "limbo2", defaultValue);
limbo3 = new StringField(config.rootPanel, "1-3", "limbo3", defaultValue);
limbo4 = new StringField(config.rootPanel, "1-4", "limbo4", defaultValue);
lust1 = new StringField(config.rootPanel, "2-1", "lust1", defaultValue);
lust2 = new StringField(config.rootPanel, "2-2", "lust2", defaultValue);
lust3 = new StringField(config.rootPanel, "2-3", "lust3", defaultValue);
lust4 = new StringField(config.rootPanel, "2-4", "lust4", defaultValue);
gluttony1 = new StringField(config.rootPanel, "3-1", "gluttony1", defaultValue);
gluttony2 = new StringField(config.rootPanel, "3-2", "gluttony2", defaultValue);
greed1 = new StringField(config.rootPanel, "4-1", "greed1", defaultValue);
greed2 = new StringField(config.rootPanel, "4-2", "greed2", defaultValue);
greed3 = new StringField(config.rootPanel, "4-3", "greed3", defaultValue);
greed4 = new StringField(config.rootPanel, "4-4", "greed4", defaultValue);
wrath1 = new StringField(config.rootPanel, "5-1", "wrath1", defaultValue);
wrath2 = new StringField(config.rootPanel, "5-2", "wrath2", defaultValue);
wrath3 = new StringField(config.rootPanel, "5-3", "wrath3", defaultValue);
wrath4 = new StringField(config.rootPanel, "5-4", "wrath4", defaultValue);
heresy1 = new StringField(config.rootPanel, "6-1", "heresy1", defaultValue);
heresy2 = new StringField(config.rootPanel, "6-2", "heresy2", defaultValue);
violence1 = new StringField(config.rootPanel, "7-1", "violence1", defaultValue);
violence2 = new StringField(config.rootPanel, "7-2", "violence2", defaultValue);
violence3 = new StringField(config.rootPanel, "7-3", "violence3", defaultValue);
violence4 = new StringField(config.rootPanel, "7-4", "violence4", defaultValue);
violenceS = new StringField(config.rootPanel, "7-S", "violenceS", defaultValue);
fraud1 = new StringField(config.rootPanel, "8-1", "fraud1", defaultValue);
fraud2 = new StringField(config.rootPanel, "8-2", "fraud2", defaultValue);
fraud3 = new StringField(config.rootPanel, "8-3", "fraud3", defaultValue);
fraud4 = new StringField(config.rootPanel, "8-4", "fraud4", defaultValue);
prime1 = new StringField(config.rootPanel, "P-1", "prime1", defaultValue);
prime2 = new StringField(config.rootPanel, "P-2", "prime2", defaultValue);
encore1 = new StringField(config.rootPanel, "0-E", "encore1", defaultValue);
encore2 = new StringField(config.rootPanel, "1-E", "encore2", defaultValue);
}
}
[HarmonyPatch]
public static class Patches
{
[HarmonyPostfix]
[HarmonyPatch(typeof(ShopZone), "Start")]
public static void Shopper(ShopZone __instance)
{
if ((Object)(object)__instance != (Object)null)
{
if (SceneHelper.CurrentScene == "Level 0-2")
{
__instance.tipOfTheDay.text = Configs.prelude2.value;
}
if (SceneHelper.CurrentScene == "Level 0-3")
{
__instance.tipOfTheDay.text = Configs.prelude3.value;
}
if (SceneHelper.CurrentScene == "Level 0-4")
{
__instance.tipOfTheDay.text = Configs.prelude4.value;
}
if (SceneHelper.CurrentScene == "Level 0-5")
{
__instance.tipOfTheDay.text = Configs.prelude5.value;
}
if (SceneHelper.CurrentScene == "Level 1-1")
{
__instance.tipOfTheDay.text = Configs.limbo1.value;
}
if (SceneHelper.CurrentScene == "Level 1-2")
{
__instance.tipOfTheDay.text = Configs.limbo2.value;
}
if (SceneHelper.CurrentScene == "Level 1-3")
{
__instance.tipOfTheDay.text = Configs.limbo3.value;
}
if (SceneHelper.CurrentScene == "Level 1-4")
{
__instance.tipOfTheDay.text = Configs.limbo4.value;
}
if (SceneHelper.CurrentScene == "Level 2-1")
{
__instance.tipOfTheDay.text = Configs.lust1.value;
}
if (SceneHelper.CurrentScene == "Level 2-2")
{
__instance.tipOfTheDay.text = Configs.lust2.value;
}
if (SceneHelper.CurrentScene == "Level 2-3")
{
__instance.tipOfTheDay.text = Configs.lust3.value;
}
if (SceneHelper.CurrentScene == "Level 2-4")
{
__instance.tipOfTheDay.text = Configs.lust4.value;
}
if (SceneHelper.CurrentScene == "Level 3-1")
{
__instance.tipOfTheDay.text = Configs.gluttony1.value;
}
if (SceneHelper.CurrentScene == "Level 3-2")
{
__instance.tipOfTheDay.text = Configs.gluttony2.value;
}
if (SceneHelper.CurrentScene == "Level 4-1")
{
__instance.tipOfTheDay.text = Configs.greed1.value;
}
if (SceneHelper.CurrentScene == "Level 4-2")
{
__instance.tipOfTheDay.text = Configs.greed2.value;
}
if (SceneHelper.CurrentScene == "Level 4-3")
{
__instance.tipOfTheDay.text = Configs.greed3.value;
}
if (SceneHelper.CurrentScene == "Level 4-4")
{
__instance.tipOfTheDay.text = Configs.greed4.value;
}
if (SceneHelper.CurrentScene == "Level 5-1")
{
__instance.tipOfTheDay.text = Configs.wrath1.value;
}
if (SceneHelper.CurrentScene == "Level 5-2")
{
__instance.tipOfTheDay.text = Configs.wrath2.value;
}
if (SceneHelper.CurrentScene == "Level 5-3")
{
__instance.tipOfTheDay.text = Configs.wrath3.value;
}
if (SceneHelper.CurrentScene == "Level 5-4")
{
__instance.tipOfTheDay.text = Configs.wrath4.value;
}
if (SceneHelper.CurrentScene == "Level 6-1")
{
__instance.tipOfTheDay.text = Configs.heresy1.value;
}
if (SceneHelper.CurrentScene == "Level 6-2")
{
__instance.tipOfTheDay.text = Configs.heresy2.value;
}
if (SceneHelper.CurrentScene == "Level 7-1")
{
__instance.tipOfTheDay.text = Configs.violence1.value;
}
if (SceneHelper.CurrentScene == "Level 7-2")
{
__instance.tipOfTheDay.text = Configs.violence2.value;
}
if (SceneHelper.CurrentScene == "Level 7-3")
{
__instance.tipOfTheDay.text = Configs.violence3.value;
}
if (SceneHelper.CurrentScene == "Level 7-4")
{
__instance.tipOfTheDay.text = Configs.violence4.value;
}
if (SceneHelper.CurrentScene == "Level 7-S")
{
__instance.tipOfTheDay.text = Configs.violenceS.value;
}
if (SceneHelper.CurrentScene == "Level 8-1")
{
__instance.tipOfTheDay.text = Configs.fraud1.value;
}
if (SceneHelper.CurrentScene == "Level 8-2")
{
__instance.tipOfTheDay.text = Configs.fraud2.value;
}
if (SceneHelper.CurrentScene == "Level 8-3")
{
__instance.tipOfTheDay.text = Configs.fraud3.value;
}
if (SceneHelper.CurrentScene == "Level 8-4")
{
__instance.tipOfTheDay.text = Configs.fraud4.value;
}
if (SceneHelper.CurrentScene == "Level P-1")
{
__instance.tipOfTheDay.text = Configs.prime1.value;
}
if (SceneHelper.CurrentScene == "Level P-2")
{
__instance.tipOfTheDay.text = Configs.prime2.value;
}
if (SceneHelper.CurrentScene == "Level 0-E")
{
__instance.tipOfTheDay.text = Configs.encore1.value;
}
if (SceneHelper.CurrentScene == "Level 1-E")
{
__instance.tipOfTheDay.text = Configs.encore2.value;
}
}
}
}
[BepInPlugin("lotus.ultrakill.CustomTOD", "CustomTOD", "1.0.1")]
public class Plugin : BaseUnityPlugin
{
public static Plugin Instance;
public ManualLogSource log => ((BaseUnityPlugin)this).Logger;
public void Awake()
{
//IL_003c: Unknown result type (might be due to invalid IL or missing references)
Instance = this;
((Object)((Component)this).gameObject).hideFlags = (HideFlags)4;
((BaseUnityPlugin)this).Logger.LogInfo((object)"It's just like that other mod but for tips instead of level titles!");
SceneManager.sceneLoaded += delegate
{
OnSceneLoaded();
};
new Harmony("lotus.ultrakill.CustomTOD").PatchAll();
Configs.CreateConfig();
}
public void OnSceneLoaded()
{
}
}
}
namespace System.Runtime.CompilerServices
{
[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]
internal sealed class IgnoresAccessChecksToAttribute : Attribute
{
public IgnoresAccessChecksToAttribute(string assemblyName)
{
}
}
}