TriggerOnPlayerSpawnComplete and ExplosionOnTrigger (#39820)

This commit is contained in:
āda
2025-09-23 15:24:45 -05:00
committed by GitHub
parent 3ee7d81944
commit eee5751a22
7 changed files with 127 additions and 20 deletions

View File

@@ -0,0 +1,46 @@
using Content.Shared.Explosion;
using Content.Shared.Explosion.Components;
using Content.Shared.Explosion.EntitySystems;
using Robust.Shared.GameStates;
using Robust.Shared.Prototypes;
namespace Content.Shared.Trigger.Components.Effects;
// TODO some sort of struct like DamageSpecifier but for explosions.
/// <summary>
/// Will explode the entity using this component's explosion specifications.
/// If TargetUser is true, they'll explode instead.
/// The User will be logged in the admin logs.
/// </summary>
/// <seealso cref="ExplodeOnTriggerComponent"/>
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
public sealed partial class ExplosionOnTriggerComponent : BaseXOnTriggerComponent
{
/// <inheritdoc cref="ExplosiveComponent.ExplosionType"/>
[DataField, AutoNetworkedField]
public ProtoId<ExplosionPrototype> ExplosionType = SharedExplosionSystem.DefaultExplosionPrototypeId;
/// <inheritdoc cref="ExplosiveComponent.MaxIntensity"/>
[DataField, AutoNetworkedField]
public float MaxTileIntensity = 4;
/// <inheritdoc cref="ExplosiveComponent.IntensitySlope"/>
[DataField, AutoNetworkedField]
public float IntensitySlope = 1;
/// <inheritdoc cref="ExplosiveComponent.TotalIntensity"/>
[DataField, AutoNetworkedField]
public float TotalIntensity = 10;
/// <inheritdoc cref="ExplosiveComponent.TileBreakScale"/>
[DataField, AutoNetworkedField]
public float TileBreakScale = 1f;
/// <inheritdoc cref="ExplosiveComponent.MaxTileBreak"/>
[DataField, AutoNetworkedField]
public int MaxTileBreak = int.MaxValue;
/// <inheritdoc cref="ExplosiveComponent.CanCreateVacuum"/>
[DataField, AutoNetworkedField]
public bool CanCreateVacuum = true;
}