From 5c2152c30949cc9f047256a86de4fa472d5e4efc Mon Sep 17 00:00:00 2001 From: FaDeOkno <143940725+FaDeOkno@users.noreply.github.com> Date: Tue, 10 Sep 2024 12:04:03 +0400 Subject: [PATCH] Update ShadekinSystem.cs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Может поможет А может и нет --- Content.Server/ADT/Shadekin/ShadekinSystem.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Content.Server/ADT/Shadekin/ShadekinSystem.cs b/Content.Server/ADT/Shadekin/ShadekinSystem.cs index ce982d64cb5..1a44502f629 100644 --- a/Content.Server/ADT/Shadekin/ShadekinSystem.cs +++ b/Content.Server/ADT/Shadekin/ShadekinSystem.cs @@ -44,10 +44,10 @@ public override void Initialize() SubscribeLocalEvent(OnTeleport); SubscribeLocalEvent(OnExamine); - SubscribeLocalEvent(OnMapInit); + SubscribeLocalEvent(OnInit); SubscribeLocalEvent(OnShutdown); - SubscribeLocalEvent(OnProfileLoaded); + SubscribeLocalEvent(OnMapInit); } public override void Update(float frameTime) @@ -84,7 +84,7 @@ public override void Update(float frameTime) } } - private void OnMapInit(EntityUid uid, ShadekinComponent comp, ComponentInit args) + private void OnInit(EntityUid uid, ShadekinComponent comp, ComponentInit args) { _alert.ShowAlert(uid, _proto.Index("ShadekinPower"), (short) Math.Clamp(Math.Round(comp.PowerLevel / 50f), 0, 4)); } @@ -96,7 +96,7 @@ private void OnShutdown(EntityUid uid, ShadekinComponent comp, ComponentShutdown _action.RemoveAction(uid, comp.ActionEntity); } - private void OnProfileLoaded(EntityUid uid, ShadekinComponent comp, ref HumanoidProfileLoadedEvent args) + private void OnMapInit(EntityUid uid, ShadekinComponent comp, MapInitEvent args) { // if ( // Оно очень странно получается, работает только при позднем подключении // args.Profile.Appearance.EyeColor.B < 100f &&