Fix spreader test (#15303)
This commit is contained in:
@@ -32,12 +32,19 @@ public sealed class SpreaderSystem : EntitySystem
|
|||||||
{
|
{
|
||||||
SubscribeLocalEvent<AirtightChanged>(OnAirtightChanged);
|
SubscribeLocalEvent<AirtightChanged>(OnAirtightChanged);
|
||||||
SubscribeLocalEvent<GridInitializeEvent>(OnGridInit);
|
SubscribeLocalEvent<GridInitializeEvent>(OnGridInit);
|
||||||
|
SubscribeLocalEvent<SpreaderGridComponent, MapInitEvent>(OnSpreaderGridMapInit);
|
||||||
|
|
||||||
SubscribeLocalEvent<SpreaderGridComponent, EntityUnpausedEvent>(OnGridUnpaused);
|
SubscribeLocalEvent<SpreaderGridComponent, EntityUnpausedEvent>(OnGridUnpaused);
|
||||||
|
|
||||||
SetupPrototypes();
|
SetupPrototypes();
|
||||||
_prototype.PrototypesReloaded += OnPrototypeReload;
|
_prototype.PrototypesReloaded += OnPrototypeReload;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void OnSpreaderGridMapInit(EntityUid uid, SpreaderGridComponent component, MapInitEvent args)
|
||||||
|
{
|
||||||
|
component.NextUpdate = _timing.CurTime;
|
||||||
|
}
|
||||||
|
|
||||||
public override void Shutdown()
|
public override void Shutdown()
|
||||||
{
|
{
|
||||||
base.Shutdown();
|
base.Shutdown();
|
||||||
@@ -80,12 +87,7 @@ public sealed class SpreaderSystem : EntitySystem
|
|||||||
private void OnGridInit(GridInitializeEvent ev)
|
private void OnGridInit(GridInitializeEvent ev)
|
||||||
{
|
{
|
||||||
var comp = EnsureComp<SpreaderGridComponent>(ev.EntityUid);
|
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/>
|
/// <inheritdoc/>
|
||||||
|
|||||||
@@ -9111,12 +9111,12 @@ entities:
|
|||||||
type: GridAtmosphere
|
type: GridAtmosphere
|
||||||
- type: OccluderTree
|
- type: OccluderTree
|
||||||
- type: Shuttle
|
- type: Shuttle
|
||||||
- nextUpdate: 8187.135845
|
- nextUpdate: 0.45
|
||||||
type: GridPathfinding
|
type: GridPathfinding
|
||||||
|
- nextUpdate: 1
|
||||||
|
type: SpreaderGrid
|
||||||
- type: RadiationGridResistance
|
- type: RadiationGridResistance
|
||||||
- type: GasTileOverlay
|
- type: GasTileOverlay
|
||||||
- nextUpdate: 0
|
|
||||||
type: SpreaderGrid
|
|
||||||
- uid: 61
|
- uid: 61
|
||||||
type: GasVentScrubber
|
type: GasVentScrubber
|
||||||
components:
|
components:
|
||||||
@@ -67312,8 +67312,10 @@ entities:
|
|||||||
type: Fixtures
|
type: Fixtures
|
||||||
- type: OccluderTree
|
- type: OccluderTree
|
||||||
- type: Shuttle
|
- type: Shuttle
|
||||||
- nextUpdate: 1984.9758152
|
- nextUpdate: 0.45
|
||||||
type: GridPathfinding
|
type: GridPathfinding
|
||||||
|
- nextUpdate: 1
|
||||||
|
type: SpreaderGrid
|
||||||
- gravityShakeSound: !type:SoundPathSpecifier
|
- gravityShakeSound: !type:SoundPathSpecifier
|
||||||
path: /Audio/Effects/alert.ogg
|
path: /Audio/Effects/alert.ogg
|
||||||
type: Gravity
|
type: Gravity
|
||||||
@@ -67526,8 +67528,6 @@ entities:
|
|||||||
type: GridAtmosphere
|
type: GridAtmosphere
|
||||||
- type: GasTileOverlay
|
- type: GasTileOverlay
|
||||||
- type: RadiationGridResistance
|
- type: RadiationGridResistance
|
||||||
- nextUpdate: 0
|
|
||||||
type: SpreaderGrid
|
|
||||||
- uid: 7537
|
- uid: 7537
|
||||||
type: ClothingNeckScarfStripedBlue
|
type: ClothingNeckScarfStripedBlue
|
||||||
components:
|
components:
|
||||||
@@ -97141,7 +97141,7 @@ entities:
|
|||||||
type: Transform
|
type: Transform
|
||||||
- charge: 100
|
- charge: 100
|
||||||
type: GravityGenerator
|
type: GravityGenerator
|
||||||
- radius: 175.75
|
- radius: 4
|
||||||
type: PointLight
|
type: PointLight
|
||||||
- uid: 11695
|
- uid: 11695
|
||||||
type: VendingMachineSciDrobe
|
type: VendingMachineSciDrobe
|
||||||
|
|||||||
Reference in New Issue
Block a user