Show / Hide Table of Contents

Class SharedSingularitySystem

The entity system primarily responsible for managing SingularityComponents.

Inheritance
System.Object
SharedSingularitySystem
SingularitySystem
SingularitySystem
Namespace: Content.Shared.Singularity.EntitySystems
Assembly: Content.Shared.dll
Syntax
public abstract class SharedSingularitySystem : EntitySystem

Fields

| Improve this Doc View Source

BaseGravityWellAcceleration

The scaling factor for the base acceleration of a singularities gravity well.

Declaration
public const float BaseGravityWellAcceleration = null
Field Value
Type Description
System.Single
| Improve this Doc View Source

BaseGravityWellRadius

The scaling factor for the size of a singularities gravity well.

Declaration
public const float BaseGravityWellRadius = null
Field Value
Type Description
System.Single
| Improve this Doc View Source

DistortionContainerScaling

The amount to scale a singularities distortion shader by when it's in a container. This is the inverse of an exponent, not a linear scaling factor. ie. n => intensity = intensity ** (1/n)

Declaration
public const float DistortionContainerScaling = null
Field Value
Type Description
System.Single
| Improve this Doc View Source

MaxSingularityLevel

The maximum level a singularity can be set to.

Declaration
public const byte MaxSingularityLevel = null
Field Value
Type Description
System.Byte
| Improve this Doc View Source

MinSingularityLevel

The minimum level a singularity can be set to.

Declaration
public const byte MinSingularityLevel = null
Field Value
Type Description
System.Byte
| Improve this Doc View Source

SingularityBreachThreshold

The level at and above which a singularity should be capable of breaching containment.

Declaration
public const byte SingularityBreachThreshold = null
Field Value
Type Description
System.Byte
| Improve this Doc View Source

Vvm

Declaration
protected readonly IViewVariablesManager Vvm
Field Value
Type Description
IViewVariablesManager

Methods

| Improve this Doc View Source

CanBreachContainment(SingularityComponent)

Derives whether a singularity should be able to breach containment from its state.

Declaration
public bool CanBreachContainment(SingularityComponent singulo)
Parameters
Type Name Description
SingularityComponent singulo

A singularity.

Returns
Type Description
System.Boolean

Whether the singularity should be able to breach containment.

| Improve this Doc View Source

EventHorizonRadius(SingularityComponent)

Derives the proper event horizon radius for a singularity from its state.

Declaration
public float EventHorizonRadius(SingularityComponent singulo)
Parameters
Type Name Description
SingularityComponent singulo

A singularity.

Returns
Type Description
System.Single

The event horizon radius the singularity should have given its state.

| Improve this Doc View Source

GetFalloff(Single)

Derives the proper distortion shader falloff for a singularity from its state.

Declaration
public float GetFalloff(float level)
Parameters
Type Name Description
System.Single level
Returns
Type Description
System.Single

The distortion shader falloff the singularity should have given its state.

| Improve this Doc View Source

GetIntensity(Single)

Derives the proper distortion shader intensity for a singularity from its state.

Declaration
public float GetIntensity(float level)
Parameters
Type Name Description
System.Single level
Returns
Type Description
System.Single

The distortion shader intensity the singularity should have given its state.

| Improve this Doc View Source

GravPulseAcceleration(SingularityComponent)

Derives the proper base gravitational acceleration for a singularity from its state.

Declaration
public (float, float) GravPulseAcceleration(SingularityComponent singulo)
Parameters
Type Name Description
SingularityComponent singulo

A singularity.

Returns
Type Description
System.ValueTuple<System.Single, System.Single>

The base gravitational acceleration the singularity should have given its state.

| Improve this Doc View Source

GravPulseRange(SingularityComponent)

Derives the proper gravity well radius for a singularity from its state.

Declaration
public float GravPulseRange(SingularityComponent singulo)
Parameters
Type Name Description
SingularityComponent singulo

A singularity.

Returns
Type Description
System.Single

The gravity well radius the singularity should have given its state.

| Improve this Doc View Source

Initialize()

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

OnSingularityStartup(EntityUid, SingularityComponent, ComponentStartup)

Syncs other components with the state of the singularity via event on startup.

Declaration
protected virtual void OnSingularityStartup(EntityUid uid, SingularityComponent comp, ComponentStartup args)
Parameters
Type Name Description
EntityUid uid

The entity that is becoming a singularity.

SingularityComponent comp

The singularity component that is being added to the entity.

ComponentStartup args

The event arguments.

| Improve this Doc View Source

SetLevel(EntityUid, Byte, SingularityComponent)

Setter for Level Also sends out an event alerting that the singularities level has changed.

Declaration
public void SetLevel(EntityUid uid, byte value, SingularityComponent singularity = null)
Parameters
Type Name Description
EntityUid uid

The uid of the singularity to change the level of.

System.Byte value

The new level the singularity should have.

SingularityComponent singularity

The state of the singularity to change the level of.

| Improve this Doc View Source

SetRadsPerLevel(EntityUid, Single, SingularityComponent)

Setter for RadsPerLevel Also updates the radiation output of the singularity according to the new values.

Declaration
public void SetRadsPerLevel(EntityUid uid, float value, SingularityComponent singularity = null)
Parameters
Type Name Description
EntityUid uid

The uid of the singularity to change the radioactivity of.

System.Single value

The new radioactivity the singularity should have.

SingularityComponent singularity

The state of the singularity to change the radioactivity of.

| Improve this Doc View Source

Shutdown()

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

UpdateSingularityLevel(EntityUid, SingularityComponent)

Alerts the entity hosting the singularity that the level of the singularity has changed without the level actually changing. Used to sync components when the singularity component is added to an entity.

Declaration
public void UpdateSingularityLevel(EntityUid uid, SingularityComponent singularity = null)
Parameters
Type Name Description
EntityUid uid

The uid of the singularity.

SingularityComponent singularity

The state of the singularity.

| Improve this Doc View Source

UpdateSingularityLevel(EntityUid, Byte, SingularityComponent)

Alerts the entity hosting the singularity that the level of the singularity has changed. Usually follows a SharedSingularitySystem.SetLevel call, but is also used on component startup to sync everything.

Declaration
public void UpdateSingularityLevel(EntityUid uid, byte oldValue, SingularityComponent singularity = null)
Parameters
Type Name Description
EntityUid uid

The uid of the singularity which's level has changed.

System.Byte oldValue

The old level of the singularity. May be equal to Level if the component is starting.

SingularityComponent singularity

The state of the singularity which's level has changed.

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