mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
[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:
committed by
GitHub
parent
e6ae743646
commit
05f9a24e8f
@@ -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
|
||||
|
||||
@@ -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."))
|
||||
|
||||
Reference in New Issue
Block a user