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);
private void OnThrusterInit(EntityUid uid, ThrusterComponent component, ComponentInit args)
{
- component.NextFire = _timing.CurTime + component.FireCooldown;
-
_ambient.SetAmbience(uid, false);
if (!component.Enabled)
}
}
+ 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);