Fix more errors, client and server now build

This commit is contained in:
DrSmugleaf
2021-12-06 14:00:39 +01:00
parent 525297c5fe
commit af4eb3c7cd
32 changed files with 94 additions and 97 deletions

View File

@@ -56,17 +56,17 @@ namespace Content.Server.Chat.Commands
return;
}
if (mindComponent.OwnedEntity == default)
if (mindComponent.OwnedEntity is not {Valid: true} owned)
{
shell.WriteError("You don't have an entity!");
return;
}
var emote = chatSanitizer.TrySanitizeOutSmilies(message, mindComponent.OwnedEntity.Value, out var sanitized, out var emoteStr);
var emote = chatSanitizer.TrySanitizeOutSmilies(message, owned, out var sanitized, out var emoteStr);
if (sanitized.Length != 0)
chat.EntitySay(mindComponent.OwnedEntity.Value, sanitized);
chat.EntitySay(owned, sanitized);
if (emote)
chat.EntityMe(mindComponent.OwnedEntity.Value, emoteStr!);
chat.EntityMe(owned, emoteStr!);
}
}