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
-66
View File
@@ -1,68 +1,3 @@
/mob/observer/dead/verb/spawn_in_belly()
set category = "Ghost.Join"
set name = "Spawn In Belly"
set desc = "Spawn in someone's belly."
if(!client)
return
// If any ghost-side restrictions are desired, they'll go here
tgui_alert(src,{"
This verb allows you to spawn inside someone's belly when they are in round.
Make sure you to coordinate with your predator OOCly as well as roleplay approprietly.
You are considered to have been in the belly entire time the predator was around and are not added to crew lists.
This is not intended to be used for mechanical advantage or providing assistance, but for facilitating longterm scenes.
Please do not abuse this ability.
"},"OOC Warning") // Warning.
var/list/eligible_targets = list()
for(var/mob/living/pred in GLOB.living_mob_list)
if(!istype(pred) || !pred.client) // Ignore preds that aren't living mobs or player controlled
continue
if(pred.no_vore) // No vore, no bellies, no inbelly spawning
continue
if(!(get_z(pred) in using_map.station_levels)) // No explo reinforcements
continue
if(ishuman(pred))
var/mob/living/carbon/human/H = pred
if(!H.latejoin_vore)
continue
eligible_targets += H
continue
if(issilicon(pred))
var/mob/living/silicon/S = pred
if(isAI(S))
continue // Sorry, AI buddies. Your vore works too differently.
if(!S.latejoin_vore)
continue
eligible_targets += S
continue
if(isanimal(pred))
var/mob/living/simple_mob/SM = pred
if(!SM.vore_active) // No vore, no bellies, no inbelly spawning
continue
if(!SM.latejoin_vore)
continue
eligible_targets += SM
continue
// Only humans, simple_mobs and non-AI silicons are included. Obscure stuff like bots is skipped.
if(!eligible_targets.len)
to_chat(src, span_notice("No eligible preds were found.")) // :(
return
var/mob/living/target = tgui_input_list(src, "Please specify which character you want to spawn inside of.", "Predator", eligible_targets) // Offer the list of things we gathered.
if(!target || !client) // Did out target cease to exist? Or did we?
return
// Notify them that its now pred's turn
to_chat(src, span_notice("Inbelly spawn request sent to predator."))
target.inbelly_spawn_prompt(client) // Hand reins over to them
/mob/living/proc/inbelly_spawn_prompt(client/potential_prey)
if(!potential_prey || !istype(potential_prey)) // Did our prey cease to exist?
return
@@ -127,7 +62,6 @@ Please do not abuse this ability.
else
to_chat(potential_prey, span_notice("Inbelly spawn cancelled."))
to_chat(src, span_notice("Prey cancelled their inbelly spawn request."))
return
/proc/inbelly_spawn(client/prey, mob/living/pred, obj/belly/target_belly, var/absorbed = FALSE)
// All this is basically admin late spawn-in, but skipping all parts related to records and equipment and with predteremined location
@@ -1,52 +0,0 @@
/mob/observer/dead/verb/soulcatcherjoin()
set category = "Ghost.Join"
set name = "Join Into Soulcatcher(Vore)"
set desc = "Select a player with enabled Soulcatcher to join."
var/list/valid_players = list()
for(var/mob/player in GLOB.player_list)
if(player.soulgem?.flag_check(SOULGEM_ACTIVE | SOULGEM_CATCHING_GHOSTS, TRUE))
valid_players += player
if(!valid_players.len)
to_chat(src, span_warning("No valid players found."))
return
var/picked = tgui_input_list(usr, "Pick a friend with enabled Soulcatcher to join into. Harrass strangers, get banned.","Select a player", valid_players)
if(!picked)
return
if(!ismob(picked))
to_chat(src, span_warning("Target is no mob."))
return
var/mob/M = picked
var/obj/soulgem/gem = M.soulgem
if(!gem?.flag_check(SOULGEM_ACTIVE))
to_chat(src, span_warning("[M] has no enabled Soulcatcher."))
return
var/req_time = world.time
gem.notify_holder("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
if(tgui_alert(M,"[src.name] wants to join into your Soulcatcher.","Soulcatcher Request",list("Deny","Allow"), timeout=1 MINUTES) != "Allow")
to_chat(src, span_warning("[M] has denied your request."))
return
if((world.time - req_time) > 1 MINUTES)
to_chat(M, span_warning("The request had already expired. (1 minute waiting max)"))
return
//Final check since we waited for input a couple times.
if(M && src && src.key && !M.stat && gem?.flag_check(SOULGEM_ACTIVE | SOULGEM_CATCHING_GHOSTS, TRUE))
if(!mind) //No mind yet, aka haven't played in this round.
mind = new(key)
mind.name = name
mind.current = src
mind.active = TRUE
gem.catch_mob(src) //This will result in us being deleted so...