Skip to content

Commit

Permalink
SalvageMobRestrictions: don't warn/log safe mobs (#2552)
Browse files Browse the repository at this point in the history
  • Loading branch information
whatston3 authored Dec 12, 2024
1 parent f0338aa commit ce71708
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions Content.Server/_NF/Salvage/SalvageMobRestrictionsSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,8 @@ private void OnParentChanged(EntityUid uid, NFSalvageMobRestrictionsComponent co
if (actor.PlayerSession.AttachedEntity == null)
return;

_adminLogger.Add(LogType.AdminMessage, LogImpact.Low, $"{ToPrettyString(actor.PlayerSession.AttachedEntity.Value):player} returned to dungeon grid");
if (component.DespawnIfOffLinkedGrid)
_adminLogger.Add(LogType.AdminMessage, LogImpact.Low, $"{ToPrettyString(actor.PlayerSession.AttachedEntity.Value):player} returned to dungeon grid");
}
else
{
Expand All @@ -130,8 +131,11 @@ private void OnParentChanged(EntityUid uid, NFSalvageMobRestrictionsComponent co
if (actor.PlayerSession.AttachedEntity == null)
return;

_adminLogger.Add(LogType.AdminMessage, LogImpact.Low, $"{ToPrettyString(actor.PlayerSession.AttachedEntity.Value):player} left the dungeon grid");
_popupSystem.PopupEntity(popupMessage, actor.PlayerSession.AttachedEntity.Value, actor.PlayerSession, PopupType.MediumCaution);
if (component.DespawnIfOffLinkedGrid)
{
_adminLogger.Add(LogType.AdminMessage, LogImpact.Low, $"{ToPrettyString(actor.PlayerSession.AttachedEntity.Value):player} left the dungeon grid");
_popupSystem.PopupEntity(popupMessage, actor.PlayerSession.AttachedEntity.Value, actor.PlayerSession, PopupType.MediumCaution);
}
}
}

Expand Down

0 comments on commit ce71708

Please sign in to comment.