Ejemplo n.º 1
0
 public override void ReceiveCompSignal(string signal)
 {
     base.ReceiveCompSignal(signal);
     if (signal == "PowerTurnedOff")
     {
         if (JukeBoxCore.orignalSongList.Count <= 0)
         {
             JukeBoxCore.orignalSongList.AddRange(DefDatabase <SongDef> .AllDefs);
         }
         JukeBoxCore.RemoveJukeBox(this);
     }
     if (signal == "PowerTurnedOn")
     {
         JukeBoxCore.AddJukeBox(this);
     }
 }
Ejemplo n.º 2
0
        public override void PostExposeData()
        {
            //이미 존재하는 개체
            base.PostExposeData();
            if (Scribe.mode == LoadSaveMode.ResolvingCrossRefs)
            {
                if (JukeBoxCore.orignalSongList.Count > 0)
                {
                    DefDatabase <SongDef> .Clear();

                    DefDatabase <SongDef> .Add(JukeBoxCore.orignalSongList);
                }
                JukeBoxCore.jukeBoxList.Clear();
            }
            if (Scribe.mode == LoadSaveMode.PostLoadInit)
            {
                compPowerTrader = parent.GetComp <CompPowerTrader>();
                if (compPowerTrader.PowerOn)
                {
                    JukeBoxCore.AddJukeBox(this);
                }
                currentState = false;
            }
        }
Ejemplo n.º 3
0
 public override void PostSpawnSetup(bool respawningAfterLoad)
 {
     base.PostSpawnSetup(respawningAfterLoad);
     JukeBoxCore.AddJukeBox(this);
     compPowerTrader = parent.GetComp <CompPowerTrader>();
 }