using System; using System.Collections.Generic; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using BepInEx; using BepInEx.Logging; using DiskCardGame; using HarmonyLib; using InscryptionAPI.Card; using InscryptionAPI.Helpers; using OLD_SA.Pelt; 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("OldSa_Tribes")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("OldSa_Tribes")] [assembly: AssemblyCopyright("Copyright © 2026")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("408b1661-bdcd-4b4d-85b7-bcdbe1090f1a")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")] [assembly: AssemblyVersion("1.0.0.0")] namespace OLD_SA.Tribes { [BepInPlugin("OLD_SA.Tribes", "OLD SA Tribes", "1.0.0")] public class Plugin : BaseUnityPlugin { public static ManualLogSource Log; private void Awake() { //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Expected O, but got Unknown Log = ((BaseUnityPlugin)this).Logger; Log.LogInfo((object)"OLD SA Tribes loading..."); TribesAPI.Init(); CardBackgroundPatch.Initialize(new Harmony("OLD_SA.Tribes")); Log.LogInfo((object)"OLD SA Tribes loaded."); } } public static class TribesAPI { public static Tribe Feline; public static Tribe Plant; public static Tribe Crustacean; public static void Init() { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: 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_003e: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_005f: 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_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_0155: 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_019e: Unknown result type (might be due to invalid IL or missing references) //IL_016f: Unknown result type (might be due to invalid IL or missing references) //IL_01e8: Unknown result type (might be due to invalid IL or missing references) //IL_01b9: Unknown result type (might be due to invalid IL or missing references) //IL_0203: Unknown result type (might be due to invalid IL or missing references) Feline = TribeManager.Add("OLD_SA", "Feline", TextureHelper.GetImageAsTexture("OldSa_Feline.png", (FilterMode)0), true, (Texture2D)null); Plant = TribeManager.Add("OLD_SA", "Plant", TextureHelper.GetImageAsTexture("OldSa_Plant.png", (FilterMode)0), true, (Texture2D)null); Crustacean = TribeManager.Add("OLD_SA", "Crustacean", TextureHelper.GetImageAsTexture("OldSa_Crustacean.png", (FilterMode)0), true, (Texture2D)null); CardInfo cardByName = CardLoader.GetCardByName("Cat"); if ((Object)(object)cardByName != (Object)null && !cardByName.tribes.Contains(Feline)) { cardByName.tribes.Add(Feline); } CardInfo cardByName2 = CardLoader.GetCardByName("DeadTree"); if ((Object)(object)cardByName2 != (Object)null && !cardByName2.tribes.Contains(Plant)) { cardByName2.tribes.Add(Plant); } CardInfo cardByName3 = CardLoader.GetCardByName("Stump"); if ((Object)(object)cardByName3 != (Object)null && !cardByName3.tribes.Contains(Plant)) { cardByName3.tribes.Add(Plant); } CardInfo cardByName4 = CardLoader.GetCardByName("Tree"); if ((Object)(object)cardByName4 != (Object)null && !cardByName4.tribes.Contains(Plant)) { cardByName4.tribes.Add(Plant); } CardInfo cardByName5 = CardLoader.GetCardByName("Tree_Hologram"); if ((Object)(object)cardByName5 != (Object)null && !cardByName5.tribes.Contains(Plant)) { cardByName5.tribes.Add(Plant); } CardInfo cardByName6 = CardLoader.GetCardByName("Tree_SnowCovered"); if ((Object)(object)cardByName6 != (Object)null && !cardByName6.tribes.Contains(Plant)) { cardByName6.tribes.Add(Plant); } } } } namespace OLD_SA.Pelt { internal static class CardBackgroundPatch { private static readonly Dictionary CardBackgrounds = new Dictionary { { "OLD_SA_NEPENTHES", OldSaPlantBackground.ID }, { "OLD_SA_STRANGLEVIEN", OldSaPlantBackground.ID }, { "OLD_SA_GEARGRASS", OldSaPlantBackground.ID } }; public static void Initialize(Harmony harmony) { //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Expected O, but got Unknown harmony.Patch((MethodBase)AccessTools.Method(typeof(Card), "ApplyAppearanceBehaviours", new Type[1] { typeof(List) }, (Type[])null), new HarmonyMethod(AccessTools.Method(typeof(CardBackgroundPatch), "Prefix", (Type[])null, (Type[])null)), (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null); } private static void Prefix(Card __instance, List appearances) { //IL_0051: 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) if (!((Object)(object)__instance == (Object)null) && !((Object)(object)__instance.Info == (Object)null) && appearances != null && CardBackgrounds.TryGetValue(((Object)__instance.Info).name, out var value) && !appearances.Contains(value)) { appearances.Add(value); } } } }