Skip to content

Commit

Permalink
фикс апстрима
Browse files Browse the repository at this point in the history
  • Loading branch information
VigersRay committed May 29, 2024
1 parent e4d1971 commit 70ceece
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Content.Server/_Sunrise/Synth/SynthSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ public sealed class SynthSystem : SharedSynthSystem

private ISawmill _sawmill = default!;

[ValidatePrototypeId<AlertPrototype>]
private const string SynthChargeAlert = "SynthCharge";

public override void Initialize()
{
base.Initialize();
Expand Down Expand Up @@ -284,7 +287,7 @@ private bool TryChangeEnergy(EntityUid uid, FixedPoint2 delta, SynthComponent? c

var severity = ContentHelpers.RoundToNearestLevels(MathF.Max(0f, component.Energy.Float()), component.MaxEnergy.Float(), 4);

_alerts.ShowAlert(uid, AlertType.SynthCharge, (short) severity);
_alerts.ShowAlert(uid, SynthChargeAlert, (short) severity);

var newEnergy = FixedPoint2.Clamp(component.Energy + delta, 0, component.MaxEnergy);

Expand Down

0 comments on commit 70ceece

Please sign in to comment.