示例#1
0
 public override void ExposeData()
 {
     base.ExposeData();
     Scribe_Values.Look(ref customLabel, "customLabel");
     Scribe_Deep.Look(ref coreBackCompat, "core");
     Scribe_Collections.Look(ref parts, "parts", LookMode.Deep);
     Scribe_Values.Look(ref startedCountdown, "startedCountdown", defaultValue: false);
     Scribe_Values.Look(ref anyEnemiesInitially, "anyEnemiesInitially", defaultValue: false);
     Scribe_Values.Look(ref allEnemiesDefeatedSignalSent, "allEnemiesDefeatedSignalSent", defaultValue: false);
     Scribe_Values.Look(ref factionMustRemainHostile, "factionMustRemainHostile", defaultValue: false);
     Scribe_Values.Look(ref desiredThreatPoints, "desiredThreatPoints", 0f);
     if (Scribe.mode == LoadSaveMode.PostLoadInit)
     {
         if (coreBackCompat != null && coreBackCompat.def != null)
         {
             parts.Insert(0, new SitePart(this, coreBackCompat.def, coreBackCompat.parms));
             coreBackCompat = null;
         }
         if (parts.RemoveAll((SitePart x) => x == null || x.def == null) != 0)
         {
             Log.Error("Some site parts were null after loading.");
         }
         for (int i = 0; i < parts.Count; i++)
         {
             parts[i].site = this;
         }
         BackCompatibility.PostExposeData(this);
     }
 }
示例#2
0
 public override void CompExposeData()
 {
     Scribe_Values.Look(ref isPermanentInt, "isPermanent", defaultValue: false);
     Scribe_Values.Look(ref permanentDamageThreshold, "permanentDamageThreshold", 9999f);
     Scribe_Values.Look(ref painCategory, "painCategory", PainCategory.Painless);
     BackCompatibility.PostExposeData(this);
 }
		public void ExposeData()
		{
			Scribe_Values.Look(ref showLearningHelper, "showLearningHelper", defaultValue: false);
			Scribe_Values.Look(ref showZones, "showZones", defaultValue: false);
			Scribe_Values.Look(ref showBeauty, "showBeauty", defaultValue: false);
			Scribe_Values.Look(ref showRoomStats, "showRoomStats", defaultValue: false);
			Scribe_Values.Look(ref showColonistBar, "showColonistBar", defaultValue: false);
			Scribe_Values.Look(ref showRoofOverlay, "showRoofOverlay", defaultValue: false);
			Scribe_Values.Look(ref showFertilityOverlay, "showFertilityOverlay", defaultValue: false);
			Scribe_Values.Look(ref showTerrainAffordanceOverlay, "showTerrainAffordanceOverlay", defaultValue: false);
			Scribe_Values.Look(ref autoHomeArea, "autoHomeArea", defaultValue: false);
			Scribe_Values.Look(ref autoRebuild, "autoRebuild", defaultValue: false);
			Scribe_Values.Look(ref lockNorthUp, "lockNorthUp", defaultValue: false);
			Scribe_Values.Look(ref usePlanetDayNightSystem, "usePlanetDayNightSystem", defaultValue: false);
			Scribe_Values.Look(ref showExpandingIcons, "showExpandingIcons", defaultValue: false);
			Scribe_Values.Look(ref showWorldFeatures, "showWorldFeatures", defaultValue: false);
			Scribe_Values.Look(ref useWorkPriorities, "useWorkPriorities", defaultValue: false);
			Scribe_Values.Look(ref defaultCareForColonyHumanlike, "defaultCareForHumanlikeColonists", MedicalCareCategory.NoCare);
			Scribe_Values.Look(ref defaultCareForColonyAnimal, "defaultCareForAnimalColonists", MedicalCareCategory.NoCare);
			Scribe_Values.Look(ref defaultCareForColonyPrisoner, "defaultCareForHumanlikeColonistPrisoners", MedicalCareCategory.NoCare);
			Scribe_Values.Look(ref defaultCareForNeutralFaction, "defaultCareForHumanlikeNeutrals", MedicalCareCategory.NoCare);
			Scribe_Values.Look(ref defaultCareForNeutralAnimal, "defaultCareForAnimalNeutrals", MedicalCareCategory.NoCare);
			Scribe_Values.Look(ref defaultCareForHostileFaction, "defaultCareForHumanlikeEnemies", MedicalCareCategory.NoCare);
			BackCompatibility.PostExposeData(this);
		}
示例#4
0
 public override void ExposeData()
 {
     base.ExposeData();
     Scribe_BodyParts.Look(ref part, "part");
     Scribe_Defs.Look(ref consumedInitialMedicineDef, "consumedInitialMedicineDef");
     BackCompatibility.PostExposeData(this);
 }
        public void SetGame()
        {
            Current.Game.currentMapIndex           = this.CurrentMapIndex;
            Current.Game.World.info.initialMapSize = new IntVec3(MapSize, 1, MapSize);

            InfoField.SetValue(Current.Game, this.info);
            RulesField.SetValue(Current.Game, this.rules);

            Current.Game.Scenario                = this.scenario;
            Current.Game.playSettings            = this.playSettings;
            Current.Game.storyWatcher            = this.storyWatcher;
            Current.Game.gameEnder               = this.gameEnder;
            Current.Game.letterStack             = this.letterStack;
            Current.Game.researchManager         = this.researchManager;
            Current.Game.storyteller             = this.storyteller;
            Current.Game.history                 = this.history;
            Current.Game.taleManager             = this.taleManager;
            Current.Game.playLog                 = this.playLog;
            Current.Game.battleLog               = this.battleLog;
            Current.Game.outfitDatabase          = this.outfitDatabase;
            Current.Game.drugPolicyDatabase      = this.drugPolicyDatabase;
            Current.Game.foodRestrictionDatabase = this.foodRestrictionDatabase;
            Current.Game.tutor        = this.tutor;
            Current.Game.dateNotifier = this.dateNotifier;
            Current.Game.components   = this.gameComponents;

            FillComponentsMethod.Invoke(Current.Game, new object[0]);
            BackCompatibility.PostExposeData(Current.Game);
        }
示例#6
0
 public void ExposeData()
 {
     Scribe_Collections.Look(ref quests, "quests", LookMode.Deep);
     if (Scribe.mode == LoadSaveMode.LoadingVars)
     {
         int num = quests.RemoveAll((Quest x) => x == null);
         if (num != 0)
         {
             Log.Error(num + " quest(s) were null after loading.");
         }
         cachedSituationalThoughtQuestParts.Clear();
         questsInDisplayOrder.Clear();
         for (int i = 0; i < quests.Count; i++)
         {
             AddToCache(quests[i]);
         }
     }
     if (Scribe.mode == LoadSaveMode.PostLoadInit)
     {
         for (int j = 0; j < quests.Count; j++)
         {
             Find.SignalManager.RegisterReceiver(quests[j]);
         }
     }
     BackCompatibility.PostExposeData(this);
 }
示例#7
0
 public void ExposeData()
 {
     Scribe_References.Look(ref other, "other");
     Scribe_Values.Look(ref goodwill, "goodwill", 0);
     Scribe_Values.Look(ref kind, "kind", FactionRelationKind.Neutral);
     BackCompatibility.PostExposeData(this);
 }
 public void ExposeData()
 {
     Scribe_Deep.Look(ref statsRecord, "statsRecord");
     Scribe_Deep.Look(ref watcherAdaptation, "watcherAdaptation");
     Scribe_Deep.Look(ref watcherPopAdaptation, "watcherPopAdaptation");
     BackCompatibility.PostExposeData(this);
 }
        public override void ExposeData()
        {
            base.ExposeData();
            Scribe_Values.Look(ref this.burstCooldownTicksLeft, "burstCooldownTicksLeft", 0, false);
            Scribe_Values.Look(ref this.burstWarmupTicksLeft, "burstWarmupTicksLeft", 0, false);

            Scribe_Values.Look(ref this.top.curRotationInt, "aa_turretTopRot");
            Scribe_Values.Look(ref isInBurst, "aa_isInBurst");

            Scribe_TargetInfo.Look(ref this.currentTargetInt, "currentTarget");
            Scribe_Values.Look(ref this.holdFire, "holdFire", false, false);
            Scribe_Deep.Look(ref this.gun, "gun", Array.Empty <object>());
            BackCompatibility.PostExposeData(this);
            if (Scribe.mode == LoadSaveMode.PostLoadInit)
            {
                this.UpdateGunVerbs();
            }

            if (top != null)
            {
                top.ExposeData();
            }
            else
            {
                Log.Error("Could not expose data for turret top: turret top is null.");
            }
        }
 public override void PostExposeData()
 {
     base.PostExposeData();
     Scribe_Defs.Look(ref requestThingDef, "requestThingDef");
     Scribe_Values.Look(ref requestCount, "requestCount", 0);
     Scribe_Values.Look(ref expiration, "expiration", 0);
     BackCompatibility.PostExposeData(this);
 }
示例#11
0
 public void ExposeData()
 {
     battleActive = BattleActive;
     Scribe_Deep.Look(ref records, "records");
     Scribe_Values.Look(ref storyRelevance, "storyRelevance", 0.0);
     Scribe_References.Look(ref battleActive, "battleActive");
     Scribe_Values.Look(ref battleExitTick, "battleExitTick", 0);
     BackCompatibility.PostExposeData(this);
 }
示例#12
0
 public void ExposeData()
 {
     Scribe_Values.Look(ref uniqueID, "uniqueID", 0);
     Scribe_Defs.Look(ref def, "def");
     Scribe_Values.Look(ref name, "name");
     Scribe_Values.Look(ref drawCenter, "drawCenter");
     Scribe_Values.Look(ref drawAngle, "drawAngle", 0f);
     Scribe_Values.Look(ref maxDrawSizeInTiles, "maxDrawSizeInTiles", 0f);
     BackCompatibility.PostExposeData(this);
 }
示例#13
0
 public virtual void ExposeData()
 {
     Scribe_Values.Look(ref uniqueID, "uniqueID", -1);
     Scribe_Values.Look(ref suppressEndMessage, "suppressEndMessage", defaultValue: false);
     Scribe_Defs.Look(ref def, "def");
     Scribe_Values.Look(ref startTick, "startTick", 0);
     Scribe_Values.Look(ref duration, "duration", 0);
     Scribe_Values.Look(ref permanent, "permanent", defaultValue: false);
     Scribe_References.Look(ref quest, "quest");
     BackCompatibility.PostExposeData(this);
 }
示例#14
0
 public void ExposeData()
 {
     Scribe_Values.Look(ref name, "name");
     Scribe_Values.Look(ref planetCoverage, "planetCoverage", 0f);
     Scribe_Values.Look(ref seedString, "seedString");
     Scribe_Values.Look(ref persistentRandomValue, "persistentRandomValue", 0);
     Scribe_Values.Look(ref overallRainfall, "overallRainfall", OverallRainfall.AlmostNone);
     Scribe_Values.Look(ref overallTemperature, "overallTemperature", OverallTemperature.VeryCold);
     Scribe_Values.Look(ref initialMapSize, "initialMapSize");
     BackCompatibility.PostExposeData(this);
 }
示例#15
0
 public void ExposeComponents()
 {
     Scribe_Deep.Look(ref factionManager, "factionManager");
     Scribe_Deep.Look(ref worldPawns, "worldPawns");
     Scribe_Deep.Look(ref worldObjects, "worldObjects");
     Scribe_Deep.Look(ref gameConditionManager, "gameConditionManager", this);
     Scribe_Deep.Look(ref storyState, "storyState", this);
     Scribe_Deep.Look(ref features, "features");
     Scribe_Collections.Look(ref components, "components", LookMode.Deep, this);
     FillComponents();
     BackCompatibility.PostExposeData(this);
 }
 public void ExposeData()
 {
     Scribe_Collections.Look(ref needs, "needs", LookMode.Deep, pawn);
     if (Scribe.mode == LoadSaveMode.LoadingVars || Scribe.mode == LoadSaveMode.PostLoadInit)
     {
         if (needs.RemoveAll((Need x) => x == null || x.def == null) != 0)
         {
             Log.Error("Pawn " + pawn.ToStringSafe() + " had some null needs after loading.");
         }
         BindDirectNeedFields();
     }
     BackCompatibility.PostExposeData(this);
 }
示例#17
0
 public override void ExposeData()
 {
     base.ExposeData();
     Scribe_Values.Look(ref burstCooldownTicksLeft, "burstCooldownTicksLeft", 0);
     Scribe_Values.Look(ref burstWarmupTicksLeft, "burstWarmupTicksLeft", 0);
     Scribe_TargetInfo.Look(ref currentTargetInt, "currentTarget");
     Scribe_Values.Look(ref holdFire, "holdFire", defaultValue: false);
     Scribe_Deep.Look(ref gun, "gun");
     BackCompatibility.PostExposeData(this);
     if (Scribe.mode == LoadSaveMode.PostLoadInit)
     {
         UpdateGunVerbs();
     }
 }
示例#18
0
 public override void ExposeData()
 {
     base.ExposeData();
     Scribe_Values.Look <int>(ref this.burstCooldownTicksLeft, "burstCooldownTicksLeft", 0, false);
     Scribe_Values.Look <int>(ref this.burstWarmupTicksLeft, "burstWarmupTicksLeft", 0, false);
     Scribe_TargetInfo.Look(ref this.currentTargetInt, "currentTarget");
     Scribe_Values.Look <bool>(ref this.holdFire, "holdFire", false, false);
     Scribe_Deep.Look <Thing>(ref this.gun, "gun", Array.Empty <object>());
     BackCompatibility.PostExposeData(this);
     if (Scribe.mode == LoadSaveMode.PostLoadInit)
     {
         this.UpdateGunVerbs();
     }
 }
示例#19
0
 public void ExposeData()
 {
     Scribe_Deep.Look(ref archive, "archive");
     Scribe_Collections.Look(ref autoRecorderGroups, "autoRecorderGroups", LookMode.Deep);
     Scribe_Values.Look(ref lastPsylinkAvailable, "lastPsylinkAvailable", -999999);
     BackCompatibility.PostExposeData(this);
     if (Scribe.mode == LoadSaveMode.PostLoadInit)
     {
         AddOrRemoveHistoryRecorderGroups();
         if (lastPsylinkAvailable == -999999)
         {
             lastPsylinkAvailable = Find.TickManager.TicksGame;
         }
     }
 }
示例#20
0
 public void ExposeData()
 {
     Scribe_References.Look(ref meleeThreat, "meleeThreat");
     Scribe_References.Look(ref enemyTarget, "enemyTarget");
     Scribe_References.Look(ref knownExploder, "knownExploder");
     Scribe_References.Look(ref lastMannedThing, "lastMannedThing");
     Scribe_TargetInfo.Look(ref lastAttackedTarget, "lastAttackedTarget");
     Scribe_Collections.Look(ref thinkData, "thinkData", LookMode.Value, LookMode.Value);
     Scribe_Values.Look(ref activeInt, "active", defaultValue: true);
     Scribe_Values.Look(ref lastJobTag, "lastJobTag", JobTag.Misc);
     Scribe_Values.Look(ref lastIngestTick, "lastIngestTick", -99999);
     Scribe_Values.Look(ref nextApparelOptimizeTick, "nextApparelOptimizeTick", -99999);
     Scribe_Values.Look(ref lastEngageTargetTick, "lastEngageTargetTick", 0);
     Scribe_Values.Look(ref lastAttackTargetTick, "lastAttackTargetTick", 0);
     Scribe_Values.Look(ref canFleeIndividual, "canFleeIndividual", defaultValue: false);
     Scribe_Values.Look(ref exitMapAfterTick, "exitMapAfterTick", -99999);
     Scribe_Values.Look(ref forcedGotoPosition, "forcedGotoPosition", IntVec3.Invalid);
     Scribe_Values.Look(ref lastMeleeThreatHarmTick, "lastMeleeThreatHarmTick", 0);
     Scribe_Values.Look(ref lastAssignedInteractTime, "lastAssignedInteractTime", -99999);
     Scribe_Values.Look(ref interactionsToday, "interactionsToday", 0);
     Scribe_Values.Look(ref lastInventoryRawFoodUseTick, "lastInventoryRawFoodUseTick", 0);
     Scribe_Values.Look(ref lastDisturbanceTick, "lastDisturbanceTick", -99999);
     Scribe_Values.Look(ref wantsToTradeWithColony, "wantsToTradeWithColony", defaultValue: false);
     Scribe_Values.Look(ref canLovinTick, "canLovinTick", -99999);
     Scribe_Values.Look(ref canSleepTick, "canSleepTick", -99999);
     Scribe_Values.Look(ref nextMoveOrderIsWait, "nextMoveOrderIsWait", defaultValue: true);
     Scribe_Values.Look(ref lastTakeCombatEnhancingDrugTick, "lastTakeCombatEnhancingDrugTick", -99999);
     Scribe_Values.Look(ref lastHarmTick, "lastHarmTick", -99999);
     Scribe_Values.Look(ref anyCloseHostilesRecently, "anyCloseHostilesRecently", defaultValue: false);
     Scribe_Deep.Look(ref duty, "duty");
     Scribe_Deep.Look(ref mentalStateHandler, "mentalStateHandler", pawn);
     Scribe_Deep.Look(ref mentalBreaker, "mentalBreaker", pawn);
     Scribe_Deep.Look(ref inspirationHandler, "inspirationHandler", pawn);
     Scribe_Deep.Look(ref priorityWork, "priorityWork", pawn);
     Scribe_Values.Look(ref applyBedThoughtsTick, "applyBedThoughtsTick", 0);
     Scribe_Values.Look(ref applyThroneThoughtsTick, "applyThroneThoughtsTick", 0);
     Scribe_Values.Look(ref applyBedThoughtsOnLeave, "applyBedThoughtsOnLeave", defaultValue: false);
     Scribe_Values.Look(ref willJoinColonyIfRescuedInt, "willJoinColonyIfRescued", defaultValue: false);
     Scribe_Values.Look(ref wildManEverReachedOutsideInt, "wildManEverReachedOutside", defaultValue: false);
     Scribe_Values.Look(ref timesGuestTendedToByPlayer, "timesGuestTendedToByPlayer", 0);
     Scribe_Values.Look(ref noAidRelationsGainUntilTick, "noAidRelationsGainUntilTick", -99999);
     Scribe_Values.Look(ref lastSelfTendTick, "lastSelfTendTick", 0);
     Scribe_Values.Look(ref spawnedByInfestationThingComp, "spawnedByInfestationThingComp", defaultValue: false);
     Scribe_Values.Look(ref lastPredatorHuntingPlayerNotificationTick, "lastPredatorHuntingPlayerNotificationTick", -99999);
     BackCompatibility.PostExposeData(this);
 }
示例#21
0
        public override void ExposeData()           // Added new variables, removed bool loaded (not used in CE)
        {
            base.ExposeData();

            // New variables
            Scribe_Deep.Look(ref gunInt, "gunInt");
            InitGun();
            Scribe_Values.Look(ref isReloading, "isReloading", false);
            Scribe_Values.Look(ref ticksUntilAutoReload, "ticksUntilAutoReload", 0);
            //lastSurroundingAmmoCheck should never be saved

            Scribe_Values.Look <int>(ref this.burstCooldownTicksLeft, "burstCooldownTicksLeft", 0, false);
            Scribe_Values.Look <int>(ref this.burstWarmupTicksLeft, "burstWarmupTicksLeft", 0, false);
            Scribe_TargetInfo.Look(ref this.currentTargetInt, "currentTarget");
            Scribe_Values.Look <bool>(ref this.holdFire, "holdFire", false, false);
            BackCompatibility.PostExposeData(this);
        }
        public override void ExposeData()
        {
            base.ExposeData();
            Scribe_TargetInfo.Look(ref localTarget, "localTarget", LocalTargetInfo.Invalid);
            Scribe_TargetInfo.Look(ref globalTarget, "globalTarget", GlobalTargetInfo.Invalid);
            Scribe_Values.Look(ref CooldownTicks, "cooldownTicks");
            Scribe_Values.Look(ref PoweringUpTicks, "powerUpTicks");
            Scribe_Values.Look(ref isChargingUp, "isChargingUp");
            Scribe_Values.Look(ref lastKnownThingLoc, "lastKnownThingLoc");

            Scribe_Deep.Look(ref gun, "gun", Array.Empty<object>());

            BackCompatibility.PostExposeData(this);
            if (Scribe.mode == LoadSaveMode.PostLoadInit)
            {
                this.UpdateGunVerbs();
            }
        }
示例#23
0
 public void ExposeData()
 {
     Scribe_Collections.Look(ref pawnsForcefullyKeptAsWorldPawns, saveDestroyedThings: true, "pawnsForcefullyKeptAsWorldPawns", LookMode.Reference);
     Scribe_Collections.Look(ref pawnsAlive, "pawnsAlive", LookMode.Deep);
     Scribe_Collections.Look(ref pawnsMothballed, "pawnsMothballed", LookMode.Deep);
     Scribe_Collections.Look(ref pawnsDead, saveDestroyedThings: true, "pawnsDead", LookMode.Deep);
     Scribe_Deep.Look(ref gc, "gc");
     BackCompatibility.PostExposeData(this);
     if (Scribe.mode == LoadSaveMode.PostLoadInit)
     {
         if (pawnsMothballed == null)
         {
             pawnsMothballed = new HashSet <Pawn>();
         }
         if (pawnsForcefullyKeptAsWorldPawns.RemoveWhere((Pawn x) => x == null) != 0)
         {
             Log.Error("Some pawnsForcefullyKeptAsWorldPawns were null after loading.");
         }
         if (pawnsAlive.RemoveWhere((Pawn x) => x == null) != 0)
         {
             Log.Error("Some pawnsAlive were null after loading.");
         }
         if (pawnsMothballed.RemoveWhere((Pawn x) => x == null) != 0)
         {
             Log.Error("Some pawnsMothballed were null after loading.");
         }
         if (pawnsDead.RemoveWhere((Pawn x) => x == null) != 0)
         {
             Log.Error("Some pawnsDead were null after loading.");
         }
         if (pawnsAlive.RemoveWhere((Pawn x) => x.def == null || x.kindDef == null) != 0)
         {
             Log.Error("Some pawnsAlive had null def after loading.");
         }
         if (pawnsMothballed.RemoveWhere((Pawn x) => x.def == null || x.kindDef == null) != 0)
         {
             Log.Error("Some pawnsMothballed had null def after loading.");
         }
         if (pawnsDead.RemoveWhere((Pawn x) => x.def == null || x.kindDef == null) != 0)
         {
             Log.Error("Some pawnsDead had null def after loading.");
         }
     }
 }
示例#24
0
 public override void ExposeData()
 {
     base.ExposeData();
     if (Scribe.mode == LoadSaveMode.Saving)
     {
         pawns.RemoveAll((Pawn x) => x.Destroyed);
     }
     Scribe_Values.Look(ref uniqueId, "uniqueId", 0);
     Scribe_Values.Look(ref nameInt, "name");
     Scribe_Deep.Look(ref pawns, "pawns", this);
     Scribe_Values.Look(ref autoJoinable, "autoJoinable", defaultValue: false);
     Scribe_Deep.Look(ref pather, "pather", this);
     Scribe_Deep.Look(ref trader, "trader", this);
     Scribe_Deep.Look(ref forage, "forage", this);
     Scribe_Deep.Look(ref needs, "needs", this);
     Scribe_Deep.Look(ref carryTracker, "carryTracker", this);
     Scribe_Deep.Look(ref beds, "beds", this);
     Scribe_Deep.Look(ref storyState, "storyState", this);
     BackCompatibility.PostExposeData(this);
 }
示例#25
0
 public void ExposeData()
 {
     Scribe_Collections.Look(ref titles, "titles", LookMode.Deep);
     Scribe_Collections.Look(ref favor, "favor", LookMode.Reference, LookMode.Value, ref tmpFavorFactions, ref tmpAmounts);
     Scribe_Values.Look(ref lastDecreeTicks, "lastDecreeTicks", -999999);
     Scribe_Collections.Look(ref highestTitles, "highestTitles", LookMode.Reference, LookMode.Def, ref tmpHighestTitleFactions, ref tmpTitleDefs);
     Scribe_Collections.Look(ref heirs, "heirs", LookMode.Reference, LookMode.Reference, ref tmpHeirFactions, ref tmpPawns);
     Scribe_Collections.Look(ref permitLastUsedTick, "permitLastUsed", LookMode.Def, LookMode.Value, ref tmpPermitDefs, ref tmlPermitLastUsed);
     Scribe_Values.Look(ref allowRoomRequirements, "allowRoomRequirements", defaultValue: true);
     Scribe_Values.Look(ref allowApparelRequirements, "allowApparelRequirements", defaultValue: true);
     if (Scribe.mode == LoadSaveMode.PostLoadInit)
     {
         if (titles.RemoveAll((RoyalTitle x) => x.def == null) != 0)
         {
             Log.Error("Some RoyalTitles had null defs after loading.");
         }
         if (heirs == null)
         {
             heirs = new Dictionary <Faction, Pawn>();
         }
         if (permitLastUsedTick == null)
         {
             permitLastUsedTick = new Dictionary <RoyalTitlePermitDef, int>();
         }
         foreach (RoyalTitle title in titles)
         {
             AssignHeirIfNone(title.def, title.faction);
         }
         for (int i = 0; i < AllTitlesInEffectForReading.Count; i++)
         {
             RoyalTitle royalTitle = AllTitlesInEffectForReading[i];
             for (int j = 0; j < royalTitle.def.grantedAbilities.Count; j++)
             {
                 pawn.abilities.GainAbility(royalTitle.def.grantedAbilities[j]);
             }
         }
     }
     BackCompatibility.PostExposeData(this);
 }
示例#26
0
 public override void PostExposeData()
 {
     base.PostExposeData();
     Scribe_Deep.Look(ref pawn, PawnSaveKey, this);
     BackCompatibility.PostExposeData(this);
 }
示例#27
0
 public void ExposeData()
 {
     Scribe_Collections.Look(ref foodRestrictions, "foodRestrictions", LookMode.Deep);
     BackCompatibility.PostExposeData(this);
 }
示例#28
0
 public void ExposeData()
 {
     Scribe_Deep.Look(ref verbTracker, "verbTracker", this);
     BackCompatibility.PostExposeData(this);
 }