diff --git a/EXILED/Exiled.API/Features/Map.cs b/EXILED/Exiled.API/Features/Map.cs
index 3f1f6fc1a0..2b3c4cdb00 100644
--- a/EXILED/Exiled.API/Features/Map.cs
+++ b/EXILED/Exiled.API/Features/Map.cs
@@ -54,6 +54,8 @@ public static class Map
private static AmbientSoundPlayer ambientSoundPlayer;
+ private static SqueakSpawner squeakSpawner;
+
///
/// Gets the tantrum prefab.
///
@@ -109,6 +111,11 @@ public static int Seed
///
public static AmbientSoundPlayer AmbientSoundPlayer => ambientSoundPlayer ??= ReferenceHub.HostHub.GetComponent();
+ ///
+ /// Gets the .
+ ///
+ public static SqueakSpawner SqueakSpawner => squeakSpawner ??= Object.FindObjectOfType();
+
///
/// Broadcasts a message to all players.
///
@@ -362,6 +369,19 @@ public static void PlayGunSound(Vector3 position, ItemType firearmType, byte max
msg.SendToAuthenticated();
}
+ ///
+ /// Spawns mice inside the .
+ ///
+ /// The type of mice you want to spawn..
+ public static void SpawnMice(byte mice = 1)
+ {
+ if (mice > SqueakSpawner.mice.Length)
+ throw new ArgumentOutOfRangeException($"Mouse type must be between 1 and {SqueakSpawner.mice.Length}.");
+
+ SqueakSpawner.NetworksyncSpawn = mice;
+ SqueakSpawner.SyncMouseSpawn(0, SqueakSpawner.NetworksyncSpawn);
+ }
+
///
/// Clears the lazy loading game object cache.
///