Beispiel #1
0
 public virtual void ExposeData()
 {
     if (Scribe.mode == LoadSaveMode.Saving && this.combatLogEntry != null)
     {
         LogEntry target = this.combatLogEntry.Target;
         if (!Current.Game.battleLog.IsEntryActive(target))
         {
             this.combatLogEntry = null;
         }
     }
     Scribe_Values.Look <int>(ref this.loadID, "loadID", 0, false);
     Scribe_Defs.Look <HediffDef>(ref this.def, "def");
     Scribe_Values.Look <int>(ref this.ageTicks, "ageTicks", 0, false);
     Scribe_Defs.Look <ThingDef>(ref this.source, "source");
     Scribe_Defs.Look <BodyPartGroupDef>(ref this.sourceBodyPartGroup, "sourceBodyPartGroup");
     Scribe_Defs.Look <HediffDef>(ref this.sourceHediffDef, "sourceHediffDef");
     Scribe_BodyParts.Look(ref this.part, "part", null);
     Scribe_Values.Look <float>(ref this.severityInt, "severity", 0f, false);
     Scribe_Values.Look <bool>(ref this.recordedTale, "recordedTale", false, false);
     Scribe_Values.Look <bool>(ref this.causesNoPain, "causesNoPain", false, false);
     Scribe_Values.Look <bool>(ref this.visible, "visible", false, false);
     Scribe_References.Look <LogEntry>(ref this.combatLogEntry, "combatLogEntry", false);
     Scribe_Values.Look <string>(ref this.combatLogText, "combatLogText", null, false);
     if (Scribe.mode == LoadSaveMode.LoadingVars)
     {
         BackCompatibility.HediffLoadingVars(this);
     }
     if (Scribe.mode == LoadSaveMode.ResolvingCrossRefs)
     {
         BackCompatibility.HediffResolvingCrossRefs(this);
     }
 }
Beispiel #2
0
 public virtual void ExposeData()
 {
     if (Scribe.mode == LoadSaveMode.Saving && combatLogEntry != null)
     {
         LogEntry target = combatLogEntry.Target;
         if (!Current.Game.battleLog.IsEntryActive(target))
         {
             combatLogEntry = null;
         }
     }
     Scribe_Values.Look(ref loadID, "loadID", 0);
     Scribe_Defs.Look(ref def, "def");
     Scribe_Values.Look(ref ageTicks, "ageTicks", 0);
     Scribe_Defs.Look(ref source, "source");
     Scribe_Defs.Look(ref sourceBodyPartGroup, "sourceBodyPartGroup");
     Scribe_Defs.Look(ref sourceHediffDef, "sourceHediffDef");
     Scribe_BodyParts.Look(ref part, "part");
     Scribe_Values.Look(ref severityInt, "severity", 0f);
     Scribe_Values.Look(ref recordedTale, "recordedTale", defaultValue: false);
     Scribe_Values.Look(ref causesNoPain, "causesNoPain", defaultValue: false);
     Scribe_Values.Look(ref visible, "visible", defaultValue: false);
     Scribe_References.Look(ref combatLogEntry, "combatLogEntry");
     Scribe_Values.Look(ref combatLogText, "combatLogText");
     if (Scribe.mode == LoadSaveMode.LoadingVars)
     {
         BackCompatibility.HediffLoadingVars(this);
     }
     if (Scribe.mode == LoadSaveMode.ResolvingCrossRefs)
     {
         BackCompatibility.HediffResolvingCrossRefs(this);
     }
 }