public PawnExtensionsMod(ModContentPack content) : base(content) { Harmony harmonyInstance = new Harmony("Pecius.PawnExtensions"); harmonyInstance.PatchAll(); DefBackCompatibilityConverter.InstallConverter(); }
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; }