Class SharedDoorSystem
Inheritance
System.Object
SharedDoorSystem
Assembly: Content.Shared.dll
Syntax
public abstract class SharedDoorSystem : EntitySystem
Fields
|
Improve this Doc
View Source
AccessType
Determines the base access behavior of all doors on the station.
Declaration
public SharedDoorSystem.AccessTypes AccessType
Field Value
|
Improve this Doc
View Source
AppearanceSystem
Declaration
protected readonly SharedAppearanceSystem AppearanceSystem
Field Value
Type |
Description |
SharedAppearanceSystem |
|
|
Improve this Doc
View Source
Audio
Declaration
protected readonly SharedAudioSystem Audio
Field Value
Type |
Description |
SharedAudioSystem |
|
|
Improve this Doc
View Source
GameTiming
Declaration
protected readonly IGameTiming GameTiming
Field Value
Type |
Description |
Robust.Shared.Timing.IGameTiming |
|
|
Improve this Doc
View Source
IntersectPercentage
A body must have an intersection percentage larger than this in order to be considered as colliding with a
door. Used for safety close-blocking and crushing.
Declaration
public const float IntersectPercentage = null
Field Value
Type |
Description |
System.Single |
|
|
Improve this Doc
View Source
PhysicsSystem
Declaration
protected readonly SharedPhysicsSystem PhysicsSystem
Field Value
Type |
Description |
Robust.Shared.Physics.Systems.SharedPhysicsSystem |
|
|
Improve this Doc
View Source
Tags
Declaration
protected readonly TagSystem Tags
Field Value
Methods
|
Improve this Doc
View Source
CanClose(EntityUid, DoorComponent, Nullable<EntityUid>, Boolean)
Immediately start closing a door
Declaration
public bool CanClose(EntityUid uid, DoorComponent door = null, EntityUid? user = null, bool quiet = true)
Parameters
Type |
Name |
Description |
EntityUid |
uid |
The uid of the door
|
DoorComponent |
door |
The doorcomponent of the door
|
System.Nullable<EntityUid> |
user |
The user (if any) opening the door
|
System.Boolean |
quiet |
|
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
CanOpen(EntityUid, DoorComponent, Nullable<EntityUid>, Boolean)
Declaration
public bool CanOpen(EntityUid uid, DoorComponent door = null, EntityUid? user = null, bool quiet = true)
Parameters
Type |
Name |
Description |
EntityUid |
uid |
|
DoorComponent |
door |
|
System.Nullable<EntityUid> |
user |
|
System.Boolean |
quiet |
|
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
CheckDoorBump(DoorComponent, PhysicsComponent)
Declaration
protected virtual void CheckDoorBump(DoorComponent component, PhysicsComponent body)
Parameters
Type |
Name |
Description |
DoorComponent |
component |
|
Robust.Shared.Physics.Components.PhysicsComponent |
body |
|
|
Improve this Doc
View Source
Crush(EntityUid, DoorComponent, PhysicsComponent)
Declaration
public void Crush(EntityUid uid, DoorComponent door = null, PhysicsComponent physics = null)
Parameters
Type |
Name |
Description |
EntityUid |
uid |
|
DoorComponent |
door |
|
Robust.Shared.Physics.Components.PhysicsComponent |
physics |
|
|
Improve this Doc
View Source
Deny(EntityUid, DoorComponent, Nullable<EntityUid>, Boolean)
Update the door state/visuals and play an access denied sound when a user without access interacts with the
door.
Declaration
public void Deny(EntityUid uid, DoorComponent door = null, EntityUid? user = null, bool predicted = false)
Parameters
Type |
Name |
Description |
EntityUid |
uid |
|
DoorComponent |
door |
|
System.Nullable<EntityUid> |
user |
|
System.Boolean |
predicted |
|
|
Improve this Doc
View Source
GetColliding(EntityUid, PhysicsComponent)
Declaration
public IEnumerable<EntityUid> GetColliding(EntityUid uid, PhysicsComponent physics = null)
Parameters
Type |
Name |
Description |
EntityUid |
uid |
|
Robust.Shared.Physics.Components.PhysicsComponent |
physics |
|
Returns
Type |
Description |
IEnumerable<EntityUid> |
|
|
Improve this Doc
View Source
HandleCollide(EntityUid, DoorComponent, ref StartCollideEvent)
Declaration
protected virtual void HandleCollide(EntityUid uid, DoorComponent door, ref StartCollideEvent args)
Parameters
Type |
Name |
Description |
EntityUid |
uid |
|
DoorComponent |
door |
|
Robust.Shared.Physics.Events.StartCollideEvent |
args |
|
|
Improve this Doc
View Source
HasAccess(EntityUid, Nullable<EntityUid>, DoorComponent, AccessReaderComponent)
Does the user have the permissions required to open this door?
Declaration
public bool HasAccess(EntityUid uid, EntityUid? user = null, DoorComponent door = null, AccessReaderComponent access = null)
Parameters
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
Initialize()
Declaration
public override void Initialize()
|
Improve this Doc
View Source
OnActivate(EntityUid, DoorComponent, ActivateInWorldEvent)
Declaration
protected virtual void OnActivate(EntityUid uid, DoorComponent door, ActivateInWorldEvent args)
Parameters
|
Improve this Doc
View Source
OnComponentInit(EntityUid, DoorComponent, ComponentInit)
Declaration
protected virtual void OnComponentInit(EntityUid uid, DoorComponent door, ComponentInit args)
Parameters
Type |
Name |
Description |
EntityUid |
uid |
|
DoorComponent |
door |
|
ComponentInit |
args |
|
|
Improve this Doc
View Source
OnPartialClose(EntityUid, DoorComponent, PhysicsComponent)
Called when the door is partially closed. This is when the door becomes "solid". If this process fails (e.g., a
mob entered the door as it was closing), then this returns false. Otherwise, returns true;
Declaration
public bool OnPartialClose(EntityUid uid, DoorComponent door = null, PhysicsComponent physics = null)
Parameters
Type |
Name |
Description |
EntityUid |
uid |
|
DoorComponent |
door |
|
Robust.Shared.Physics.Components.PhysicsComponent |
physics |
|
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
OnPartialOpen(EntityUid, DoorComponent)
Called when the door is partially opened. The door becomes transparent and stops colliding with entities.
Declaration
public void OnPartialOpen(EntityUid uid, DoorComponent door = null)
Parameters
|
Improve this Doc
View Source
PlaySound(EntityUid, SoundSpecifier, AudioParams, Nullable<EntityUid>, Boolean)
Declaration
protected abstract void PlaySound(EntityUid uid, SoundSpecifier soundSpecifier, AudioParams audioParams, EntityUid? predictingPlayer, bool predicted)
Parameters
Type |
Name |
Description |
EntityUid |
uid |
|
Robust.Shared.Audio.SoundSpecifier |
soundSpecifier |
|
Robust.Shared.Audio.AudioParams |
audioParams |
|
System.Nullable<EntityUid> |
predictingPlayer |
|
System.Boolean |
predicted |
|
|
Improve this Doc
View Source
SetCollidable(EntityUid, Boolean, DoorComponent, PhysicsComponent, Nullable<OccluderComponent>)
Declaration
protected virtual void SetCollidable(EntityUid uid, bool collidable, DoorComponent door = null, PhysicsComponent physics = null, OccluderComponent? occluder = null)
Parameters
Type |
Name |
Description |
EntityUid |
uid |
|
System.Boolean |
collidable |
|
DoorComponent |
door |
|
Robust.Shared.Physics.Components.PhysicsComponent |
physics |
|
System.Nullable<OccluderComponent> |
occluder |
|
|
Improve this Doc
View Source
SetNextStateChange(EntityUid, Nullable<TimeSpan>, DoorComponent)
Schedule an open or closed door to progress to the next state after some time.
Declaration
public void SetNextStateChange(EntityUid uid, TimeSpan? delay, DoorComponent door = null)
Parameters
Type |
Name |
Description |
EntityUid |
uid |
|
System.Nullable<TimeSpan> |
delay |
|
DoorComponent |
door |
|
|
Improve this Doc
View Source
SetState(EntityUid, DoorState, DoorComponent)
Declaration
protected void SetState(EntityUid uid, DoorState state, DoorComponent door = null)
Parameters
|
Improve this Doc
View Source
StartClosing(EntityUid, DoorComponent, Nullable<EntityUid>, Boolean)
Declaration
public virtual void StartClosing(EntityUid uid, DoorComponent door = null, EntityUid? user = null, bool predicted = false)
Parameters
Type |
Name |
Description |
EntityUid |
uid |
|
DoorComponent |
door |
|
System.Nullable<EntityUid> |
user |
|
System.Boolean |
predicted |
|
|
Improve this Doc
View Source
StartOpening(EntityUid, DoorComponent, Nullable<EntityUid>, Boolean)
Immediately start opening a door
Declaration
public virtual void StartOpening(EntityUid uid, DoorComponent door = null, EntityUid? user = null, bool predicted = false)
Parameters
Type |
Name |
Description |
EntityUid |
uid |
The uid of the door
|
DoorComponent |
door |
The doorcomponent of the door
|
System.Nullable<EntityUid> |
user |
The user (if any) opening the door
|
System.Boolean |
predicted |
Whether the interaction would have been
predicted. See comments in the PlaySound method on the Server system for details
|
|
Improve this Doc
View Source
TryClose(EntityUid, DoorComponent, Nullable<EntityUid>, Boolean)
Declaration
public bool TryClose(EntityUid uid, DoorComponent door = null, EntityUid? user = null, bool predicted = false)
Parameters
Type |
Name |
Description |
EntityUid |
uid |
|
DoorComponent |
door |
|
System.Nullable<EntityUid> |
user |
|
System.Boolean |
predicted |
|
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
TryOpen(EntityUid, DoorComponent, Nullable<EntityUid>, Boolean, Boolean)
Declaration
public bool TryOpen(EntityUid uid, DoorComponent door = null, EntityUid? user = null, bool predicted = false, bool quiet = false)
Parameters
Type |
Name |
Description |
EntityUid |
uid |
|
DoorComponent |
door |
|
System.Nullable<EntityUid> |
user |
|
System.Boolean |
predicted |
|
System.Boolean |
quiet |
|
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
TryToggleDoor(EntityUid, DoorComponent, Nullable<EntityUid>, Boolean)
Declaration
public bool TryToggleDoor(EntityUid uid, DoorComponent door = null, EntityUid? user = null, bool predicted = false)
Parameters
Type |
Name |
Description |
EntityUid |
uid |
|
DoorComponent |
door |
|
System.Nullable<EntityUid> |
user |
|
System.Boolean |
predicted |
|
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
Update(Single)
Iterate over active doors and progress them to the next state if they need to be updated.
Declaration
public override void Update(float frameTime)
Parameters
Type |
Name |
Description |
System.Single |
frameTime |
|