Files
tbd-station-14/Content.Shared/Explosion/Components/ExplosionVisualsComponent.cs
Aexxie 467e983ba9 Move grenade components to shared (#22691)
* Moves FlashComponent.cs, FlashOnTriggerComponent.cs, and SmokeOnTriggerComponent.cs to Shared

* Moves ExplodeOnTriggerComponent.cs, OnUseTimerTriggerComponent.cs, ActiveTimerTriggerComponent.cs, and SmokeOnTriggerComponent.cs to Shared

* Delete .run/Content Server+Client.run.xml

HOW DID THIS GET IN HERE ITS NOT AHHHH

* Update Content.Client/Explosion/SmokeOnTriggerSystem.cs

Co-authored-by: DrSmugleaf <DrSmugleaf@users.noreply.github.com>

* Update Content.Shared/Explosion/Components/ActiveTimerTriggerComponent.cs

Co-authored-by: DrSmugleaf <DrSmugleaf@users.noreply.github.com>

* Update Content.Shared/Explosion/Components/OnUseTimerTriggerComponent.cs

Co-authored-by: DrSmugleaf <DrSmugleaf@users.noreply.github.com>

* Update Content.Shared/Explosion/Components/OnUseTimerTriggerComponent.cs

Co-authored-by: DrSmugleaf <DrSmugleaf@users.noreply.github.com>

* Update Content.Shared/Explosion/EntitySystems/SharedTriggerSystem.cs

Co-authored-by: DrSmugleaf <DrSmugleaf@users.noreply.github.com>

* Update Content.Shared/Explosion/EntitySystems/SharedSmokeOnTriggerSystem.cs

Co-authored-by: DrSmugleaf <DrSmugleaf@users.noreply.github.com>

* Update ExplodeOnTriggerComponent.cs

* Revert "Delete .run/Content Server+Client.run.xml"

This reverts commit 29ee05f57de60eab5c92158d8eba5e3acba483c2.

* Fix?

* cannot figure out how to get this to go back please forgive

* Fixes a network issue

* leftovers

* Fixes

---------

Co-authored-by: DrSmugleaf <DrSmugleaf@users.noreply.github.com>
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
2024-02-02 00:29:01 +11:00

57 lines
1.8 KiB
C#

using Robust.Shared.GameStates;
using Robust.Shared.Map;
using Robust.Shared.Serialization;
namespace Content.Shared.Explosion.Components;
/// <summary>
/// Component that is used to send explosion overlay/visual data to an abstract explosion entity.
/// </summary>
[RegisterComponent, NetworkedComponent]
public sealed partial class ExplosionVisualsComponent : Component
{
public MapCoordinates Epicenter;
public Dictionary<int, List<Vector2i>>? SpaceTiles;
public Dictionary<EntityUid, Dictionary<int, List<Vector2i>>> Tiles = new();
public List<float> Intensity = new();
public string ExplosionType = string.Empty;
public Matrix3 SpaceMatrix;
public ushort SpaceTileSize;
}
[Serializable, NetSerializable]
public sealed class ExplosionVisualsState : ComponentState
{
public MapCoordinates Epicenter;
public Dictionary<int, List<Vector2i>>? SpaceTiles;
public Dictionary<NetEntity, Dictionary<int, List<Vector2i>>> Tiles;
public List<float> Intensity;
public string ExplosionType = string.Empty;
public Matrix3 SpaceMatrix;
public ushort SpaceTileSize;
public ExplosionVisualsState(
MapCoordinates epicenter,
string typeID,
List<float> intensity,
Dictionary<int, List<Vector2i>>? spaceTiles,
Dictionary<NetEntity, Dictionary<int, List<Vector2i>>> tiles,
Matrix3 spaceMatrix,
ushort spaceTileSize)
{
Epicenter = epicenter;
SpaceTiles = spaceTiles;
Tiles = tiles;
Intensity = intensity;
ExplosionType = typeID;
SpaceMatrix = spaceMatrix;
SpaceTileSize = spaceTileSize;
}
}
[Serializable, NetSerializable]
public enum ExplosionAppearanceData
{
Progress, // iteration index tracker for explosions that are still expanding outwards,
}