Skip to content

Commit

Permalink
Merge pull request #81 from RimNauts/main
Browse files Browse the repository at this point in the history
Fix issue with tileless maps
  • Loading branch information
sindre0830 committed Apr 13, 2024
2 parents f7b7250 + b90bf3b commit 101402f
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 2 deletions.
Binary file modified Assemblies/RimNauts2.dll
Binary file not shown.
1 change: 1 addition & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
# Changelog
- Fix issue with tileless maps
2 changes: 2 additions & 0 deletions Source/RimNauts2/RimNauts2/Biome/Patch/PawnGroupMaker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ namespace RimNauts2.Biome.Patch {
[HarmonyLib.HarmonyPatch(typeof(RimWorld.PawnGroupMakerUtility), "GeneratePawns")]
class PawnGroupMakerUtility_GeneratePawns {
public static IEnumerable<Pawn> Postfix(IEnumerable<Pawn> __result, RimWorld.PawnGroupMakerParms parms, bool warnOnZeroResults) {
if (parms.tile == -1) return __result;

RimWorld.BiomeDef biome = Find.WorldGrid[parms.tile].biome;
bool no_oxygen = Universum.Utilities.Cache.allowed_utility(biome, "universum.vacuum_suffocation");
bool decompression = Universum.Utilities.Cache.allowed_utility(biome, "universum.vacuum_decompression");
Expand Down
2 changes: 1 addition & 1 deletion Source/RimNauts2/RimNauts2/Constants.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
namespace RimNauts2 {
public static class Info {
public static readonly string name = "RimNauts 2";
public static readonly string version = "5.2.1";
public static readonly string version = "5.2.2";
}

public static class Style {
Expand Down
2 changes: 1 addition & 1 deletion Source/RimNauts2/RimNauts2/Things/TransportPod.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public bool get_tile_target(RimWorld.Planet.GlobalTargetInfo target) {
}

public bool CanSelectCelestialObject(RimWorld.Planet.GlobalTargetInfo target) {
if (!target.IsValid) return false;
if (!target.IsValid || target.Tile == -1) return false;

Universum.World.ObjectHolder objectHolder = Universum.World.ObjectHolderCache.Get(target.Tile);
bool dynamicLifeCycle = objectHolder != null && (objectHolder.keepAfterAbandon == false || objectHolder.celestialObject.deathTick != null);
Expand Down

0 comments on commit 101402f

Please sign in to comment.