Toy Box filled with toys (ready for merge) (#16252)

This commit is contained in:
brainfood1183
2023-06-03 04:31:47 +01:00
committed by GitHub
parent 3d29ab3486
commit c99585c94f
75 changed files with 1118 additions and 13 deletions

View File

@@ -0,0 +1,42 @@
using Robust.Shared.Audio;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
namespace Content.Shared.Glue;
[RegisterComponent]
public sealed class GluedComponent : Component
{
/// <summary>
/// Reverts name to before prefix event (essentially removes prefix).
/// </summary>
[DataField("beforeGluedEntityName"), ViewVariables(VVAccess.ReadOnly)]
public string BeforeGluedEntityName = String.Empty;
/// <summary>
/// Sound made when glue applied.
/// </summary>
[DataField("squeeze")]
public SoundSpecifier Squeeze = new SoundPathSpecifier("/Audio/Items/squeezebottle.ogg");
/// <summary>
/// Timings for glue duration and removal.
/// </summary>
[DataField("nextGlueTime", customTypeSerializer: typeof(TimeOffsetSerializer)), ViewVariables(VVAccess.ReadWrite)]
public TimeSpan? NextGlueTime;
[DataField("glueTime", customTypeSerializer: typeof(TimeOffsetSerializer))]
public TimeSpan GlueTime = TimeSpan.Zero;
[DataField("glueCooldown")]
public TimeSpan GlueCooldown = TimeSpan.FromSeconds(20);
/// <summary>
/// Bools which control timings and when to apply the glue effect.
/// </summary>
public bool GlueBroken = false;
[DataField("glued")]
[ViewVariables(VVAccess.ReadWrite)]
public bool Glued = false;
}