Show / Hide Table of Contents

Class AntagSelectionSystem

Inheritance
System.Object
GameRuleSystem<GameRuleComponent>
AntagSelectionSystem
Namespace: Content.Server.Antag
Assembly: Content.Server.dll
Syntax
public sealed class AntagSelectionSystem : GameRuleSystem<GameRuleComponent>

Methods

| Improve this Doc View Source

AttemptStartGameRule(RoundStartAttemptEvent, EntityUid, Int32, GameRuleComponent)

Attempts to start the game rule by checking if there are enough players in lobby and readied.

Declaration
public void AttemptStartGameRule(RoundStartAttemptEvent ev, EntityUid uid, int minPlayers, GameRuleComponent gameRule)
Parameters
Type Name Description
RoundStartAttemptEvent ev

The roundstart attempt event

EntityUid uid

The entity the gamerule you are using is on

System.Int32 minPlayers

The minimum amount of players needed for you gamerule to start.

GameRuleComponent gameRule

The gamerule component.

| Improve this Doc View Source

EligiblePlayers(String, Int32, Int32, SoundSpecifier, String, String, out List<EntityUid>, Boolean)

Will check which players are eligible to be chosen for antagonist and give them the given antag.

Declaration
public void EligiblePlayers(string antagPrototype, int maxAntags, int antagsPerPlayer, SoundSpecifier antagSound, string antagGreeting, string greetingColor, out List<EntityUid> chosen, bool includeHeads = false)
Parameters
Type Name Description
System.String antagPrototype

The antag prototype from your rule component.

System.Int32 maxAntags

How many antags can be present in any given round.

System.Int32 antagsPerPlayer

How many players you need to spawn an additional antag.

Robust.Shared.Audio.SoundSpecifier antagSound

The intro sound that plays when the antag is chosen.

System.String antagGreeting

The antag message you want shown when the antag is chosen.

System.String greetingColor

The color of the message for the antag greeting in hex.

List<EntityUid> chosen

A list of all the antags chosen in case you need to add stuff after.

System.Boolean includeHeads

Whether or not heads can be chosen as antags for this gamemode.

| Improve this Doc View Source

GiveAntagBagGear(EntityUid, List<EntProtoId>)

Will attempt to spawn an item inside of a persons bag and then pockets.

Declaration
public void GiveAntagBagGear(EntityUid antag, List<EntProtoId> items)
Parameters
Type Name Description
EntityUid antag

The entity that you want to spawn an item on

List<Robust.Shared.Prototypes.EntProtoId> items

A list of prototype IDs that you want to spawn in the bag.

| Improve this Doc View Source

GiveAntagBagGear(EntityUid, String)

Will attempt to spawn an item inside of a persons bag and then pockets.

Declaration
public void GiveAntagBagGear(EntityUid antag, string item)
Parameters
Type Name Description
EntityUid antag

The entity that you want to spawn an item on

System.String item

The prototype ID that you want to spawn in the bag.

| Improve this Doc View Source

IsGroupDead(List<EntityUid>, Boolean)

Will take a group of entities and check if they are all alive or dead

Declaration
public bool IsGroupDead(List<EntityUid> list, bool checkOffStation)
Parameters
Type Name Description
List<EntityUid> list

The list of the entities

System.Boolean checkOffStation

Bool for if you want to check if someone is in space and consider them dead. (Won't check when emergency shuttle arrives just in case)

Returns
Type Description
System.Boolean
  • Improve this Doc
  • View Source
☀
☾
In This Article
Back to top
Generated by DocFX
☀
☾