verb macro system (pr 1/3) (#96720)

## About The Pull Request

just macro-izes all the usages of verbs in the codebase as a
pre-requisite to my follow up pr that serializes all the verbs arguments
so we can tgui-ify the command bar, so we can then put it on the
onscreen map.

this also basically does the same as #94487 so can easily be integrated
into the verb queueing stuff... but does not actually do any verb
queueing by itself. basically im just trying to be
https://github.com/tgstation/tgstation/labels/Atomic
## Why It's Good For The Game
it doesn't really do anything by itself but it does let us do more stuff

## Changelog
🆑
code: the backend to all verbs in the game has been played with, please
report any issues to github
/🆑

---------

Co-authored-by: harryob <55142896+harryob@users.noreply.github.com>
This commit is contained in:
harry
2026-07-04 02:45:07 -04:00
committed by GitHub
co-authored by harryob
parent e5afe71e87
commit ff006aa4a5
79 changed files with 369 additions and 565 deletions
+2 -6
View File
@@ -401,9 +401,7 @@
if(greyscale_config_inhand_right)
righthand_file = SSgreyscale.GetColoredIconByType(greyscale_config_inhand_right, greyscale_colors)
/obj/item/verb/move_to_top()
set name = "Move To Top"
set src in oview(1)
GAME_VERB_SRC(/obj/item, move_to_top, oview(1), "Move To Top", null)
if(!isturf(loc) || usr.stat != CONSCIOUS || HAS_TRAIT(usr, TRAIT_HANDS_BLOCKED) || anchored)
return
@@ -822,9 +820,7 @@
return M.can_equip(src, slot, disable_warning, bypass_equip_delay_self, ignore_equipped, indirect_action = indirect_action)
/obj/item/verb/verb_pickup()
set src in oview(1)
set name = "Pick up"
GAME_VERB_SRC(/obj/item, verb_pickup, oview(1), "Pick up", null)
if(usr.incapacitated || !Adjacent(usr))
return
@@ -126,8 +126,7 @@
return FALSE
/obj/item/taperecorder/verb/ejectverb()
set name = "Eject Tape"
GAME_VERB(/obj/item/taperecorder, ejectverb, "Eject Tape", null)
if(!can_use(usr))
balloon_alert(usr, "can't use!")
@@ -161,8 +160,7 @@
mytape.storedinfo += "\[[time2text(mytape.used_capacity,"mm:ss", NO_TIMEZONE)]\] [speaker.get_voice()]: [raw_message]"
/obj/item/taperecorder/verb/record()
set name = "Start Recording"
GAME_VERB(/obj/item/taperecorder, record, "Start Recording", null)
if(!can_use(usr))
balloon_alert(usr, "can't use!")
@@ -203,8 +201,7 @@
playsound(src, 'sound/items/taperecorder/taperecorder_stop.ogg', 50, FALSE)
/obj/item/taperecorder/verb/stop()
set name = "Stop"
GAME_VERB(/obj/item/taperecorder, stop, "Stop", null)
if(!can_use(usr))
balloon_alert(usr, "can't use!")
@@ -223,8 +220,7 @@
update_appearance()
update_sound()
/obj/item/taperecorder/verb/play()
set name = "Play Tape"
GAME_VERB(/obj/item/taperecorder, play, "Play Tape", null)
if(!can_use(usr))
balloon_alert(usr, "can't use!")
@@ -295,8 +291,7 @@
if("Eject")
eject(user)
/obj/item/taperecorder/verb/print_transcript()
set name = "Print Transcript"
GAME_VERB(/obj/item/taperecorder, print_transcript, "Print Transcript", null)
var/list/transcribed_info = mytape.storedinfo
if(!length(transcribed_info))
@@ -32,8 +32,7 @@
return ..()
///A right-click verb, for those not using hotkey mode.
/obj/item/borg/apparatus/verb/verb_dropHeld()
set name = "Drop"
GAME_VERB(/obj/item/borg/apparatus, verb_dropHeld, "Drop", null)
if(usr != loc || !stored)
return
+1 -2
View File
@@ -59,8 +59,7 @@
//Remove from their hands and put back "into" the tank
remove_noz()
/obj/item/watertank/verb/toggle_mister_verb()
set name = "Toggle Mister"
GAME_VERB(/obj/item/watertank, toggle_mister_verb, "Toggle Mister", null)
toggle_mister(usr)
/obj/item/watertank/proc/make_noz()
@@ -1025,9 +1025,7 @@ GLOBAL_LIST_EMPTY(roundstart_station_closets)
if(attack_hand(user))
return ITEM_INTERACT_BLOCKING
/obj/structure/closet/verb/verb_toggleopen()
set name = "Toggle Open"
set src in view(1)
GAME_VERB_SRC(/obj/structure/closet, verb_toggleopen, view(1), "Toggle Open", null)
if(!usr.can_perform_action(src) || !isturf(loc))
return
@@ -336,9 +336,8 @@
//Flips the windoor assembly, determines whather the door opens to the left or the right
/obj/structure/windoor_assembly/verb/flip()
set name = "Flip Windoor Assembly"
set src in oview(1)
GAME_VERB_SRC(/obj/structure/windoor_assembly, flip, oview(1), "Flip Windoor Assembly", null)
if(usr.stat != CONSCIOUS || HAS_TRAIT(usr, TRAIT_HANDS_BLOCKED))
return