Files
Batrachophreno af6c74d917 Verb organization stuff (#21131)
Currently, only Preferences Verbs use subcategories. As a result, all
other Verb tabs are only organized alphabetically, meaning that a single
mechanic (ie. languages) has its governing Verbs scattered rather than
grouped together.

Verb organization by Tab handles broad organization - IC, OOC, Objects,
etc.- highly effectively but requires the user to click-navigate to
other Tabs to access any other verbs.

Verb organization within a Tab can be handled by A.) subcategories and
B.) Verb name prefixes (such as Earphones - *****). The first option is
the clearest and cleanest, but consumes additional vertical space. The
second option conserves vertical space at the cost of visual clarity.

This PR attempts to reorganize Verbs by their Tabs, Subcategories, and
prefixes with the following priorities in mind:
- Minimal disruption; any radical change must be justified (don't move
shit around just for the sake of moving shit around.)
- Verbs which share common functions (such as Languages) should be
grouped together.
- Maintainability. Contributors should not need to memorize an
excessively convoluted Subcategories list; Subcategories must be
intuitive and simple.
- Subcategories should be used judiciously when grouping Verbs to
conserve vertical space. Example: Instead of creating a Subcategory for
Emotes, just rename Audible Emote and Visual Emote to Emote (Audible)
and Emote (Visual).
- Subcategories should highlight uncommon or unusual verbs when
reasonable. Example: There are several animal husbandry-related Verbs,
and because most characters will not have access to those verbs
regularly, we can be less conservative with space (because they'll be
gone most of the time) for the sake of emphasizing their availability.

This PR covers the IC, OOC, and Object Tabs.

Subcategories:
OOC.Chat (Chat functions)
- AOOC
- LOOC
- Devsay (moved from Special Verbs)
- Dsay (moved from Special Verbs)
- OOC

OOC.Debug (Fix shit)
- Fit viewport
- Fix chat
- Refresh TGUI

OOC.Round (Round information)
- Check Gamemode Probability
- Check Round Info
- Custom Event Info
- Vote

IC.Antag (Antag verbs w/o their own tab)
- Invite to the Loyalists
- Invite to the Revolutionaries
- Set Ambition

IC.Critters (More critter stuff than you'd expect there to be)
- Befriend Carp (Previous name 'Become Friends')
- Befriend Cat (Previous name 'Become Friends')
- Befriend Dog
- Befriend Ives
- Name Alien Species
- Name Animal

IC.Language (Language-related stuff)
- Check Default Language
- Check Known Languages
- Set Default Language

IC.Maneuver (Movement, positioning, etc.)
- Adjust walk speed
- Do Pushup
- Face Direction
- Look Down
- Look Up
- Move Downwards
- Move Upwards
- Rest

Object.Equipped (Equipped object stuff, mostly for drip)
- Adjust Badge
- Adjust Bag Straps (Backpacks)
- Adjust Goggles
- Adjust Mask
- Adjust Welding Goggles
- Adjust Welding Mask
- Change Glasses Layer
- Change Pants Layer
- Change Wrist Radio Layer
- Change Wristwear Layer
- Check Time
- Flip Badge
- Flip Belt
- Flip Eyepatch
- Flip Hat
- Flip ID card (ID card)
- Flip Radio (Clip-on radio)
- Flip Wristwear
- Fold Collar
- Lock Antenna(e)
- Point At Watch
- Raise Shroud
- Roll Up Cape Mantle
- Roll Up/Down Jumpsuit
- Roll Up/Down Sleeves
- Switch Belt Layer
- Switch ID Layer
- Switch Lanyard Layer
- Switch Shoe Layer
- Toggle Aviators (Like a dozen variants)
- Toggle Ceremonial Garment Lights
- Toggle Coat Buttons
- Toggle Coat Zipper
- Toggle Hair Coverage (For hats helmets etc)
- Toggle Hair Coverage (FOR BABY CARP!!!!!)
- Toggle Helmet Camera
- Toggle Hood
- Toggle Lyodsuit Mask
- Toggle Poncho Tail Coverage
- Toggle Shirt Buttons
- Toggle Suit Sensors
- Toggle Visor (Pilot helmet)
- Toggle Waistcoat Buttons
- Transform Holoclothing
- Voidsuit - Eject Suit Cooler
- Voidsuit - Eject Tank
- Voidsuit - Toggle Helmet

Object.Held (If you're HOLDING it, its probably relevant to you rn)
- Activate Held Object (Silicons; moved from IC)
- Alter Beacon's Signal (Radio beacon)
- Change Bite Size (Utensils)
- Change Pen Colour
- Choose Colour (Paint sprayer)
- Choose Decal (Paint sprayer)
- Choose Direction (Paint sprayer)
- Choose Preset Colour (Paint sprayer)
- Describe Prototype
- Draw Boot Knife
- Empty Bee Net
- Empty Spray Bottle
- Holster
- Name Gun
- Name Prototype
- Plant Flag (Flags)
- Print Plant Report
- Remove Chopsticks
- Remove Top
- Set Detector High-Bound (Light meter)
- Set Detector Low-Bound (Light meter)
- Set Hailer Message (Hailer)
- Set Timer (Timer igniter)
- Set Valve Pressure (Pneumatic cannon)
- Show Held Item
- Spin Cylinder (Revolvers)
- Switch Verbosity (Health analyzer)
- Toggle Chainsaw Power (Chainsaw)
- Toggle Flashlight Brightness (Flashlights)
- Toggle Gun Safety
- Toggle Hazard Vest
- Toggle Pinpointer Mode (Pinpointer)
- Toggle Mister (Backpack water tank. Goes into/out of hands)
- Twist Cap
- Use Scope
- Wield Pick/Drill
- Wield Two-Handed Weapon (Two-handed weapons)

Object.Cards (I fucking hate cards!!!)
- Deck - Deal
- Deck - Draw
- Deck - Pick
- Hand - Pick
- Turn Hand Into Deck

Object.Earphones (Enough here to separate out)
- Eject Music Cartridge
- Change Volume
- Next Song
- Pause/Unpause
- Play/Stop
- Previous Song

Object.Jetpack (This is probably really important to see quickly)
- Toggle Jetpack
- Toggle Jetpack Stabilization

Object.Tape Recorder (Enough here to separate out)
- Start Recording
- Stop Recording
- Clear Memory
- Playback Memory
- Print Transcript
- Eject Portable Storage

**IC tab example:**
<img width="1061" height="277" alt="Screenshot 2025-08-09 101813"
src="https://github.com/user-attachments/assets/a2afe92d-34fd-4160-bf68-b459a4195e26"
/>
**Objects tab example:**
<img width="1100" height="472" alt="Screenshot 2025-08-09 101807"
src="https://github.com/user-attachments/assets/a36e4c76-594e-4569-93ba-ffcda57e8760"
/>
2025-08-11 15:12:56 +00:00

201 lines
6.2 KiB
Plaintext

/mob/proc/can_emote(var/emote_type)
return (stat == CONSCIOUS)
/mob/living/can_emote(var/emote_type)
return (..() && !(silent && emote_type == AUDIBLE_MESSAGE))
/mob/verb/custom_audible_emote()
set name = "Emote (Audible)"
set category = "IC"
set desc = "Type in an emote message that will be received by mobs that can hear you."
custom_emote(m_type = AUDIBLE_MESSAGE, message = sanitize(input(src,"Choose an emote to display.") as text|null))
/mob/verb/custom_visible_emote()
set name = "Emote (Visible)"
set category = "IC"
set desc = "Type in an emote message that will be received by mobs that can see you."
custom_emote(m_type = VISIBLE_MESSAGE, message = sanitize(input(src,"Choose an emote to display.") as text|null))
/mob/proc/emote(var/act, var/m_type, var/message)
// s-s-snowflake
if((src.stat == DEAD || src.status_flags & FAKEDEATH) && act != "deathgasp")
return
var/splitpoint = findtext(act, " ")
if(splitpoint > 0)
var/tempstr = act
act = copytext(tempstr,1,splitpoint)
message = copytext(tempstr,splitpoint+1,0)
var/singleton/emote/use_emote = usable_emotes[act]
if(!use_emote)
to_chat(src, SPAN_WARNING("Unknown emote '[act]'. Type <b>say *help</b> for a list of usable emotes."))
return
if(m_type && m_type != use_emote.message_type)
return
if(!use_emote.can_do_emote(src))
return
if(use_emote.message_type == AUDIBLE_MESSAGE && is_muzzled())
audible_message("<b>\The [src]</b> makes a muffled sound.")
return
else
use_emote.do_emote(src, message)
for (var/obj/item/implant/I in src)
if (I.implanted)
I.trigger(act, src)
/mob/proc/client_emote(var/act, var/m_type, var/message)
if((src.stat == DEAD || src.status_flags & FAKEDEATH) && act != "deathgasp")
return
if(usr == src) //client-called emote
if (client && (client.prefs.muted & MUTE_IC))
to_chat(src, SPAN_WARNING("You cannot send IC messages (muted)."))
return
if(act == "help")
var/list/help_text = list()
for(var/emote_key in usable_emotes)
var/emote_text = emote_key
var/singleton/emote/emote = usable_emotes[emote_key]
if(istype(emote, /singleton/emote/audible))
var/singleton/emote/audible/audible_emote = emote
if(audible_emote.emote_sound)
emote_text = SPAN_NOTICE(emote_key)
help_text += emote_text
to_chat(src,"<b>Usable emotes:</b> [english_list(help_text)]")
return
if(!can_emote(m_type))
to_chat(src, SPAN_WARNING("You cannot currently [m_type == AUDIBLE_MESSAGE ? "audibly" : "visually"] emote!"))
return
if(act == "me")
return custom_emote(m_type, message)
if(act == "custom")
if(!message)
message = sanitize(input("Enter an emote to display.") as text|null)
if(!message)
return
if (!m_type)
if(alert(src, "Is this an audible emote?", "Emote", "Yes", "No") == "No")
m_type = VISIBLE_MESSAGE
else
m_type = AUDIBLE_MESSAGE
return custom_emote(m_type, message)
return emote(act)
/mob/proc/format_emote(var/emoter = null, var/message = null)
var/pretext
var/subtext
var/nametext
var/end_char
var/start_char
var/name_anchor
var/anchor_char = "^"
if(!message || !emoter)
return
message = html_decode(message)
name_anchor = findtext(message, anchor_char)
if(name_anchor > 0) // User supplied emote with visible_emote token (default ^)
pretext = copytext(message, 1, name_anchor)
subtext = copytext(message, name_anchor + 1, length(message) + 1)
else
// No token. Just the emote as usual.
subtext = message
// Oh shit, we got this far! Let's see... did the user attempt to use more than one token?
if(findtext(subtext, anchor_char))
// abort abort!
to_chat(emoter, SPAN_WARNING("You may use only one \"[anchor_char]\" symbol in your emote."))
return
if(pretext)
// Add a space at the end if we didn't already supply one.
end_char = copytext(pretext, length(pretext), length(pretext) + 1)
if(end_char != " ")
pretext += " "
// Grab the last character of the emote message.
end_char = copytext(subtext, length(subtext), length(subtext) + 1)
if(!(end_char in list(".", "?", "!", "\"", "-", "~"))) // gotta include ~ for all you fucking weebs
// No punctuation supplied. Tack a period on the end.
subtext += "."
// Add a space to the subtext, unless it begins with an apostrophe or comma.
if(subtext != ".")
// First, let's get rid of any existing space, to account for sloppy emoters ("X, ^ , Y")
subtext = trim_left(subtext)
start_char = copytext(subtext, 1, 2)
if(start_char != "," && start_char != "'")
subtext = " " + subtext
pretext = capitalize(html_encode(pretext))
nametext = html_encode(nametext)
subtext = html_encode(subtext)
// Store the player's name in a nice bold, naturalement
nametext = "<B>[emoter]</B>"
return pretext + nametext + subtext
/mob/proc/custom_emote(var/m_type = VISIBLE_MESSAGE, var/message = null, var/do_show_observers = TRUE)
if((usr && stat) || (!use_me && usr == src))
to_chat(src, "You are unable to emote.")
return
if(!message)
return
if (message)
log_emote("[name]/[key] : [message]")
message = process_chat_markup(message, list("~", "_"))
var/langchat_message = message
message = format_emote(src, message)
var/list/emote_viewers = list()
if(m_type == VISIBLE_MESSAGE)
visible_message(message, show_observers = do_show_observers)
emote_viewers = viewers(world.view, src)
else
audible_message(message, ghost_hearing = do_show_observers)
emote_viewers = get_hearers_in_LOS(world.view, src)
langchat_speech(langchat_message, emote_viewers, GLOB.all_languages, skip_language_check = TRUE, additional_styles = list("emote", "langchat_small"))
// Specific mob type exceptions below.
/mob/living/silicon/ai/emote(var/act, var/type, var/message)
var/obj/machinery/hologram/holopad/T = src.holo
if(T?.active_holograms[src]) //Is the AI using a holopad?
src.holopad_emote(message)
else //Emote normally, then.
..()
/mob/living/captive_brain/emote(var/message)
return
/mob/abstract/ghost/observer/emote(var/act, var/type, var/message)
if(!message)
return
if(act != "me")
return
log_emote("Ghost/[src.key] : [message]")
if(src.client)
if(src.client.prefs.muted & (MUTE_DEADCHAT|MUTE_IC))
to_chat(src, SPAN_WARNING("You cannot emote in deadchat (muted)."))
return
. = src.emote_dead(message)