Exemplo n.º 1
0
        public void CleanTick()
        {
            if (CleaningStationSettings.isDynamicPower())
            {
                float powerFactor = -1f * (500f / (500f + (float)cleanableCells.Count()));
                compPowerTrader.PowerOutput = (float)Math.Round(CleaningStationSettings.GetPowerConsumption() * cleanableCells.Count() * powerFactor);
            }

            if (compPowerTrader.PowerOn)
            {
                foreach (IntVec3 cleanMe in cleanableCells)
                {
                    FilthMaker.RemoveAllFilth(cleanMe, this.Map);
                }
            }
        }
Exemplo n.º 2
0
        public override void SpawnSetup(Map map, bool respawningAfterLoad)
        {
            base.SpawnSetup(map, respawningAfterLoad);
            this.compPowerTrader = base.GetComp <CompPowerTrader>();

            HugsLibController.Instance.DistributedTicker.RegisterTickability(CleanTick, CleaningStationSettings.GetCleanTime(), this);
        }
        public override void DrawGhost(ThingDef def, IntVec3 center, Rot4 rot, Color ghostCol)
        {
            Map currentMap = Find.CurrentMap;

            GenDraw.DrawRadiusRing(center, CleaningStationSettings.GetCleanRadius());
        }