EntitySystemMessage Removal & InteractionSystem directed events (#3572)
* Removed obsolete EntitySystemMessage, now everything uses the base EntityEventArgs or the derived HandledEntityEventArgs. Setup InteractionSystem to use new directed events. * Update Submodule.
This commit is contained in:
@@ -31,13 +31,8 @@ namespace Content.Shared.Interfaces.GameObjects.Components
|
||||
/// Raised when an entity is activated in the world.
|
||||
/// </summary>
|
||||
[PublicAPI]
|
||||
public class ActivateInWorldMessage : EntitySystemMessage
|
||||
public class ActivateInWorldMessage : HandledEntityEventArgs
|
||||
{
|
||||
/// <summary>
|
||||
/// If this message has already been "handled" by a previous system.
|
||||
/// </summary>
|
||||
public bool Handled { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Entity that activated the world entity.
|
||||
/// </summary>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#nullable enable
|
||||
#nullable enable
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using JetBrains.Annotations;
|
||||
@@ -50,13 +50,8 @@ namespace Content.Shared.Interfaces.GameObjects.Components
|
||||
/// Raised when clicking on another object and no attack event was handled.
|
||||
/// </summary>
|
||||
[PublicAPI]
|
||||
public class AfterInteractMessage : EntitySystemMessage
|
||||
public class AfterInteractMessage : HandledEntityEventArgs
|
||||
{
|
||||
/// <summary>
|
||||
/// If this message has already been "handled" by a previous system.
|
||||
/// </summary>
|
||||
public bool Handled { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Entity that triggered the attack.
|
||||
/// </summary>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#nullable enable
|
||||
#nullable enable
|
||||
using System;
|
||||
using Robust.Shared.Analyzers;
|
||||
using Robust.Shared.GameObjects;
|
||||
@@ -18,7 +18,7 @@ namespace Content.Shared.Interfaces.GameObjects.Components
|
||||
bool ClickAttack(AttackEventArgs eventArgs);
|
||||
}
|
||||
|
||||
public class AttackEventArgs : EventArgs
|
||||
public class AttackEventArgs : EntityEventArgs
|
||||
{
|
||||
public AttackEventArgs(IEntity user, EntityCoordinates clickLocation, bool wideAttack, EntityUid target = default)
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#nullable enable
|
||||
#nullable enable
|
||||
using System;
|
||||
using Robust.Shared.Analyzers;
|
||||
using Robust.Shared.GameObjects;
|
||||
@@ -58,7 +58,7 @@ namespace Content.Shared.Interfaces.GameObjects.Components
|
||||
}
|
||||
}
|
||||
|
||||
public class StartDragDropEventArgs : EventArgs
|
||||
public class StartDragDropEventArgs : EntityEventArgs
|
||||
{
|
||||
/// <summary>
|
||||
/// Creates a new instance of <see cref="StartDragDropEventArgs"/>.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#nullable enable
|
||||
#nullable enable
|
||||
using System;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Shared.Analyzers;
|
||||
@@ -32,13 +32,8 @@ namespace Content.Shared.Interfaces.GameObjects.Components
|
||||
/// Raised when an entity is dropped
|
||||
/// </summary>
|
||||
[PublicAPI]
|
||||
public class DroppedMessage : EntitySystemMessage
|
||||
public class DroppedMessage : HandledEntityEventArgs
|
||||
{
|
||||
/// <summary>
|
||||
/// If this message has already been "handled" by a previous system.
|
||||
/// </summary>
|
||||
public bool Handled { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Entity that dropped the item.
|
||||
/// </summary>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#nullable enable
|
||||
#nullable enable
|
||||
using System;
|
||||
using Content.Shared.GameObjects.Components.Inventory;
|
||||
using JetBrains.Annotations;
|
||||
@@ -45,13 +45,8 @@ namespace Content.Shared.Interfaces.GameObjects.Components
|
||||
/// Raised when equipping the entity in an inventory slot.
|
||||
/// </summary>
|
||||
[PublicAPI]
|
||||
public class EquippedMessage : EntitySystemMessage
|
||||
public class EquippedMessage : HandledEntityEventArgs
|
||||
{
|
||||
/// <summary>
|
||||
/// If this message has already been "handled" by a previous system.
|
||||
/// </summary>
|
||||
public bool Handled { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Entity that equipped the item.
|
||||
/// </summary>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#nullable enable
|
||||
#nullable enable
|
||||
using Content.Shared.GameObjects.Components.Items;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Shared.Analyzers;
|
||||
@@ -32,13 +32,8 @@ namespace Content.Shared.Interfaces.GameObjects.Components
|
||||
/// Raised when putting the entity into a hand slot
|
||||
/// </summary>
|
||||
[PublicAPI]
|
||||
public class EquippedHandMessage : EntitySystemMessage
|
||||
public class EquippedHandMessage : HandledEntityEventArgs
|
||||
{
|
||||
/// <summary>
|
||||
/// If this message has already been "handled" by a previous system.
|
||||
/// </summary>
|
||||
public bool Handled { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Entity that equipped the item.
|
||||
/// </summary>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#nullable enable
|
||||
#nullable enable
|
||||
using System;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Shared.Analyzers;
|
||||
@@ -29,13 +29,8 @@ namespace Content.Shared.Interfaces.GameObjects.Components
|
||||
/// Raised when an entity item in a hand is deselected.
|
||||
/// </summary>
|
||||
[PublicAPI]
|
||||
public class HandDeselectedMessage : EntitySystemMessage
|
||||
public class HandDeselectedMessage : HandledEntityEventArgs
|
||||
{
|
||||
/// <summary>
|
||||
/// If this message has already been "handled" by a previous system.
|
||||
/// </summary>
|
||||
public bool Handled { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Entity that owns the deselected hand.
|
||||
/// </summary>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#nullable enable
|
||||
#nullable enable
|
||||
using System;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Shared.Analyzers;
|
||||
@@ -29,13 +29,8 @@ namespace Content.Shared.Interfaces.GameObjects.Components
|
||||
/// Raised when an entity item in a hand is selected.
|
||||
/// </summary>
|
||||
[PublicAPI]
|
||||
public class HandSelectedMessage : EntitySystemMessage
|
||||
public class HandSelectedMessage : HandledEntityEventArgs
|
||||
{
|
||||
/// <summary>
|
||||
/// If this message has already been "handled" by a previous system.
|
||||
/// </summary>
|
||||
public bool Handled { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Entity that owns the selected hand.
|
||||
/// </summary>
|
||||
|
||||
@@ -29,13 +29,8 @@ namespace Content.Shared.Interfaces.GameObjects.Components
|
||||
/// Raised when being clicked on or "attacked" by a user with an empty hand.
|
||||
/// </summary>
|
||||
[PublicAPI]
|
||||
public class AttackHandMessage : EntitySystemMessage
|
||||
public class AttackHandMessage : HandledEntityEventArgs
|
||||
{
|
||||
/// <summary>
|
||||
/// If this message has already been "handled" by a previous system.
|
||||
/// </summary>
|
||||
public bool Handled { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Entity that triggered the attack.
|
||||
/// </summary>
|
||||
|
||||
@@ -39,13 +39,8 @@ namespace Content.Shared.Interfaces.GameObjects.Components
|
||||
/// Raised when being clicked on or "attacked" by a user with an object in their hand
|
||||
/// </summary>
|
||||
[PublicAPI]
|
||||
public class InteractUsingMessage : EntitySystemMessage
|
||||
public class InteractUsingMessage : HandledEntityEventArgs
|
||||
{
|
||||
/// <summary>
|
||||
/// If this message has already been "handled" by a previous system.
|
||||
/// </summary>
|
||||
public bool Handled { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Entity that triggered the attack.
|
||||
/// </summary>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#nullable enable
|
||||
#nullable enable
|
||||
using System;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Shared.Analyzers;
|
||||
@@ -32,13 +32,8 @@ namespace Content.Shared.Interfaces.GameObjects.Components
|
||||
/// Raised when an entity that was thrown lands.
|
||||
/// </summary>
|
||||
[PublicAPI]
|
||||
public class LandMessage : EntitySystemMessage
|
||||
public class LandMessage : HandledEntityEventArgs
|
||||
{
|
||||
/// <summary>
|
||||
/// If this message has already been "handled" by a previous system.
|
||||
/// </summary>
|
||||
public bool Handled { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Entity that threw the item.
|
||||
/// </summary>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Shared.Analyzers;
|
||||
using Robust.Shared.GameObjects;
|
||||
@@ -32,13 +32,8 @@ namespace Content.Shared.Interfaces.GameObjects.Components
|
||||
/// Raised when being clicked by objects outside the range of direct use.
|
||||
/// </summary>
|
||||
[PublicAPI]
|
||||
public class RangedInteractMessage : EntitySystemMessage
|
||||
public class RangedInteractMessage : HandledEntityEventArgs
|
||||
{
|
||||
/// <summary>
|
||||
/// If this message has already been "handled" by a previous system.
|
||||
/// </summary>
|
||||
public bool Handled { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Entity that triggered the attack.
|
||||
/// </summary>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#nullable enable
|
||||
#nullable enable
|
||||
using System;
|
||||
using Robust.Shared.Analyzers;
|
||||
using Robust.Shared.GameObjects;
|
||||
@@ -38,13 +38,8 @@ namespace Content.Shared.Interfaces.GameObjects.Components
|
||||
}
|
||||
}
|
||||
|
||||
public class ThrowCollideMessage : EntitySystemMessage
|
||||
public class ThrowCollideMessage : HandledEntityEventArgs
|
||||
{
|
||||
/// <summary>
|
||||
/// If this message has already been "handled" by a previous system.
|
||||
/// </summary>
|
||||
public bool Handled { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The entity that threw <see cref="Thrown"/>.
|
||||
/// </summary>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#nullable enable
|
||||
#nullable enable
|
||||
using System;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Shared.Analyzers;
|
||||
@@ -29,13 +29,8 @@ namespace Content.Shared.Interfaces.GameObjects.Components
|
||||
/// Raised when throwing the entity in your hands.
|
||||
/// </summary>
|
||||
[PublicAPI]
|
||||
public class ThrownMessage : EntitySystemMessage
|
||||
public class ThrownMessage : HandledEntityEventArgs
|
||||
{
|
||||
/// <summary>
|
||||
/// If this message has already been "handled" by a previous system.
|
||||
/// </summary>
|
||||
public bool Handled { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Entity that threw the item.
|
||||
/// </summary>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#nullable enable
|
||||
#nullable enable
|
||||
using Content.Shared.GameObjects.Components.Inventory;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Shared.Analyzers;
|
||||
@@ -34,13 +34,8 @@ namespace Content.Shared.Interfaces.GameObjects.Components
|
||||
/// Raised when removing the entity from an inventory slot.
|
||||
/// </summary>
|
||||
[PublicAPI]
|
||||
public class UnequippedMessage : EntitySystemMessage
|
||||
public class UnequippedMessage : HandledEntityEventArgs
|
||||
{
|
||||
/// <summary>
|
||||
/// If this message has already been "handled" by a previous system.
|
||||
/// </summary>
|
||||
public bool Handled { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Entity that equipped the item.
|
||||
/// </summary>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#nullable enable
|
||||
#nullable enable
|
||||
using Content.Shared.GameObjects.Components.Items;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Shared.Analyzers;
|
||||
@@ -31,13 +31,8 @@ namespace Content.Shared.Interfaces.GameObjects.Components
|
||||
/// Raised when removing the entity from an inventory slot.
|
||||
/// </summary>
|
||||
[PublicAPI]
|
||||
public class UnequippedHandMessage : EntitySystemMessage
|
||||
public class UnequippedHandMessage : HandledEntityEventArgs
|
||||
{
|
||||
/// <summary>
|
||||
/// If this message has already been "handled" by a previous system.
|
||||
/// </summary>
|
||||
public bool Handled { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Entity that equipped the item.
|
||||
/// </summary>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Shared.Analyzers;
|
||||
using Robust.Shared.GameObjects;
|
||||
@@ -28,13 +28,8 @@ namespace Content.Shared.Interfaces.GameObjects.Components
|
||||
/// Raised when using the entity in your hands.
|
||||
/// </summary>
|
||||
[PublicAPI]
|
||||
public class UseInHandMessage : EntitySystemMessage
|
||||
public class UseInHandMessage : HandledEntityEventArgs
|
||||
{
|
||||
/// <summary>
|
||||
/// If this message has already been "handled" by a previous system.
|
||||
/// </summary>
|
||||
public bool Handled { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Entity holding the item in their hand.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user