コード例 #1
0
        /// <summary>Does the ingestion outcome special.</summary>
        /// <param name="pawn">The pawn.</param>
        /// <param name="ingested">The ingested.</param>
        protected override void DoIngestionOutcomeSpecial(Pawn pawn, Thing ingested)
        {
            var gComp = Find.World.GetComponent <PawnmorphGameComp>();

            var status = gComp.GetPawnStatus(pawn);

            if (status == TransformedStatus.Transformed)
            {
                foreach (MutagenDef mutagenDef in DefDatabase <MutagenDef> .AllDefs)
                {
                    if (blackList.Contains(mutagenDef))
                    {
                        return; // Make it so this reverted can not revert certain kinds of transformations.
                    }
                    if (mutagenDef.MutagenCached.TryRevert(pawn))
                    {
                        return;
                    }
                }
            }

            TransformerUtility.RemoveAllMutations(pawn);
            pawn.RefreshGraphics();
            AspectTracker aT = pawn.GetAspectTracker();

            if (aT != null)
            {
                RemoveAspects(aT);
            }
        }