Splits the singularity into its component parts + ECS singularity + Support for singularities in containers. (#12132)

* InitialCommit (Broken)

* Fixes compile errors

* PR comments. More doc comments. Fixes

* Makes a singularity/event horizon without radiation/physics a valid state to be in

* VV 'fake' setters, fixes the visualizer, fixes the singularity trying to eat itself instead of nearby things.

* Removes unused dependency from Content.Client.GravityWellSystem

* Testing containment and fake VV setters for SingularityGeneratorComponent

* Fixes gravity wells (broken due to LookupFlags.None). Adds recursive Event Horizon consumption

* Fix merge skew

* Fixes for the master merge

* Fix engine commit

* Dirty is obsolete

* Switch over dirty

* Fix requested changes

* ambiant -> ambient

* Moves EventHorionComponent to Shared

* Proper container handling

* Fixes master merge. Fixes post insertion assertions for singularities. Extends proper container handling to gravity wells and the distortion shader.

* Better support for admemes throwing singularities.

* Moves update timing from accumulators to target times

* Update doc comments
This commit is contained in:
TemporalOroboros
2022-12-19 18:47:15 -08:00
committed by GitHub
parent 490aefecef
commit 9a72b05a50
35 changed files with 2561 additions and 683 deletions

View File

@@ -0,0 +1,63 @@
using Content.Server.Physics.Controllers;
namespace Content.Server.Physics.Components;
/// <summary>
/// A component which makes its entity move around at random.
/// </summary>
[RegisterComponent]
public sealed class RandomWalkComponent : Component
{
/// <summary>
/// The minimum speed at which this entity will move.
/// </summary>
[DataField("minSpeed")]
[ViewVariables(VVAccess.ReadWrite)]
public float MinSpeed = 7.5f;
/// <summary>
/// The maximum speed at which this entity will move.
/// </summary>
[DataField("maxSpeed")]
[ViewVariables(VVAccess.ReadWrite)]
public float MaxSpeed = 10f;
/// <summary>
/// The amount of speed carried over when the speed updates.
/// </summary>
[DataField("accumulatorRatio")]
[ViewVariables(VVAccess.ReadWrite)]
public float AccumulatorRatio = 0.0f;
/// <summary>
/// Whether this random walker should take a step immediately when it starts up.
/// </summary>
[DataField("stepOnStartup")]
[ViewVariables(VVAccess.ReadOnly)]
public bool StepOnStartup = false;
#region Update Timing
/// <summary>
/// The minimum amount of time between speed updates.
/// </summary>
[DataField("minStepCooldown")]
[ViewVariables(VVAccess.ReadWrite)]
public TimeSpan MinStepCooldown { get; internal set; } = TimeSpan.FromSeconds(2.0);
/// <summary>
/// The maximum amount of time between speed updates.
/// </summary>
[DataField("maxStepCooldown")]
[ViewVariables(VVAccess.ReadWrite)]
public TimeSpan MaxStepCooldown { get; internal set; } = TimeSpan.FromSeconds(5.0);
/// <summary>
/// The next time this should update its speed.
/// </summary>
[ViewVariables(VVAccess.ReadWrite)]
[Access(typeof(RandomWalkController))]
public TimeSpan NextStepTime { get; internal set; } = default!;
#endregion Update Timing
}