Moves the new "Turn Target into MMI" verb into a VV dropdown option and rewrites the code around it. (#80097)

## About The Pull Request

Removes the Turn Target into MMI verb and re-adds it as a VV dropdown
option.

Rewrites the code around this to support what is effectively an
admin-forced action, which MMI code previously didn't support cleanly.
## Why It's Good For The Game

#79896 added a new debug verb, unfortunately because of how that debug
verb was defined (it has args for a target mob in the proc params) it
automatically gets added to the right click context menu instead...


![image](https://github.com/tgstation/tgstation/assets/24975989/26529f7c-4393-45cc-a8e2-7aa2405384a2)

Which is not ideal for admins as they're one misclick away from just
deleting a mob.

This moves it to the VV dropdown menu for humans and rewrites the code
behind it, which previously relied on the MMI attackby proc which
expects a user and thus has side effects as a result.

This new code is more suited to an admin force-insertion than the old
code which removed the brain and forced the now brainless mob to insert
its former brain into the MMI (with the potential to fail on user input
for the now brainless mob).


![dreamseeker_VUBPYXOmEJ](https://github.com/tgstation/tgstation/assets/24975989/89e8b1ab-15f7-4187-a5db-b064b0861014)
## Changelog
🆑
admin: Removed the "Turn Target into MMI" right click context menu verb
entirely, and instead added the same command as a VV dropdown on human
mobs.
/🆑
This commit is contained in:
Timberpoes
2023-12-03 15:25:45 -07:00
committed by GitHub
parent 8434bb2742
commit 835ca92007
4 changed files with 84 additions and 15 deletions
-15
View File
@@ -221,7 +221,6 @@ GLOBAL_PROTECT(admin_verbs_debug)
/client/proc/run_empty_query,
/client/proc/SDQL2_query,
/client/proc/set_dynex_scale,
/client/proc/spawn_as_mmi,
/client/proc/spawn_debug_full_crew,
/client/proc/test_cardpack_distribution,
/client/proc/test_movable_UI,
@@ -1189,17 +1188,3 @@ GLOBAL_PROTECT(admin_verbs_poll)
segment.AddComponent(/datum/component/mob_chain, front = previous)
previous = segment
/client/proc/spawn_as_mmi(mob/living/carbon/human/target in GLOB.human_list)
set category = "Debug"
set name = "Turn target into MMI"
set desc = "Turns something into an MMI, must be used on humans"
if(!check_rights(R_DEBUG))
return
if(!ishuman(target))
return
var/obj/item/mmi/new_mmi = new(target.loc)
var/obj/item/organ/internal/brain/target_brain = target.get_organ_slot(ORGAN_SLOT_BRAIN)
target_brain.Remove(target)
new_mmi.attackby(target_brain,target)
qdel(target)