diff --git a/code/modules/admin/game_master/game_master.dm b/code/modules/admin/game_master/game_master.dm
index 8cb8c985bf..0ec9ee7e3e 100644
--- a/code/modules/admin/game_master/game_master.dm
+++ b/code/modules/admin/game_master/game_master.dm
@@ -30,6 +30,7 @@ GLOBAL_VAR_INIT(radio_communication_clarity, 100)
// Spawn stuff
#define DEFAULT_SPAWN_XENO_STRING XENO_CASTE_DRONE
#define GAME_MASTER_AI_XENOS list(XENO_CASTE_DRONE, XENO_CASTE_RUNNER, XENO_CASTE_LURKER, XENO_CASTE_CRUSHER)
+#define DEFAULT_SPAWN_HIVE_STRING XENO_HIVE_NORMAL
#define DEFAULT_XENO_AMOUNT_TO_SPAWN 1
@@ -71,6 +72,9 @@ GLOBAL_VAR_INIT(radio_communication_clarity, 100)
/// The xeno selected to be spawned in the spawn section
var/selected_xeno = DEFAULT_SPAWN_XENO_STRING
+ /// The hive selected to be spawned in the spawn section
+ var/selected_hive = DEFAULT_SPAWN_HIVE_STRING
+
/// The amount of xenos to spawn in the spawn section
var/xeno_spawn_count = DEFAULT_XENO_AMOUNT_TO_SPAWN
@@ -139,6 +143,7 @@ GLOBAL_VAR_INIT(radio_communication_clarity, 100)
// Spawn stuff
data["selected_xeno"] = selected_xeno
+ data["selected_hive"] = selected_hive
data["spawn_ai"] = spawn_ai
data["spawn_click_intercept"] = spawn_click_intercept
data["xeno_spawn_count"] = xeno_spawn_count
@@ -163,6 +168,8 @@ GLOBAL_VAR_INIT(radio_communication_clarity, 100)
data["spawnable_xenos"] = GAME_MASTER_AI_XENOS
+ data["spawnable_hives"] = ALL_XENO_HIVES
+
data["selectable_behaviors"] = SELECTABLE_XENO_BEHAVIORS
return data
@@ -186,6 +193,11 @@ GLOBAL_VAR_INIT(radio_communication_clarity, 100)
xeno_spawn_count = DEFAULT_XENO_AMOUNT_TO_SPAWN
return
+ if("set_selected_hive")
+ selected_hive = params["new_hive"]
+ xeno_spawn_count = DEFAULT_XENO_AMOUNT_TO_SPAWN
+ return
+
if("xeno_spawn_ai_toggle")
spawn_ai = !spawn_ai
return
@@ -337,7 +349,7 @@ GLOBAL_VAR_INIT(radio_communication_clarity, 100)
var/turf/spawn_turf = get_turf(object)
for(var/i = 1 to xeno_spawn_count)
- new spawning_xeno_type(spawn_turf, null, XENO_HIVE_NORMAL, !spawn_ai)
+ new spawning_xeno_type(spawn_turf, null, selected_hive, !spawn_ai)
return TRUE
@@ -449,6 +461,7 @@ GLOBAL_VAR_INIT(radio_communication_clarity, 100)
#undef DEFAULT_SPAWN_XENO_STRING
#undef GAME_MASTER_AI_XENOS
+#undef DEFAULT_SPAWN_HIVE_STRING
#undef DEFAULT_XENO_AMOUNT_TO_SPAWN
#undef OBJECTIVE_NUMBER_OPTIONS
diff --git a/code/modules/admin/game_master/game_master_submenu/ambush.dm b/code/modules/admin/game_master/game_master_submenu/ambush.dm
index 15205e8520..80709d99cf 100644
--- a/code/modules/admin/game_master/game_master_submenu/ambush.dm
+++ b/code/modules/admin/game_master/game_master_submenu/ambush.dm
@@ -1,6 +1,7 @@
#define DEFAULT_SPAWN_XENO_STRING XENO_CASTE_DRONE
#define GAME_MASTER_AMBUSH_AI_XENOS list(XENO_CASTE_DRONE, XENO_CASTE_RUNNER, XENO_CASTE_LURKER)
+#define DEFAULT_SPAWN_HIVE_STRING XENO_HIVE_NORMAL
#define DEFAULT_XENO_AMOUNT_TO_SPAWN 1
@@ -16,9 +17,15 @@
/// Current selected xeno string to spawn when we hit spawn
var/selected_xeno = DEFAULT_SPAWN_XENO_STRING
+ /// Current selected hive string to spawn when we hit spawn
+ var/selected_hive = DEFAULT_SPAWN_HIVE_STRING
+
/// Current xenos to spawn in an ambush, organized as xeno_type = number_to_spawn
var/list/current_ambush = list()
+ /// Current hive to spawn in an ambush
+ var/current_ambushing_hive = DEFAULT_SPAWN_HIVE_STRING
+
/// Current info on the ambush passed to the menu
var/ambush_info = "No Current Ambush"
@@ -55,6 +62,7 @@
data["xeno_spawn_count"] = xeno_spawn_count
data["selected_xeno"] = selected_xeno
+ data["selected_hive"] = selected_hive
data["ambush_info"] = ambush_info
return data
@@ -66,6 +74,8 @@
data["spawnable_xenos"] = GAME_MASTER_AMBUSH_AI_XENOS
+ data["spawnable_hives"] = ALL_XENO_HIVES
+
return data
/datum/game_master_submenu/ambush/ui_act(action, list/params, datum/tgui/ui, datum/ui_state/state)
@@ -85,6 +95,11 @@
xeno_spawn_count = DEFAULT_XENO_AMOUNT_TO_SPAWN
return TRUE
+ if("set_selected_hive")
+ selected_hive = params["new_hive"]
+ xeno_spawn_count = DEFAULT_XENO_AMOUNT_TO_SPAWN
+ return TRUE
+
if("ambush")
setup_ambush()
return TRUE
@@ -126,18 +141,21 @@
temp_string = copytext(temp_string, 1, -2)
+ temp_string += " of [selected_hive]"
+
ambush_info = temp_string
- SEND_SIGNAL(referenced_atom, COMSIG_GAME_MASTER_AMBUSH_SET, current_ambush.Copy(), ambush_info)
+ SEND_SIGNAL(referenced_atom, COMSIG_GAME_MASTER_AMBUSH_SET, current_ambush.Copy(), selected_hive, ambush_info)
primary = TRUE
-/datum/game_master_submenu/ambush/proc/other_ambush_set(atom/movable/other_parent, new_ambush, new_ambush_info)
+/datum/game_master_submenu/ambush/proc/other_ambush_set(atom/movable/other_parent, new_ambush, new_hive, new_ambush_info)
SIGNAL_HANDLER
primary = FALSE
current_ambush = new_ambush
+ current_ambushing_hive = new_hive
ambush_info = new_ambush_info
#define AMBUSH_ESCAPE_INCREMENT_TIME (1 SECONDS)
@@ -187,7 +205,7 @@
playsound(referenced_atom, pick(ambush_sounds), 25, 1)
- new xeno_type(spawn_turf, null, XENO_HIVE_NORMAL)
+ new xeno_type(spawn_turf, null, selected_hive)
/// Shakes the spawner via animation and returns a callback to reset the animation
/datum/game_master_submenu/ambush/proc/shake_spawner()
@@ -195,4 +213,5 @@
#undef DEFAULT_SPAWN_XENO_STRING
#undef GAME_MASTER_AMBUSH_AI_XENOS
+#undef DEFAULT_SPAWN_HIVE_STRING
#undef DEFAULT_XENO_AMOUNT_TO_SPAWN
diff --git a/tgui/packages/tgui/interfaces/GameMaster.js b/tgui/packages/tgui/interfaces/GameMaster.js
index 6814a89394..32949fea54 100644
--- a/tgui/packages/tgui/interfaces/GameMaster.js
+++ b/tgui/packages/tgui/interfaces/GameMaster.js
@@ -51,6 +51,16 @@ export const GameMasterSpawningPanel = (props, context) => {
}}
/>
+
+ {
+ act('set_selected_hive', { new_hive });
+ }}
+ />
+
diff --git a/tgui/packages/tgui/interfaces/GameMasterSubmenuAmbush.js b/tgui/packages/tgui/interfaces/GameMasterSubmenuAmbush.js
index 38462d8840..77bd7c5231 100644
--- a/tgui/packages/tgui/interfaces/GameMasterSubmenuAmbush.js
+++ b/tgui/packages/tgui/interfaces/GameMasterSubmenuAmbush.js
@@ -48,6 +48,16 @@ export const GameMasterSubmenuAmbushSpawningPanel = (props, context) => {
}}
/>
+
+ {
+ act('set_selected_hive', { new_hive });
+ }}
+ />
+