Skip to content

Commit

Permalink
Merge pull request #47 from RimNauts/main
Browse files Browse the repository at this point in the history
Assure pawns can wear spacesuits before applying them
  • Loading branch information
sindre0830 authored Mar 16, 2023
2 parents c13dfdf + 2bb0f39 commit 635644a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 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
- Assure pawns can wear spacesuits before applying them
8 changes: 5 additions & 3 deletions Source/RimNauts2/RimNauts2/Biome/Patch/PawnGroupMaker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,13 @@ public static IEnumerable<Pawn> apply_spacesuits(IEnumerable<Pawn> pawns) {
ThingDef spacesuit_helmet = ThingDef.Named("RimNauts2_Apparel_SpaceSuit_Head");
ThingDef spacesuit_armor = ThingDef.Named("RimNauts2_Apparel_SpaceSuit_Body");
foreach (Pawn pawn in pawns) {
if (pawn != null) {
if (pawn != null && pawn.apparel != null && !pawn.RaceProps.Animal) {
Universum.Utilities.Vacuum_Protection protection = Universum.Utilities.Cache.spacesuit_protection(pawn);
if (protection != Universum.Utilities.Vacuum_Protection.All) {
pawn.apparel.Wear((RimWorld.Apparel) ThingMaker.MakeThing(spacesuit_helmet), false);
pawn.apparel.Wear((RimWorld.Apparel) ThingMaker.MakeThing(spacesuit_armor), false);
try {
pawn.apparel.Wear((RimWorld.Apparel) ThingMaker.MakeThing(spacesuit_helmet), false);
pawn.apparel.Wear((RimWorld.Apparel) ThingMaker.MakeThing(spacesuit_armor), false);
} catch { }
}
}
yield return pawn;
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 = "4.10.1";
public static readonly string version = "4.10.2";
}

public static class Style {
Expand Down

0 comments on commit 635644a

Please sign in to comment.