internal static void RunDestructivePatches()
        {
            Type original = typeof(GraphicDatabaseHeadRecords);
            Type patched  = typeof(GraphicDatabaseHeadRecords_Patch);

            RimThreadedHarmony.Prefix(original, patched, "BuildDatabaseIfNecessary");
        }
Example #2
0
        public static void RunDestructivePatches()
        {
            Type original = typeof(PawnUtility);
            Type patched  = typeof(PawnUtility_Patch);

            RimThreadedHarmony.Prefix(original, patched, "IsInvisible");
        }
        internal static void RunDestructivePatches()
        {
            Type original = typeof(ListerBuildingsRepairable);
            Type patched  = typeof(ListerBuildingsRepairable_Patch);

            RimThreadedHarmony.Prefix(original, patched, nameof(UpdateBuilding));
        }
        internal static void RunDestructivePatches()
        {
            Type original = typeof(UniqueIDsManager);
            Type patched  = typeof(UniqueIDsManager_Patch);

            RimThreadedHarmony.Prefix(original, patched, nameof(GetNextID));
        }
        internal static void RunDestructivePatches()
        {
            Type original = typeof(RegionCostCalculatorWrapper);
            Type patched  = typeof(RegionCostCalculatorWrapper_Patch);

            RimThreadedHarmony.Prefix(original, patched, "Init");
        }
Example #6
0
        public static void RunDestructivePatches()
        {
            Type original = typeof(AudioSourceMaker);
            Type patched  = typeof(AudioSourceMaker_Patch);

            RimThreadedHarmony.Prefix(original, patched, "NewAudioSourceOn");
        }
        public static void RunDestructivePatches()
        {
            Type original = typeof(MaterialPool);
            Type patched  = typeof(MaterialPool_Patch);

            RimThreadedHarmony.Prefix(original, patched, "MatFrom", new Type[] { typeof(MaterialRequest) });
        }
Example #8
0
        public static void RunDestructivePatches()
        {
            Type original = typeof(SampleSustainer);
            Type patched  = typeof(SampleSustainer_Patch);

            RimThreadedHarmony.Prefix(original, patched, "TryMakeAndPlay");
        }
Example #9
0
        internal static void RunDestructivePatches()
        {
            Type original = typeof(Thing);
            Type patched  = typeof(Thing_Patch);

            RimThreadedHarmony.Prefix(original, patched, "get_FlammableNow");
        }
Example #10
0
        internal static void RunDestructivePatches()
        {
            Type original = typeof(BeautyUtility);
            Type patched  = typeof(BeautyUtility_Patch);

            RimThreadedHarmony.Prefix(original, patched, "AverageBeautyPerceptible");
        }
Example #11
0
        public static void RunDestructivePatches()
        {
            Type original = typeof(AudioSource);
            Type patched  = typeof(AudioSource_Patch);

            RimThreadedHarmony.Prefix(original, patched, "Stop", Type.EmptyTypes);
        }
Example #12
0
        public static void RunDestructivePatches()
        {
            Type original = typeof(GenClosest);
            Type patched  = typeof(GenClosest_Patch);

            RimThreadedHarmony.Prefix(original, patched, "RegionwiseBFSWorker");
        }
        internal static void RunDestructivePatches()
        {
            Type original = typeof(JobGiver_AnimalFlee);
            Type patched  = typeof(JobGiver_AnimalFlee_Patch);

            RimThreadedHarmony.Prefix(original, patched, "FleeLargeFireJob");
        }
        internal static void RunDestructivePatches()
        {
            Type original = typeof(RulePackDef);
            Type patched  = typeof(RulePackDef_Patch);

            RimThreadedHarmony.Prefix(original, patched, nameof(get_RulesPlusIncludes));
        }
Example #15
0
        public static void RunDestructivePatches()
        {
            Type original = typeof(RegionGrid);
            Type patched  = typeof(RegionGrid_Patch);

            RimThreadedHarmony.Prefix(original, patched, "GetValidRegionAt");
        }
Example #16
0
        internal static void RunNonDestructivePatches()
        {
            Type original = typeof(Thing);
            Type patched  = typeof(Thing_Patch);

            RimThreadedHarmony.Postfix(original, patched, "SpawnSetup", "SpawnSetupPostFix");
        }
Example #17
0
        internal static void RunDestructivePatches()
        {
            Type original = typeof(LightningBoltMeshMaker);
            Type patched  = typeof(LightningBoltMeshMaker_Patch);

            RimThreadedHarmony.Prefix(original, patched, "NewBoltMesh");
        }
Example #18
0
        //Class was largely overhauled to allow multithreaded ticking for WorldPawns.Tick()
        internal static void RunDestructivePatches()
        {
            Type original = typeof(WorldObjectsHolder);
            Type patched  = typeof(WorldObjectsHolder_Patch);

            RimThreadedHarmony.Prefix(original, patched, "WorldObjectsHolderTick");
        }
        internal static void RunDestructivePatches()
        {
            Type original = typeof(Toils_Haul);
            Type patched  = typeof(Toils_Haul_Patch);

            RimThreadedHarmony.Prefix(original, patched, "ErrorCheckForCarry");
        }
Example #20
0
        internal static void RunNonDestructivePatches()
        {
            Type original = typeof(Map);
            Type patched  = typeof(Map_Transpile);

            RimThreadedHarmony.Transpile(original, patched, "MapUpdate");
        }
Example #21
0
        internal static void RunNonDestructivePatches()
        {
            Type original = typeof(HediffGiver_Hypothermia);
            Type patched  = typeof(HediffGiver_Hypothermia_Transpile);

            RimThreadedHarmony.Transpile(original, patched, "OnIntervalPassed");
        }
Example #22
0
        internal static void RunDestructivePatches()
        {
            Type original = typeof(ReservationUtility);
            Type patched  = typeof(ReservationUtility_Patch);

            RimThreadedHarmony.Prefix(original, patched, "CanReserve");
        }
Example #23
0
        public static void RunDestructivePatches()
        {
            Type original = typeof(Pawn_PlayerSettings);
            Type patched  = typeof(Pawn_PlayerSettings_Patch);

            RimThreadedHarmony.Prefix(original, patched, "set_Master");
        }
Example #24
0
        internal static void RunDestructivePatches()
        {
            Type original = typeof(GrammarResolver);
            Type patched  = typeof(GrammarResolver_Patch);

            RimThreadedHarmony.Prefix(original, patched, "ResolveUnsafe", new[] { typeof(string), typeof(GrammarRequest), typeof(bool).MakeByRefType(), typeof(string), typeof(bool), typeof(bool), typeof(List <string>), typeof(List <string>), typeof(bool) });
        }
        public static void RunDestructivePatches()
        {
            Type original = typeof(Reachability);
            Type patched  = typeof(Reachability_Patch);

            RimThreadedHarmony.Prefix(original, patched, nameof(CanReach), new Type[] { typeof(IntVec3), typeof(LocalTargetInfo), typeof(PathEndMode), typeof(TraverseParms) });
        }
        internal static void RunNonDestructivePatches()
        {
            Type original = typeof(BattleLog);
            Type patched  = typeof(BattleLog_Transpile);

            RimThreadedHarmony.Transpile(original, patched, "Add");
        }
        public static void RunDestructivePatches()
        {
            Type original = typeof(Alert_MinorBreakRisk);
            Type patched  = typeof(Alert_MinorBreakRisk_Patch);

            RimThreadedHarmony.Prefix(original, patched, "GetReport");
        }
        public static IEnumerable <CodeInstruction> Add(IEnumerable <CodeInstruction> instructions, ILGenerator iLGenerator)
        {
            List <CodeInstruction> instructionsList = instructions.ToList();
            int  i = 0;
            Type lockObjectType = typeof(object);
            List <CodeInstruction> loadLockObjectInstructions = new List <CodeInstruction>
            {
                new CodeInstruction(OpCodes.Ldsfld, Field(typeof(BattleLog_Transpile), "addLogEntryLock")),
            };
            LocalBuilder lockObject = iLGenerator.DeclareLocal(lockObjectType);
            LocalBuilder lockTaken  = iLGenerator.DeclareLocal(typeof(bool));

            foreach (CodeInstruction ci in RimThreadedHarmony.EnterLock(
                         lockObject, lockTaken, loadLockObjectInstructions, instructionsList[i]))
            {
                yield return(ci);
            }

            while (i < instructionsList.Count - 1)
            {
                yield return(instructionsList[i++]);
            }
            foreach (CodeInstruction ci in RimThreadedHarmony.ExitLock(
                         iLGenerator, lockObject, lockTaken, instructionsList[i]))
            {
                yield return(ci);
            }

            while (i < instructionsList.Count)
            {
                yield return(instructionsList[i++]);
            }
        }
        public static void RunDestructivePatches()
        {
            Type original = typeof(ContentFinder <Texture2D>);
            Type patched  = typeof(ContentFinder_Texture2D_Patch);

            RimThreadedHarmony.Prefix(original, patched, "Get");
        }
        internal static void RunDestructivePatches()
        {
            Type original = typeof(SeasonUtility);
            Type patched  = typeof(SeasonUtility_Patch);

            RimThreadedHarmony.Prefix(original, patched, "GetReportedSeason");
        }