Table of Contents

Class Map

Namespace
Exiled.API.Features
Assembly
Exiled.API.dll

A set of tools to easily handle the in-game map.

public static class Map
Inheritance
Map
Inherited Members

Properties

AmbientSoundPlayer

Gets the AmbientSoundPlayer.

public static AmbientSoundPlayer AmbientSoundPlayer { get; }

Property Value

AmbientSoundPlayer

DecontaminationState

Gets a value indicating whether decontamination phase is in the light containment zone.

public static DecontaminationState DecontaminationState { get; }

Property Value

DecontaminationState

EscapeZones

Gets the Escape.EscapeZones that will trigger Escape for player.

public static List<Bounds> EscapeZones { get; }

Property Value

List<Bounds>

EzLayout

Gets the layout of the entrance zone.

public static EzFacilityLayout EzLayout { get; }

Property Value

EzFacilityLayout

HczLayout

Gets the layout of the heavy containment zone.

public static HczFacilityLayout HczLayout { get; }

Property Value

HczFacilityLayout

IsDecontaminationEnabled

Gets or sets a value indicating whether decontamination is enabled.

public static bool IsDecontaminationEnabled { get; set; }

Property Value

bool

IsLczDecontaminated

Gets a value indicating whether decontamination has begun in the light containment zone.

public static bool IsLczDecontaminated { get; }

Property Value

bool

LczLayout

Gets the layout of the light containment zone.

public static LczFacilityLayout LczLayout { get; }

Property Value

LczFacilityLayout

PocketDimensionTeleports

Gets all PocketDimensionTeleport objects.

public static ReadOnlyCollection<PocketDimensionTeleport> PocketDimensionTeleports { get; }

Property Value

ReadOnlyCollection<PocketDimensionTeleport>

RemainingDecontaminationTime

Gets the remaining time for the decontamination process.

public static float RemainingDecontaminationTime { get; }

Property Value

float

The remaining time in seconds for the decontamination process.

Seed

Gets or sets the current seed of the map.

public static int Seed { get; set; }

Property Value

int

SqueakSpawner

Gets the SqueakSpawner.

public static SqueakSpawner SqueakSpawner { get; }

Property Value

SqueakSpawner

Methods

Broadcast(Broadcast, bool)

Broadcasts a message to all players.

public static void Broadcast(Broadcast broadcast, bool shouldClearPrevious = false)

Parameters

broadcast Broadcast

The Broadcast to be broadcasted.

shouldClearPrevious bool

Clears all players' broadcasts before sending the new one.

Broadcast(ushort, Func<Player, string>)

Broadcasts delegate invocation result to all players.

public static void Broadcast(ushort duration, Func<Player, string> func)

Parameters

duration ushort

The duration in seconds.

func Func<Player, string>

The delegate whose invocation result will be the message.

Broadcast(ushort, string, BroadcastFlags, bool)

Broadcasts a message to all players.

public static void Broadcast(ushort duration, string message, Broadcast.BroadcastFlags type = BroadcastFlags.Normal, bool shouldClearPrevious = false)

Parameters

duration ushort

The duration in seconds.

message string

The message that will be broadcast (supports Unity Rich Text formatting).

type Broadcast.BroadcastFlags

The broadcast type.

shouldClearPrevious bool

Clears all players' broadcasts before sending the new one.

ChangeLightsColor(Color)

Changes the UnityEngine.Color of all lights in the facility.

public static void ChangeLightsColor(Color color)

Parameters

color Color

The new UnityEngine.Color of the lights.

Clean(DecalPoolType)

Destroy all specified Decals.DecalPoolType objects.

public static void Clean(DecalPoolType decalType)

Parameters

decalType DecalPoolType

Decal type to destroy.

Clean(DecalPoolType, int)

Destroy specified amount of specified Decals.DecalPoolType object.

public static void Clean(DecalPoolType decalType, int amount)

Parameters

decalType DecalPoolType

Decal type to destroy.

amount int

Amount of decals to destroy.

CleanAllItems()

Destroy all InventorySystem.Items.Pickups.ItemPickupBase objects.

public static void CleanAllItems()

CleanAllItems(IEnumerable<Pickup>)

Destroy all the Pickup objects from the specified list.

public static void CleanAllItems(IEnumerable<Pickup> pickups)

Parameters

pickups IEnumerable<Pickup>

The List of pickups to destroy.

CleanAllRagdolls()

Destroy all PlayerRoles.Ragdolls.BasicRagdoll objects.

public static void CleanAllRagdolls()

CleanAllRagdolls(IEnumerable<Ragdoll>)

Destroy all Ragdoll objects from the specified list.

public static void CleanAllRagdolls(IEnumerable<Ragdoll> ragDolls)

Parameters

ragDolls IEnumerable<Ragdoll>

The List of RagDolls to destroy.

ClearBroadcasts()

Clears all players' broadcasts.

public static void ClearBroadcasts()

DimScreens()

Triggers the end-of-round screen dimming effect (fade to black) globally for all players.

public static bool DimScreens()

Returns

bool

true if the RoundSummary singleton is active; otherwise, false.

Explode(Vector3, ProjectileType, Player)

Explode.

public static void Explode(Vector3 position, ProjectileType projectileType, Player attacker = null)

Parameters

position Vector3

The position where explosion will be created.

projectileType ProjectileType

The projectile that will create the explosion.

attacker Player

The player who create the explosion.

ExplodeEffect(Vector3, ProjectileType)

Spawn projectile effect.

public static void ExplodeEffect(Vector3 position, ProjectileType projectileType)

Parameters

position Vector3

The position where effect will be created.

projectileType ProjectileType

The projectile that will create the effect.

GetNearCameras(Vector3, float)

Gets all the near cameras.

public static IEnumerable<Camera> GetNearCameras(Vector3 position, float toleration = 15)

Parameters

position Vector3

The position from which starting to search cameras.

toleration float

The maximum toleration to define the radius from which get the cameras.

Returns

IEnumerable<Camera>

A IEnumerable<T> of Camera which contains all the found cameras.

GetRandomPickup(ItemType)

Gets a random Pickup.

public static Pickup GetRandomPickup(ItemType type = ItemType.None)

Parameters

type ItemType

Filters by ItemType.

Returns

Pickup

Pickup object.

HideRoundSummary()

Hides the Round Summary screen for all players.

public static bool HideRoundSummary()

Returns

bool

true if the RoundSummary singleton was found and the RPC was sent; otherwise, false.

PlaceBlood(Vector3, Vector3)

Places a blood decal.

[Obsolete("Use PlaceBlood(this Player, Vector3, Vector3, RoleTypeId, int) instead.")]
public static void PlaceBlood(Vector3 position, Vector3 direction)

Parameters

position Vector3

The position of the blood decal.

direction Vector3

The direction of the blood decal.

PlayAmbientSound()

Plays a random ambient sound.

public static void PlayAmbientSound()

PlayAmbientSound(int)

Plays an ambient sound.

public static void PlayAmbientSound(int id)

Parameters

id int

The id of the sound to play.

PlayGunSound(Vector3, ItemType, byte, byte)

Plays a gun sound at the specified position.

[Obsolete("This method is not working. Use PlayGunSound(Player, Vector3, FirearmType, float, int, bool) overload instead.")]
public static void PlayGunSound(Vector3 position, ItemType firearmType, byte maxDistance = 45, byte audioClipId = 0)

Parameters

position Vector3

Position to play the sound at.

firearmType ItemType

The type of firearm to play the sound of.

maxDistance byte

The maximum distance the sound can be heard from.

audioClipId byte

The audio clip ID to play.

PlaySquishSound(Vector3)

Plays the elevator squish sound effect at the specified position for all players.

public static bool PlaySquishSound(Vector3 position)

Parameters

position Vector3

The world position where the sound will be played.

Returns

bool

true if an ElevatorSquish instance was found; otherwise, false.

ResetLightsColor()

Resets the color of all lights in the facility.

public static void ResetLightsColor()

ShowHint(string, float)

Shows a hint to all players.

public static void ShowHint(string message, float duration = 3)

Parameters

message string

The message that will be broadcasted (supports Unity Rich Text formatting).

duration float

The duration in seconds.

ShowRoundSummary(SumInfo_ClassList, SumInfo_ClassList, LeadingTeam, int, int, int, int, int)

Show the Round Summary screen globally for all players.

public static bool ShowRoundSummary(RoundSummary.SumInfo_ClassList initialStats, RoundSummary.SumInfo_ClassList finalStats, RoundSummary.LeadingTeam leadingTeam, int escapedClassDCount, int escapedScientistCount, int totalScpKills, int nextRoundTime, int totalRoundDuration)

Parameters

initialStats RoundSummary.SumInfo_ClassList

The statistics RoundSummary.SumInfo_ClassList at the beginning of the round.

finalStats RoundSummary.SumInfo_ClassList

The statistics RoundSummary.SumInfo_ClassList to be displayed as the final result.

leadingTeam RoundSummary.LeadingTeam

The team to be declared as the winner RoundSummary.LeadingTeam.

escapedClassDCount int

The number of Class-D personnel shown as escaped.

escapedScientistCount int

The number of Scientists shown as escaped.

totalScpKills int

The total number of kills by SCPs to be displayed.

nextRoundTime int

The time in seconds displayed as the next round time.

totalRoundDuration int

The total elapsed duration of the round in seconds.

Returns

bool

true if the RoundSummary singleton was found and the RPC was sent; otherwise, false.

SpawnMice(byte)

Spawns mice inside the EzShelter.

public static void SpawnMice(byte mice = 1)

Parameters

mice byte

The type of mice you want to spawn..

StaffMessage(string, Player)

Sends a staff message to all players online with PlayerPermissions.AdminChat permission.

public static void StaffMessage(string message, Player player = null)

Parameters

message string

The message to send.

player Player

The player to send message as, null will use Server Host.

StartDecontamination()

Forces the light containment zone decontamination process.

public static void StartDecontamination()

TurnOffAllLights(float, ZoneType)

Turns off all lights in the facility.

public static void TurnOffAllLights(float duration, ZoneType zoneTypes = ZoneType.Unspecified)

Parameters

duration float

The duration of the blackout.

zoneTypes ZoneType

The ZoneTypes to affect.

TurnOffAllLights(float, IEnumerable<ZoneType>)

Turns off all lights in the facility.

public static void TurnOffAllLights(float duration, IEnumerable<ZoneType> zoneTypes)

Parameters

duration float

The duration of the blackout.

zoneTypes IEnumerable<ZoneType>

The ZoneTypes to affect.

TurnOnAllLights(IEnumerable<ZoneType>)

Turns on all lights in the facility.

public static void TurnOnAllLights(IEnumerable<ZoneType> zoneTypes)

Parameters

zoneTypes IEnumerable<ZoneType>

The ZoneTypes to affect.

UndimScreens()

Reverses the screen dimming effect, restoring normal visibility globally for all players.

public static bool UndimScreens()

Returns

bool

true if the RoundSummary singleton is active; otherwise, false.

WarheadExplosionEffect(bool)

Triggers the Alpha Warhead atmospheric effect (orange fog/tint) globally for all players.

public static bool WarheadExplosionEffect(bool achieve = false)

Parameters

achieve bool

If set to true, idk what is this maybe achivement.

Returns

bool

true if the AlphaWarheadController is set; otherwise, false.