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.
This commit is contained in:
Ryll Ryll
2021-12-02 04:29:06 -05:00
committed by GitHub
parent d748d06ede
commit b5089e714b
8 changed files with 80 additions and 351 deletions
+15 -140
View File
@@ -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"])