Skip to content

Commit

Permalink
Looking for ISR2Gs
Browse files Browse the repository at this point in the history
  • Loading branch information
LocoNeko committed May 1, 2020
1 parent 44d5e6f commit f0096da
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions Source/HarmonyPatches.cs
Original file line number Diff line number Diff line change
Expand Up @@ -349,15 +349,10 @@ public static void Postfix(Tile __instance, ref List<Tile.RoadLink> __result)
public static class Patch_Game_LoadGame
{
[HarmonyPostfix]
public static void Postfix()
public static void Postfix(Game __instance)
{
ListerThings lister = new ListerThings(ListerThingsUse.Global);
lister.AllThings.Find(t => t.def.defName == "RotR_ISR2G");
RoadsOfTheRim.DebugLog("Game loaded");
foreach (Thing aThing in lister.AllThings)
{
RoadsOfTheRim.DebugLog("Found ISR2G at "+aThing.Position.ToString());
}
List<Thing> listOfThing = __instance.CurrentMap.listerThings.AllThings.Where(x => x.def.defName == "RotR_ISR2G").ToList();
RoadsOfTheRim.DebugLog("Game loaded - Found "+listOfThing.Count()+" ISR2G");
}
}

Expand Down
Binary file modified v1.1/Assemblies/RoadsOfTheRim.dll
Binary file not shown.

0 comments on commit f0096da

Please sign in to comment.