Mechanical Engineering Cross Role Interactions (#22880)

<img width="606" height="144" alt="image"
src="https://github.com/user-attachments/assets/f1c88863-37be-41e0-be79-27fca980a3f3"
/>

This PR adds new "Cross-Role Interactions" for the Mechanical
Engineering skill, with two specific kinds that are aimed at a variety
of different roles.

1. **Bonus damage vs. structures**: Having ranks in MechE makes you deal
bonus damage when melee attacking structures like Airlocks and Windows.
This makes it a desireable niche pick for any kind of job that can see
themself wanting to take a breaching to a room's entrance! For example,
paramedics, shaft miners, and security can all make use of it on
occasion.
2. **Mech Repair Speed**: This one is aimed specifically at Machinists.
Repairing mechs with a welder is no longer instantaneous (That was very
powergamey in practice for 'battle machinists'). Instead it has a repair
speed (and repair amount) that scales with your Mechanical Engineering
skill.

Why MechE and not Robotics? To encourage further "Machinist
Specialization". Machinist players were already pretty naturally
inclined to position their character as either being a Robotics
Specialist, or a Mechatronics Specialist, by sheer virtue of there being
two machinist slots and two noticeably distinctive roles. This
separation of skill interactions is there to further encourage this
degree of separation between machinist skillsets.

As a side note, just so I'm not thoroughly pissing off every machinist
main. As a quality of life improvement, I've made it so that attempting
to repair a mech with a welder will loop the repair until completed or
interrupted.

---------

Signed-off-by: VMSolidus <evilexecutive@gmail.com>
This commit is contained in:
VMSolidus
2026-08-16 16:13:43 +00:00
committed by GitHub
parent 6ae7fc8b2e
commit 27f727b71f
6 changed files with 94 additions and 11 deletions
@@ -139,7 +139,7 @@
/obj/item/mech_component/proc/update_components()
return
/obj/item/mech_component/proc/repair_brute_generic(var/obj/item/weldingtool/WT, var/mob/user)
/obj/item/mech_component/proc/repair_brute_generic(obj/item/weldingtool/WT, var/mob/user)
if(!istype(WT))
return
if(!brute_damage)
@@ -148,12 +148,38 @@
if(!WT.isOn())
to_chat(user, SPAN_WARNING("Turn \the [WT] on, first."))
return
if(WT.use(0, user))
var/repair_value = 15
if(brute_damage)
repair_brute_damage(repair_value)
to_chat(user, SPAN_NOTICE("You mend the damage to \the [src]."))
playsound(user.loc, 'sound/items/Welder.ogg', 25, 1)
var/do_after_time = 5 SECONDS
var/repair_value = 5
// Get modifiers only once before entering the loop.
SEND_SIGNAL(user, COMSIG_GET_MECH_WELD_MODIFIERS, src, &do_after_time, &repair_value)
if (repair_value <= 0) // Sanity check just in case to prevent an infinite loop after we start.
to_chat(user, SPAN_NOTICE("You can't repair \the [src]"))
return
to_chat(user, SPAN_NOTICE("You start welding \the [src]"))
playsound(user.loc, 'sound/items/Welder.ogg', 25, 1)
// Loop until finished fixing it.
while (TRUE)
if (!src || !WT || !user) // Any one of the three failed to exist.
return
if (!brute_damage) // Check damage both before and after do_after
to_chat(user, SPAN_NOTICE("You finish welding \the [src]."))
return
if (!do_after(user, do_after_time, src, DO_DEFAULT | DO_USER_UNIQUE_ACT | DO_SHOW_PROGRESS))
to_chat(user, SPAN_NOTICE("You were interrupted while welding \the [src]"))
return
if (!brute_damage || !WT.use(0, user))
to_chat(user, SPAN_NOTICE("You finish welding \the [src]."))
return
repair_brute_damage(repair_value)
to_chat(user, SPAN_NOTICE("You mend the damage to \the [src]."))
playsound(user.loc, 'sound/items/Welder.ogg', 25, 1)
/obj/item/mech_component/proc/repair_burn_generic(var/obj/item/stack/cable_coil/CC, var/mob/user)
if(!istype(CC))