* Predict dumping - This got soaped really fucking hard. - Dumping is predicted, this required disposals to be predicte.d - Disposals required mailing (because it's tightly coupled), and a smidge of other content systems. - I also had to fix a compnetworkgenerator issue at the same time so it wouldn't mispredict. * Fix a bunch of stuff * nasty merge * Some reviews * Some more reviews while I stash * Fix merge * Fix merge * Half of review * Review * re(h)f * lizards * feexes * feex
51 lines
1.3 KiB
C#
51 lines
1.3 KiB
C#
using System.Text.RegularExpressions;
|
|
using Robust.Shared.Serialization;
|
|
|
|
namespace Content.Shared.Disposal.Components
|
|
{
|
|
public sealed partial class SharedDisposalRouterComponent : Component
|
|
{
|
|
public static readonly Regex TagRegex = new("^[a-zA-Z0-9, ]*$", RegexOptions.Compiled);
|
|
|
|
[Serializable, NetSerializable]
|
|
public sealed class DisposalRouterUserInterfaceState : BoundUserInterfaceState
|
|
{
|
|
public readonly string Tags;
|
|
|
|
public DisposalRouterUserInterfaceState(string tags)
|
|
{
|
|
Tags = tags;
|
|
}
|
|
}
|
|
|
|
[Serializable, NetSerializable]
|
|
public sealed class UiActionMessage : BoundUserInterfaceMessage
|
|
{
|
|
public readonly UiAction Action;
|
|
public readonly string Tags = "";
|
|
|
|
public UiActionMessage(UiAction action, string tags)
|
|
{
|
|
Action = action;
|
|
|
|
if (Action == UiAction.Ok)
|
|
{
|
|
Tags = tags.Substring(0, Math.Min(tags.Length, 150));
|
|
}
|
|
}
|
|
}
|
|
|
|
[Serializable, NetSerializable]
|
|
public enum UiAction
|
|
{
|
|
Ok
|
|
}
|
|
|
|
[Serializable, NetSerializable]
|
|
public enum DisposalRouterUiKey
|
|
{
|
|
Key
|
|
}
|
|
}
|
|
}
|