public override void LordJobTick()
        {
            base.LordJobTick();


            var alter = spot.GetFirstThing <Building_SkavenAlter>(Map);

            if (alter == null)
            {
                return;
            }

            Rand.PushState(alter.thingIDNumber);
            try
            {
                foreach (IntVec3 cell in alter.PeripheralCells)
                {
                    var pos = GenThing.TrueCenter(cell, alter.Rotation, alter.RotatedSize, alter.def.Altitude);
                    CellRenderer.RenderSpot(pos, Rand.Range(0, 1f));
                }
            }
            finally
            {
                Rand.PopState();
            }
        }
Beispiel #2
0
        public void DebugDrawMouseover()
        {
            int num = Mathf.RoundToInt(Time.realtimeSinceStartup * 2f) % 2;

            if (RimShipMod.mod.settings.debugDrawRegions)
            {
                Color color;
                if (!this.valid)
                {
                    color = Color.red;
                }
                else if (this.DebugIsNew)
                {
                    color = Color.yellow;
                }
                else
                {
                    color = Color.green;
                }

                GenDraw.DrawFieldEdges(this.Cells.ToList <IntVec3>(), color);
                foreach (WaterRegion region in this.Neighbors)
                {
                    GenDraw.DrawFieldEdges(region.Cells.ToList <IntVec3>(), Color.grey);
                }

                if (RimShipMod.mod.settings.debugDrawRegionLinks)
                {
                    foreach (WaterRegionLink regionLink in this.links)
                    {
                        if (num == 1)
                        {
                            foreach (IntVec3 c in regionLink.span.Cells)
                            {
                                CellRenderer.RenderCell(c, DebugSolidColorMats.MaterialOf(Color.magenta));
                            }
                        }
                    }
                }
                if (RimShipMod.mod.settings.debugDrawRegionThings)
                {
                    foreach (Thing thing in this.listerThings.AllThings)
                    {
                        CellRenderer.RenderSpot(thing.TrueCenter(), (float)(thing.thingIDNumber % 256) / 256f);
                    }
                }
            }
        }