Co-authored-by: ShadowCommander <10494922+ShadowCommander@users.noreply.github.com>
This commit is contained in:
metalgearsloth
2022-01-30 17:39:46 +11:00
committed by GitHub
parent 26b6175a4b
commit b5724feb27
29 changed files with 2342 additions and 2337 deletions

View File

@@ -29,34 +29,16 @@ namespace Content.Shared.Weapons.Ranged.Components
}
/// <summary>
/// A component message raised when the weapon is fired at a position on the map.
/// An event raised when the weapon is fired at a position on the map by a client.
/// </summary>
[Serializable, NetSerializable]
#pragma warning disable 618
public sealed class FirePosComponentMessage : ComponentMessage
#pragma warning restore 618
public sealed class FirePosEvent : EntityEventArgs
{
/// <summary>
/// If this is not invalid, the target position is relative to the grid.
/// Otherwise, it is a map position.
/// </summary>
public GridId TargetGrid { get; }
public EntityCoordinates Coordinates;
/// <summary>
/// If Target Grid is not invalid, this is relative to the grid, otherwise
/// it is a map position.
/// </summary>
public Vector2 TargetPosition { get; }
/// <summary>
/// Constructs a new instance of <see cref="FirePosComponentMessage"/>.
/// </summary>
/// <param name="targetGrid">The grid that the target position is on, if any.</param>
/// <param name="targetPosition">Target position relative to the grid, or a map position if the grid is invalid.</param>
public FirePosComponentMessage(GridId targetGrid, Vector2 targetPosition)
public FirePosEvent(EntityCoordinates coordinates)
{
TargetGrid = targetGrid;
TargetPosition = targetPosition;
Coordinates = coordinates;
}
}
}

View File

@@ -8,7 +8,8 @@ namespace Content.Shared.Weapons.Ranged
/// This is sent if the MagazineBarrel AutoEjects the magazine
/// </summary>
[Serializable, NetSerializable]
#pragma warning disable 618
public sealed class MagazineAutoEjectMessage : ComponentMessage {}
#pragma warning restore 618
public sealed class MagazineAutoEjectEvent : EntityEventArgs
{
public EntityUid Uid;
}
}