Example #1
0
 public override void ExposeData()
 {
     if (Scribe.mode == LoadSaveMode.Saving)
     {
         tmpDefName = ((def != null) ? def.defName : null);
         tmpDefType = ((def != null) ? def.GetType() : null);
     }
     Scribe_Values.Look(ref tmpDefName, "defName");
     Scribe_Values.Look(ref tmpDefType, "defType");
     if (Scribe.mode == LoadSaveMode.LoadingVars && tmpDefName != null)
     {
         def = GenDefDatabase.GetDef(tmpDefType, BackCompatibility.BackCompatibleDefName(tmpDefType, tmpDefName));
     }
 }
Example #2
0
 public override void ExposeData()
 {
     if (Scribe.mode == LoadSaveMode.Saving)
     {
         this.tmpDefName = ((this.def == null) ? null : this.def.defName);
         this.tmpDefType = ((this.def == null) ? null : this.def.GetType());
     }
     Scribe_Values.Look <string>(ref this.tmpDefName, "defName", null, false);
     Scribe_Values.Look <Type>(ref this.tmpDefType, "defType", null, false);
     if (Scribe.mode == LoadSaveMode.LoadingVars && this.tmpDefName != null)
     {
         this.def = GenDefDatabase.GetDef(this.tmpDefType, BackCompatibility.BackCompatibleDefName(this.tmpDefType, this.tmpDefName, false), true);
     }
 }