Glass tables break when climbed on (#6246)

This commit is contained in:
mirrorcult
2022-01-22 05:52:35 -07:00
committed by GitHub
parent 1819069427
commit 1880db9c75
6 changed files with 138 additions and 7 deletions

View File

@@ -0,0 +1,33 @@
using Content.Shared.Damage;
using Robust.Shared.Analyzers;
using Robust.Shared.GameObjects;
using Robust.Shared.Serialization.Manager.Attributes;
namespace Content.Server.Climbing.Components;
/// <summary>
/// Glass tables shatter and stun you when climbed on.
/// This is a really entity-specific behavior, so opted to make it
/// not very generalized with regards to naming.
/// </summary>
[RegisterComponent, Friend(typeof(ClimbSystem))]
[ComponentProtoName("GlassTable")]
public class GlassTableComponent : Component
{
/// <summary>
/// How much damage should be given to the climber?
/// </summary>
[DataField("climberDamage")]
public DamageSpecifier ClimberDamage = default!;
/// <summary>
/// How much damage should be given to the table when climbed on?
/// </summary>
[DataField("tableDamage")]
public DamageSpecifier TableDamage = default!;
/// <summary>
/// How long should someone who climbs on this table be stunned for?
/// </summary>
public float StunTime = 5.0f;
}