public void UpdateGlower(int colorOptionInd)
        {
            RemoveGlower(this.parent.Map);
            var colorOption = Props.colorOptions[colorOptionInd];

            this.currentColor    = colorOption;
            this.currentColorInd = colorOptionInd;
            this.compGlower      = new CompGlower();
            Thing dummyThing = null;

            if (Props.spawnGlowerInFacedCell)
            {
                dummyThing = ThingMaker.MakeThing(GetDummyDef());
                var cellGlower = this.parent.Position + base.parent.Rotation.FacingCell;
                GenSpawn.Spawn(dummyThing, cellGlower, this.parent.Map);
                this.compGlower.parent = dummyThing as ThingWithComps;
            }
            else
            {
                this.compGlower.parent = this.parent;
            }
            this.compGlower.Initialize(new CompProperties_Glower()
            {
                glowColor       = colorOption.glowColor,
                glowRadius      = colorOption.glowRadius,
                overlightRadius = colorOption.overlightRadius
            });
            Traverse.Create(this.compGlower).Field("glowOnInt").SetValue(true);
            base.parent.Map.mapDrawer.MapMeshDirty(base.parent.Position, MapMeshFlag.Things);
            base.parent.Map.glowGrid.RegisterGlower(this.compGlower);
            if (Props.spawnGlowerInFacedCell)
            {
                dummyThing.DeSpawn();
            }
        }
 public override void PostExposeData()
 {
     base.PostExposeData();
     Scribe_Values.Look(ref currentColorInd, "currentColorInd");
     this.currentColor = Props.colorOptions[currentColorInd];
 }
 public override void PostSpawnSetup(bool respawningAfterLoad)
 {
     base.PostSpawnSetup(respawningAfterLoad);
     this.currentColor = Props.colorOptions[currentColorInd];
     this.dirty        = true;
 }