mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-21 21:10:30 +01:00
af6c74d917
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" />
281 lines
9.1 KiB
Plaintext
281 lines
9.1 KiB
Plaintext
/client/verb/ooc_verb()
|
|
set name = ".OOC"
|
|
set hidden = TRUE
|
|
winset(src, null, "command=[src.tgui_say_create_open_command(OOC_CHANNEL)]")
|
|
|
|
/client/verb/ooc(msg as text)
|
|
set name = "OOC"
|
|
set category = "OOC.Chat"
|
|
|
|
if(say_disabled) //This is here to try to identify lag problems
|
|
to_chat(usr, SPAN_WARNING("Speech is currently admin-disabled."))
|
|
return
|
|
|
|
if(!mob)
|
|
return
|
|
|
|
if(IsGuestKey(key))
|
|
to_chat(src, "Guests may not use OOC.")
|
|
return
|
|
|
|
if(!(prefs.toggles & CHAT_OOC))
|
|
to_chat(src, SPAN_WARNING("You have OOC muted."))
|
|
return
|
|
|
|
msg = sanitize(msg)
|
|
|
|
if(!msg)
|
|
return
|
|
|
|
if(!holder)
|
|
if(!GLOB.config.ooc_allowed)
|
|
to_chat(src, SPAN_DANGER("OOC is globally muted."))
|
|
return
|
|
if(!GLOB.config.dooc_allowed && (mob.stat == DEAD))
|
|
to_chat(usr, SPAN_DANGER("OOC for dead mobs has been turned off."))
|
|
return
|
|
if(handle_spam_prevention(msg,MUTE_OOC))
|
|
return
|
|
if(findtext(msg, "byond://"))
|
|
to_chat(src, "<B>Advertising other servers is not allowed.</B>")
|
|
log_admin("[key_name(src)] has attempted to advertise in OOC: [msg]")
|
|
message_admins("[key_name_admin(src)] has attempted to advertise in OOC: [msg]")
|
|
return
|
|
|
|
log_ooc("[mob.name]/[key] : [msg]")
|
|
|
|
var/ooc_style = "everyone"
|
|
if(holder && !holder.fakekey)
|
|
ooc_style = "elevated"
|
|
if(holder.rights & R_MOD)
|
|
ooc_style = "moderator"
|
|
if(holder.rights & (R_DEBUG|R_DEV))
|
|
ooc_style = "developer"
|
|
if(holder.rights & R_ADMIN)
|
|
ooc_style = "admin"
|
|
|
|
msg = process_chat_markup(msg, list("*"))
|
|
|
|
for(var/client/target in GLOB.clients)
|
|
if(target.prefs?.toggles & CHAT_OOC)
|
|
var/display_name = src.key
|
|
if(holder)
|
|
if(holder.fakekey)
|
|
if(target.holder)
|
|
display_name = "[holder.fakekey]/([src.key])"
|
|
else
|
|
display_name = holder.fakekey
|
|
if(holder && !holder.fakekey && (holder.rights & R_ADMIN) && GLOB.config.allow_admin_ooccolor && (src.prefs.ooccolor != initial(src.prefs.ooccolor))) // keeping this for the badmins
|
|
to_chat(target, "<font color='[src.prefs.ooccolor]'><span class='ooc'>" + create_text_tag("OOC", target) + " <EM>[display_name]:</EM> <span class='message linkify'>[msg]</span></span></font>")
|
|
else
|
|
to_chat(target, "<span class='ooc'><span class='[ooc_style]'>" + create_text_tag("OOC", target) + " <EM>[display_name]:</EM> <span class='message linkify'>[msg]</span></span></span>")
|
|
|
|
/client/verb/looc(msg as text)
|
|
set name = "LOOC"
|
|
set desc = "Local OOC, seen only by those in view."
|
|
set category = "OOC.Chat"
|
|
|
|
if(say_disabled) //This is here to try to identify lag problems
|
|
to_chat(usr, SPAN_DANGER("Speech is currently admin-disabled."))
|
|
return
|
|
|
|
if(!mob)
|
|
return
|
|
|
|
if(IsGuestKey(key))
|
|
to_chat(src, "Guests may not use OOC.")
|
|
return
|
|
|
|
msg = sanitize(msg)
|
|
msg = process_chat_markup(msg, list("*"))
|
|
if(!msg)
|
|
return
|
|
|
|
if(!(prefs.toggles & CHAT_LOOC))
|
|
to_chat(src, SPAN_DANGER("You have LOOC muted."))
|
|
return
|
|
if(mob.stat == DEAD && !(prefs.toggles & CHAT_GHOSTLOOC))
|
|
to_chat(src, SPAN_DANGER("You have observer LOOC muted."))
|
|
return
|
|
|
|
if(!holder)
|
|
if(!GLOB.config.looc_allowed)
|
|
to_chat(src, SPAN_DANGER("LOOC is globally muted."))
|
|
return
|
|
if(!GLOB.config.dead_looc_allowed && (mob.stat == DEAD))
|
|
to_chat(usr, SPAN_DANGER("LOOC for dead mobs has been turned off."))
|
|
return
|
|
if(handle_spam_prevention(msg, MUTE_OOC))
|
|
return
|
|
if(findtext(msg, "byond://"))
|
|
to_chat(src, "<B>Advertising other servers is not allowed.</B>")
|
|
log_admin("[key_name(src)] has attempted to advertise in OOC: [msg]")
|
|
message_admins("[key_name_admin(src)] has attempted to advertise in OOC: [msg]")
|
|
return
|
|
|
|
log_ooc("(LOCAL) [mob.name]/[key] : [msg]")
|
|
|
|
var/mob/source = src.mob
|
|
var/list/messageturfs = list() //List of turfs we broadcast to.
|
|
var/list/messagemobs = list() //List of living mobs nearby who can hear it
|
|
|
|
for(var/turf in range(world.view, get_turf(source)))
|
|
messageturfs += turf
|
|
if(isAI(source))
|
|
var/mob/living/silicon/ai/AI = source
|
|
for(var/turf in range(world.view, get_turf(AI.eyeobj)))
|
|
messageturfs += turf
|
|
|
|
for(var/mob/M in GLOB.player_list)
|
|
if(!M.client || istype(M, /mob/abstract/new_player))
|
|
continue
|
|
if(isAI(M))
|
|
var/mob/living/silicon/ai/AI = M
|
|
if(get_turf(AI.eyeobj) in messageturfs)
|
|
messagemobs += M
|
|
continue
|
|
if(get_turf(M) in messageturfs)
|
|
messagemobs += M
|
|
|
|
var/display_name = source.key
|
|
if(holder && holder.fakekey)
|
|
display_name = holder.fakekey
|
|
if(source.stat != DEAD)
|
|
display_name = source.name
|
|
|
|
msg = process_chat_markup(msg, list("*"))
|
|
|
|
var/prefix
|
|
var/admin_stuff
|
|
for(var/client/target in GLOB.clients)
|
|
if(target.prefs.toggles & CHAT_LOOC)
|
|
if(mob.stat == DEAD && !(target.prefs.toggles & CHAT_GHOSTLOOC))
|
|
continue
|
|
admin_stuff = ""
|
|
var/display_remote = 0
|
|
if (target.holder && ((R_MOD|R_ADMIN) & target.holder.rights))
|
|
display_remote = 1
|
|
if(display_remote)
|
|
prefix = "(R)"
|
|
admin_stuff += "/([source.key])"
|
|
if(target != source.client)
|
|
admin_stuff += "(<A href='byond://?src=[REF(target.holder)];adminplayerobservejump=[REF(mob)]'>JMP</A>)"
|
|
if(target.mob in messagemobs)
|
|
prefix = ""
|
|
if((target.mob in messagemobs) || display_remote)
|
|
to_chat(target, "<span class='ooc'><span class='looc'>" + create_text_tag("LOOC", target) + " <span class='prefix'>[prefix]</span><EM>[display_name][admin_stuff]:</EM> <span class='message linkify'>[msg]</span></span></span>")
|
|
|
|
/client/verb/stop_all_sounds()
|
|
set name = "Stop all sounds"
|
|
set desc = "Stop all sounds that are currently playing."
|
|
set category = "OOC"
|
|
|
|
if(!mob)
|
|
return
|
|
|
|
mob << sound(null)
|
|
|
|
/client/verb/rolldice()
|
|
set name = "Roll the Dice!"
|
|
set desc = "Rolls the Dice of your choice!"
|
|
set category = "OOC"
|
|
|
|
var/list/choice = list(2, 4, 6, 8, 10, 12, 20, 50, 100)
|
|
var/input = input("Select the Dice you want!", "Dice", null, null) in choice
|
|
|
|
to_chat(usr, SPAN_NOTICE("You roll [rand(1,input)] out of [input]!"))
|
|
|
|
/client/verb/fit_viewport()
|
|
set name = "Fit Viewport"
|
|
set category = "OOC.Debug"
|
|
set desc = "Fit the width of the map window to match the viewport"
|
|
|
|
// Fetch aspect ratio
|
|
var/view_size = getviewsize(view)
|
|
var/aspect_ratio = view_size[1] / view_size[2]
|
|
|
|
// Calculate desired pixel width using window size and aspect ratio
|
|
var/list/sizes = params2list(winget(src, "mainwindow.split;mapwindow", "size"))
|
|
|
|
// Client closed the window? Some other error? This is unexpected behaviour, let's
|
|
// CRASH with some info.
|
|
if(!sizes["mapwindow.size"])
|
|
CRASH("sizes does not contain mapwindow.size key. This means a winget failed to return what we wanted. --- sizes var: [sizes] --- sizes length: [length(sizes)]")
|
|
|
|
var/list/map_size = splittext(sizes["mapwindow.size"], "x")
|
|
|
|
// Gets the type of zoom we're currently using from our view datum
|
|
// If it's 0 we do our pixel calculations based off the size of the mapwindow
|
|
// If it's not, we already know how big we want our window to be, since zoom is the exact pixel ratio of the map
|
|
var/zoom_value = /*src.view_size?.zoom ||*/ 0
|
|
|
|
var/desired_width = 0
|
|
if(zoom_value)
|
|
desired_width = round(view_size[1] * zoom_value * ICON_SIZE_X)
|
|
else
|
|
|
|
// Looks like we expect mapwindow.size to be "ixj" where i and j are numbers.
|
|
// If we don't get our expected 2 outputs, let's give some useful error info.
|
|
if(length(map_size) != 2)
|
|
CRASH("map_size of incorrect length --- map_size var: [map_size] --- map_size length: [length(map_size)]")
|
|
var/height = text2num(map_size[2])
|
|
desired_width = round(height * aspect_ratio)
|
|
|
|
if (text2num(map_size[1]) == desired_width)
|
|
// Nothing to do
|
|
return
|
|
|
|
var/split_size = splittext(sizes["mainwindow.split.size"], "x")
|
|
var/split_width = text2num(split_size[1])
|
|
|
|
// Avoid auto-resizing the statpanel and chat into nothing.
|
|
desired_width = min(desired_width, split_width - 300)
|
|
|
|
// Calculate and apply a best estimate
|
|
// +4 pixels are for the width of the splitter's handle
|
|
var/pct = 100 * (desired_width + 4) / split_width
|
|
winset(src, "mainwindow.split", "splitter=[pct]")
|
|
|
|
// Apply an ever-lowering offset until we finish or fail
|
|
var/delta
|
|
for(var/safety in 1 to 10)
|
|
var/after_size = winget(src, "mapwindow", "size")
|
|
map_size = splittext(after_size, "x")
|
|
var/got_width = text2num(map_size[1])
|
|
|
|
if (got_width == desired_width)
|
|
// success
|
|
return
|
|
else if (isnull(delta))
|
|
// calculate a probable delta value based on the difference
|
|
delta = 100 * (desired_width - got_width) / split_width
|
|
else if ((delta > 0 && got_width > desired_width) || (delta < 0 && got_width < desired_width))
|
|
// if we overshot, halve the delta and reverse direction
|
|
delta = -delta/2
|
|
|
|
pct += delta
|
|
winset(src, "mainwindow.split", "splitter=[pct]")
|
|
|
|
/// Attempt to automatically fit the viewport, assuming the user wants it
|
|
/client/proc/attempt_auto_fit_viewport()
|
|
/*if (!prefs.read_preference(/datum/preference/toggle/auto_fit_viewport))
|
|
return*/ //We do not have this in aurora yet
|
|
if(fully_created)
|
|
INVOKE_ASYNC(src, VERB_REF(fit_viewport))
|
|
else //Delayed to avoid wingets from Login calls.
|
|
addtimer(CALLBACK(src, VERB_REF(fit_viewport), 1 SECONDS))
|
|
|
|
/client/verb/refresh_tgui()
|
|
set name = "Refresh TGUI"
|
|
set category = "OOC.Debug"
|
|
|
|
for(var/window_id in tgui_windows)
|
|
var/datum/tgui_window/window = tgui_windows[window_id]
|
|
window.reinitialize()
|
|
|
|
/client/verb/fix_stat_panel()
|
|
set name = "Fix-Stat-Panel"
|
|
set hidden = TRUE
|
|
|
|
init_verbs()
|