From f8f2c8222fe157bda7402d45428cba67c832ff17 Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Fri, 7 May 2021 08:42:51 +0200 Subject: [PATCH] [MIRROR] moves sdql spell to vv dropdown (#5522) * moves sdql spell to vv dropdown (#58911) * moves sdql spell to vv dropdown Co-authored-by: Fikou --- code/__DEFINES/vv.dm | 1 + code/modules/admin/verbs/SDQL2/SDQL_spells_and_items.dm | 2 +- code/modules/mob/mob.dm | 6 +++++- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/code/__DEFINES/vv.dm b/code/__DEFINES/vv.dm index d7fcf394c26..2ad4cd6c1ad 100644 --- a/code/__DEFINES/vv.dm +++ b/code/__DEFINES/vv.dm @@ -110,6 +110,7 @@ #define VV_HK_DIRECT_CONTROL "direct_control" #define VV_HK_GIVE_DIRECT_CONTROL "give_direct_control" #define VV_HK_OFFER_GHOSTS "offer_ghosts" +#define VV_HK_SDQL_SPELL "sdql_spell" // /mob/living/carbon #define VV_HK_MAKE_AI "aiify" diff --git a/code/modules/admin/verbs/SDQL2/SDQL_spells_and_items.dm b/code/modules/admin/verbs/SDQL2/SDQL_spells_and_items.dm index bcce43a0e88..0d5b22bf89a 100644 --- a/code/modules/admin/verbs/SDQL2/SDQL_spells_and_items.dm +++ b/code/modules/admin/verbs/SDQL2/SDQL_spells_and_items.dm @@ -207,8 +207,8 @@ #undef RAW_ADDRESS /client/proc/cmd_give_sdql_spell(mob/target in GLOB.mob_list) - set category = "Debug.Admin" set name = "Give SDQL spell" + set hidden = TRUE if(CONFIG_GET(flag/sdql_spells)) var/datum/give_sdql_spell/ui = new(usr, target) ui.ui_interact(usr) diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 18ed1423718..81938dfd6f7 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -1191,6 +1191,7 @@ VV_DROPDOWN_OPTION(VV_HK_DIRECT_CONTROL, "Assume Direct Control") VV_DROPDOWN_OPTION(VV_HK_GIVE_DIRECT_CONTROL, "Give Direct Control") VV_DROPDOWN_OPTION(VV_HK_OFFER_GHOSTS, "Offer Control to Ghosts") + VV_DROPDOWN_OPTION(VV_HK_SDQL_SPELL, "Give SDQL Spell") /mob/vv_do_topic(list/href_list) . = ..() @@ -1242,7 +1243,10 @@ if(!check_rights(NONE)) return offer_control(src) - + if(href_list[VV_HK_SDQL_SPELL]) + if(!check_rights(R_DEBUG)) + return + usr.client.cmd_give_sdql_spell(src) /** * extra var handling for the logging var */