Space Kudzu (#5472)

This commit is contained in:
Moony
2021-11-28 20:25:36 -06:00
committed by GitHub
parent 30c87ca6b2
commit 9075cf6163
30 changed files with 617 additions and 42 deletions

View File

@@ -0,0 +1,32 @@
using Robust.Shared.Analyzers;
using Robust.Shared.GameObjects;
using Robust.Shared.Serialization.Manager.Attributes;
using Robust.Shared.ViewVariables;
namespace Content.Server.Kudzu;
/// <summary>
/// Component for rapidly spreading objects, like Kudzu.
/// ONLY USE THIS FOR ANCHORED OBJECTS. An error will be logged if not anchored/static.
/// Currently does not support growing in space.
/// </summary>
[RegisterComponent, Friend(typeof(SpreaderSystem))]
public class SpreaderComponent : Component
{
public override string Name => "Spreader";
/// <summary>
/// Chance for it to grow on any given tick, after the normal growth rate-limit (if it doesn't grow, SpreaderSystem will pick another one.).
/// </summary>
[DataField("chance", required: true)]
public float Chance;
/// <summary>
/// Prototype spawned on growth success.
/// </summary>
[DataField("growthResult", required: true)]
public string GrowthResult = default!;
[DataField("enabled")]
public bool Enabled = true;
}