2021-10-29 01:18:43 -07:00
|
|
|
using Robust.Shared.Map;
|
|
|
|
|
|
|
|
|
|
namespace Content.Server.Atmos.EntitySystems
|
|
|
|
|
{
|
|
|
|
|
/* doesn't seem to be a use for this at the moment, so it's disabled
|
2022-02-16 00:23:23 -07:00
|
|
|
public sealed class AtmosExposedSystem : EntitySystem
|
2021-10-29 01:18:43 -07:00
|
|
|
{}
|
|
|
|
|
*/
|
|
|
|
|
|
2021-12-27 18:50:43 +01:00
|
|
|
[ByRefEvent]
|
2021-10-29 01:18:43 -07:00
|
|
|
public readonly struct AtmosExposedUpdateEvent
|
|
|
|
|
{
|
|
|
|
|
public readonly EntityCoordinates Coordinates;
|
|
|
|
|
public readonly GasMixture GasMixture;
|
2022-07-04 16:51:34 +02:00
|
|
|
public readonly TransformComponent Transform;
|
2021-10-29 01:18:43 -07:00
|
|
|
|
2022-07-04 16:51:34 +02:00
|
|
|
public AtmosExposedUpdateEvent(EntityCoordinates coordinates, GasMixture mixture, TransformComponent transform)
|
2021-10-29 01:18:43 -07:00
|
|
|
{
|
|
|
|
|
Coordinates = coordinates;
|
|
|
|
|
GasMixture = mixture;
|
2022-07-04 16:51:34 +02:00
|
|
|
Transform = transform;
|
2021-10-29 01:18:43 -07:00
|
|
|
}
|
|
|
|
|
}
|
2022-02-19 17:42:01 -07:00
|
|
|
|
2022-07-04 16:51:34 +02:00
|
|
|
/// <summary>
|
|
|
|
|
/// Event that tries to query the mixture a certain entity is exposed to.
|
|
|
|
|
/// </summary>
|
2022-02-19 17:42:01 -07:00
|
|
|
[ByRefEvent]
|
|
|
|
|
public struct AtmosExposedGetAirEvent
|
|
|
|
|
{
|
2022-07-04 16:51:34 +02:00
|
|
|
/// <summary>
|
|
|
|
|
/// The entity we want to query this for.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public readonly EntityUid Entity;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// The mixture that the entity is exposed to. Output parameter.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public GasMixture? Gas = null;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Whether to invalidate the mixture, if possible.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public bool Invalidate = false;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Whether this event has been handled or not.
|
|
|
|
|
/// Check this before changing anything.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public bool Handled = false;
|
|
|
|
|
|
|
|
|
|
public AtmosExposedGetAirEvent(EntityUid entity, bool invalidate = false)
|
|
|
|
|
{
|
|
|
|
|
Entity = entity;
|
2022-08-14 07:28:34 +02:00
|
|
|
Invalidate = invalidate;
|
2022-07-04 16:51:34 +02:00
|
|
|
}
|
2022-02-19 17:42:01 -07:00
|
|
|
}
|
2021-10-29 01:18:43 -07:00
|
|
|
}
|