From 80254795010a2065c53fe56d04c6d392ffc4b157 Mon Sep 17 00:00:00 2001 From: CHOMPStation2StaffMirrorBot <94713762+CHOMPStation2StaffMirrorBot@users.noreply.github.com> Date: Sun, 8 Feb 2026 16:36:13 -0700 Subject: [PATCH] [MIRROR] migrates give modifier to admin Verbs (#12398) Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com> --- code/__defines/vv.dm | 1 + code/modules/admin/admin_verb_lists_vr.dm | 3 --- code/modules/admin/admin_verbs.dm | 18 +++++++----------- code/modules/mob/mob.dm | 4 ++++ 4 files changed, 12 insertions(+), 14 deletions(-) diff --git a/code/__defines/vv.dm b/code/__defines/vv.dm index 307056f8cd..460b8ab2b7 100644 --- a/code/__defines/vv.dm +++ b/code/__defines/vv.dm @@ -123,6 +123,7 @@ #define VV_HK_REMOVE_MOB_ACTION "remove_mob_action" #define VV_HK_GIVE_SPELL "give_spell" #define VV_HK_REMOVE_SPELL "remove_spell" +#define VV_HK_GIVE_MODIFIER "give_modifier" #define VV_HK_GIVE_DISEASE "give_disease" #define VV_HK_GODMODE "toggle_godmode" #define VV_HK_DROP_ALL "dropall" diff --git a/code/modules/admin/admin_verb_lists_vr.dm b/code/modules/admin/admin_verb_lists_vr.dm index a220f84455..e2d0665d74 100644 --- a/code/modules/admin/admin_verb_lists_vr.dm +++ b/code/modules/admin/admin_verb_lists_vr.dm @@ -216,7 +216,6 @@ GLOBAL_LIST_INIT(admin_verbs_debug, list( /client/proc/cmd_regenerate_asset_cache, /client/proc/cmd_clear_smart_asset_cache, /client/proc/cmd_reload_robot_sprite_test, - /client/proc/admin_give_modifier, /client/proc/simple_DPS, /datum/admins/proc/view_feedback, /client/proc/stop_sounds, @@ -342,7 +341,6 @@ GLOBAL_LIST_INIT(admin_verbs_event_manager, list( /client/proc/cmd_regenerate_asset_cache, /client/proc/cmd_clear_smart_asset_cache, /client/proc/cmd_reload_robot_sprite_test, - /client/proc/admin_give_modifier, /client/proc/Jump, /client/proc/jumptomob, /client/proc/jumptocoord, @@ -367,7 +365,6 @@ GLOBAL_LIST_INIT(admin_verbs_event_manager, list( /client/proc/cmd_regenerate_asset_cache, /client/proc/cmd_clear_smart_asset_cache, /client/proc/cmd_reload_robot_sprite_test, - /client/proc/admin_give_modifier, /datum/admins/proc/cmd_admin_dress, /datum/admins/proc/set_tcrystals, /datum/admins/proc/add_tcrystals, diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index 513474c721..8505cc9ffc 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -308,29 +308,25 @@ ADMIN_VERB(stealth, R_STEALTH, "Stealth Mode", "Toggle stealth.", "Admin.Game") message_admins(span_blue("[ckey] creating an admin explosion at [epicenter.loc].")) feedback_add_details("admin_verb","DB") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! -/client/proc/admin_give_modifier(var/mob/living/L) - set category = "Debug.Game" - set name = "Give Modifier" - set desc = "Makes a mob weaker or stronger by adding a specific modifier to them." - set popup_menu = FALSE //VOREStation Edit - Declutter. - if(!L) - to_chat(usr, span_warning("Looks like you didn't select a mob.")) +ADMIN_VERB(admin_give_modifier, R_EVENT, "Give Modifier", "Makes a mob weaker or stronger by adding a specific modifier to them.", ADMIN_CATEGORY_DEBUG_GAME, mob/living/living_target) + if(!living_target) + to_chat(user, span_warning("Looks like you didn't select a mob.")) return var/list/possible_modifiers = subtypesof(/datum/modifier) - var/new_modifier_type = tgui_input_list(usr, "What modifier should we add to [L]?", "Modifier Type", possible_modifiers) + var/new_modifier_type = tgui_input_list(user, "What modifier should we add to [living_target]?", "Modifier Type", possible_modifiers) if(!new_modifier_type) return - var/duration = tgui_input_number(usr, "How long should the new modifier last, in seconds. To make it last forever, write '0'.", "Modifier Duration") + var/duration = tgui_input_number(user, "How long should the new modifier last, in seconds. To make it last forever, write '0'.", "Modifier Duration") if(duration == 0) duration = null else duration = duration SECONDS - L.add_modifier(new_modifier_type, duration) - log_and_message_admins("has given [key_name(L)] the modifer [new_modifier_type], with a duration of [duration ? "[duration / 600] minutes" : "forever"].") + living_target.add_modifier(new_modifier_type, duration) + log_and_message_admins("has given [key_name(living_target)] the modifer [new_modifier_type], with a duration of [duration ? "[duration / 600] minutes" : "forever"].", user) /client/proc/make_sound(var/obj/O in world) // -- TLE set category = "Fun.Sounds" diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 24e970dc6b..2dd9e11bef 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -1457,6 +1457,7 @@ GLOBAL_LIST_EMPTY_TYPED(living_players_by_zlevel, /list) //VV_DROPDOWN_OPTION(VV_HK_GIVE_AI_SPEECH, "Give Random AI Speech") VV_DROPDOWN_OPTION(VV_HK_GIVE_SPELL, "Give Spell") VV_DROPDOWN_OPTION(VV_HK_REMOVE_SPELL, "Remove Spell") + VV_DROPDOWN_OPTION(VV_HK_GIVE_MODIFIER, "Give Modifier") VV_DROPDOWN_OPTION(VV_HK_ADDLANGUAGE, "Add Language") VV_DROPDOWN_OPTION(VV_HK_REMOVELANGUAGE, "Remove Language") VV_DROPDOWN_OPTION(VV_HK_ADDVERB, "Add Verb") @@ -1697,6 +1698,9 @@ GLOBAL_LIST_EMPTY_TYPED(living_players_by_zlevel, /list) if(href_list[VV_HK_REMOVE_SPELL]) return SSadmin_verbs.dynamic_invoke_verb(usr, /datum/admin_verb/remove_spell, src) + if(href_list[VV_HK_GIVE_MODIFIER]) + return SSadmin_verbs.dynamic_invoke_verb(usr, /datum/admin_verb/admin_give_modifier, src) + //if(href_list[VV_HK_GIVE_DISEASE]) // return SSadmin_verbs.dynamic_invoke_verb(usr, /datum/admin_verb/give_disease, src)