From 05f9a24e8fb3cebb03904e4ac1a10a5bb406950e Mon Sep 17 00:00:00 2001 From: CHOMPStation2StaffMirrorBot <94713762+CHOMPStation2StaffMirrorBot@users.noreply.github.com> Date: Sat, 18 Oct 2025 20:23:32 -0700 Subject: [PATCH] [MIRROR] Fix ghost role free slot spawns (#11840) Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com> Co-authored-by: C.L. --- 1Item_list.dmm | 16 ++-------- code/datums/ghost_spawn.dm | 3 ++ code/datums/ghost_spawn_options.dm | 20 +++++++++++- .../objects/structures/ghost_pods/event_vr.dm | 9 ------ .../ghost_pods/unified_ghost_hole.dm | 31 +++++++++++-------- .../maps/southern_cross/southern_cross-1.dmm | 10 +++--- .../GhostSpawn/GhostJoin/GhostJoin.tsx | 12 ++----- 7 files changed, 49 insertions(+), 52 deletions(-) diff --git a/1Item_list.dmm b/1Item_list.dmm index d9ce629faa..5f16926b14 100644 --- a/1Item_list.dmm +++ b/1Item_list.dmm @@ -8019,12 +8019,6 @@ icon_state = "vault" }, /area/survivalpod) -"csh" = ( -/obj/structure/ghost_pod/ghost_activated/maintpred/no_announce, -/turf/simulated/fitness{ - icon_state = "vault" - }, -/area/survivalpod) "csn" = ( /obj/item/bone/skull/unathi, /turf/simulated/fitness{ @@ -55785,12 +55779,6 @@ icon_state = "vault" }, /area/survivalpod) -"qsi" = ( -/obj/structure/ghost_pod/ghost_activated/morphspawn/no_announce, -/turf/simulated/fitness{ - icon_state = "vault" - }, -/area/survivalpod) "qsm" = ( /obj/machinery/abstract_grub_machine, /turf/simulated/fitness{ @@ -88812,7 +88800,7 @@ bCw eUy fxB bSW -csh +pDu bSW bSW bSW @@ -89216,7 +89204,7 @@ ugJ qMm kZl bSW -qsi +ldZ bSW hVu bSW diff --git a/code/datums/ghost_spawn.dm b/code/datums/ghost_spawn.dm index 4491abf3aa..4cb767c67e 100644 --- a/code/datums/ghost_spawn.dm +++ b/code/datums/ghost_spawn.dm @@ -85,6 +85,9 @@ GLOBAL_VAR_INIT(allowed_ghost_spawns, 2) if("lost_drone_spawn") join_lost(ui.user) . = TRUE + if("maintenance_critter") + join_maintrcritter(ui.user) + . = TRUE if("gravekeeper_spawn") join_grave(ui.user) . = TRUE diff --git a/code/datums/ghost_spawn_options.dm b/code/datums/ghost_spawn_options.dm index ad476cd83a..3f6ecaace8 100644 --- a/code/datums/ghost_spawn_options.dm +++ b/code/datums/ghost_spawn_options.dm @@ -209,7 +209,6 @@ gem.catch_mob(user) //This will result in us being deleted so... - /datum/tgui_module/ghost_spawn_menu/proc/vore_belly_spawn(mob/observer/dead/user, selected_player) var/mob/living/target = locate(selected_player) in GLOB.player_list @@ -262,6 +261,25 @@ var/obj/structure/ghost_pod/manual/lost_drone/dogborg/lost = new(get_turf(spawnspot)) lost.create_occupant(user) +/datum/tgui_module/ghost_spawn_menu/proc/join_maintrcritter(mob/observer/dead/user) + if(jobban_isbanned(user, JOB_GHOSTROLES)) + to_chat(user, span_danger("You are banned from playing ghost roles and cannot spawn as a maint critter.")) + return + + if(GLOB.allowed_ghost_spawns <= 0) + to_chat(user, span_warning("There're no free ghost join slots.")) + return + + var/obj/effect/landmark/spawnspot = get_ghost_role_spawn() + if(!spawnspot) + to_chat(user, span_warning("No spawnpoint available.")) + return + + GLOB.allowed_ghost_spawns-- + announce_ghost_joinleave(user, 0, "They are now a maint critter.") + var/obj/structure/ghost_pod/ghost_activated/unified_hole/maint_critter = new(get_turf(spawnspot)) + maint_critter.create_occupant(user) + /datum/tgui_module/ghost_spawn_menu/proc/join_grave(mob/observer/dead/user) if(jobban_isbanned(user, JOB_CYBORG)) to_chat(user, span_danger("You are banned from playing synthetics and cannot spawn as a gravekeeper.")) diff --git a/code/game/objects/structures/ghost_pods/event_vr.dm b/code/game/objects/structures/ghost_pods/event_vr.dm index 9d4ed06c5f..27ce2fa256 100644 --- a/code/game/objects/structures/ghost_pods/event_vr.dm +++ b/code/game/objects/structures/ghost_pods/event_vr.dm @@ -13,7 +13,6 @@ anchored = TRUE invisibility = INVISIBILITY_OBSERVER spawn_active = TRUE - var/announce_prob = 35 /obj/structure/ghost_pod/ghost_activated/maintpred/create_occupant(var/mob/M) ..() @@ -65,9 +64,6 @@ newPred.vore_selected = newPred.vore_organs[1] qdel(src) -/obj/structure/ghost_pod/ghost_activated/maintpred/no_announce - announce_prob = 0 - /obj/structure/ghost_pod/ghost_activated/morphspawn name = "weird goo" desc = "A pile of weird gunk... Wait, is it actually moving?" @@ -78,7 +74,6 @@ anchored = TRUE invisibility = INVISIBILITY_OBSERVER spawn_active = TRUE - var/announce_prob = 50 /obj/structure/ghost_pod/ghost_activated/morphspawn/create_occupant(var/mob/M) ..() @@ -109,13 +104,9 @@ newMorph.vore_selected = newMorph.vore_organs[1] qdel(src) -/obj/structure/ghost_pod/ghost_activated/morphspawn/no_announce - announce_prob = 0 - /obj/structure/ghost_pod/ghost_activated/maintpred/redgate //For ghostpods placed in the redgate that aren't spawned via an event name = "creature hole" desc = "Looks like some creature dug is hiding in the redgate..." - announce_prob = 0 icon_state = "redgate_hole" icon_state_opened = "redgate_hole" diff --git a/code/game/objects/structures/ghost_pods/unified_ghost_hole.dm b/code/game/objects/structures/ghost_pods/unified_ghost_hole.dm index d528e522fd..e0b8e8c704 100644 --- a/code/game/objects/structures/ghost_pods/unified_ghost_hole.dm +++ b/code/game/objects/structures/ghost_pods/unified_ghost_hole.dm @@ -11,6 +11,9 @@ spawn_active = TRUE var/redgate_restricted = FALSE +/obj/structure/ghost_pod/ghost_activated/unified_hole/create_occupant(mob/observer/dead/user) + attack_ghost(user) + //override the standard attack_ghost proc for custom messages /obj/structure/ghost_pod/ghost_activated/unified_hole/attack_ghost(var/mob/observer/dead/user) var/choice @@ -20,7 +23,7 @@ //No OOC notes/FT if(not_has_ooc_text(user)) - //to_chat(user, span_warning("You must have proper out-of-character notes and flavor text configured for your current character slot to use this spawnpoint.")) + to_chat(user, span_warning("You must have proper out-of-character notes and flavor text configured for your current character slot to use this spawnpoint.")) return if(redgate_restricted) @@ -28,19 +31,21 @@ else choice = tgui_alert(user, "Which type of critter do you wish to spawn as?", "Critter Spawner", list("Mob", "Morph", "Lurker", "Cancel")) - - if(choice == "Mob") - create_simplemob(user) - else if(choice == "Morph") - create_morph(user) - else if(choice == "Lurker") - if(!is_alien_whitelisted(user.client, GLOB.all_species[user.client.prefs.species])) - to_chat(user, span_warning("You cannot use this spawnpoint to spawn as a species you are not whitelisted for!")) + switch(choice) + if(null, "Cancel") return - else + if("Mob") + create_simplemob(user) + if("Morph") + create_morph(user) + if("Lurker") + if(!is_alien_whitelisted(user.client, GLOB.all_species[user.client.prefs.species])) + to_chat(user, span_warning("You cannot use this spawnpoint to spawn as a species you are not whitelisted for!")) + return create_lurker(user) - else if(choice == "Cancel") - return + used = TRUE + icon_state = icon_state_opened + GLOB.active_ghost_pods -= src /obj/structure/ghost_pod/ghost_activated/unified_hole/proc/create_simplemob(var/mob/M) var/choice @@ -155,8 +160,8 @@ GLOB.active_ghost_pods += src /obj/structure/ghost_pod/ghost_activated/unified_hole/Destroy() - . = ..() GLOB.active_ghost_pods -= src + . = ..() /obj/structure/ghost_pod/ghost_activated/unified_hole/redgate name = "Redspace inhabitant hole" diff --git a/modular_chomp/maps/southern_cross/southern_cross-1.dmm b/modular_chomp/maps/southern_cross/southern_cross-1.dmm index 6dda0d7c5b..ecb4bc5575 100644 --- a/modular_chomp/maps/southern_cross/southern_cross-1.dmm +++ b/modular_chomp/maps/southern_cross/southern_cross-1.dmm @@ -224,7 +224,7 @@ /turf/simulated/floor/plating/turfpack/station, /area/maintenance/zeroport) "aE" = ( -/obj/structure/ghost_pod/ghost_activated/maintpred/no_announce, +/obj/structure/ghost_pod/ghost_activated/maintpred, /turf/simulated/floor/plating/turfpack/station, /area/maintenance/abcargo) "aF" = ( @@ -240,7 +240,7 @@ /area/maintenance/engineering/gravgen) "aG" = ( /obj/effect/decal/cleanable/flour, -/obj/structure/ghost_pod/ghost_activated/morphspawn/no_announce, +/obj/structure/ghost_pod/ghost_activated/morphspawn, /turf/simulated/floor/plating/turfpack/station, /area/maintenance/abchemistry) "aH" = ( @@ -250,7 +250,7 @@ /turf/simulated/floor/wood/alt/parquet/turfpack/station, /area/maintenance/lookout) "aI" = ( -/obj/structure/ghost_pod/ghost_activated/maintpred/no_announce, +/obj/structure/ghost_pod/ghost_activated/maintpred, /turf/simulated/floor/wood/turfpack/station, /area/maintenance/zerobar) "aJ" = ( @@ -261,7 +261,7 @@ /turf/simulated/floor/tiled/techfloor, /area/engineering/gravgen) "aK" = ( -/obj/structure/ghost_pod/ghost_activated/maintpred/no_announce, +/obj/structure/ghost_pod/ghost_activated/maintpred, /turf/simulated/floor/tiled/white, /area/maintenance/abscience) "aL" = ( @@ -4460,7 +4460,7 @@ /obj/structure/cable{ icon_state = "4-8" }, -/obj/structure/ghost_pod/ghost_activated/morphspawn/no_announce, +/obj/structure/ghost_pod/ghost_activated/morphspawn, /turf/simulated/floor/tiled/white, /area/maintenance/abfirstaid) "rZ" = ( diff --git a/tgui/packages/tgui/interfaces/GhostSpawn/GhostJoin/GhostJoin.tsx b/tgui/packages/tgui/interfaces/GhostSpawn/GhostJoin/GhostJoin.tsx index 7fbad340d3..969918e0a5 100644 --- a/tgui/packages/tgui/interfaces/GhostSpawn/GhostJoin/GhostJoin.tsx +++ b/tgui/packages/tgui/interfaces/GhostSpawn/GhostJoin/GhostJoin.tsx @@ -58,12 +58,12 @@ export const GhostJoin = (props: { all_ghost_join_options: GhostJoinData }) => { 'lost_drone_spawn', ); specialRoles[2] = describeSpecialData( - 'Maint Pred', + 'Maintenance Critter', !!ghost_banned, remaining_ghost_roles, !!existing_ghost_spawnpoints, special_role_respawn, - 'maintpred_spawn', + 'maintenance_critter', ); specialRoles[3] = describeSpecialData( 'Gravekeeper Drone', @@ -73,14 +73,6 @@ export const GhostJoin = (props: { all_ghost_join_options: GhostJoinData }) => { special_role_respawn, 'gravekeeper_spawn', ); - specialRoles[4] = describeSpecialData( - 'Morph', - !!ghost_banned, - remaining_ghost_roles, - !!existing_ghost_spawnpoints, - special_role_respawn, - 'morph_spawn', - ); const playerDropdown = Object.entries(drone_data.fabricators).map((entry) => { return { displayText: entry[1], value: entry[0] };