Admins transforming a humanoid into an AI can now choose to not move them to the satellite. (#56075)

Adds a Yes/No/Cancel button to the AI transform proc that admins use on whether the new AI should be moved to the satellite or not.

Sometimes admins want to make an AI somewhere off-station for whatever reason. Also makes testing things with AIs less of a hassle.
This commit is contained in:
zxaber
2021-01-21 12:04:31 -08:00
committed by GitHub
parent 9ebc207b50
commit 50357cb9d6
2 changed files with 25 additions and 12 deletions
+15 -11
View File
@@ -77,20 +77,24 @@
invisibility = INVISIBILITY_MAXIMUM
return ..()
/mob/proc/AIize(transfer_after = TRUE, client/preference_source)
/mob/proc/AIize(transfer_after = TRUE, client/preference_source, move = TRUE)
var/list/turf/landmark_loc = list()
for(var/obj/effect/landmark/start/ai/sloc in GLOB.landmarks_list)
if(locate(/mob/living/silicon/ai) in sloc.loc)
continue
if(sloc.primary_ai)
LAZYCLEARLIST(landmark_loc)
landmark_loc += sloc.loc
break
landmark_loc += sloc.loc
if(!landmark_loc.len)
to_chat(src, "Oh god sorry we can't find an unoccupied AI spawn location, so we're spawning you on top of someone.")
if(!move)
landmark_loc += loc
else
for(var/obj/effect/landmark/start/ai/sloc in GLOB.landmarks_list)
if(locate(/mob/living/silicon/ai) in sloc.loc)
continue
if(sloc.primary_ai)
LAZYCLEARLIST(landmark_loc)
landmark_loc += sloc.loc
break
landmark_loc += sloc.loc
if(!landmark_loc.len)
to_chat(src, "Oh god sorry we can't find an unoccupied AI spawn location, so we're spawning you on top of someone.")
for(var/obj/effect/landmark/start/ai/sloc in GLOB.landmarks_list)
landmark_loc += sloc.loc
if(!landmark_loc.len)
message_admins("Could not find ai landmark for [src]. Yell at a mapper! We are spawning them at their current location.")