Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix debug v2 #449

Merged
merged 1 commit into from
Sep 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Content.Server/ADT/Shadekin/ShadekinSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ public override void Initialize()

SubscribeLocalEvent<ShadekinComponent, ShadekinTeleportActionEvent>(OnTeleport);
SubscribeLocalEvent<ShadekinComponent, ExaminedEvent>(OnExamine);
SubscribeLocalEvent<ShadekinComponent, ComponentInit>(OnMapInit);
SubscribeLocalEvent<ShadekinComponent, ComponentInit>(OnInit);
SubscribeLocalEvent<ShadekinComponent, ComponentShutdown>(OnShutdown);

SubscribeLocalEvent<ShadekinComponent, HumanoidProfileLoadedEvent>(OnProfileLoaded);
SubscribeLocalEvent<ShadekinComponent, MapInitEvent>(OnMapInit);
}

public override void Update(float frameTime)
Expand Down Expand Up @@ -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<AlertPrototype>("ShadekinPower"), (short) Math.Clamp(Math.Round(comp.PowerLevel / 50f), 0, 4));
}
Expand All @@ -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 &&
Expand Down
Loading