Class Map
A set of tools to easily handle the in-game map.
Inheritance
Inherited Members
Namespace: Exiled.API.Features
Assembly: Exiled.API.dll
Syntax
public static class Map
Properties
| Improve this Doc View SourceAmbientSoundPlayer
Gets the AmbientSoundPlayer.
Declaration
public static AmbientSoundPlayer AmbientSoundPlayer { get; }
Property Value
Type | Description |
---|---|
AmbientSoundPlayer |
AmnesticCloudPrefab
Gets the amnestic cloud prefab.
Declaration
public static Scp939AmnesticCloudInstance AmnesticCloudPrefab { get; }
Property Value
Type | Description |
---|---|
PlayerRoles.PlayableScps.Scp939.Scp939AmnesticCloudInstance |
DecontaminationState
Gets a value indicating whether decontamination phase is in the light containment zone.
Declaration
public static DecontaminationState DecontaminationState { get; }
Property Value
Type | Description |
---|---|
DecontaminationState |
IsLczDecontaminated
Gets a value indicating whether decontamination has begun in the light containment zone.
Declaration
public static bool IsLczDecontaminated { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Lockers
Gets all MapGeneration.Distributors.Locker objects.
Declaration
public static ReadOnlyCollection<Locker> Lockers { get; }
Property Value
Type | Description |
---|---|
System.Collections.ObjectModel.ReadOnlyCollection<MapGeneration.Distributors.Locker> |
PocketDimensionTeleports
Gets all PocketDimensionTeleport objects.
Declaration
public static ReadOnlyCollection<PocketDimensionTeleport> PocketDimensionTeleports { get; }
Property Value
Type | Description |
---|---|
System.Collections.ObjectModel.ReadOnlyCollection<PocketDimensionTeleport> |
Seed
Gets or sets the current seed of the map.
Declaration
public static int Seed { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
TantrumPrefab
Gets the tantrum prefab.
Declaration
public static TantrumEnvironmentalHazard TantrumPrefab { get; }
Property Value
Type | Description |
---|---|
Hazards.TantrumEnvironmentalHazard |
Toys
Gets all AdminToy objects.
Declaration
public static ReadOnlyCollection<AdminToy> Toys { get; }
Property Value
Type | Description |
---|---|
System.Collections.ObjectModel.ReadOnlyCollection<AdminToy> |
Methods
| Improve this Doc View SourceBroadcast(Broadcast, Boolean)
Broadcasts a message to all players.
Declaration
public static void Broadcast(Broadcast broadcast, bool shouldClearPrevious = false)
Parameters
Type | Name | Description |
---|---|---|
Broadcast | broadcast | The Broadcast to be broadcasted. |
System.Boolean | shouldClearPrevious | Clears all players' broadcasts before sending the new one. |
Broadcast(UInt16, String, Broadcast.BroadcastFlags, Boolean)
Broadcasts a message to all players.
Declaration
public static void Broadcast(ushort duration, string message, Broadcast.BroadcastFlags type = Broadcast.BroadcastFlags.Normal, bool shouldClearPrevious = false)
Parameters
Type | Name | Description |
---|---|---|
System.UInt16 | duration | The duration in seconds. |
System.String | message | The message that will be broadcast (supports Unity Rich Text formatting). |
Broadcast.BroadcastFlags | type | The broadcast type. |
System.Boolean | shouldClearPrevious | Clears all players' broadcasts before sending the new one. |
ChangeLightsColor(Color)
Changes the UnityEngine.Color of all lights in the facility.
Declaration
public static void ChangeLightsColor(Color color)
Parameters
Type | Name | Description |
---|---|---|
UnityEngine.Color | color | The new UnityEngine.Color of the lights. |
CleanAllItems()
Destroy all InventorySystem.Items.Pickups.ItemPickupBase objects.
Declaration
public static void CleanAllItems()
CleanAllItems(IEnumerable<Pickup>)
Destroy all the Pickup objects from the specified list.
Declaration
public static void CleanAllItems(IEnumerable<Pickup> pickups)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<Pickup> | pickups | The List of pickups to destroy. |
CleanAllRagdolls()
Destroy all PlayerRoles.Ragdolls.BasicRagdoll objects.
Declaration
public static void CleanAllRagdolls()
CleanAllRagdolls(IEnumerable<Ragdoll>)
Destroy all Ragdoll objects from the specified list.
Declaration
public static void CleanAllRagdolls(IEnumerable<Ragdoll> ragDolls)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<Ragdoll> | ragDolls | The List of RagDolls to destroy. |
ClearBroadcasts()
Clears all players' broadcasts.
Declaration
public static void ClearBroadcasts()
Explode(Vector3, ProjectileType, Player)
Explode.
Declaration
public static void Explode(Vector3 position, ProjectileType projectileType, Player attacker = null)
Parameters
Type | Name | Description |
---|---|---|
UnityEngine.Vector3 | position | The position where explosion will be created. |
ProjectileType | projectileType | The projectile that will create the explosion. |
Player | attacker | The player who create the explosion. |
ExplodeEffect(Vector3, ProjectileType)
Spawn projectile effect.
Declaration
public static void ExplodeEffect(Vector3 position, ProjectileType projectileType)
Parameters
Type | Name | Description |
---|---|---|
UnityEngine.Vector3 | position | The position where effect will be created. |
ProjectileType | projectileType | The projectile that will create the effect. |
GetNearCameras(Vector3, Single)
Gets all the near cameras.
Declaration
public static IEnumerable<Camera> GetNearCameras(Vector3 position, float toleration = 15F)
Parameters
Type | Name | Description |
---|---|---|
UnityEngine.Vector3 | position | The position from which starting to search cameras. |
System.Single | toleration | The maximum toleration to define the radius from which get the cameras. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<Camera> | A System.Collections.Generic.IEnumerable<T> of Camera which contains all the found cameras. |
GetRandomLocker()
Gets a random MapGeneration.Distributors.Locker.
Declaration
public static Locker GetRandomLocker()
Returns
Type | Description |
---|---|
MapGeneration.Distributors.Locker | MapGeneration.Distributors.Locker object. |
GetRandomPickup(ItemType)
Gets a random Pickup.
Declaration
public static Pickup GetRandomPickup(ItemType type = ItemType.None)
Parameters
Type | Name | Description |
---|---|---|
ItemType | type | Filters by ItemType. |
Returns
Type | Description |
---|---|
Pickup | Pickup object. |
PlaceBlood(Vector3, Vector3)
Places a blood decal.
Declaration
public static void PlaceBlood(Vector3 position, Vector3 direction)
Parameters
Type | Name | Description |
---|---|---|
UnityEngine.Vector3 | position | The position of the blood decal. |
UnityEngine.Vector3 | direction | The direction of the blood decal. |
PlaceTantrum(Vector3, Boolean)
Places a Tantrum (SCP-173's ability) in the indicated position.
Declaration
public static TantrumHazard PlaceTantrum(Vector3 position, bool isActive = true)
Parameters
Type | Name | Description |
---|---|---|
UnityEngine.Vector3 | position | The position where you want to spawn the Tantrum. |
System.Boolean | isActive | Whether or not the tantrum will apply the Stained effect. |
Returns
Type | Description |
---|---|
TantrumHazard | The TantrumHazard instance. |
Remarks
If isActive
is true, the tantrum is moved slightly up from its original position. Otherwise, the collision will not be detected and the slowness will not work.
PlayAmbientSound()
Plays a random ambient sound.
Declaration
public static void PlayAmbientSound()
PlayAmbientSound(Int32)
Plays an ambient sound.
Declaration
public static void PlayAmbientSound(int id)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | id | The id of the sound to play. |
ResetLightsColor()
Resets the UnityEngine.Color of all lights in the facility.
Declaration
public static void ResetLightsColor()
ShowHint(String, Single)
Shows a hint to all players.
Declaration
public static void ShowHint(string message, float duration = 3F)
Parameters
Type | Name | Description |
---|---|---|
System.String | message | The message that will be broadcasted (supports Unity Rich Text formatting). |
System.Single | duration | The duration in seconds. |
StartDecontamination()
Starts the light containment zone decontamination process.
Declaration
public static void StartDecontamination()
TurnOffAllLights(Single, ZoneType)
Turns off all lights in the facility.
Declaration
public static void TurnOffAllLights(float duration, ZoneType zoneTypes = ZoneType.Unspecified)
Parameters
Type | Name | Description |
---|---|---|
System.Single | duration | The duration of the blackout. |
ZoneType | zoneTypes | The ZoneTypes to affect. |
TurnOffAllLights(Single, IEnumerable<ZoneType>)
Turns off all lights in the facility.
Declaration
public static void TurnOffAllLights(float duration, IEnumerable<ZoneType> zoneTypes)
Parameters
Type | Name | Description |
---|---|---|
System.Single | duration | The duration of the blackout. |
System.Collections.Generic.IEnumerable<ZoneType> | zoneTypes | The ZoneTypes to affect. |