Improve on disposal routing code (#1795)

Co-authored-by: Julian Giebel <j.giebel@netrocks.info>
This commit is contained in:
Julian Giebel
2020-08-19 20:43:56 +02:00
committed by GitHub
parent 20ab566f8c
commit 7771f58460
8 changed files with 23 additions and 31 deletions

View File

@@ -78,16 +78,16 @@ namespace Content.Server.GameObjects.Components.Disposal
if (!PlayerCanUseDisposalTagger(obj.Session.AttachedEntity))
return;
if (msg.Action == UiAction.Ok)
//Check for correct message and ignore maleformed strings
if (msg.Action == UiAction.Ok && TagRegex.IsMatch(msg.Tags))
{
_tags.Clear();
foreach (var tag in msg.Tags.Split(',', StringSplitOptions.RemoveEmptyEntries))
{
_tags.Add(tag.Trim());
ClickSound();
}
}
ClickSound();
}
/// <summary>