Mana no longer regenerates after death (#1027)
* Update CP14MagicEnergySystem.Draw.cs * :nerd: * Update CP14MagicEnergySystem.Draw.cs * Update CP14MagicEnergySystem.Draw.cs * oops... --------- Co-authored-by: Ed <96445749+TheShuEd@users.noreply.github.com>
This commit is contained in:
@@ -1,12 +1,16 @@
|
||||
using Content.Server._CP14.MagicEnergy.Components;
|
||||
using Content.Shared._CP14.MagicEnergy.Components;
|
||||
using Content.Shared.Damage;
|
||||
using Content.Shared.Mobs.Components;
|
||||
using Content.Shared.Mobs.Systems;
|
||||
using Robust.Shared.Map.Components;
|
||||
|
||||
namespace Content.Server._CP14.MagicEnergy;
|
||||
|
||||
public partial class CP14MagicEnergySystem
|
||||
{
|
||||
[Dependency] private readonly MobStateSystem _mobState = default!;
|
||||
|
||||
private void InitializeDraw()
|
||||
{
|
||||
SubscribeLocalEvent<CP14MagicEnergyDrawComponent, MapInitEvent>(OnDrawMapInit);
|
||||
@@ -52,6 +56,9 @@ public partial class CP14MagicEnergySystem
|
||||
if (draw.NextUpdateTime >= _gameTiming.CurTime)
|
||||
continue;
|
||||
|
||||
if (TryComp<MobStateComponent>(uid, out var mobState) && !_mobState.IsAlive(uid, mobState))
|
||||
continue;
|
||||
|
||||
draw.NextUpdateTime = _gameTiming.CurTime + TimeSpan.FromSeconds(draw.Delay);
|
||||
|
||||
ChangeEnergy(uid, draw.Energy, out _, out _, magicContainer, draw.Safe);
|
||||
@@ -63,6 +70,9 @@ public partial class CP14MagicEnergySystem
|
||||
if (draw.NextUpdateTime >= _gameTiming.CurTime)
|
||||
continue;
|
||||
|
||||
if (TryComp<MobStateComponent>(uid, out var mobState) && !_mobState.IsAlive(uid, mobState))
|
||||
continue;
|
||||
|
||||
draw.NextUpdateTime = _gameTiming.CurTime + TimeSpan.FromSeconds(draw.Delay);
|
||||
|
||||
var daylight = false;
|
||||
|
||||
Reference in New Issue
Block a user