Files
Aurora.3/code/game/objects/structures.dm
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

244 lines
6.7 KiB
Plaintext

/obj/structure
icon = 'icons/obj/structures.dmi'
w_class = WEIGHT_CLASS_GIGANTIC
layer = STRUCTURE_LAYER
blocks_emissive = EMISSIVE_BLOCK_GENERIC
pass_flags_self = PASSSTRUCTURE
var/material_alteration = MATERIAL_ALTERATION_ALL // Overrides for material shit. Set them manually if you don't want colors etc. See wood chairs/office chairs.
var/climbable
var/breakable
var/parts
var/list/climbers
var/list/footstep_sound //footstep sounds when stepped on
var/material/material
var/build_amt = 2 // used by some structures to determine into how many pieces they should disassemble into or be made with
var/slowdown = 0 //amount that pulling mobs have their movement delayed by
/obj/structure/Initialize(mapload)
. = ..()
if(!isnull(material) && !istype(material))
material = SSmaterials.get_material_by_name(material)
if (!mapload)
updateVisibility(src) // No point checking this before visualnet initializes.
if(climbable)
verbs += /obj/structure/proc/climb_on
if (smoothing_flags)
QUEUE_SMOOTH(src)
QUEUE_SMOOTH_NEIGHBORS(src)
/obj/structure/Destroy()
if(parts)
new parts(loc)
if (smoothing_flags)
SSicon_smooth.remove_from_queues(src)
QUEUE_SMOOTH_NEIGHBORS(src)
climbers = null
return ..()
/obj/structure/attack_hand(mob/living/user)
if(breakable)
if((user.mutations & HULK) && !(user.isSynthetic()) && !(isvaurca(user)))
user.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ))
attack_generic(user,1,"smashes")
else if(istype(user,/mob/living/carbon/human))
var/mob/living/carbon/human/H = user
if(H.species.can_shred(user))
attack_generic(user,1,"slices")
if(LAZYLEN(climbers) && !(user in climbers))
user.visible_message(SPAN_WARNING("[user] shakes \the [src]."), \
SPAN_NOTICE("You shake \the [src]."))
structure_shaken()
return ..()
/obj/structure/ex_act(severity)
switch(severity)
if(1.0)
qdel(src)
return
if(2.0)
if(prob(50))
qdel(src)
return
if(3.0)
return
/obj/structure/proc/dismantle()
var/material/dismantle_material
if(!get_material())
dismantle_material = SSmaterials.get_material_by_name(DEFAULT_WALL_MATERIAL) //if there is no defined material, it will use steel
else
dismantle_material = get_material()
for(var/i = 1 to build_amt)
dismantle_material.place_sheet(loc)
qdel(src)
/obj/structure/bullet_act(obj/projectile/hitting_projectile, def_zone, piercing_hit)
. = ..()
if(. != BULLET_ACT_HIT)
return .
bullet_ping(hitting_projectile)
/obj/structure/proc/climb_on()
set name = "Climb Structure"
set desc = "Climbs onto a structure. Shortcut middle-mouse click."
set category = "Object"
set src in oview(1)
if(can_climb(usr))
do_climb(usr)
/obj/structure/handle_middle_mouse_click(mob/user)
if(can_climb(user))
do_climb(usr)
return TRUE
return FALSE
/obj/structure/mouse_drop_receive(atom/dropped, mob/user, params)
var/mob/living/H = user
if(istype(H) && can_climb(H) && dropped == user)
do_climb(dropped)
else
return ..()
/obj/structure/proc/can_climb(var/mob/living/user, post_climb_check=0)
if (!climbable)
to_chat(user, SPAN_WARNING("\The [src] cannot be climbed!"))
return FALSE
if (!can_touch(user) || (!post_climb_check && (user in climbers)))
return FALSE
if (!user.Adjacent(src))
to_chat(user, SPAN_WARNING("You must be next to \the [src] to climb it."))
return FALSE
var/obj/occupied = turf_is_crowded()
if(occupied)
to_chat(user, SPAN_WARNING("There's \a [occupied] in the way."))
return FALSE
return TRUE
/obj/structure/proc/turf_is_crowded(var/exclude_self = FALSE)
var/turf/T = get_turf(src)
if(!T || !istype(T))
return 0
for(var/obj/O in T.contents)
if(istype(O,/obj/structure))
var/obj/structure/S = O
if(S.climbable)
continue
if(O && O.density && !(O.atom_flags & ATOM_FLAG_CHECKS_BORDER)) //ATOM_FLAG_CHECKS_BORDER structures are handled by the Adjacent() check.
if(exclude_self && O == src)
continue
return O
return 0
/obj/structure/proc/do_climb(var/mob/living/user)
if (!can_climb(user))
return
user.visible_message(SPAN_WARNING("[user] starts [atom_flags & ATOM_FLAG_CHECKS_BORDER ? "leaping over" : "climbing onto"] \the [src]!"))
LAZYADD(climbers, user)
if(!do_after(user, 5 SECONDS, src, DO_DEFAULT | DO_USER_UNIQUE_ACT))
LAZYREMOVE(climbers, user)
return
if (!can_climb(user, post_climb_check=1))
LAZYREMOVE(climbers, user)
return
var/turf/TT = get_turf(src)
if(atom_flags & ATOM_FLAG_CHECKS_BORDER)
TT = get_step(get_turf(src), dir)
if(user.loc == TT)
TT = get_turf(src)
user.visible_message(SPAN_WARNING("[user] [atom_flags & ATOM_FLAG_CHECKS_BORDER ? "leaps over" : "climbs onto"] \the [src]!"))
user.forceMove(TT)
LAZYREMOVE(climbers, user)
/obj/structure/proc/structure_shaken()
for(var/mob/living/M in climbers)
M.Weaken(1)
to_chat(M, SPAN_DANGER("You topple as you are shaken off \the [src]!"))
LAZYREMOVE(climbers, M)
for(var/mob/living/M in get_turf(src))
if(M.lying) return //No spamming this on people.
M.Weaken(3)
to_chat(M, SPAN_DANGER("You topple as \the [src] moves under you!"))
if(prob(25))
var/damage = rand(15,30)
var/mob/living/carbon/human/H = M
if(!istype(H))
to_chat(H, SPAN_DANGER("You land heavily!"))
M.adjustBruteLoss(damage)
return
var/obj/item/organ/external/affecting
switch(pick(list("ankle","wrist",BP_HEAD,"knee","elbow")))
if("ankle")
affecting = H.get_organ(pick(BP_L_FOOT, BP_R_FOOT))
if("knee")
affecting = H.get_organ(pick(BP_L_LEG, BP_R_LEG))
if("wrist")
affecting = H.get_organ(pick(BP_L_HAND, BP_R_HAND))
if("elbow")
affecting = H.get_organ(pick(BP_L_ARM, BP_R_ARM))
if(BP_HEAD)
affecting = H.get_organ(BP_HEAD)
if(affecting)
to_chat(M, SPAN_DANGER("You land heavily on your [affecting.name]!"))
affecting.take_damage(damage, 0)
if(affecting.parent)
affecting.parent.add_autopsy_data("Misadventure", damage)
else
to_chat(H, SPAN_DANGER("You land heavily!"))
H.adjustBruteLoss(damage)
H.UpdateDamageIcon()
H.updatehealth()
return
/obj/structure/proc/can_touch(var/mob/user)
if (!user)
return 0
if(!Adjacent(user))
return 0
if (user.restrained() || user.buckled_to)
to_chat(user, SPAN_NOTICE("You need your hands and legs free for this."))
return 0
if (user.stat || user.paralysis || user.sleeping || user.lying || user.weakened)
return 0
if (issilicon(user))
to_chat(user, SPAN_NOTICE("You need hands for this."))
return 0
return 1
/obj/structure/attack_generic(var/mob/user, var/damage, var/attack_verb, var/wallbreaker)
if(!breakable || !damage || !wallbreaker)
return 0
visible_message(SPAN_DANGER("[user] [attack_verb] the [src] apart!"))
user.do_attack_animation(src)
qdel(src)
return 1
/obj/structure/get_material()
return material