Show / Hide Table of Contents

Class PoweredLightSystem

System for the PoweredLightComponents

Inheritance
System.Object
PoweredLightSystem
Namespace: Content.Server.Light.EntitySystems
Assembly: Content.Server.dll
Syntax
public sealed class PoweredLightSystem : EntitySystem

Fields

| Improve this Doc View Source

LightBulbContainer

Declaration
public const string LightBulbContainer = null
Field Value
Type Description
System.String

Methods

| Improve this Doc View Source

EjectBulb(EntityUid, Nullable<EntityUid>, PoweredLightComponent)

Ejects the bulb to a mob's hand if possible.

Declaration
public EntityUid? EjectBulb(EntityUid uid, EntityUid? userUid = null, PoweredLightComponent light = null)
Parameters
Type Name Description
EntityUid uid
System.Nullable<EntityUid> userUid
PoweredLightComponent light
Returns
Type Description
System.Nullable<EntityUid>

Bulb uid if it was successfully ejected, null otherwise

| Improve this Doc View Source

GetBulb(EntityUid, PoweredLightComponent)

Try to get light bulb inserted in powered light

Declaration
public EntityUid? GetBulb(EntityUid uid, PoweredLightComponent light = null)
Parameters
Type Name Description
EntityUid uid
PoweredLightComponent light
Returns
Type Description
System.Nullable<EntityUid>

Bulb uid if it exist, null otherwise

| Improve this Doc View Source

HandleLightDamaged(EntityUid, PoweredLightComponent, DamageChangedEvent)

Destroy the light bulb if the light took any damage.

Declaration
public void HandleLightDamaged(EntityUid uid, PoweredLightComponent component, DamageChangedEvent args)
Parameters
Type Name Description
EntityUid uid
PoweredLightComponent component
DamageChangedEvent args
| Improve this Doc View Source

Initialize()

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

InsertBulb(EntityUid, EntityUid, PoweredLightComponent)

Inserts the bulb if possible.

Declaration
public bool InsertBulb(EntityUid uid, EntityUid bulbUid, PoweredLightComponent light = null)
Parameters
Type Name Description
EntityUid uid
EntityUid bulbUid
PoweredLightComponent light
Returns
Type Description
System.Boolean

True if it could insert it, false if it couldn't.

| Improve this Doc View Source

ReplaceBulb(EntityUid, EntityUid, PoweredLightComponent)

Try to replace current bulb with a new one If succeed old bulb just drops on floor

Declaration
public bool ReplaceBulb(EntityUid uid, EntityUid bulb, PoweredLightComponent light = null)
Parameters
Type Name Description
EntityUid uid
EntityUid bulb
PoweredLightComponent light
Returns
Type Description
System.Boolean
| Improve this Doc View Source

SetState(EntityUid, Boolean, PoweredLightComponent)

Declaration
public void SetState(EntityUid uid, bool state, PoweredLightComponent light = null)
Parameters
Type Name Description
EntityUid uid
System.Boolean state
PoweredLightComponent light
| Improve this Doc View Source

ToggleBlinkingLight(EntityUid, PoweredLightComponent, Boolean)

Declaration
public void ToggleBlinkingLight(EntityUid uid, PoweredLightComponent light, bool isNowBlinking)
Parameters
Type Name Description
EntityUid uid
PoweredLightComponent light
System.Boolean isNowBlinking
| Improve this Doc View Source

ToggleLight(EntityUid, PoweredLightComponent)

Declaration
public void ToggleLight(EntityUid uid, PoweredLightComponent light = null)
Parameters
Type Name Description
EntityUid uid
PoweredLightComponent light
| Improve this Doc View Source

TryDestroyBulb(EntityUid, PoweredLightComponent)

Try to break bulb inside light fixture

Declaration
public bool TryDestroyBulb(EntityUid uid, PoweredLightComponent light = null)
Parameters
Type Name Description
EntityUid uid
PoweredLightComponent light
Returns
Type Description
System.Boolean
  • Improve this Doc
  • View Source
☀
☾
In This Article
Back to top
Generated by DocFX
☀
☾