示例#1
0
        public override void SpawnSetup(Map map, bool respawningAfterLoad)
        {
            base.SpawnSetup(map, respawningAfterLoad);

            WindowCache.WindowComponent.RegisterWindow(this);

            if (ElifsDecorationsSettings.BeautyEnabled)
            {
                WindowComp.GetBeauty();
            }

            Map.linkGrid.Notify_LinkerCreatedOrDestroyed(this);
            map.mapDrawer.MapMeshDirty(Position, MapMeshFlag.Things, true, false);

            WindowComp.state       = WindowComp.NextState(State.None);
            WindowComp.wantedState = WindowComp.NextState(State.None);
        }
示例#2
0
        public override void TickRare()
        {
            base.TickRare();

            if (WindowComp.state == State.Ajar)
            {
                float rate = Size * 14f; // following in suit of the default '14f' of a vent in vanilla
                GenTemperature.EqualizeTemperaturesThroughBuilding(this, rate, true);
            }

            if (LastUpdate-- <= 0)
            {
                if (WindowComp.facing == LinkDirections.None)
                {
                    WindowComp.TryResolveFacing();
                }

                LastUpdate = 25;
                if (ElifsDecorationsSettings.BeautyEnabled)
                {
                    WindowComp.GetBeauty();
                }
            }
        }
示例#3
0
 public void ChangeState()
 {
     WindowComp.ChangeState();
     this.DirtyMapMesh(this.Map);
 }