Files
tbd-station-14/Content.Shared/GameObjects/Components/Disposal/SharedDisposalRouterComponent.cs
Acruid ca4fd649fe Massive Namespace Cleanup (#3120)
* Engine namespace changes.

* Automated remove redundant using statements.

* Simplified Graphics namespace.

* Apparently the container system stores full type names in the map file.😞 This updates those names.

* API Changes to LocalizationManager.LoadCulture.

* Update submodule to v0.3.2
2021-02-11 01:13:03 -08:00

55 lines
1.4 KiB
C#

using System;
using System.Text.RegularExpressions;
using Robust.Shared.GameObjects;
using Robust.Shared.Serialization;
namespace Content.Shared.GameObjects.Components.Disposal
{
public class SharedDisposalRouterComponent : Component
{
public override string Name => "DisposalRouter";
public static readonly Regex TagRegex = new("^[a-zA-Z0-9, ]*$", RegexOptions.Compiled);
[Serializable, NetSerializable]
public class DisposalRouterUserInterfaceState : BoundUserInterfaceState
{
public readonly string Tags;
public DisposalRouterUserInterfaceState(string tags)
{
Tags = tags;
}
}
[Serializable, NetSerializable]
public 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
}
}
}