EntityStringRepresentation in logs correctly parse the EntityUid and player

This commit is contained in:
Vera Aguilera Puerto
2021-12-09 16:26:16 +01:00
parent c680d5b201
commit cd1b5f44e8

View File

@@ -57,6 +57,7 @@ public partial class AdminLogSystem
EntityUid? entityId = properties[key] switch EntityUid? entityId = properties[key] switch
{ {
EntityUid id => id, EntityUid id => id,
EntityStringRepresentation rep => rep.Uid,
IPlayerSession {AttachedEntity: {Valid: true}} session => session.AttachedEntity, IPlayerSession {AttachedEntity: {Valid: true}} session => session.AttachedEntity,
IComponent component => component.Owner, IComponent component => component.Owner,
_ => null _ => null