Re-organize all projects (#4166)
This commit is contained in:
70
Content.Shared/Verbs/VerbSystemMessages.cs
Normal file
70
Content.Shared/Verbs/VerbSystemMessages.cs
Normal file
@@ -0,0 +1,70 @@
|
||||
#nullable enable
|
||||
using System;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.Serialization;
|
||||
using Robust.Shared.Utility;
|
||||
|
||||
namespace Content.Shared.Verbs
|
||||
{
|
||||
public static class VerbSystemMessages
|
||||
{
|
||||
[Serializable, NetSerializable]
|
||||
public class RequestVerbsMessage : EntityEventArgs
|
||||
{
|
||||
public readonly EntityUid EntityUid;
|
||||
|
||||
public RequestVerbsMessage(EntityUid entityUid)
|
||||
{
|
||||
EntityUid = entityUid;
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
public class VerbsResponseMessage : EntityEventArgs
|
||||
{
|
||||
public readonly NetVerbData[] Verbs;
|
||||
public readonly EntityUid Entity;
|
||||
|
||||
public VerbsResponseMessage(NetVerbData[] verbs, EntityUid entity)
|
||||
{
|
||||
Verbs = verbs;
|
||||
Entity = entity;
|
||||
}
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
public readonly struct NetVerbData
|
||||
{
|
||||
public readonly string Text;
|
||||
public readonly string Key;
|
||||
public readonly string Category;
|
||||
public readonly SpriteSpecifier? Icon;
|
||||
public readonly SpriteSpecifier? CategoryIcon;
|
||||
public readonly bool Available;
|
||||
|
||||
public NetVerbData(VerbData data, string key)
|
||||
{
|
||||
Text = data.Text;
|
||||
Key = key;
|
||||
Category = data.Category;
|
||||
CategoryIcon = data.CategoryIcon;
|
||||
Icon = data.Icon;
|
||||
Available = data.Visibility == VerbVisibility.Visible;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
public class UseVerbMessage : EntityEventArgs
|
||||
{
|
||||
public readonly EntityUid EntityUid;
|
||||
public readonly string VerbKey;
|
||||
|
||||
public UseVerbMessage(EntityUid entityUid, string verbKey)
|
||||
{
|
||||
EntityUid = entityUid;
|
||||
VerbKey = verbKey;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user