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); }
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(); } } }
public void ChangeState() { WindowComp.ChangeState(); this.DirtyMapMesh(this.Map); }