Files
tbd-station-14/Content.Shared/Interfaces/GameObjects/Components/Interaction/ILand.cs
Acruid ca4fd649fe Massive Namespace Cleanup (#3120)
* Engine namespace changes.

* Automated remove redundant using statements.

* Simplified Graphics namespace.

* Apparently the container system stores full type names in the map file.😞 This updates those names.

* API Changes to LocalizationManager.LoadCulture.

* Update submodule to v0.3.2
2021-02-11 01:13:03 -08:00

64 lines
1.7 KiB
C#

using System;
using JetBrains.Annotations;
using Robust.Shared.Analyzers;
using Robust.Shared.GameObjects;
using Robust.Shared.Map;
namespace Content.Shared.Interfaces.GameObjects.Components
{
/// <summary>
/// This interface gives components behavior when landing after being thrown.
/// </summary>
[RequiresExplicitImplementation]
public interface ILand
{
void Land(LandEventArgs eventArgs);
}
public class LandEventArgs : EventArgs
{
public LandEventArgs(IEntity user, EntityCoordinates landingLocation)
{
User = user;
LandingLocation = landingLocation;
}
public IEntity User { get; }
public EntityCoordinates LandingLocation { get; }
}
/// <summary>
/// Raised when an entity that was thrown lands.
/// </summary>
[PublicAPI]
public class LandMessage : EntitySystemMessage
{
/// <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>
public IEntity User { get; }
/// <summary>
/// Item that was thrown.
/// </summary>
public IEntity Thrown { get; }
/// <summary>
/// Location where the item landed.
/// </summary>
public EntityCoordinates LandLocation { get; }
public LandMessage(IEntity user, IEntity thrown, EntityCoordinates landLocation)
{
User = user;
Thrown = thrown;
LandLocation = landLocation;
}
}
}