Exemple #1
0
        public override void SpawnSetup(Map map, bool respawningAfterLoad)
        {
            base.SpawnSetup(map, respawningAfterLoad);
            compRefuelable = GetComp <CompRefuelable>();
            forbiddable    = GetComp <CompForbiddable>();
            fillpct        = 0;
            histolysisPct  = 0;
            BioReactorDef reactorDef = def as BioReactorDef;

            if (reactorDef != null)
            {
                innerDrawOffset = ((BioReactorDef)def).innerDrawOffset;
                waterDrawCenter = ((BioReactorDef)def).waterDrawCenter;
                waterDrawOffset = ((BioReactorDef)def).waterDrawOffset;
            }
        }
Exemple #2
0
 public override void ExposeData()
 {
     base.ExposeData();
     Scribe_Values.Look <ReactorState>(ref state, "state");
     Scribe_Values.Look <float>(ref fillpct, "fillpct");
     Scribe_Values.Look <float>(ref histolysisPct, "histolysisPct");
     if (Scribe.mode == LoadSaveMode.PostLoadInit)
     {
         BioReactorDef reactorDef = def as BioReactorDef;
         if (reactorDef != null)
         {
             innerDrawOffset = ((BioReactorDef)def).innerDrawOffset;
             waterDrawCenter = ((BioReactorDef)def).waterDrawCenter;
             waterDrawOffset = ((BioReactorDef)def).waterDrawOffset;
         }
     }
     compRefuelable = GetComp <CompRefuelable>();
     forbiddable    = GetComp <CompForbiddable>();
 }