Example #1
0
 public override void ExposeData()
 {
     base.ExposeData();
     if (Scribe.mode == LoadSaveMode.Saving)
     {
         this.pawns.RemoveAll((Pawn x) => x.Destroyed);
     }
     Scribe_Values.Look <string>(ref this.nameInt, "name", null, false);
     Scribe_Deep.Look <ThingOwner <Pawn> >(ref this.pawns, "pawns", new object[]
     {
         this
     });
     Scribe_Values.Look <bool>(ref this.autoJoinable, "autoJoinable", false, false);
     Scribe_Deep.Look <Caravan_PathFollower>(ref this.pather, "pather", new object[]
     {
         this
     });
     Scribe_Deep.Look <Caravan_TraderTracker>(ref this.trader, "trader", new object[]
     {
         this
     });
     Scribe_Deep.Look <StoryState>(ref this.storyState, "storyState", new object[]
     {
         this
     });
     if (Scribe.mode == LoadSaveMode.PostLoadInit)
     {
         BackCompatibility.CaravanPostLoadInit(this);
     }
 }
Example #2
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);
     if (Scribe.mode == LoadSaveMode.PostLoadInit)
     {
         BackCompatibility.CaravanPostLoadInit(this);
     }
 }