{
SubscribeLocalEvent<AirtightChanged>(OnAirtightChanged);
SubscribeLocalEvent<GridInitializeEvent>(OnGridInit);
+ SubscribeLocalEvent<SpreaderGridComponent, MapInitEvent>(OnSpreaderGridMapInit);
+
SubscribeLocalEvent<SpreaderGridComponent, EntityUnpausedEvent>(OnGridUnpaused);
SetupPrototypes();
_prototype.PrototypesReloaded += OnPrototypeReload;
}
+ private void OnSpreaderGridMapInit(EntityUid uid, SpreaderGridComponent component, MapInitEvent args)
+ {
+ component.NextUpdate = _timing.CurTime;
+ }
+
public override void Shutdown()
{
base.Shutdown();
private void OnGridInit(GridInitializeEvent ev)
{
var comp = EnsureComp<SpreaderGridComponent>(ev.EntityUid);
- var nextUpdate = _timing.CurTime;
- // TODO: I believe we need grid mapinit events so we can set the time correctly only on mapinit
- // and not touch it on regular init.
- if (comp.NextUpdate < nextUpdate)
- comp.NextUpdate = nextUpdate;
}
/// <inheritdoc/>
type: GridAtmosphere\r
- type: OccluderTree\r
- type: Shuttle\r
- - nextUpdate: 8187.135845\r
+ - nextUpdate: 0.45\r
type: GridPathfinding\r
+ - nextUpdate: 1\r
+ type: SpreaderGrid\r
- type: RadiationGridResistance\r
- type: GasTileOverlay\r
- - nextUpdate: 0\r
- type: SpreaderGrid\r
- uid: 61\r
type: GasVentScrubber\r
components:\r
type: Fixtures\r
- type: OccluderTree\r
- type: Shuttle\r
- - nextUpdate: 1984.9758152\r
+ - nextUpdate: 0.45\r
type: GridPathfinding\r
+ - nextUpdate: 1\r
+ type: SpreaderGrid\r
- gravityShakeSound: !type:SoundPathSpecifier\r
path: /Audio/Effects/alert.ogg\r
type: Gravity\r
type: GridAtmosphere\r
- type: GasTileOverlay\r
- type: RadiationGridResistance\r
- - nextUpdate: 0\r
- type: SpreaderGrid\r
- uid: 7537\r
type: ClothingNeckScarfStripedBlue\r
components:\r
type: Transform\r
- charge: 100\r
type: GravityGenerator\r
- - radius: 175.75\r
+ - radius: 4\r
type: PointLight\r
- uid: 11695\r
type: VendingMachineSciDrobe\r