minor thruster system cleanup (#35143)
This commit is contained in:
@@ -44,6 +44,7 @@ public sealed class ThrusterSystem : EntitySystem
|
||||
base.Initialize();
|
||||
SubscribeLocalEvent<ThrusterComponent, ActivateInWorldEvent>(OnActivateThruster);
|
||||
SubscribeLocalEvent<ThrusterComponent, ComponentInit>(OnThrusterInit);
|
||||
SubscribeLocalEvent<ThrusterComponent, MapInitEvent>(OnMapInit);
|
||||
SubscribeLocalEvent<ThrusterComponent, ComponentShutdown>(OnThrusterShutdown);
|
||||
SubscribeLocalEvent<ThrusterComponent, PowerChangedEvent>(OnPowerChange);
|
||||
SubscribeLocalEvent<ThrusterComponent, AnchorStateChangedEvent>(OnAnchorChange);
|
||||
@@ -232,8 +233,6 @@ public sealed class ThrusterSystem : EntitySystem
|
||||
|
||||
private void OnThrusterInit(EntityUid uid, ThrusterComponent component, ComponentInit args)
|
||||
{
|
||||
component.NextFire = _timing.CurTime + component.FireCooldown;
|
||||
|
||||
_ambient.SetAmbience(uid, false);
|
||||
|
||||
if (!component.Enabled)
|
||||
@@ -247,6 +246,11 @@ public sealed class ThrusterSystem : EntitySystem
|
||||
}
|
||||
}
|
||||
|
||||
private void OnMapInit(Entity<ThrusterComponent> ent, ref MapInitEvent args)
|
||||
{
|
||||
ent.Comp.NextFire = _timing.CurTime + ent.Comp.FireCooldown;
|
||||
}
|
||||
|
||||
private void OnThrusterShutdown(EntityUid uid, ThrusterComponent component, ComponentShutdown args)
|
||||
{
|
||||
DisableThruster(uid, component);
|
||||
|
||||
Reference in New Issue
Block a user