From ed852b9944351348b72c0191d2a24761f2d2c76a Mon Sep 17 00:00:00 2001 From: Ed Date: Tue, 17 Sep 2024 22:32:06 +0300 Subject: [PATCH 1/3] no Demi Gods --- Content.Client/Anomaly/AnomalySystem.cs | 11 ++++++++++- Content.Shared/Anomaly/SharedAnomalySystem.cs | 2 ++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/Content.Client/Anomaly/AnomalySystem.cs b/Content.Client/Anomaly/AnomalySystem.cs index c93f0ce9490174..51212a6323436f 100644 --- a/Content.Client/Anomaly/AnomalySystem.cs +++ b/Content.Client/Anomaly/AnomalySystem.cs @@ -20,8 +20,9 @@ public override void Initialize() SubscribeLocalEvent(OnAppearanceChanged); SubscribeLocalEvent(OnStartup); SubscribeLocalEvent(OnAnimationComplete); - } + SubscribeLocalEvent(OnSupercriticalShutdown); + } private void OnStartup(EntityUid uid, AnomalyComponent component, ComponentStartup args) { _floating.FloatAnimation(uid, component.FloatingOffset, component.AnimationKey, component.AnimationTime); @@ -75,4 +76,12 @@ public override void Update(float frameTime) } } } + + private void OnSupercriticalShutdown(Entity ent, ref ComponentShutdown args) + { + if (!TryComp(ent, out var sprite)) + return; + + sprite.Scale = Vector2.One; + } } diff --git a/Content.Shared/Anomaly/SharedAnomalySystem.cs b/Content.Shared/Anomaly/SharedAnomalySystem.cs index 9a0cde29988cb3..b502c522cbdcd1 100644 --- a/Content.Shared/Anomaly/SharedAnomalySystem.cs +++ b/Content.Shared/Anomaly/SharedAnomalySystem.cs @@ -192,6 +192,8 @@ public void EndAnomaly(EntityUid uid, AnomalyComponent? component = null, bool s _transform.PlaceNextTo(core, uid); } + RemCompDeferred(uid); + if (component.DeleteEntity) QueueDel(uid); } From c814b40ac72017692b297be5d469c6e3428986f8 Mon Sep 17 00:00:00 2001 From: Ed Date: Tue, 17 Sep 2024 22:33:26 +0300 Subject: [PATCH 2/3] Update AnomalySystem.cs --- Content.Client/Anomaly/AnomalySystem.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Content.Client/Anomaly/AnomalySystem.cs b/Content.Client/Anomaly/AnomalySystem.cs index 51212a6323436f..9caf685a9591f3 100644 --- a/Content.Client/Anomaly/AnomalySystem.cs +++ b/Content.Client/Anomaly/AnomalySystem.cs @@ -83,5 +83,6 @@ private void OnSupercriticalShutdown(Entity ent, return; sprite.Scale = Vector2.One; + sprite.Color = sprite.Color.WithAlpha(1f); } } From a6e41a327a148f57088ba612064b86a237ae06ef Mon Sep 17 00:00:00 2001 From: Ed Date: Tue, 17 Sep 2024 23:23:14 +0300 Subject: [PATCH 3/3] ha --- Content.Client/Anomaly/AnomalySystem.cs | 4 ++-- Content.Shared/Anomaly/SharedAnomalySystem.cs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Content.Client/Anomaly/AnomalySystem.cs b/Content.Client/Anomaly/AnomalySystem.cs index 9caf685a9591f3..28c015f3021cdc 100644 --- a/Content.Client/Anomaly/AnomalySystem.cs +++ b/Content.Client/Anomaly/AnomalySystem.cs @@ -21,7 +21,7 @@ public override void Initialize() SubscribeLocalEvent(OnStartup); SubscribeLocalEvent(OnAnimationComplete); - SubscribeLocalEvent(OnSupercriticalShutdown); + SubscribeLocalEvent(OnShutdown); } private void OnStartup(EntityUid uid, AnomalyComponent component, ComponentStartup args) { @@ -77,7 +77,7 @@ public override void Update(float frameTime) } } - private void OnSupercriticalShutdown(Entity ent, ref ComponentShutdown args) + private void OnShutdown(Entity ent, ref ComponentShutdown args) { if (!TryComp(ent, out var sprite)) return; diff --git a/Content.Shared/Anomaly/SharedAnomalySystem.cs b/Content.Shared/Anomaly/SharedAnomalySystem.cs index b502c522cbdcd1..07beb1444d7653 100644 --- a/Content.Shared/Anomaly/SharedAnomalySystem.cs +++ b/Content.Shared/Anomaly/SharedAnomalySystem.cs @@ -192,10 +192,10 @@ public void EndAnomaly(EntityUid uid, AnomalyComponent? component = null, bool s _transform.PlaceNextTo(core, uid); } - RemCompDeferred(uid); - if (component.DeleteEntity) QueueDel(uid); + else + RemCompDeferred(uid); } ///