SubscribeLocalEvent<AnomalyComponent, AppearanceChangeEvent>(OnAppearanceChanged);
SubscribeLocalEvent<AnomalyComponent, ComponentStartup>(OnStartup);
SubscribeLocalEvent<AnomalyComponent, AnimationCompletedEvent>(OnAnimationComplete);
- }
+ SubscribeLocalEvent<AnomalySupercriticalComponent, ComponentShutdown>(OnShutdown);
+ }
private void OnStartup(EntityUid uid, AnomalyComponent component, ComponentStartup args)
{
_floating.FloatAnimation(uid, component.FloatingOffset, component.AnimationKey, component.AnimationTime);
}
}
}
+
+ private void OnShutdown(Entity<AnomalySupercriticalComponent> ent, ref ComponentShutdown args)
+ {
+ if (!TryComp<SpriteComponent>(ent, out var sprite))
+ return;
+
+ sprite.Scale = Vector2.One;
+ sprite.Color = sprite.Color.WithAlpha(1f);
+ }
}