Skip to content

Commit

Permalink
Switch logger errors to debug assertions
Browse files Browse the repository at this point in the history
  • Loading branch information
vaketola committed Feb 22, 2024
1 parent 90363d0 commit c691569
Showing 1 changed file with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using Content.Shared.SimpleStation14.Species.Shadowkin.Components;
using Content.Shared.SimpleStation14.Species.Shadowkin.Events;
using System.Threading.Tasks;
using Robust.Shared.Utility;

namespace Content.Server.SimpleStation14.Species.Shadowkin.Systems;

Expand Down Expand Up @@ -71,7 +72,7 @@ public void UpdateAlert(EntityUid uid, bool enabled, float? powerLevel = null)
// Get shadowkin component
if (!_entity.TryGetComponent<ShadowkinComponent>(uid, out var component))
{
Logger.ErrorS("ShadowkinPowerSystem", "Tried to update alert of entity without shadowkin component.");
DebugTools.Assert("Tried to update alert of entity without shadowkin component.");
return;
}

Expand Down Expand Up @@ -116,7 +117,7 @@ public void UpdatePowerLevel(EntityUid uid, float frameTime)
// Get shadowkin component
if (!_entity.TryGetComponent<ShadowkinComponent>(uid, out var component))
{
Logger.Error("Tried to update power level of entity without shadowkin component.");
DebugTools.Assert("Tried to update power level of entity without shadowkin component.");
return;
}

Expand Down Expand Up @@ -157,7 +158,7 @@ public void AddPowerLevel(EntityUid uid, float amount)
// Get shadowkin component
if (!_entity.TryGetComponent<ShadowkinComponent>(uid, out var component))
{
Logger.Error("Tried to add to power level of entity without shadowkin component.");
DebugTools.Assert("Tried to add to power level of entity without shadowkin component.");
return;
}

Expand All @@ -181,7 +182,7 @@ public void SetPowerLevel(EntityUid uid, float newPowerLevel)
// Get shadowkin component
if (!_entity.TryGetComponent<ShadowkinComponent>(uid, out var component))
{
Logger.Error("Tried to set power level of entity without shadowkin component.");
DebugTools.Assert("Tried to set power level of entity without shadowkin component.");
return;
}

Expand Down Expand Up @@ -218,7 +219,7 @@ public void Blackeye(EntityUid uid)
// Get shadowkin component
if (!_entity.TryGetComponent<ShadowkinComponent>(uid, out var component))
{
Logger.Error("Tried to blackeye entity without shadowkin component.");
DebugTools.Assert("Tried to blackeye entity without shadowkin component.");
return;
}

Expand Down Expand Up @@ -256,7 +257,7 @@ public void AddMultiplier(EntityUid uid, float multiplier, float? time = null)
// Get shadowkin component
if (!_entity.TryGetComponent<ShadowkinComponent>(uid, out var component))
{
Logger.Error("Tried to add multiplier to entity without shadowkin component.");
DebugTools.Assert("Tried to add multiplier to entity without shadowkin component.");
return;
}

Expand Down

0 comments on commit c691569

Please sign in to comment.