public override void ExposeData() { base.ExposeData(); Scribe_Collections.Look(ref oldInjuries, "oldInjuries"); }
public void ExposeData() { Scribe_Collections.Look(ref records, "records", LookMode.Deep); }
public override void ExposeData() { base.ExposeData(); Scribe_Collections.Look(ref placedBeds, "placedBeds", LookMode.Reference, LookMode.Reference); }
public void ExposeData() { Scribe_TFAct.Look(ref owner, nameof(owner)); Scribe_Collections.Look(ref data, nameof(data), LookMode.Value, LookMode.Undefined); }
public void ExposeData() { Scribe_Values.LookValue(ref defName, "defName"); Scribe_Values.LookValue(ref priority, "priority"); Scribe_Collections.LookList(ref workGivers, "workGivers", LookMode.Deep); }
public override void ExposeData() { base.ExposeData(); Scribe_Collections.Look <IntVec3>(ref this.sandbagCells, "sandbagCells", LookMode.Undefined, new object[0]); }
public void ExposeData() { Scribe_Values.Look(ref Tab, "Tab"); Scribe_Collections.Look(ref Items, "Items", LookMode.Deep); }
public override void ExposeData() { if (Scribe.mode == LoadSaveMode.Saving) { this.tempPawnOutfits = new List <PawnOutfitTracker>(PawnOutfits.Count); foreach (PawnOutfitTracker po in PawnOutfits.Values) { if (po != null) { this.tempPawnOutfits.Add(po); } } } Scribe_Values.Look <int>(ref nextDresserOutfitId, "nextDresserOutfitId", 0); Scribe_Collections.Look(ref this.tempPawnOutfits, "pawnOutfits", LookMode.Deep, new object[0]); Scribe_Deep.Look(ref ApparelColorTracker, "apparelColorTrack"); List <Outfit> ofb = OutfitsForBattle; Scribe_Collections.Look(ref ofb, "outfitsForBattle", LookMode.Reference, new object[0]); OutfitsForBattle = ofb; if (Scribe.mode == LoadSaveMode.PostLoadInit) { if (PawnOutfits == null) { PawnOutfits = new Dictionary <Pawn, PawnOutfitTracker>(); } if (OutfitsForBattle == null) { OutfitsForBattle = new List <Outfit>(); } PawnOutfits.Clear(); if (this.tempPawnOutfits != null) { foreach (PawnOutfitTracker po in this.tempPawnOutfits) { if (po != null && po.Pawn != null && !po.Pawn.Dead) { PawnOutfits.Add(po.Pawn, po); } } } for (int i = OutfitsForBattle.Count - 1; i >= 0; --i) { if (OutfitsForBattle[i] == null) { OutfitsForBattle.RemoveAt(i); } } if (ApparelColorTracker == null) { ApparelColorTracker = new ApparelColorTracker(); } ApparelColorTracker.PersistWornColors(); } if (this.tempPawnOutfits != null && (Scribe.mode == LoadSaveMode.Saving || Scribe.mode == LoadSaveMode.PostLoadInit)) { this.tempPawnOutfits.Clear(); this.tempPawnOutfits = null; } }
private void ExposeData_StateGraph() { if (Scribe.mode == LoadSaveMode.Saving) { this.tmpLordToilData.Clear(); for (int i = 0; i < this.graph.lordToils.Count; i++) { if (this.graph.lordToils[i].data != null) { this.tmpLordToilData.Add(i, this.graph.lordToils[i].data); } } this.tmpTriggerData.Clear(); int num = 0; for (int j = 0; j < this.graph.transitions.Count; j++) { for (int k = 0; k < this.graph.transitions[j].triggers.Count; k++) { if (this.graph.transitions[j].triggers[k].data != null) { this.tmpTriggerData.Add(num, this.graph.transitions[j].triggers[k].data); } num++; } } this.tmpCurLordToilIdx = this.graph.lordToils.IndexOf(this.curLordToil); } Scribe_Collections.Look <int, LordToilData>(ref this.tmpLordToilData, "lordToilData", LookMode.Value, LookMode.Deep); Scribe_Collections.Look <int, TriggerData>(ref this.tmpTriggerData, "triggerData", LookMode.Value, LookMode.Deep); Scribe_Values.Look <int>(ref this.tmpCurLordToilIdx, "curLordToilIdx", -1, false); if (Scribe.mode == LoadSaveMode.PostLoadInit) { if (this.curJob.LostImportantReferenceDuringLoading) { this.lordManager.RemoveLord(this); } else { LordJob job = this.curJob; this.curJob = null; this.SetJob(job); foreach (KeyValuePair <int, LordToilData> current in this.tmpLordToilData) { if (current.Key < 0 || current.Key >= this.graph.lordToils.Count) { Log.Error(string.Concat(new object[] { "Could not find lord toil for lord toil data of type \"", current.Value.GetType(), "\" (lord job: \"", this.curJob.GetType(), "\"), because lord toil index is out of bounds: ", current.Key })); } else { this.graph.lordToils[current.Key].data = current.Value; } } this.tmpLordToilData.Clear(); foreach (KeyValuePair <int, TriggerData> current2 in this.tmpTriggerData) { Trigger triggerByIndex = this.GetTriggerByIndex(current2.Key); if (triggerByIndex == null) { Log.Error(string.Concat(new object[] { "Could not find trigger for trigger data of type \"", current2.Value.GetType(), "\" (lord job: \"", this.curJob.GetType(), "\"), because trigger index is out of bounds: ", current2.Key })); } else { triggerByIndex.data = current2.Value; } } this.tmpTriggerData.Clear(); if (this.tmpCurLordToilIdx < 0 || this.tmpCurLordToilIdx >= this.graph.lordToils.Count) { Log.Error(string.Concat(new object[] { "Current lord toil index out of bounds (lord job: \"", this.curJob.GetType(), "\"): ", this.tmpCurLordToilIdx })); } else { this.curLordToil = this.graph.lordToils[this.tmpCurLordToilIdx]; } } } }
public override void ExposeData() { base.ExposeData(); Scribe_Collections.LookDictionary(ref CountTargets, "Targets", LookMode.Value, LookMode.Value); Scribe_Defs.LookDef(ref pawnKind, "PawnKind"); }
public void ExposeData() { Scribe_Collections.Look(ref times, "times", LookMode.Undefined); }
public void ExposeData() { Scribe_Collections.Look <QueuedJob>(ref this.jobs, "jobs", LookMode.Deep, new object[0]); }
public override void ExposeData() { base.ExposeData(); Scribe_Collections.Look <Faction, List <Tile> >(ref this.scoutedLocations, "scoutedLocations", LookMode.Reference, LookMode.Deep, ref this.scoutedLocationsKeysWorkingList, ref this.scoutedLocationsValuesWorkingList); }
public override void PostExposeData() { base.PostExposeData(); Scribe_References.Look <Pawn>(ref wearer, "wearer"); Scribe_Collections.Look <Hediff>(ref wearerHediffs, "wearerHediffs", LookMode.Reference); }
public override void ExposeData() { Scribe_Collections.Look <string, int>(ref TotalAlienLimit, "TotalAlienLimit", LookMode.Value, LookMode.Value, ref this.TotalAlienLimitKeys, ref this.TotalAlienLimitValue); base.ExposeData(); }
public override void ExposeData() { base.ExposeData(); Scribe_Collections.Look(ref oldLocalFlatWeights, "localFlatWeights", LookMode.Value, LookMode.Value); }
public void ExposeData() { Scribe_Values.Look <int>(ref this.uniqueId, "uniqueId", 0, false); Scribe_Values.Look <string>(ref this.label, "label", null, false); Scribe_Collections.Look <DrugPolicyEntry>(ref this.entriesInt, "drugs", LookMode.Deep, new object[0]); }
public void ExposeData() { Scribe_References.Look(ref this.pawn, "pawn"); Scribe_Defs.Look(ref this.questGiverDef, "questGiverDef"); Scribe_Collections.Look(ref this.quests, "quests", LookMode.Def); }
public void ExposeData() { Scribe_Collections.Look(ref pawns, "Pawns", LookMode.Reference); }
public override void PostExposeData() { base.PostExposeData(); Scribe_Collections.Look <ShipWeaponSlot>(ref this.weaponSlots, "weaponSlots", LookMode.Deep); }
public override void ExposeData() { base.ExposeData(); Scribe_Collections.Look(ref stock, "stock", LookMode.Deep); }
public void ExposeData() { Scribe_References.Look <DrugPolicy>(ref this.curPolicy, "curAssignedDrugs", false); Scribe_Collections.Look <DrugTakeRecord>(ref this.drugTakeRecords, "drugTakeRecords", LookMode.Deep, new object[0]); }
public void ExposeData() { Scribe_References.Look(ref bill, "bill"); Scribe_Collections.Look(ref selected, "selected", LookMode.Deep); Scribe_Values.Look(ref workLeft, "workLeft"); }
public override void ExposeData() { base.ExposeData(); if (Scribe.mode == LoadSaveMode.Saving) { this.temp = new List <ThingWithComps>(); foreach (IEnumerable <ThingWithComps> l in this.StoredWeapons.Values) { this.temp.AddRange(l); } foreach (IEnumerable <ThingWithComps> l in this.StoredBioEncodedWeapons.Values) { this.temp.AddRange(l); } if (this.forceAddedWeapons == null) { this.forceAddedWeapons = new List <Thing>(0); } } Scribe_Collections.Look(ref this.temp, false, "storedWeapons", LookMode.Deep, new object[0]); Scribe_Values.Look <bool>(ref this.includeInTradeDeals, "includeInTradeDeals", true, false); Scribe_Values.Look <bool>(ref this.IncludeInSharedWeapons, "includeInSharedWeapons", true, false); Scribe_Collections.Look(ref this.forceAddedWeapons, false, "forceAddedWeapons", LookMode.Deep, new object[0]); Scribe_Values.Look(ref this.Name, "name", "", false); if (Scribe.mode == LoadSaveMode.ResolvingCrossRefs) { this.StoredWeapons.Clear(); this.StoredBioEncodedWeapons.Clear(); if (this.temp != null) { foreach (ThingWithComps t in this.temp) { if (CompBiocodable.IsBiocoded(t)) { this.AddToSortedList(t, this.StoredBioEncodedWeapons); } else { this.AddToSortedList(t, this.StoredWeapons); } } } } if (Scribe.mode == LoadSaveMode.Saving || Scribe.mode == LoadSaveMode.ResolvingCrossRefs) { if (this.temp != null) { this.temp.Clear(); this.temp = null; } if (this.forceAddedWeapons != null && this.forceAddedWeapons.Count == 0) { this.forceAddedWeapons = null; } } }
public void ExposeData() { if (Scribe.mode == LoadSaveMode.Saving) { this.lastJobGiverKey = ((this.lastJobGiver == null) ? -1 : this.lastJobGiver.UniqueSaveKey); } Scribe_Values.Look <int>(ref this.lastJobGiverKey, "lastJobGiverKey", -1, false); if (Scribe.mode == LoadSaveMode.PostLoadInit && this.lastJobGiverKey != -1 && !this.lastJobGiverThinkTree.TryGetThinkNodeWithSaveKey(this.lastJobGiverKey, out this.lastJobGiver)) { Log.Warning("Could not find think node with key " + this.lastJobGiverKey, false); } Scribe_References.Look <Pawn>(ref this.meleeThreat, "meleeThreat", false); Scribe_References.Look <Thing>(ref this.enemyTarget, "enemyTarget", false); Scribe_References.Look <Thing>(ref this.knownExploder, "knownExploder", false); Scribe_References.Look <Thing>(ref this.lastMannedThing, "lastMannedThing", false); Scribe_Defs.Look <ThinkTreeDef>(ref this.lastJobGiverThinkTree, "lastJobGiverThinkTree"); Scribe_TargetInfo.Look(ref this.lastAttackedTarget, "lastAttackedTarget"); Scribe_Collections.Look <int, int>(ref this.thinkData, "thinkData", LookMode.Value, LookMode.Value); Scribe_Values.Look <bool>(ref this.activeInt, "active", true, false); Scribe_Values.Look <JobTag>(ref this.lastJobTag, "lastJobTag", JobTag.Misc, false); Scribe_Values.Look <int>(ref this.lastIngestTick, "lastIngestTick", -99999, false); Scribe_Values.Look <int>(ref this.nextApparelOptimizeTick, "nextApparelOptimizeTick", -99999, false); Scribe_Values.Look <int>(ref this.lastEngageTargetTick, "lastEngageTargetTick", 0, false); Scribe_Values.Look <int>(ref this.lastAttackTargetTick, "lastAttackTargetTick", 0, false); Scribe_Values.Look <bool>(ref this.canFleeIndividual, "canFleeIndividual", false, false); Scribe_Values.Look <int>(ref this.exitMapAfterTick, "exitMapAfterTick", -99999, false); Scribe_Values.Look <IntVec3>(ref this.forcedGotoPosition, "forcedGotoPosition", IntVec3.Invalid, false); Scribe_Values.Look <int>(ref this.lastMeleeThreatHarmTick, "lastMeleeThreatHarmTick", 0, false); Scribe_Values.Look <int>(ref this.lastAssignedInteractTime, "lastAssignedInteractTime", -99999, false); Scribe_Values.Look <int>(ref this.interactionsToday, "interactionsToday", 0, false); Scribe_Values.Look <int>(ref this.lastInventoryRawFoodUseTick, "lastInventoryRawFoodUseTick", 0, false); Scribe_Values.Look <int>(ref this.lastDisturbanceTick, "lastDisturbanceTick", -99999, false); Scribe_Values.Look <bool>(ref this.wantsToTradeWithColony, "wantsToTradeWithColony", false, false); Scribe_Values.Look <int>(ref this.canLovinTick, "canLovinTick", -99999, false); Scribe_Values.Look <int>(ref this.canSleepTick, "canSleepTick", -99999, false); Scribe_Values.Look <bool>(ref this.nextMoveOrderIsWait, "nextMoveOrderIsWait", true, false); Scribe_Values.Look <int>(ref this.lastTakeCombatEnhancingDrugTick, "lastTakeCombatEnhancingDrugTick", -99999, false); Scribe_Values.Look <int>(ref this.lastHarmTick, "lastHarmTick", -99999, false); Scribe_Values.Look <bool>(ref this.anyCloseHostilesRecently, "anyCloseHostilesRecently", false, false); Scribe_Deep.Look <PawnDuty>(ref this.duty, "duty", new object[0]); Scribe_Deep.Look <MentalStateHandler>(ref this.mentalStateHandler, "mentalStateHandler", new object[] { this.pawn }); Scribe_Deep.Look <MentalBreaker>(ref this.mentalBreaker, "mentalBreaker", new object[] { this.pawn }); Scribe_Deep.Look <InspirationHandler>(ref this.inspirationHandler, "inspirationHandler", new object[] { this.pawn }); Scribe_Deep.Look <PriorityWork>(ref this.priorityWork, "priorityWork", new object[] { this.pawn }); Scribe_Values.Look <int>(ref this.applyBedThoughtsTick, "applyBedThoughtsTick", 0, false); Scribe_Values.Look <bool>(ref this.applyBedThoughtsOnLeave, "applyBedThoughtsOnLeave", false, false); Scribe_Values.Look <bool>(ref this.willJoinColonyIfRescuedInt, "willJoinColonyIfRescued", false, false); Scribe_Values.Look <bool>(ref this.wildManEverReachedOutsideInt, "wildManEverReachedOutside", false, false); Scribe_Values.Look <int>(ref this.timesGuestTendedToByPlayer, "timesGuestTendedToByPlayer", 0, false); Scribe_Values.Look <int>(ref this.lastSelfTendTick, "lastSelfTendTick", 0, false); Scribe_Values.Look <bool>(ref this.spawnedByInfestationThingComp, "spawnedByInfestationThingComp", false, false); Scribe_Values.Look <int>(ref this.lastPredatorHuntingPlayerNotificationTick, "lastPredatorHuntingPlayerNotificationTick", -99999, false); if (Scribe.mode == LoadSaveMode.PostLoadInit) { BackCompatibility.MindStatePostLoadInit(this); } }
public void ExposeData() { Scribe_Collections.Look <DrugPolicy>(ref this.policies, "policies", LookMode.Deep, new object[0]); }
public override void ExposeData() { Scribe_Collections.LookList(ref pawns, "visitingPawns", LookMode.Reference); // TODO: Make sure the lookmode is correct }
public void ExposeData() { Scribe_Values.LookValue(ref delayTicks, "delayTicks"); Scribe_Collections.LookList(ref actions, "actions", LookMode.Deep); }
public override void ExposeData() { Scribe_Collections.Look(ref cache, "cache", LookMode.Deep); }
public void ExposeData() { Scribe_Collections.Look(ref dict, "dict", LookMode.Value, LookMode.Deep, ref ints, ref items); }