Revert "Actions Rework" (#6888)
This commit is contained in:
@@ -1,23 +0,0 @@
|
||||
using Content.Shared.Actions;
|
||||
using Robust.Shared.Reflection;
|
||||
using Robust.Shared.Serialization;
|
||||
|
||||
namespace Content.Server.UserInterface;
|
||||
|
||||
public sealed class OpenUiActionEvent : PerformActionEvent, ISerializationHooks
|
||||
{
|
||||
[ViewVariables]
|
||||
public Enum? Key { get; set; }
|
||||
|
||||
[DataField("key", readOnly: true, required: true)]
|
||||
private string _keyRaw = default!;
|
||||
|
||||
void ISerializationHooks.AfterDeserialization()
|
||||
{
|
||||
var reflectionManager = IoCManager.Resolve<IReflectionManager>();
|
||||
if (reflectionManager.TryParseEnumReference(_keyRaw, out var key))
|
||||
Key = key;
|
||||
else
|
||||
Logger.Error($"Invalid UI key ({_keyRaw}) in open-UI action");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user