From b5089e714b765579cd08af8eaed49554e306fedf Mon Sep 17 00:00:00 2001
From: Ryll Ryll <3589655+Ryll-Ryll@users.noreply.github.com>
Date: Thu, 2 Dec 2021 04:29:06 -0500
Subject: [PATCH] Cleans up unnecessary transformation options in admin player
panel (#62832)
I got tired of having to walk new admin candidates through the admin buttons and telling them about all of the antiquated buttons they'd never use, so I'm doing my part and removing a bunch of the transformation bloat from the player panel. Below is the current menu
The only button admins I know ever actually use is the human rudimentary transformation one, and literally nothing else. Judging by how the options are a random choice of some of the station pets, these options probably haven't been updated since like 2012. In addition, the non-rudimentary transformations only work if you're a human, so not sure why they show up for non human player panels.
Here's the new pared down selection, I figured these would be the only useful ones from the bunch. They work no matter what mob the target was previously, whether it be another living mob or a ghost. In addition, I also cut out the transformation equivalents from the VV dropdown, because lord knows that menu keeps getting longer and longer. Lastly, I refactored stuff where possible without getting too trapped in cursed pre-MSO era admincode.
---
code/__DEFINES/vv.dm | 4 -
code/modules/admin/topic.dm | 155 ++----------------
code/modules/admin/verbs/admingame.dm | 79 +++------
code/modules/admin/verbs/debug.dm | 79 +--------
code/modules/admin/view_variables/topic.dm | 16 --
code/modules/mob/living/carbon/human/human.dm | 28 ----
code/modules/mob/mob_transformation_simple.dm | 2 +-
code/modules/mob/transform_procs.dm | 68 ++++----
8 files changed, 80 insertions(+), 351 deletions(-)
diff --git a/code/__DEFINES/vv.dm b/code/__DEFINES/vv.dm
index cb38597f7b1..85d6b5483d4 100644
--- a/code/__DEFINES/vv.dm
+++ b/code/__DEFINES/vv.dm
@@ -132,10 +132,6 @@
#define VV_HK_COPY_OUTFIT "copy_outfit"
#define VV_HK_MOD_MUTATIONS "quirkmut"
#define VV_HK_MOD_QUIRKS "quirkmod"
-#define VV_HK_MAKE_MONKEY "human_monkify"
-#define VV_HK_MAKE_CYBORG "human_cyborgify"
-#define VV_HK_MAKE_SLIME "human_slimeify"
-#define VV_HK_MAKE_ALIEN "human_alienify"
#define VV_HK_SET_SPECIES "setspecies"
#define VV_HK_PURRBATION "purrbation"
diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm
index 33aca41eb1d..f309aac633c 100644
--- a/code/modules/admin/topic.dm
+++ b/code/modules/admin/topic.dm
@@ -230,18 +230,6 @@
switch(href_list["simplemake"])
if("observer")
M.change_mob_type( /mob/dead/observer , null, null, delmob )
- if("drone")
- M.change_mob_type( /mob/living/carbon/alien/humanoid/drone , null, null, delmob )
- if("hunter")
- M.change_mob_type( /mob/living/carbon/alien/humanoid/hunter , null, null, delmob )
- if("queen")
- M.change_mob_type( /mob/living/carbon/alien/humanoid/royal/queen , null, null, delmob )
- if("praetorian")
- M.change_mob_type( /mob/living/carbon/alien/humanoid/royal/praetorian , null, null, delmob )
- if("sentinel")
- M.change_mob_type( /mob/living/carbon/alien/humanoid/sentinel , null, null, delmob )
- if("larva")
- M.change_mob_type( /mob/living/carbon/alien/larva , null, null, delmob )
if("human")
var/posttransformoutfit = usr.client.robust_dress_shop()
if (!posttransformoutfit)
@@ -249,42 +237,10 @@
var/mob/living/carbon/human/newmob = M.change_mob_type( /mob/living/carbon/human , null, null, delmob )
if(posttransformoutfit && istype(newmob))
newmob.equipOutfit(posttransformoutfit)
- if("slime")
- M.change_mob_type( /mob/living/simple_animal/slime , null, null, delmob )
- if("adultslime")
- var/mob/living/simple_animal/slime/baby_slime = M.change_mob_type( /mob/living/simple_animal/slime , null, null, delmob )
- baby_slime.amount_grown = SLIME_EVOLUTION_THRESHOLD
- baby_slime.Evolve()
if("monkey")
M.change_mob_type( /mob/living/carbon/human/species/monkey , null, null, delmob )
if("robot")
M.change_mob_type( /mob/living/silicon/robot , null, null, delmob )
- if("cat")
- M.change_mob_type( /mob/living/simple_animal/pet/cat , null, null, delmob )
- if("runtime")
- M.change_mob_type( /mob/living/simple_animal/pet/cat/runtime , null, null, delmob )
- if("corgi")
- M.change_mob_type( /mob/living/simple_animal/pet/dog/corgi , null, null, delmob )
- if("ian")
- M.change_mob_type( /mob/living/simple_animal/pet/dog/corgi/ian , null, null, delmob )
- if("pug")
- M.change_mob_type( /mob/living/simple_animal/pet/dog/pug , null, null, delmob )
- if("crab")
- M.change_mob_type( /mob/living/simple_animal/crab , null, null, delmob )
- if("coffee")
- M.change_mob_type( /mob/living/simple_animal/crab/coffee , null, null, delmob )
- if("parrot")
- M.change_mob_type( /mob/living/simple_animal/parrot , null, null, delmob )
- if("polyparrot")
- M.change_mob_type( /mob/living/simple_animal/parrot/poly , null, null, delmob )
- if("constructjuggernaut")
- M.change_mob_type( /mob/living/simple_animal/hostile/construct/juggernaut , null, null, delmob )
- if("constructartificer")
- M.change_mob_type( /mob/living/simple_animal/hostile/construct/artificer , null, null, delmob )
- if("constructwraith")
- M.change_mob_type( /mob/living/simple_animal/hostile/construct/wraith , null, null, delmob )
- if("shade")
- M.change_mob_type( /mob/living/simple_animal/shade , null, null, delmob )
else if(href_list["boot2"])
if(!check_rights(R_ADMIN))
@@ -550,46 +506,6 @@
message_admins("[key_name(usr)] set 'forced_threat_level' to [GLOB.dynamic_forced_threat_level].")
dynamic_mode_options(usr)
- else if(href_list["monkeyone"])
- if(!check_rights(R_SPAWN))
- return
-
- var/mob/living/carbon/human/H = locate(href_list["monkeyone"])
- if(!istype(H))
- to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human.", confidential = TRUE)
- return
-
- log_admin("[key_name(usr)] attempting to monkeyize [key_name(H)].")
- message_admins(span_adminnotice("[key_name_admin(usr)] attempting to monkeyize [key_name_admin(H)]."))
- H.monkeyize()
-
- else if(href_list["humanone"])
- if(!check_rights(R_SPAWN))
- return
-
- var/mob/living/carbon/human/Mo = locate(href_list["humanone"])
- if(!ismonkey(Mo))
- to_chat(usr, "This can only be used on monkeys.", confidential = TRUE)
- return
-
- log_admin("[key_name(usr)] attempting to humanize [key_name(Mo)].")
- message_admins(span_adminnotice("[key_name_admin(usr)] attempting to humanize [key_name_admin(Mo)]."))
- Mo.humanize()
-
- else if(href_list["corgione"])
- if(!check_rights(R_SPAWN))
- return
-
- var/mob/living/carbon/human/H = locate(href_list["corgione"])
- if(!istype(H))
- to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human.", confidential = TRUE)
- return
-
- log_admin("[key_name(usr)] attempting to corgize [key_name(H)].")
- message_admins(span_adminnotice("[key_name_admin(usr)] attempting to corgize [key_name_admin(H)]."))
- H.corgize()
-
-
else if(href_list["forcespeech"])
if(!check_rights(R_FUN))
return
@@ -773,9 +689,11 @@
if(!check_rights(R_SPAWN))
return
- var/mob/living/carbon/human/H = locate(href_list["makeai"])
- if(!istype(H))
- to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human.", confidential = TRUE)
+ var/mob/our_mob = locate(href_list["makeai"])
+ if(!istype(our_mob))
+ return
+ if(isAI(our_mob))
+ to_chat(usr, "That's already an AI.", confidential = TRUE)
return
var/move = TRUE
@@ -784,68 +702,25 @@
return
if("No")
move = FALSE
- if(QDELETED(H))
+ if(QDELETED(our_mob))
to_chat(usr, span_danger("Subject was deleted already. Transform canceled."))
return
- message_admins(span_danger("Admin [key_name_admin(usr)] AIized [key_name_admin(H)]!"))
- log_admin("[key_name(usr)] AIized [key_name(H)].")
- H.AIize(TRUE, H.client, move)
-
- else if(href_list["makealien"])
- if(!check_rights(R_SPAWN))
- return
-
- var/mob/living/carbon/human/H = locate(href_list["makealien"])
- if(!istype(H))
- to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human.", confidential = TRUE)
- return
-
- usr.client.cmd_admin_alienize(H)
-
- else if(href_list["makeslime"])
- if(!check_rights(R_SPAWN))
- return
-
- var/mob/living/carbon/human/H = locate(href_list["makeslime"])
- if(!istype(H))
- to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human.", confidential = TRUE)
- return
-
- usr.client.cmd_admin_slimeize(H)
-
- else if(href_list["makeblob"])
- if(!check_rights(R_SPAWN))
- return
-
- var/mob/living/carbon/human/H = locate(href_list["makeblob"])
- if(!istype(H))
- to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human.", confidential = TRUE)
- return
-
- usr.client.cmd_admin_blobize(H)
-
+ message_admins(span_danger("Admin [key_name_admin(usr)] AIized [key_name_admin(our_mob)]!"))
+ log_admin("[key_name(usr)] AIized [key_name(our_mob)].")
+ our_mob.AIize(TRUE, our_mob.client, move)
else if(href_list["makerobot"])
if(!check_rights(R_SPAWN))
return
- var/mob/living/carbon/human/H = locate(href_list["makerobot"])
- if(!istype(H))
- to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human.", confidential = TRUE)
+ var/mob/our_mob = locate(href_list["makerobot"])
+ if(!istype(our_mob))
+ return
+ if(iscyborg(our_mob))
+ to_chat(usr, "That's already a cyborg.", confidential = TRUE)
return
- usr.client.cmd_admin_robotize(H)
-
- else if(href_list["makeanimal"])
- if(!check_rights(R_SPAWN))
- return
-
- var/mob/M = locate(href_list["makeanimal"])
- if(isnewplayer(M))
- to_chat(usr, "This cannot be used on instances of type /mob/dead/new_player.", confidential = TRUE)
- return
-
- usr.client.cmd_admin_animalize(M)
+ usr.client.cmd_admin_robotize(our_mob)
else if(href_list["adminplayeropts"])
var/mob/M = locate(href_list["adminplayeropts"])
diff --git a/code/modules/admin/verbs/admingame.dm b/code/modules/admin/verbs/admingame.dm
index 2152160993d..59e9c24c3d1 100644
--- a/code/modules/admin/verbs/admingame.dm
+++ b/code/modules/admin/verbs/admingame.dm
@@ -96,81 +96,44 @@
body += "Play sound to | "
body += "Language Menu"
- if (M.client)
+ if(M.client)
if(!isnewplayer(M))
body += "
"
- body += "Transformation:"
- body += "
"
+ body += "Transformation:
"
+ if(isobserver(M))
+ body += "Ghost | "
+ else
+ body += "Make Ghost | "
- //Human
if(ishuman(M) && !ismonkey(M))
- body += "Human | "
+ body += "Human | "
else
- body += "Humanize | "
+ body += "Make Human | "
- //Monkey
if(ismonkey(M))
- body += "Monkeyized | "
+ body += "Monkey | "
else
- body += "Monkeyize | "
+ body += "Make Monkey | "
- //Corgi
- if(iscorgi(M))
- body += "Corgized | "
+ if(iscyborg(M))
+ body += "Cyborg | "
else
- body += "Corgize | "
+ body += "Make Cyborg | "
- //AI / Cyborg
if(isAI(M))
- body += "Is an AI "
- else if(ishuman(M))
- body += "Make AI | "
- body += "Make Robot | "
- body += "Make Alien | "
- body += "Make Slime | "
- body += "Make Blob | "
-
- //Simple Animals
- if(isanimal(M))
- body += "Re-Animalize | "
+ body += "AI"
else
- body += "Animalize | "
+ body += "Make AI"
- body += "
"
- body += "Rudimentary transformation:
These transformations only create a new mob type and copy stuff over. They do not take into account MMIs and similar mob-specific things. The buttons in 'Transformations' are preferred, when possible.
"
- body += "Observer | "
- body += "\[ Alien: Drone, "
- body += "Hunter, "
- body += "Sentinel, "
- body += "Praetorian, "
- body += "Queen, "
- body += "Larva \] "
- body += "Human "
- body += "\[ slime: Baby, "
- body += "Adult \] "
- body += "Monkey | "
- body += "Cyborg | "
- body += "Cat | "
- body += "Runtime | "
- body += "Corgi | "
- body += "Ian | "
- body += "Crab | "
- body += "Coffee | "
- body += "\[ Construct: Juggernaut , "
- body += "Artificer , "
- body += "Wraith \] "
- body += "Shade"
- body += "
"
-
- if (M.client)
body += "
"
body += "Other actions:"
body += "
"
- body += "Forcesay | "
- body += "Thunderdome 1 | "
- body += "Thunderdome 2 | "
- body += "Thunderdome Admin | "
- body += "Thunderdome Observer | "
+ if(!isnewplayer(M))
+ body += "Forcesay | "
+ body += "Thunderdome 1 | "
+ body += "Thunderdome 2 | "
+ body += "Thunderdome Admin | "
+ body += "Thunderdome Observer | "
body += "Commend Behavior | "
body += "
"
diff --git a/code/modules/admin/verbs/debug.dm b/code/modules/admin/verbs/debug.dm
index d65e9620324..76703c9eb21 100644
--- a/code/modules/admin/verbs/debug.dm
+++ b/code/modules/admin/verbs/debug.dm
@@ -39,53 +39,13 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
/client/proc/cmd_admin_robotize(mob/M in GLOB.mob_list)
set category = "Admin.Fun"
- set name = "Make Robot"
+ set name = "Make Cyborg"
if(!SSticker.HasRoundStarted())
tgui_alert(usr,"Wait until the game starts")
return
- if(ishuman(M))
- log_admin("[key_name(src)] has robotized [M.key].")
- var/mob/living/carbon/human/H = M
- INVOKE_ASYNC(H, /mob/living/carbon/human.proc/Robotize)
-
- else
- tgui_alert(usr,"Invalid mob")
-
-/client/proc/cmd_admin_blobize(mob/M in GLOB.mob_list)
- set category = "Admin.Fun"
- set name = "Make Blob"
-
- if(!SSticker.HasRoundStarted())
- tgui_alert(usr,"Wait until the game starts")
- return
- if(ishuman(M))
- log_admin("[key_name(src)] has blobized [M.key].")
- var/mob/living/carbon/human/H = M
- H.become_overmind()
- else
- tgui_alert(usr,"Invalid mob")
-
-
-/client/proc/cmd_admin_animalize(mob/M in GLOB.mob_list)
- set category = "Admin.Fun"
- set name = "Make Simple Animal"
-
- if(!SSticker.HasRoundStarted())
- tgui_alert(usr,"Wait until the game starts")
- return
-
- if(!M)
- tgui_alert(usr,"That mob doesn't seem to exist, close the panel and try again.")
- return
-
- if(isnewplayer(M))
- tgui_alert(usr,"The mob must not be a new_player.")
- return
-
- log_admin("[key_name(src)] has animalized [M.key].")
- INVOKE_ASYNC(M, /mob.proc/Animalize)
-
+ log_admin("[key_name(src)] has robotized [M.key].")
+ INVOKE_ASYNC(M, /mob.proc/Robotize)
/client/proc/makepAI(turf/T in GLOB.mob_list)
set category = "Admin.Fun"
@@ -100,7 +60,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
if(!choice)
return
if(!isobserver(choice))
- var/confirm = tgui_alert(usr, "[choice.key] isn't ghosting right now. Are you sure you want to yank him out of them out of their body and place them in this pAI?", "Spawn pAI Confirmation", list("Yes", "No"))
+ var/confirm = tgui_alert(usr, "[choice.key] isn't ghosting right now. Are you sure you want to yank them out of their body and place them in this pAI?", "Spawn pAI Confirmation", list("Yes", "No"))
if(confirm != "Yes")
return
var/obj/item/paicard/card = new(T)
@@ -120,37 +80,6 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
SSpai.candidates.Remove(candidate)
SSblackbox.record_feedback("tally", "admin_verb", 1, "Make pAI") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
-/client/proc/cmd_admin_alienize(mob/M in GLOB.mob_list)
- set category = "Admin.Fun"
- set name = "Make Alien"
-
- if(!SSticker.HasRoundStarted())
- tgui_alert(usr,"Wait until the game starts")
- return
- if(ishuman(M))
- INVOKE_ASYNC(M, /mob/living/carbon/human/proc/Alienize)
- SSblackbox.record_feedback("tally", "admin_verb", 1, "Make Alien") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
- log_admin("[key_name(usr)] made [key_name(M)] into an alien at [AREACOORD(M)].")
- message_admins(span_adminnotice("[key_name_admin(usr)] made [ADMIN_LOOKUPFLW(M)] into an alien."))
- else
- tgui_alert(usr,"Invalid mob")
-
-/client/proc/cmd_admin_slimeize(mob/M in GLOB.mob_list)
- set category = "Admin.Fun"
- set name = "Make slime"
-
- if(!SSticker.HasRoundStarted())
- tgui_alert(usr,"Wait until the game starts")
- return
- if(ishuman(M))
- INVOKE_ASYNC(M, /mob/living/carbon/human/proc/slimeize)
- SSblackbox.record_feedback("tally", "admin_verb", 1, "Make Slime") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
- log_admin("[key_name(usr)] made [key_name(M)] into a slime at [AREACOORD(M)].")
- message_admins(span_adminnotice("[key_name_admin(usr)] made [ADMIN_LOOKUPFLW(M)] into a slime."))
- else
- tgui_alert(usr,"Invalid mob")
-
-
//TODO: merge the vievars version into this or something maybe mayhaps
/client/proc/cmd_debug_del_all(object as text)
set category = "Debug"
diff --git a/code/modules/admin/view_variables/topic.dm b/code/modules/admin/view_variables/topic.dm
index 8f5a2c05772..cc6a552bafd 100644
--- a/code/modules/admin/view_variables/topic.dm
+++ b/code/modules/admin/view_variables/topic.dm
@@ -60,22 +60,6 @@
vv_update_display(A, "dir", dir2text(A.dir))
- else if(href_list["makehuman"])
- if(!check_rights(R_SPAWN))
- return
-
- var/mob/living/carbon/human/Mo = locate(href_list["makehuman"]) in GLOB.mob_list
- if(!ismonkey(Mo))
- to_chat(usr, "This can only be done to monkeys", confidential = TRUE)
- return
-
- if(tgui_alert(usr,"Confirm mob type change?",,list("Transform","Cancel")) != "Transform")
- return
- if(!Mo)
- to_chat(usr, "Mob doesn't exist anymore", confidential = TRUE)
- return
- holder.Topic(href, list("humanone"=href_list["makehuman"]))
-
else if(href_list["adjustDamage"] && href_list["mobToDamage"])
if(!check_rights(NONE))
return
diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm
index 87e35da8c45..788f73eda06 100644
--- a/code/modules/mob/living/carbon/human/human.dm
+++ b/code/modules/mob/living/carbon/human/human.dm
@@ -780,10 +780,6 @@
VV_DROPDOWN_OPTION(VV_HK_COPY_OUTFIT, "Copy Outfit")
VV_DROPDOWN_OPTION(VV_HK_MOD_MUTATIONS, "Add/Remove Mutation")
VV_DROPDOWN_OPTION(VV_HK_MOD_QUIRKS, "Add/Remove Quirks")
- VV_DROPDOWN_OPTION(VV_HK_MAKE_MONKEY, "Make Monkey")
- VV_DROPDOWN_OPTION(VV_HK_MAKE_CYBORG, "Make Cyborg")
- VV_DROPDOWN_OPTION(VV_HK_MAKE_SLIME, "Make Slime")
- VV_DROPDOWN_OPTION(VV_HK_MAKE_ALIEN, "Make Alien")
VV_DROPDOWN_OPTION(VV_HK_SET_SPECIES, "Set Species")
VV_DROPDOWN_OPTION(VV_HK_PURRBATION, "Toggle Purrbation")
@@ -838,30 +834,6 @@
remove_quirk(T)
else
add_quirk(T)
- if(href_list[VV_HK_MAKE_MONKEY])
- if(!check_rights(R_SPAWN))
- return
- if(tgui_alert(usr,"Confirm mob type change?",,list("Transform","Cancel")) != "Transform")
- return
- usr.client.holder.Topic("vv_override", list("monkeyone"=href_list[VV_HK_TARGET]))
- if(href_list[VV_HK_MAKE_CYBORG])
- if(!check_rights(R_SPAWN))
- return
- if(tgui_alert(usr,"Confirm mob type change?",,list("Transform","Cancel")) != "Transform")
- return
- usr.client.holder.Topic("vv_override", list("makerobot"=href_list[VV_HK_TARGET]))
- if(href_list[VV_HK_MAKE_ALIEN])
- if(!check_rights(R_SPAWN))
- return
- if(tgui_alert(usr,"Confirm mob type change?",,list("Transform","Cancel")) != "Transform")
- return
- usr.client.holder.Topic("vv_override", list("makealien"=href_list[VV_HK_TARGET]))
- if(href_list[VV_HK_MAKE_SLIME])
- if(!check_rights(R_SPAWN))
- return
- if(tgui_alert(usr,"Confirm mob type change?",,list("Transform","Cancel")) != "Transform")
- return
- usr.client.holder.Topic("vv_override", list("makeslime"=href_list[VV_HK_TARGET]))
if(href_list[VV_HK_SET_SPECIES])
if(!check_rights(R_SPAWN))
return
diff --git a/code/modules/mob/mob_transformation_simple.dm b/code/modules/mob/mob_transformation_simple.dm
index 91baf04ab2e..01aa30a7d75 100644
--- a/code/modules/mob/mob_transformation_simple.dm
+++ b/code/modules/mob/mob_transformation_simple.dm
@@ -47,7 +47,7 @@
D.updateappearance(mutcolor_update=1, mutations_overlay_update=1)
else if(ishuman(M))
var/mob/living/carbon/human/H = M
- client.prefs.safe_transfer_prefs_to(H)
+ client?.prefs.safe_transfer_prefs_to(H)
H.dna.update_dna_identity()
if(mind && isliving(M))
diff --git a/code/modules/mob/transform_procs.dm b/code/modules/mob/transform_procs.dm
index 99f84ccbb74..5b81e921471 100644
--- a/code/modules/mob/transform_procs.dm
+++ b/code/modules/mob/transform_procs.dm
@@ -57,26 +57,6 @@
set_species(species)
return src
-/mob/living/carbon/human/AIize(transfer_after = TRUE, client/preference_source)
- if (notransform)
- return
- for(var/t in bodyparts)
- qdel(t)
-
- return ..()
-
-/mob/living/carbon/AIize(transfer_after = TRUE, client/preference_source)
- if (notransform)
- return
- notransform = TRUE
- Paralyze(1, ignore_canstun = TRUE)
- for(var/obj/item/W in src)
- dropItemToGround(W)
- regenerate_icons()
- icon = null
- invisibility = INVISIBILITY_MAXIMUM
- return ..()
-
/mob/proc/AIize(transfer_after = TRUE, client/preference_source, move = TRUE)
var/list/turf/landmark_loc = list()
@@ -103,33 +83,45 @@
if(client)
stop_sound_channel(CHANNEL_LOBBYMUSIC)
- if(!transfer_after)
- mind.active = FALSE
+ var/mob/living/silicon/ai/our_AI = new /mob/living/silicon/ai(pick(landmark_loc), null, src)
+ . = our_AI
- . = new /mob/living/silicon/ai(pick(landmark_loc), null, src)
+ if(mind)
+ if(!transfer_after)
+ mind.active = FALSE
+ mind.transfer_to(our_AI)
+ else if(transfer_after)
+ our_AI.key = key
if(preference_source)
apply_pref_name(/datum/preference/name/ai, preference_source)
qdel(src)
-/mob/living/carbon/human/proc/Robotize(delete_items = 0, transfer_after = TRUE)
+/mob/living/carbon/AIize(transfer_after = TRUE, client/preference_source)
if (notransform)
return
notransform = TRUE
Paralyze(1, ignore_canstun = TRUE)
-
for(var/obj/item/W in src)
- if(delete_items)
- qdel(W)
- else
- dropItemToGround(W)
+ dropItemToGround(W)
regenerate_icons()
icon = null
invisibility = INVISIBILITY_MAXIMUM
+ return ..()
+
+/mob/living/carbon/human/AIize(transfer_after = TRUE, client/preference_source)
+ if (notransform)
+ return
for(var/t in bodyparts)
qdel(t)
+ return ..()
+
+/mob/proc/Robotize(delete_items = 0, transfer_after = TRUE)
+ if(notransform)
+ return
+ notransform = TRUE
var/mob/living/silicon/robot/R = new /mob/living/silicon/robot(loc)
R.gender = gender
@@ -161,6 +153,24 @@
INVOKE_ASYNC(R, /mob/living/silicon/robot.proc/replace_banned_cyborg)
qdel(src)
+/mob/living/Robotize(delete_items = 0, transfer_after = TRUE)
+ if(notransform)
+ return
+ notransform = TRUE
+ Paralyze(1, ignore_canstun = TRUE)
+
+ for(var/obj/item/W in src)
+ if(delete_items)
+ qdel(W)
+ else
+ dropItemToGround(W)
+ regenerate_icons()
+ icon = null
+ invisibility = INVISIBILITY_MAXIMUM
+
+ notransform = FALSE
+ return ..()
+
/mob/living/silicon/robot/proc/replace_banned_cyborg()
to_chat(src, "You are job banned from cyborg! Appeal your job ban if you want to avoid this in the future!")
ghostize(FALSE)