Skip to content
This repository was archived by the owner on Jun 14, 2025. It is now read-only.
BananaCake2Day edited this page Mar 3, 2019 · 4 revisions

The Map singleton can be accessed from the Server. Server.Map

Methods

Map.DetonateWarhead()

Instantly detonates the alpha warhead.

Map.StartWarhead()

Starts detonation of the alpha warhead as if a player activated it.

Map.StopWarhead()

Stops detonation of the alpha warhead as if a player deactivated it.

Map.Shake()

Shakes the screen of all clients. This is the same effect when the alpha warhead detonates.

Map.SpawnItem(ItemType type, Vector pos, Vector rotation)

Spawns an item in the world of ItemTypetype and at the position pos.

Parameters:

TypeNameDefaultDescription
ItemTypetypenoneThe item to spawn.
VectorposnoneThe position to spawn it at.
VectorrotationnullThe rotation to spawn it at.

Map.FemurBreaker(bool enable)

Activates the Femur Breaker / 106 Recontainment Procedures. It can also deactivate it, but don't count on it.

Parameters:

TypeNameDefaultDescription
boolenablenoneTo enable or disable the femur breaker

Map.AnnounceNtfEntrance(int scpsLeft, int mtfNumber, char mtfLetter)

Makes a NTF announcement, like one you'd hear when MTF spawns.

Parameters:

TypeNameDefaultDescription
intscpsLeftnoneThe number of SCPs left in the announcement.
intmtfNumbernoneThe number squadron (03-BRAVO).
charmtfLetternoneThe letter squadron (03-BRAVO).

Map.AnnounceScpKill(string scpNumber, Player killer) void

Makes a SCP re-contained announcement, like one you'd hear when a SCP is killed.

Parameters:

TypeNameDefaultDescription
stringscpNumbernoneThe amount of SCPs left in the announcement.
PlayerkillernullThe killer of the SCP.

Map.AnnounceCustomMessage(string words)

Makes a CASSIE custom announcement. CASSIE can only pronounce a set list of phrases found here, and when a phrase cannot be pronounced, it is not said in the announcement.

Parameters:

TypeNameDefaultDescription
stringwordsnoneThe words to be pronounced by the CASSIE system.

Map.Broadcast(uint duration, string message, bool isMonoSpaced)

Broadcasts a message. This message is printed to the screen for every client. isMonoSpaced decides if the message is monospaced.

Parameters:

TypeNameDefaultDescription
uintdurationnoneHow long the broadcast will linger on player screens.
stringmessagenoneThe message to display.
boolisMonoSpacednoneWhether the broadcast is displayed monospaced.

Map.ClearBroadcasts()

Clears the broadcasts of each client.

Getting

Map.GetItems(ItemType type, bool world_only)

Gets all of the items in the world. If world_only is false, will also search through player inventories to find items. The type parameter can be used to filter the type of item to find. Also, see the static method Item.GetItems()

Parameters

TypeNameDefaultDescription
ItemTypetypenoneFilters the list by ItemType.
boolworld_onlynoneDetermines if the method will also search through player inventories to find items.

Returns: List<Item>

Map.GetElevatorTeleportPoints()

Returns each pair of elevator teleport points in the world. Each individual elevator has two points that players teleport between when using elevators.

Returns: Dictionary<Vector, Vector>

Map.GetElevators()

Returns all elevators in the world.

Returns: List<Elevator>

Map.GetGenerators()

Gets all of the generators in the world.

Returns: Generator[]

Map.Get079InteractionRooms(Scp079InteractionType type)

Returns all the rooms that support the Scp079InteractionType type passed in the function.

Parameters:

TypeNameDefaultDescription
Scp079InteractionTypetypenoneThe Scp079InteractionType to filter with.

Returns: Room[]

Map.GetRandomSpawnPoint(Role role)

Returns a Vector of a random spawn point according to the Role passed. EG: A role of Role.CLASSD will return a random D-Class cell. A role of Role.SCP_173 will return 173's chamber.

Parameters:

TypeNameDefaultDescription
RolerolenoneThe role to get a random spawn point of.

Returns: Vector

Map.GetSpawnPoints(Role role)

Returns a list of positions that represent all possible spawn points for that role.

Parameters:

TypeNameDefaultDescription
RolerolenoneThe role to get all spawn points of.

Returns: List<Vector>

Map.GetBlastDoorPoints()

Returns the positions of all blast doors in the world.

Returns: List<Vector>

Map.GetDoors()

Returns a list of all doors in the world.

Returns: List<Door>

Map.GetTeslaGates()

Returns a list of all the tesla gates in the world.

Returns: List<TeslaGate>

Map.GetPocketDimensionExits()

Returns a list of all pocket dimension exits in the world.

Returns: List<PocketDimensionExit>

Map.GetIntercomSpeaker()

Gets the current intercom speaker. The value returned is null most of the time, so don't forget null checks before doing anything important!

Returns: Player

Map.GetIntercomContent(IntercomStatus intercomStatus)

Gets the content of the intercom status message.

Parameters:

TypeNameDefaultDescription
IntercomStatusintercomStatusnoneThe intercom status to get the content of.

Returns: string

Setting

Map.SetIntercomSpeaker(Player player)

Sets the intercom speaker. This method is affected by cooldown.

Parameters:

TypeNameDefaultDescription
PlayerplayernoneThe new speaker

Map.SetIntercomContent(IntercomStatus intercomStatus, string content)

Sets the content of the intercom status message. Keep in mind that this will only set the intercom status message of the intercom status you passed in intercomStatus. Which means after setting the intercom content of IntercomStatus.READY, it will only display when READY. Further testing required

Parameters:

TypeNameDefaultDescription
IntercomStatusintercomStatusnoneThe IntercomStatus to set the content to.
stringcontentnoneThe content.

Properties

Map.WarheadDetonated

Has the warhead been detonated? Read only.

Field Value: bool

Map.LCZDecontaminated

Has Lower Containment been decontaminated? Read only.

Field Value: bool

Clone this wiki locally