Skip to content

Commit

Permalink
Merge pull request #50 from RimNauts/main
Browse files Browse the repository at this point in the history
Patch update
  • Loading branch information
sindre0830 authored Mar 18, 2023
2 parents 084327d + 6f15d56 commit 144aaa7
Show file tree
Hide file tree
Showing 4 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
- Add in-bounds check before applying the stripes in map generation
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 = "4.11.1";
public static readonly string version = "4.11.2";
}

public static class Style {
Expand Down
4 changes: 3 additions & 1 deletion Source/RimNauts2/RimNauts2/Map/MoonStripped/Stripes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ public override void Generate(Map map, GenStepParams parms) {

public void wide_brush(IntVec3 pos, string defName, Map map, int halfWidth) {
for (int dz = -halfWidth; dz <= halfWidth; dz++) {
map.terrainGrid.SetTerrain(new IntVec3(pos.x, 0, pos.z + dz), DefDatabase<ThingDef>.GetNamed(defName).building.naturalTerrain);
if (new IntVec3(pos.x, 0, pos.z + dz).InBounds(map)) {
map.terrainGrid.SetTerrain(new IntVec3(pos.x, 0, pos.z + dz), DefDatabase<ThingDef>.GetNamed(defName).building.naturalTerrain);
}
}
}
}
Expand Down

0 comments on commit 144aaa7

Please sign in to comment.