diff --git a/1.1/Source/WhatTheHack/Harmony/Dialog_FormCaravan.cs b/1.1/Source/WhatTheHack/Harmony/Dialog_FormCaravan.cs index 0ea70e11..ed5255d2 100644 --- a/1.1/Source/WhatTheHack/Harmony/Dialog_FormCaravan.cs +++ b/1.1/Source/WhatTheHack/Harmony/Dialog_FormCaravan.cs @@ -83,7 +83,11 @@ public static void AddWarnings(Dialog_FormCaravan instance, ref List war { return; } - if(numPlatforms < numMechanoids) + if (warnings == null) + { + warnings = new List(); + } + if (numPlatforms < numMechanoids) { warnings.Add("WTH_Warning_NotEnoughPlatforms".Translate()); } diff --git a/1.1/Source/WhatTheHack/Harmony/Pawn_HealthTracker.cs b/1.1/Source/WhatTheHack/Harmony/Pawn_HealthTracker.cs index abf67912..1b8b4e50 100644 --- a/1.1/Source/WhatTheHack/Harmony/Pawn_HealthTracker.cs +++ b/1.1/Source/WhatTheHack/Harmony/Pawn_HealthTracker.cs @@ -259,7 +259,7 @@ private static void TryHealRandomInjury(Pawn_HealthTracker __instance, Pawn pawn } Hediff_Injury hediff_Injury = hediffs.RandomElement(); hediff_Injury.Heal(healAmount); - if (pawn.IsHashIntervalTick(50) && !pawn.IsHashIntervalTick(100) && !pawn.Position.Fogged(pawn.Map)) + if (pawn.IsHashIntervalTick(50) && !pawn.IsHashIntervalTick(100) && pawn.Map != null && !pawn.Position.Fogged(pawn.Map)) { MoteMaker.ThrowMetaIcon(pawn.Position, pawn.Map, ThingDefOf.Mote_HealingCross); } diff --git a/1.1/Source/WhatTheHack/Recipes/Recipe_HackMechanoid.cs b/1.1/Source/WhatTheHack/Recipes/Recipe_HackMechanoid.cs index 758d3a85..d9fb8d23 100644 --- a/1.1/Source/WhatTheHack/Recipes/Recipe_HackMechanoid.cs +++ b/1.1/Source/WhatTheHack/Recipes/Recipe_HackMechanoid.cs @@ -38,6 +38,10 @@ protected override void PostSuccessfulApply(Pawn pawn, BodyPartRecord part, Pawn { pawn.ownership = new Pawn_Ownership(pawn); } + if (pawn.psychicEntropy == null) + { + pawn.psychicEntropy = new Pawn_PsychicEntropyTracker(pawn); + } pawn.Name = PawnBioAndNameGenerator.GeneratePawnName(pawn, NameStyle.Full); Find.LetterStack.ReceiveLetter("WTH_Letter_Success_Label".Translate(), "WTH_Letter_Success_Label_Description".Translate(new object[]{billDoer.Name.ToStringShort, pawn.Name}), LetterDefOf.PositiveEvent, pawn);