earrape fix

This commit is contained in:
Ed
2025-09-06 13:19:18 +03:00
parent 9d3162585c
commit 89e4b6e4ed
2 changed files with 4 additions and 1 deletions

View File

@@ -4,6 +4,7 @@ using Content.Shared._CP14.MagicEnergy.Components;
using Content.Shared.Damage;
using Content.Shared.Mobs.Components;
using Content.Shared.Mobs.Systems;
using Robust.Shared.Timing;
namespace Content.Server._CP14.MagicEnergy;
@@ -11,6 +12,7 @@ public partial class CP14MagicEnergySystem
{
[Dependency] private readonly MobStateSystem _mobState = default!;
[Dependency] private readonly CP14DayCycleSystem _dayCycle = default!;
[Dependency] private readonly IGameTiming _timing = default!;
private void InitializeDraw()
{
@@ -60,7 +62,7 @@ public partial class CP14MagicEnergySystem
if (TryComp<MobStateComponent>(uid, out var mobState) && !_mobState.IsAlive(uid, mobState))
continue;
draw.NextUpdateTime += TimeSpan.FromSeconds(draw.Delay);
draw.NextUpdateTime = _timing.CurTime + TimeSpan.FromSeconds(draw.Delay);
ChangeEnergy((uid, magicContainer), draw.Energy, out _, out _, draw.Safe);
}

View File

@@ -49,6 +49,7 @@ public sealed partial class CP14RoundEndSystem : EntitySystem
_chatSystem.DispatchGlobalAnnouncement(Loc.GetString("cp14-round-end"),
announcementSound: new SoundPathSpecifier("/Audio/_CP14/Announce/event_boom.ogg"));
_roundEnd.EndRound();
_roundEndMoment = TimeSpan.Zero;
}
private void OnFinisherMagicEnergyLevelChange(Entity<CP14MagicContainerRoundFinisherComponent> ent,