Beispiel #1
0
        public PawnExtensionsMod(ModContentPack content) : base(content)
        {
            Harmony harmonyInstance = new Harmony("Pecius.PawnExtensions");

            harmonyInstance.PatchAll();

            DefBackCompatibilityConverter.InstallConverter();
        }
Beispiel #2
0
        public static void InstallConverter()
        {
            if (installed)
            {
                Log.Error("Attempted to install back compatibility converter when it was already installed.");
                return;
            }

            var converter       = new DefBackCompatibilityConverter();
            var conversionChain = Traverse.Create(typeof(Verse.BackCompatibility)).Field <List <BackCompatibilityConverter> >("conversionChain").Value;

            conversionChain.Add(converter);

            installed = true;
        }