Show / Hide Table of Contents

Class NPCSystem

Handles NPCs running every tick.

Inheritance
System.Object
NPCSystem
Namespace: Content.Server.NPC.Systems
Assembly: Content.Server.dll
Syntax
public sealed class NPCSystem : EntitySystem

Properties

| Improve this Doc View Source

Enabled

Whether any NPCs are allowed to run at all.

Declaration
public bool Enabled { get; set; }
Property Value
Type Description
System.Boolean

Methods

| Improve this Doc View Source

Initialize()

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

IsAwake(EntityUid, HTNComponent, ActiveNPCComponent)

Is the NPC awake and updating?

Declaration
public bool IsAwake(EntityUid uid, HTNComponent component, ActiveNPCComponent active = null)
Parameters
Type Name Description
EntityUid uid
HTNComponent component
ActiveNPCComponent active
Returns
Type Description
System.Boolean
| Improve this Doc View Source

OnMobStateChange(EntityUid, HTNComponent, MobStateChangedEvent)

Declaration
public void OnMobStateChange(EntityUid uid, HTNComponent component, MobStateChangedEvent args)
Parameters
Type Name Description
EntityUid uid
HTNComponent component
Content.Shared.Mobs.MobStateChangedEvent args
| Improve this Doc View Source

OnNPCMapInit(EntityUid, HTNComponent, MapInitEvent)

Declaration
public void OnNPCMapInit(EntityUid uid, HTNComponent component, MapInitEvent args)
Parameters
Type Name Description
EntityUid uid
HTNComponent component
MapInitEvent args
| Improve this Doc View Source

OnNPCShutdown(EntityUid, HTNComponent, ComponentShutdown)

Declaration
public void OnNPCShutdown(EntityUid uid, HTNComponent component, ComponentShutdown args)
Parameters
Type Name Description
EntityUid uid
HTNComponent component
ComponentShutdown args
| Improve this Doc View Source

OnPlayerNPCAttach(EntityUid, HTNComponent, PlayerAttachedEvent)

Declaration
public void OnPlayerNPCAttach(EntityUid uid, HTNComponent component, PlayerAttachedEvent args)
Parameters
Type Name Description
EntityUid uid
HTNComponent component
Robust.Server.GameObjects.PlayerAttachedEvent args
| Improve this Doc View Source

OnPlayerNPCDetach(EntityUid, HTNComponent, PlayerDetachedEvent)

Declaration
public void OnPlayerNPCDetach(EntityUid uid, HTNComponent component, PlayerDetachedEvent args)
Parameters
Type Name Description
EntityUid uid
HTNComponent component
Robust.Server.GameObjects.PlayerDetachedEvent args
| Improve this Doc View Source

SetBlackboard(EntityUid, String, Object, HTNComponent)

Declaration
public void SetBlackboard(EntityUid uid, string key, object value, HTNComponent component = null)
Parameters
Type Name Description
EntityUid uid
System.String key
System.Object value
HTNComponent component
| Improve this Doc View Source

Shutdown()

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

SleepNPC(EntityUid, HTNComponent)

Declaration
public void SleepNPC(EntityUid uid, HTNComponent component = null)
Parameters
Type Name Description
EntityUid uid
HTNComponent component
| Improve this Doc View Source

TryGetNpc(EntityUid, out NPCComponent)

Declaration
public bool TryGetNpc(EntityUid uid, out NPCComponent component)
Parameters
Type Name Description
EntityUid uid
NPCComponent component
Returns
Type Description
System.Boolean
| Improve this Doc View Source

Update(Single)

Declaration
public override void Update(float frameTime)
Parameters
Type Name Description
System.Single frameTime
| Improve this Doc View Source

WakeNPC(EntityUid, HTNComponent)

Allows the NPC to actively be updated.

Declaration
public void WakeNPC(EntityUid uid, HTNComponent component = null)
Parameters
Type Name Description
EntityUid uid
HTNComponent component
  • Improve this Doc
  • View Source
☀
☾
In This Article
Back to top
Generated by DocFX
☀
☾