Show / Hide Table of Contents

Class GravityWellSystem

The server side version of SharedGravityWellSystem. Primarily responsible for managing GravityWellComponents. Handles the gravitational pulses they can emit.

Inheritance
System.Object
SharedGravityWellSystem
GravityWellSystem
Namespace: Content.Server.Singularity.EntitySystems
Assembly: Content.Server.dll
Syntax
public sealed class GravityWellSystem : SharedGravityWellSystem

Fields

| Improve this Doc View Source

MinGravPulseRange

The minimum range at which gravpulses will act. Prevents division by zero problems.

Declaration
public const float MinGravPulseRange = null
Field Value
Type Description
System.Single

Methods

| Improve this Doc View Source

GravPulse(EntityUid, Single, Single, Matrix3, Nullable<TransformComponent>)

Greates a gravitational pulse, shoving around all entities within some distance of an epicenter.

Declaration
public void GravPulse(EntityUid uid, float maxRange, float minRange, in Matrix3 baseMatrixDeltaV, TransformComponent? xform = null)
Parameters
Type Name Description
EntityUid uid

The entity at the epicenter of the gravity pulse.

System.Single maxRange

The maximum distance at which entities can be affected by the gravity pulse.

System.Single minRange

The minimum distance at which entities can be affected by the gravity pulse.

Matrix3 baseMatrixDeltaV

The base velocity added to any entities within affected by the gravity pulse scaled by the displacement of those entities from the epicenter.

System.Nullable<TransformComponent> xform

(optional) The transform of the entity at the epicenter of the gravitational pulse.

| Improve this Doc View Source

GravPulse(EntityUid, Single, Single, Single, Single, Nullable<TransformComponent>)

Greates a gravitational pulse, shoving around all entities within some distance of an epicenter.

Declaration
public void GravPulse(EntityUid uid, float maxRange, float minRange, float baseRadialDeltaV = 0F, float baseTangentialDeltaV = 0F, TransformComponent? xform = null)
Parameters
Type Name Description
EntityUid uid

The entity at the epicenter of the gravity pulse.

System.Single maxRange

The maximum distance at which entities can be affected by the gravity pulse.

System.Single minRange

The minimum distance at which entities can be affected by the gravity pulse.

System.Single baseRadialDeltaV

The base radial velocity that will be added to entities within range towards the center of the gravitational pulse.

System.Single baseTangentialDeltaV

The base tangential velocity that will be added to entities within countrclockwise around the center of the gravitational pulse.

System.Nullable<TransformComponent> xform

(optional) The transform of the entity at the epicenter of the gravitational pulse.

| Improve this Doc View Source

GravPulse(EntityCoordinates, Single, Single, Matrix3)

Greates a gravitational pulse, shoving around all entities within some distance of an epicenter.

Declaration
public void GravPulse(EntityCoordinates entityPos, float maxRange, float minRange, in Matrix3 baseMatrixDeltaV)
Parameters
Type Name Description
Robust.Shared.Map.EntityCoordinates entityPos

The epicenter of the gravity pulse.

System.Single maxRange

The maximum distance at which entities can be affected by the gravity pulse.

System.Single minRange

The minimum distance at which entities can be affected by the gravity pulse.

Matrix3 baseMatrixDeltaV

The base velocity added to any entities within affected by the gravity pulse scaled by the displacement of those entities from the epicenter.

| Improve this Doc View Source

GravPulse(EntityCoordinates, Single, Single, Single, Single)

Greates a gravitational pulse, shoving around all entities within some distance of an epicenter.

Declaration
public void GravPulse(EntityCoordinates entityPos, float maxRange, float minRange, float baseRadialDeltaV = 0F, float baseTangentialDeltaV = 0F)
Parameters
Type Name Description
Robust.Shared.Map.EntityCoordinates entityPos

The epicenter of the gravity pulse.

System.Single maxRange

The maximum distance at which entities can be affected by the gravity pulse.

System.Single minRange

The minimum distance at which entities can be affected by the gravity pulse.

System.Single baseRadialDeltaV

The base radial velocity that will be added to entities within range towards the center of the gravitational pulse.

System.Single baseTangentialDeltaV

The base tangential velocity that will be added to entities within countrclockwise around the center of the gravitational pulse.

| Improve this Doc View Source

GravPulse(MapCoordinates, Single, Single, Matrix3)

Causes a gravitational pulse, shoving around all entities within some distance of an epicenter.

Declaration
public void GravPulse(MapCoordinates mapPos, float maxRange, float minRange, in Matrix3 baseMatrixDeltaV)
Parameters
Type Name Description
Robust.Shared.Map.MapCoordinates mapPos

The epicenter of the gravity pulse.

System.Single maxRange

The maximum distance at which entities can be affected by the gravity pulse.

System.Single minRange

The minimum distance at which entities can be affected by the gravity pulse. Exists to prevent div/0 errors.

Matrix3 baseMatrixDeltaV

The base velocity added to any entities within affected by the gravity pulse scaled by the displacement of those entities from the epicenter.

| Improve this Doc View Source

GravPulse(MapCoordinates, Single, Single, Single, Single)

Causes a gravitational pulse, shoving around all entities within some distance of an epicenter.

Declaration
public void GravPulse(MapCoordinates mapPos, float maxRange, float minRange = 0F, float baseRadialDeltaV = 0F, float baseTangentialDeltaV = 0F)
Parameters
Type Name Description
Robust.Shared.Map.MapCoordinates mapPos

The epicenter of the gravity pulse.

System.Single maxRange

The maximum distance at which entities can be affected by the gravity pulse.

System.Single minRange

The minimum distance at which entities can be affected by the gravity pulse. Exists to prevent div/0 errors.

System.Single baseRadialDeltaV

The base amount of velocity that will be added to entities in range towards the epicenter of the pulse.

System.Single baseTangentialDeltaV

The base amount of velocity that will be added to entities in range counterclockwise relative to the epicenter of the pulse.

| Improve this Doc View Source

Initialize()

Declaration
public override void Initialize()
| Improve this Doc View Source

OnGravityWellStartup(EntityUid, GravityWellComponent, ComponentStartup)

Resets the pulse timings of the gravity well when the components starts up.

Declaration
public void OnGravityWellStartup(EntityUid uid, GravityWellComponent comp, ComponentStartup args)
Parameters
Type Name Description
EntityUid uid

The uid of the gravity well to start up.

GravityWellComponent comp

The state of the gravity well to start up.

ComponentStartup args

The startup prompt arguments.

| Improve this Doc View Source

SetPulsePeriod(EntityUid, TimeSpan, GravityWellComponent)

Sets the pulse period for a gravity well. If the new pulse period implies that the gravity well was intended to pulse already it does so immediately.

Declaration
public void SetPulsePeriod(EntityUid uid, TimeSpan value, GravityWellComponent gravWell = null)
Parameters
Type Name Description
EntityUid uid

The uid of the gravity well to set the pulse period for.

TimeSpan value

The new pulse period for the gravity well.

GravityWellComponent gravWell

The state of the gravity well to set the pulse period for.

| Improve this Doc View Source

Shutdown()

Declaration
public override void Shutdown()
| Improve this Doc View Source

Update(Single)

Updates the pulse cooldowns of all gravity wells. If they are off cooldown it makes them emit a gravitational pulse and reset their cooldown.

Declaration
public override void Update(float frameTime)
Parameters
Type Name Description
System.Single frameTime

The time elapsed since the last set of updates.

  • Improve this Doc
  • View Source
☀
☾
In This Article
Back to top
Generated by DocFX
☀
☾