Minor comp message removal (#6733)

This commit is contained in:
mirrorcult
2022-02-15 20:04:33 -07:00
committed by GitHub
parent 9d422d0762
commit e427381be6
9 changed files with 19 additions and 190 deletions

View File

@@ -59,69 +59,15 @@ namespace Content.Shared.Buckle.Components
public int? DrawDepth;
}
public sealed class BuckleChangeEvent : EntityEventArgs
{
public EntityUid Strap;
public bool Buckling;
}
[Serializable, NetSerializable]
public enum BuckleVisuals
{
Buckled
}
[Serializable, NetSerializable]
#pragma warning disable 618
public abstract class BuckleChangeMessage : ComponentMessage
#pragma warning restore 618
{
/// <summary>
/// Constructs a new instance of <see cref="BuckleChangeMessage"/>
/// </summary>
/// <param name="entity">The entity that had its buckling status changed</param>
/// <param name="strap">The strap that the entity was buckled to or unbuckled from</param>
/// <param name="buckled">True if the entity was buckled, false otherwise</param>
protected BuckleChangeMessage(EntityUid entity, EntityUid strap, bool buckled)
{
Entity = entity;
Strap = strap;
Buckled = buckled;
}
/// <summary>
/// The entity that had its buckling status changed
/// </summary>
public EntityUid Entity { get; }
/// <summary>
/// The strap that the entity was buckled to or unbuckled from
/// </summary>
public EntityUid Strap { get; }
/// <summary>
/// True if the entity was buckled, false otherwise.
/// </summary>
public bool Buckled { get; }
}
[Serializable, NetSerializable]
public class BuckleMessage : BuckleChangeMessage
{
/// <summary>
/// Constructs a new instance of <see cref="BuckleMessage"/>
/// </summary>
/// <param name="entity">The entity that had its buckling status changed</param>
/// <param name="strap">The strap that the entity was buckled to or unbuckled from</param>
public BuckleMessage(EntityUid entity, EntityUid strap) : base(entity, strap, true)
{
}
}
[Serializable, NetSerializable]
public class UnbuckleMessage : BuckleChangeMessage
{
/// <summary>
/// Constructs a new instance of <see cref="UnbuckleMessage"/>
/// </summary>
/// <param name="entity">The entity that had its buckling status changed</param>
/// <param name="strap">The strap that the entity was buckled to or unbuckled from</param>
public UnbuckleMessage(EntityUid entity, EntityUid strap) : base(entity, strap, false)
{
}
}
}

View File

@@ -60,65 +60,4 @@ namespace Content.Shared.Buckle.Components
RotationAngle,
BuckledState
}
// TODO : Convert this to an Entity Message. Careful, it will Break ShuttleControllerComponent (only place where it's used)
[Serializable, NetSerializable]
#pragma warning disable 618
public abstract class StrapChangeMessage : ComponentMessage
#pragma warning restore 618
{
/// <summary>
/// Constructs a new instance of <see cref="StrapChangeMessage"/>
/// </summary>
/// <param name="entity">The entity that had its buckling status changed</param>
/// <param name="strap">The strap that the entity was buckled to or unbuckled from</param>
/// <param name="buckled">True if the entity was buckled, false otherwise</param>
protected StrapChangeMessage(EntityUid entity, EntityUid strap, bool buckled)
{
Entity = entity;
Strap = strap;
Buckled = buckled;
}
/// <summary>
/// The entity that had its buckling status changed
/// </summary>
public EntityUid Entity { get; }
/// <summary>
/// The strap that the entity was buckled to or unbuckled from
/// </summary>
public EntityUid Strap { get; }
/// <summary>
/// True if the entity was buckled, false otherwise.
/// </summary>
public bool Buckled { get; }
}
[Serializable, NetSerializable]
public class StrapMessage : StrapChangeMessage
{
/// <summary>
/// Constructs a new instance of <see cref="StrapMessage"/>
/// </summary>
/// <param name="entity">The entity that had its buckling status changed</param>
/// <param name="strap">The strap that the entity was buckled to or unbuckled from</param>
public StrapMessage(EntityUid entity, EntityUid strap) : base(entity, strap, true)
{
}
}
[Serializable, NetSerializable]
public class UnStrapMessage : StrapChangeMessage
{
/// <summary>
/// Constructs a new instance of <see cref="UnStrapMessage"/>
/// </summary>
/// <param name="entity">The entity that had its buckling status changed</param>
/// <param name="strap">The strap that the entity was buckled to or unbuckled from</param>
public UnStrapMessage(EntityUid entity, EntityUid strap) : base(entity, strap, false)
{
}
}
}

View File

@@ -18,21 +18,6 @@ namespace Content.Shared.Configurable
}
}
/// <summary>
/// Message sent to other components on this entity when DeviceNetwork configuration updated.
/// </summary>
#pragma warning disable 618
public class ConfigUpdatedComponentMessage : ComponentMessage
#pragma warning restore 618
{
public Dictionary<string, string> Config { get; }
public ConfigUpdatedComponentMessage(Dictionary<string, string> config)
{
Config = config;
}
}
/// <summary>
/// Message data sent from client to server when the device configuration is updated.
/// </summary>

View File

@@ -1,22 +0,0 @@
using System;
using Robust.Shared.GameObjects;
using Robust.Shared.Serialization;
namespace Content.Shared.Singularity
{
[Serializable, NetSerializable]
#pragma warning disable 618
public class SingularitySoundMessage : ComponentMessage
#pragma warning restore 618
{
public bool Start { get; }
public SingularitySoundMessage(bool start)
{
Directed = true;
Start = start;
}
}
}