[MIRROR] Fix ghost role free slot spawns (#11840)

Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
Co-authored-by: C.L. <killer65311@gmail.com>
This commit is contained in:
CHOMPStation2StaffMirrorBot
2025-10-18 20:23:32 -07:00
committed by GitHub
parent e6ae743646
commit 05f9a24e8f
7 changed files with 49 additions and 52 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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."))

View File

@@ -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"

View File

@@ -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"

View File

@@ -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" = (

View File

@@ -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] };