示例#1
0
        public static void RestoreOnResurrect(Pawn pawn)
        {
            if (!MemoryThingComp.ShouldRemember(pawn))
            {
                return;
            }

            pawn.TryGetComp <MemoryThingComp>()?.TryRestoreMemory(false);
        }
示例#2
0
        public static void StoreMemoriesOnDeath(Pawn __instance)
        {
            if (!MemoryThingComp.ShouldRemember(__instance))
            {
                return;
            }

            __instance.TryGetComp <MemoryThingComp>()?.TryStoreMemory();
        }
示例#3
0
        public static void RestorePlayerColonist(Pawn __instance, Faction newFaction)
        {
            if (!MemoryThingComp.ShouldRemember(__instance))
            {
                return;
            }

            if (newFaction != Faction.OfPlayer)
            {
                return;
            }

            __instance?.TryGetComp <MemoryThingComp>()?.TryRestoreMemory(false);
        }
示例#4
0
        public static void WildManCheck(Pawn __instance, PawnKindDef newKindDef)
        {
            if (!MemoryThingComp.ShouldRemember(__instance))
            {
                return;
            }

            if (newKindDef != PawnKindDefOf.WildMan)
            {
                return;
            }

            __instance?.TryGetComp <MemoryThingComp>()?.TryStoreMemory();
        }