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:
@@ -0,0 +1,71 @@
|
||||
using Content.Shared.Singularity.Components;
|
||||
using Content.Server.Singularity.EntitySystems;
|
||||
|
||||
namespace Content.Server.Singularity.Components;
|
||||
|
||||
/// <summary>
|
||||
/// The server-side version of <see cref="SharedGravityWellComponent"/>.
|
||||
/// Primarily managed by <see cref="GravityWellSystem"/>.
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
public sealed class GravityWellComponent : Component
|
||||
{
|
||||
/// <summary>
|
||||
/// The maximum range at which the gravity well can push/pull entities.
|
||||
/// </summary>
|
||||
[DataField("maxRange")]
|
||||
[ViewVariables(VVAccess.ReadWrite)]
|
||||
public float MaxRange;
|
||||
|
||||
/// <summary>
|
||||
/// The minimum range at which the gravity well can push/pull entities.
|
||||
/// This is effectively hardfloored at <see cref="GravityWellSystem.MinGravPulseRange"/>.
|
||||
/// </summary>
|
||||
[DataField("minRange")]
|
||||
[ViewVariables(VVAccess.ReadWrite)]
|
||||
public float MinRange = 0f;
|
||||
|
||||
/// <summary>
|
||||
/// The acceleration entities will experience towards the gravity well at a distance of 1m.
|
||||
/// Negative values accelerate entities away from the gravity well.
|
||||
/// Actual acceleration scales with the inverse of the distance to the singularity.
|
||||
/// </summary>
|
||||
[DataField("baseRadialAcceleration")]
|
||||
[ViewVariables(VVAccess.ReadWrite)]
|
||||
public float BaseRadialAcceleration = 0.0f;
|
||||
|
||||
/// <summary>
|
||||
/// The acceleration entities will experience tangent to the gravity well at a distance of 1m.
|
||||
/// Positive tangential acceleration is counter-clockwise.
|
||||
/// Actual acceleration scales with the inverse of the distance to the singularity.
|
||||
/// </summary>
|
||||
[DataField("baseTangentialAcceleration")]
|
||||
[ViewVariables(VVAccess.ReadWrite)]
|
||||
public float BaseTangentialAcceleration = 0.0f;
|
||||
|
||||
#region Update Timing
|
||||
|
||||
/// <summary>
|
||||
/// The amount of time that should elapse between automated updates to this gravity well.
|
||||
/// </summary>
|
||||
[DataField("gravPulsePeriod")]
|
||||
[ViewVariables(VVAccess.ReadOnly)]
|
||||
[Access(typeof(GravityWellSystem))]
|
||||
public TimeSpan TargetPulsePeriod { get; internal set; } = TimeSpan.FromSeconds(0.5);
|
||||
|
||||
/// <summary>
|
||||
/// The next time at which this gravity well should pulse.
|
||||
/// </summary>
|
||||
[ViewVariables(VVAccess.ReadOnly)]
|
||||
[Access(typeof(GravityWellSystem))]
|
||||
public TimeSpan NextPulseTime { get; internal set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// The last time this gravity well pulsed.
|
||||
/// </summary>
|
||||
[ViewVariables(VVAccess.ReadOnly)]
|
||||
[Access(typeof(GravityWellSystem))]
|
||||
public TimeSpan LastPulseTime { get; internal set; } = default!;
|
||||
|
||||
#endregion Update Timing
|
||||
}
|
||||
Reference in New Issue
Block a user