diff --git a/code/_onclick/click.dm b/code/_onclick/click.dm index c9065b329a0..a439b1a5485 100644 --- a/code/_onclick/click.dm +++ b/code/_onclick/click.dm @@ -393,4 +393,24 @@ var/global/list/click_catchers var/turf/T = screen_loc2turf(screen_loc, get_turf(usr)) if(T) T.Click(location, control, params) - . = 1 \ No newline at end of file + . = 1 + +// Suppress the mouse macros +/client/var/has_mouse_macro_warning +/mob/proc/LogMouseMacro(verbused, params) + if(!client) + return + if(!client.has_mouse_macro_warning) // Log once + log_admin("[key_name(usr)] attempted to use a mouse macro: [verbused] [params]") +/mob/verb/ClickSubstitute(params as command_text) + set hidden = 1 + set name = ".click" + LogMouseMacro(".click", params) +/mob/verb/DblClickSubstitute(params as command_text) + set hidden = 1 + set name = ".dblclick" + LogMouseMacro(".dblclick", params) +/mob/verb/MouseSubstitute(params as command_text) + set hidden = 1 + set name = ".mouse" + LogMouseMacro(".mouse", params) \ No newline at end of file diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index caf683ce6b2..389d685e1c6 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -484,40 +484,6 @@ var/list/global/slot_flags_enumeration = list( /obj/item/proc/on_give(var/mob/giver, var/mob/receiver) return -/mob/living/carbon/verb/verb_pickup(obj/item/I in range(1)) - set category = "Object" - set name = "Pick up" - - if(!(usr)) //BS12 EDIT - return - if (!(I in view(1, src))) - return - if (istype(I, /obj/item/storage/internal)) - return - if(!usr.canmove || usr.stat || usr.restrained() || !Adjacent(usr)) - return - if((!istype(usr, /mob/living/carbon)) || (istype(usr, /mob/living/carbon/brain)))//Is humanoid, and is not a brain - to_chat(usr, "You can't pick things up!") - return - if( usr.stat || usr.restrained() )//Is not asleep/dead and is not restrained - to_chat(usr, "You can't pick things up!") - return - if(I.anchored) //Object isn't anchored - to_chat(usr, "You can't pick that up!") - return - if(!usr.hand && usr.r_hand) //Right hand is not full - to_chat(usr, "Your right hand is full.") - return - if(usr.hand && usr.l_hand) //Left hand is not full - to_chat(usr, "Your left hand is full.") - return - if(!istype(I.loc, /turf)) //Object is on a turf - to_chat(usr, "You can't pick that up!") - return - //All checks are done, time to pick it up! - usr.UnarmedAttack(I) - return - //This proc is executed when someone clicks the on-screen UI button. To make the UI button show, set the 'icon_action_button' to the icon_state of the image of the button in screen1_action.dmi //The default action is attack_self(). diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index c44046a03d4..07d58a5f425 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -2037,3 +2037,21 @@ if(!(accent in species.allowed_accents)) accent = species.default_accent return TRUE + +/mob/living/carbon/human/verb/click_belt() + set hidden = 1 + set name = "click_belt" + if(belt) + belt.Click() + +/mob/living/carbon/human/verb/click_uniform() + set hidden = 1 + set name = "click_uniform" + if(w_uniform) + w_uniform.Click() + +/mob/living/carbon/human/verb/click_back() + set hidden = 1 + set name = "click_back" + if(back) + back.Click() \ No newline at end of file diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 04a16c69a1e..817c4246716 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -975,3 +975,9 @@ default behaviour is: if(src) clear_fullscreen("flash", 25) return 1 + +/mob/living/verb/toggle_run_intent() + set hidden = 1 + set name = "mov_intent" + if(hud_used?.move_intent) + hud_used.move_intent.Click() \ No newline at end of file diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 119e534d0c5..ceae90bac98 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -1448,4 +1448,4 @@ if(!check_has_body_select()) return var/obj/screen/zone_sel/selector = mob.zone_sel - selector.set_selected_zone(next_in_list(mob.zone_sel.selecting,zones)) + selector.set_selected_zone(next_in_list(mob.zone_sel.selecting,zones)) \ No newline at end of file diff --git a/html/changelogs/geeves-disable_click_macros.yml b/html/changelogs/geeves-disable_click_macros.yml new file mode 100644 index 00000000000..e78649029b5 --- /dev/null +++ b/html/changelogs/geeves-disable_click_macros.yml @@ -0,0 +1,9 @@ +author: Geeves + +delete-after: True + +changes: + - rscdel: ".click, .dblclick, and .mouse macros have been disabled." + - rscdel: "Pick-up macros have been disabled." + - rscadd: "Added a replacement verb for clicking your mov_intent. Simply make a macro with 'mov_intent' as the command." + - rscadd: "Added replacement verbs for clicking on your uniform, belt, and backpack. These macros are 'click_uniform', 'click_belt' and 'click_back' respectively." \ No newline at end of file