private static void MutatePawn(Pawn pawn, MutagenDef mutagen) { HediffSet hediffSet = pawn.health.hediffSet; if (!pawn.Spawned || !mutagen.CanInfect(pawn)) { return; } pawn.health.AddHediff(MorphTransformationDefOf.FullRandomTF); IntermittentMagicSprayer.ThrowMagicPuffDown(pawn.Position.ToVector3(), pawn.Map); }
private void DoMutationAddedEffects(Pawn pawn) { IntermittentMagicSprayer.ThrowMagicPuffDown(pawn.Position.ToVector3(), pawn.MapHeld); var mDef = hediff as MutationDef; var mTale = tale ?? mDef?.mutationTale; var mMem = memory ?? mDef?.mutationMemory; if (mTale != null) { TaleRecorder.RecordTale(mTale, pawn); } if (mMem != null) { TryAddMemory(pawn, mMem); } }