Show / Hide Table of Contents

Class RulePlayerSpawningEvent

Event raised before readied up players are spawned and given jobs by the GameTicker. You can use this to spawn people off-station, like in the case of nuke ops or wizard. Remove the players you spawned from the PlayerPool and call PlayerJoinGame(IPlayerSession, Boolean) on them.

Inheritance
System.Object
RulePlayerSpawningEvent
Namespace: Content.Server.GameTicking
Assembly: Content.Server.dll
Syntax
public sealed class RulePlayerSpawningEvent : object

Constructors

| Improve this Doc View Source

RulePlayerSpawningEvent(List<IPlayerSession>, IReadOnlyDictionary<NetUserId, HumanoidCharacterProfile>, Boolean)

Declaration
public RulePlayerSpawningEvent(List<IPlayerSession> playerPool, IReadOnlyDictionary<NetUserId, HumanoidCharacterProfile> profiles, bool forced)
Parameters
Type Name Description
List<Robust.Server.Player.IPlayerSession> playerPool
IReadOnlyDictionary<Robust.Shared.Network.NetUserId, HumanoidCharacterProfile> profiles
System.Boolean forced

Properties

| Improve this Doc View Source

Forced

Declaration
public bool Forced { get; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

PlayerPool

Pool of players to be spawned. If you want to handle a specific player being spawned, remove it from this list and do what you need.

Declaration
public List<IPlayerSession> PlayerPool { get; }
Property Value
Type Description
List<Robust.Server.Player.IPlayerSession>
Remarks

If you spawn a player by yourself from this event, don't forget to call PlayerJoinGame(IPlayerSession, Boolean) on them.

| Improve this Doc View Source

Profiles

Declaration
public IReadOnlyDictionary<NetUserId, HumanoidCharacterProfile> Profiles { get; }
Property Value
Type Description
IReadOnlyDictionary<Robust.Shared.Network.NetUserId, HumanoidCharacterProfile>
  • Improve this Doc
  • View Source
☀
☾
In This Article
Back to top
Generated by DocFX
☀
☾