simple ghost pod find (#17909)

* simple ghost spawn rewrite

* neutral

* .

* don't close

* migrate vore spawn

* use a searchable list

* move some more verbs

* allow special role spawns

* add key

* .

* fix that part

* announce for logging

* filter those

* typ o

* .

* .

* Update SelectionList.tsx

* .

* that

* .

---------

Co-authored-by: Cameron Lennox <killer65311@gmail.com>
This commit is contained in:
Kashargul
2025-07-17 01:00:51 +02:00
committed by GitHub
parent f94a66cb97
commit 426b24d37e
34 changed files with 1543 additions and 430 deletions
+2 -56
View File
@@ -41,6 +41,7 @@
var/ghost_sprite = null
var/last_revive_notification = null // world.time of last notification, used to avoid spamming players from defibs or cloners.
var/cleanup_timer // Refernece to a timer that will delete this mob if no client returns
var/selecting_ghostrole = FALSE
invisibility = INVISIBILITY_OBSERVER
layer = BELOW_MOB_LAYER
@@ -648,61 +649,6 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
var/rads = SSradiation.get_rads_at_turf(t)
to_chat(src, span_notice("Radiation level: [rads ? rads : "0"] Bq."))
/mob/observer/dead/verb/become_mouse()
set name = "Become mouse"
set category = "Ghost.Join"
if(CONFIG_GET(flag/disable_player_mice))
to_chat(src, span_warning("Spawning as a mouse is currently disabled."))
return
//VOREStation Add Start
if(jobban_isbanned(src, JOB_GHOSTROLES))
to_chat(src, span_warning("You cannot become a mouse because you are banned from playing ghost roles."))
return
//VOREStation Add End
if(!MayRespawn(1))
return
var/turf/T = get_turf(src)
if(!T || (T.z in using_map.admin_levels))
to_chat(src, span_warning("You may not spawn as a mouse on this Z-level."))
return
var/timedifference = world.time - client.time_died_as_mouse
if(client.time_died_as_mouse && timedifference <= CONFIG_GET(number/mouse_respawn_time) MINUTES)
var/timedifference_text
timedifference_text = time2text(CONFIG_GET(number/mouse_respawn_time) MINUTES - timedifference,"mm:ss")
to_chat(src, span_warning("You may only spawn again as a mouse more than [CONFIG_GET(number/mouse_respawn_time)] minutes after your death. You have [timedifference_text] left."))
return
var/response = tgui_alert(src, "Are you -sure- you want to become a mouse?","Are you sure you want to squeek?",list("Squeek!","Nope!"))
if(response != "Squeek!") return //Hit the wrong key...again.
//find a viable mouse candidate
var/mob/living/simple_mob/animal/passive/mouse/host
var/obj/machinery/atmospherics/unary/vent_pump/vent_found
var/list/found_vents = list()
for(var/obj/machinery/atmospherics/unary/vent_pump/v in GLOB.machines)
if(!v.welded && v.z == T.z && v.network && v.network.normal_members.len > 20)
found_vents.Add(v)
if(found_vents.len)
vent_found = pick(found_vents)
host = new /mob/living/simple_mob/animal/passive/mouse(vent_found)
else
to_chat(src, span_warning("Unable to find any unwelded vents to spawn mice at."))
if(host)
if(CONFIG_GET(flag/uneducated_mice))
host.universal_understand = 0
announce_ghost_joinleave(src, 0, "They are now a mouse.")
host.ckey = src.ckey
host.add_ventcrawl(vent_found)
to_chat(host, span_info("You are now a mouse. Try to avoid interaction with players, and do not give hints away that you are more than a simple rodent."))
/mob/observer/dead/verb/view_manfiest()
set name = "Show Crew Manifest"
set category = "Ghost.Game"
@@ -916,7 +862,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
return 0
if(mind && mind.current && mind.current.stat != DEAD && can_reenter_corpse)
if(feedback)
to_chat(src, span_warning("Your non-dead body prevent you from respawning."))
to_chat(src, span_warning("Your non-dead body prevents you from respawning."))
return 0
if(CONFIG_GET(flag/antag_hud_restricted) && has_enabled_antagHUD == 1)
if(feedback)
+5 -77
View File
@@ -1,62 +1,3 @@
/mob/observer/dead/verb/nifjoin()
set category = "Ghost.Join"
set name = "Join Into Soulcatcher"
set desc = "Select a player with a working NIF + Soulcatcher NIFSoft to join into it."
var/picked = tgui_input_list(src, "Pick a friend with NIF and Soulcatcher to join into. Harrass strangers, get banned. Not everyone has a NIF w/ Soulcatcher.","Select a player", GLOB.player_list)
//Didn't pick anyone or picked a null
if(!picked)
return
//Good choice testing and some instance-grabbing
if(!ishuman(picked))
to_chat(src,span_warning("[picked] isn't in a humanoid mob at the moment."))
return
var/mob/living/carbon/human/H = picked
if(H.stat || !H.client)
to_chat(src,span_warning("[H] isn't awake/alive at the moment."))
return
if(!H.nif)
to_chat(src,span_warning("[H] doesn't have a NIF installed."))
return
var/datum/nifsoft/soulcatcher/SC = H.nif.imp_check(NIF_SOULCATCHER)
if(!SC)
to_chat(src,span_warning("[H] doesn't have the Soulcatcher NIFSoft installed, or their NIF is unpowered."))
return
//Fine fine, we can ask.
var/obj/item/nif/nif = H.nif
to_chat(src,span_notice("Request sent to [H]."))
var/req_time = world.time
nif.notify("Transient mindstate detected, analyzing...")
sleep(15) //So if they are typing they get interrupted by sound and message, and don't type over the box
var/response = tgui_alert(H,"[src] ([src.key]) wants to join into your Soulcatcher.","Soulcatcher Request",list("Deny","Allow"), timeout = 1 MINUTE)
if(!response || response == "Deny")
to_chat(src,span_warning("[H] denied your request."))
return
if((world.time - req_time) > 1 MINUTE)
to_chat(H,span_warning("The request had already expired. (1 minute waiting max)"))
return
//Final check since we waited for input a couple times.
if(H && src && src.key && !H.stat && nif && SC)
if(!mind) //No mind yet, aka haven't played in this round.
mind = new(key)
mind.name = name
mind.current = src
mind.active = TRUE
SC.catch_mob(src) //This will result in us being deleted so...
/mob/observer/dead/verb/backup_ping()
set category = "Ghost.Join"
set name = "Notify Transcore"
@@ -106,30 +47,17 @@
*/
/mob/observer/dead/verb/findghostpod() //Moves the ghost instead of just changing the ghosts's eye -Nodrak
set category = "Ghost.Join"
set name = "Find Ghost Pod"
set desc = "Find an active ghost pod"
set popup_menu = FALSE
set name = "Ghost Spawn"
set desc = "Open Ghost Spawn Menu"
if(!isobserver(src)) //Make sure they're an observer!
return
var/input = tgui_input_list(src, "Select a ghost pod:", "Ghost Jump", observe_list_format(GLOB.active_ghost_pods))
if(!input)
to_chat(src, span_filter_notice("No active ghost pods detected."))
if(selecting_ghostrole)
return
var/target = observe_list_format(GLOB.active_ghost_pods)[input]
if (!target)//Make sure we actually have a target
return
else
var/obj/O = target //Destination mob
var/turf/T = get_turf(O) //Turf of the destination mob
if(T && isturf(T)) //Make sure the turf exists, then move the source to that destination.
forceMove(T)
stop_following()
else
to_chat(src, span_filter_notice("This ghost pod is not located in the game world."))
var/datum/tgui_module/ghost_spawn_menu/ui = new(src)
ui.tgui_interact(src)
/mob/observer/dead/verb/findautoresleever()
set category = "Ghost.Join"