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

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

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, 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()

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.

PlaceBlood(Vector3, Vector3)

Places a blood decal.

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.

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.

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.

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..

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.