Class FuncDoor
Namespace: ValveResourceFormat.Renderer.Entities
Assembly: Renderer.dll
func_door. A brush that slides open along its movedir and back again. Not simulated: sounds, the master, damage to whatever blocks it, and door groups.
public class FuncDoor : BaseToggleInheritance
object ← BaseEntity ← BaseModelEntity ← BaseToggle ← FuncDoor
Derived
Inherited Members
BaseToggle.Speed, BaseToggle.Lip, BaseToggle.MoveDirection, BaseToggle.FinalDestination, BaseToggle.IsLinearMoving, BaseToggle.IsPusher, BaseToggle.TurnsByAngleComponents, BaseToggle.LinearMove(Vector3), BaseToggle.AngularMove(Vector3, float), BaseToggle.FinishLinearMove(), BaseToggle.GetAxisDirection(bool, bool), BaseToggle.ResolveEntitySpaceMoveDirection(), BaseToggle.GetTravelDistance(Vector3), BaseModelEntity.Solid, BaseModelEntity.ModelNode, BaseModelEntity.Physics, BaseModelEntity.LoadedModel, BaseModelEntity.NonEmpty(string?), BaseModelEntity.CreateRootNode(), BaseModelEntity.BuildsCollider, BaseModelEntity.InputColor(EntityInputData), BaseModelEntity.InputAlpha(EntityInputData), BaseModelEntity.InputSetRenderAttribute(EntityInputData), BaseModelEntity.InputClearRenderAttribute(EntityInputData), BaseModelEntity.InputLightingOrigin(EntityInputData), BaseModelEntity.DispatchInput(string, EntityInputData), BaseEntity.Scene, BaseEntity.RootNode, BaseEntity.Transform, BaseEntity.RigidTransform, BaseEntity.EntitySystem, BaseEntity.Data, BaseEntity.SpawnData, BaseEntity.NameFixup, BaseEntity.SpawnGroup, BaseEntity.KeyValues, BaseEntity.Classname, BaseEntity.TargetName, BaseEntity.SpawnFlags, BaseEntity.SpawnTransform, BaseEntity.Owner, BaseEntity.MoveParent, BaseEntity.EntityScale, BaseEntity.ModelName, BaseEntity.Origin, BaseEntity.Angles, BaseEntity.WorldOrigin, BaseEntity.WorldAngles, BaseEntity.Velocity, BaseEntity.AngularVelocity, BaseEntity.NextThink, BaseEntity.MoveDoneTime, BaseEntity.IsRemoved, BaseEntity.Collider, BaseEntity.IsSolid, BaseEntity.IsTrigger, BaseEntity.IsDrawn, BaseEntity.IsShown, BaseEntity.IsCollidable, BaseEntity.TouchingEntities, BaseEntity.CreateRootNode(), BaseEntity.CreateEditorNode(ObjectTypeFlags), BaseEntity.CreateEffect(string?, ParticleSnapshot?, bool), BaseEntity.HasSpawnFlags<TSpawnFlags>(TSpawnFlags), BaseEntity.Spawn(), BaseEntity.Activate(), BaseEntity.Think(), BaseEntity.RoundStart(), BaseEntity.MoveDone(), BaseEntity.TryGetTouchBounds(out Vector3, out Vector3), BaseEntity.AcceptsTouchFrom(BaseEntity), BaseEntity.OnStartTouch(BaseEntity), BaseEntity.OnTouch(BaseEntity), BaseEntity.OnEndTouch(BaseEntity), BaseEntity.ObjectCaps, BaseEntity.Use(BaseEntity?), BaseEntity.Teleport(Vector3, Vector3?), BaseEntity.JumpTo(Vector3, Vector3), BaseEntity.AcceptInput(string, EntityInputData), BaseEntity.InputKill(EntityInputData), BaseEntity.InputFireUser1(EntityInputData), BaseEntity.InputFireUser2(EntityInputData), BaseEntity.InputFireUser3(EntityInputData), BaseEntity.InputFireUser4(EntityInputData), BaseEntity.SetNextThink(float), BaseEntity.SetMoveDoneTime(float), BaseEntity.PhysicsSimulate(float), BaseEntity.TurnsByAngleComponents, BaseEntity.IsPusher, BaseEntity.IsUnblockableByPlayer, BaseEntity.MovesWithoutPushing, BaseEntity.PushesPlayerAsTrain, BaseEntity.HasVPhysicsSolid, BaseEntity.OnStartBlocked(BaseEntity), BaseEntity.OnBlocked(BaseEntity), BaseEntity.OnEndBlocked(), BaseEntity.GetSurfaceVelocity(Vector3), BaseEntity.TurnBody(Vector3, Vector3), BaseEntity.SetOriginAndAngles(Vector3, Vector3), BaseEntity.SetWorldOriginAndAngles(Vector3, Vector3), BaseEntity.AddNode(SceneNode, bool), BaseEntity.OnRemove(), BaseEntity.UpdateTransform(), BaseEntity.UpdateColliderTransform(), BaseEntity.UpdateRenderTransform(float), BaseEntity.SnapInterpolation(), BaseEntity.AngleMod(float), BaseEntity.DispatchInput(string, EntityInputData)
Constructors
FuncDoor(EntitySystem, EntitySpawnInfo)
Initializes a func_door from its keyvalues.
public FuncDoor(EntitySystem system, EntitySpawnInfo spawnInfo)Parameters
system EntitySystem
spawnInfo EntitySpawnInfo
Properties
ForceClosed
Gets the forceclosed keyvalue: a blocked door holds its course instead of turning back, but still cannot move through the blocker.
public bool ForceClosed { get; }Property Value
bool
IsLocked
Gets whether the door refuses to open.
public bool IsLocked { get; }Property Value
bool
IsOpen
Gets whether the door is open or on its way there.
public bool IsOpen { get; }Property Value
bool
IsUnblockableByPlayer
Gets whether the player can never block this pusher: the player is moved the whole way, through the world if need be, and the pusher keeps going.
protected override bool IsUnblockableByPlayer { get; }Property Value
bool
LastActivator
Gets the entity that last set the door going. The outputs report it; reaching either end clears it.
protected BaseEntity? LastActivator { get; }Property Value
ObjectCaps
Gets whether the player can open this door by pressing it.
public override EntityCapability ObjectCaps { get; }Property Value
PositionClosed
Gets the place the door rests when closed.
protected Vector3 PositionClosed { get; }Property Value
PositionOpen
Gets the place the door rests when open.
protected Vector3 PositionOpen { get; }Property Value
State
Gets the travel state: at either end, or moving towards one.
protected BaseToggle.ToggleState State { get; set; }Property Value
Wait
Gets the seconds the door stays open before closing; a negative wait keeps it open.
public float Wait { get; }Property Value
float
Methods
DispatchInput(string, EntityInputData)
Runs the handler declared with EntityInputAttribute for an input.
protected override bool DispatchInput(string inputName, EntityInputData data)Parameters
inputName string
data EntityInputData
Returns
bool
true when a handler ran.
InputClose(EntityInputData)
Closes the door, even one already closing, which sets it off again.
[EntityInput("Close")]
protected void InputClose(EntityInputData data)Parameters
data EntityInputData
InputLock(EntityInputData)
Stops the door opening until it is unlocked.
[EntityInput("Lock")]
protected void InputLock(EntityInputData data)Parameters
data EntityInputData
InputOpen(EntityInputData)
Opens the door. Ignored silently when locked or already open.
[EntityInput("Open")]
protected void InputOpen(EntityInputData data)Parameters
data EntityInputData
InputSetSpeed(EntityInputData)
Changes how fast the door travels from its next move on.
[EntityInput("SetSpeed")]
protected void InputSetSpeed(EntityInputData data)Parameters
data EntityInputData
InputSetToggleState(EntityInputData)
Jumps the door to its open end for 0, else its closed end.
[EntityInput("SetToggleState")]
protected void InputSetToggleState(EntityInputData data)Parameters
data EntityInputData
InputToggle(EntityInputData)
Opens a closed door and closes an open one. A moving or locked door ignores it.
[EntityInput("Toggle")]
protected void InputToggle(EntityInputData data)Parameters
data EntityInputData
InputUnlock(EntityInputData)
Lets the door open again.
[EntityInput("Unlock")]
protected void InputUnlock(EntityInputData data)Parameters
data EntityInputData
JumpToEnd(bool)
Puts the door at one of its ends without travelling or changing its state.
protected virtual void JumpToEnd(bool atOpenEnd)Parameters
atOpenEnd bool
Whether to the open end rather than the closed one.
MoveDone()
Runs when BaseEntity.MoveDoneTime comes due, after the tick's movement was applied.
public override void MoveDone()OnBlocked(BaseEntity)
Runs every tick the door is blocked. Unless FuncDoor.ForceClosed is set, turns the door around and every door sharing its name; doors with a negative FuncDoor.Wait never turn.
protected override void OnBlocked(BaseEntity blocker)Parameters
blocker BaseEntity
OnEndBlocked()
Runs on the first push that is no longer blocked.
protected override void OnEndBlocked()OnStartBlocked(BaseEntity)
Runs on the first tick a push is blocked by blocker.
protected override void OnStartBlocked(BaseEntity blocker)Parameters
blocker BaseEntity
What the push could not move.
OnTouch(BaseEntity)
Passes the touch on to chained doors, and opens this one for a player when FuncDoor.SpawnFlag.TouchOpens is set.
protected override void OnTouch(BaseEntity other)Parameters
other BaseEntity
SetUpSpawnPosition()
Puts the door where it spawns. One that spawns open is moved to its open end, so closing it returns it to the authored position.
protected virtual void SetUpSpawnPosition()Spawn()
Sets up the entity (model, class keyvalues, first think). Called once the entity's spawn group has created all entities of the group, after the move parent has spawned.
public override void Spawn()Remarks
An override calls this first: it builds the node from BaseEntity.CreateRootNode() and snaps the entity onto its parent's attachment, which the rest of the override reads.
StartMove(bool)
Sets the door travelling towards one of its two ends.
protected virtual void StartMove(bool opening)Parameters
opening bool
Use(BaseEntity?)
Ignores the press while the door is moving, or open and due to close by itself, unless FuncDoor.SpawnFlag.NewUseRules is set.
public override void Use(BaseEntity? activator)Parameters
activator BaseEntity?

