Class Map
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
EscapeZones
Gets the Escape.EscapeZones that will trigger Escape for player.
public static List<Bounds> EscapeZones { get; }
Property Value
- List<Bounds>
IsDecontaminationEnabled
Gets or sets a value indicating whether decontamination is enabled.
public static bool IsDecontaminationEnabled { get; set; }
Property Value
IsLczDecontaminated
Gets a value indicating whether decontamination has begun in the light containment zone.
public static bool IsLczDecontaminated { get; }
Property Value
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
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
broadcastBroadcastThe Broadcast to be broadcasted.
shouldClearPreviousboolClears 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
durationushortThe duration in seconds.
funcFunc<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
durationushortThe duration in seconds.
messagestringThe message that will be broadcast (supports Unity Rich Text formatting).
typeBroadcast.BroadcastFlagsThe broadcast type.
shouldClearPreviousboolClears 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
colorColorThe new UnityEngine.Color of the lights.
Clean(DecalPoolType)
Destroy all specified Decals.DecalPoolType objects.
public static void Clean(DecalPoolType decalType)
Parameters
decalTypeDecalPoolTypeDecal type to destroy.
Clean(DecalPoolType, int)
Destroy specified amount of specified Decals.DecalPoolType object.
public static void Clean(DecalPoolType decalType, int amount)
Parameters
decalTypeDecalPoolTypeDecal type to destroy.
amountintAmount 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
pickupsIEnumerable<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
ragDollsIEnumerable<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
positionVector3The position where explosion will be created.
projectileTypeProjectileTypeThe projectile that will create the explosion.
attackerPlayerThe player who create the explosion.
ExplodeEffect(Vector3, ProjectileType)
Spawn projectile effect.
public static void ExplodeEffect(Vector3 position, ProjectileType projectileType)
Parameters
positionVector3The position where effect will be created.
projectileTypeProjectileTypeThe 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
positionVector3The position from which starting to search cameras.
tolerationfloatThe 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
typeItemTypeFilters by ItemType.
Returns
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
positionVector3The position of the blood decal.
directionVector3The 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
idintThe 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
positionVector3Position to play the sound at.
firearmTypeItemTypeThe type of firearm to play the sound of.
maxDistancebyteThe maximum distance the sound can be heard from.
audioClipIdbyteThe 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
messagestringThe message that will be broadcasted (supports Unity Rich Text formatting).
durationfloatThe duration in seconds.
SpawnMice(byte)
Spawns mice inside the EzShelter.
public static void SpawnMice(byte mice = 1)
Parameters
micebyteThe 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
messagestringThe message to send.
playerPlayerThe 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
TurnOffAllLights(float, IEnumerable<ZoneType>)
Turns off all lights in the facility.
public static void TurnOffAllLights(float duration, IEnumerable<ZoneType> zoneTypes)
Parameters
durationfloatThe duration of the blackout.
zoneTypesIEnumerable<ZoneType>The ZoneTypes to affect.
TurnOnAllLights(IEnumerable<ZoneType>)
Turns on all lights in the facility.
public static void TurnOnAllLights(IEnumerable<ZoneType> zoneTypes)
Parameters
zoneTypesIEnumerable<ZoneType>The ZoneTypes to affect.