Repath obj/machinery to obj/structure/machinery [MDB Ignore] (#22500)

Repaths obj/machinery to obj/structure/machinery. **Note for
reviewers:** the only meaningful changed code exists within
**code/game/objects/structures.dm** and
**code/game/objects/structures/_machinery.dm**, largely concerning
damage procs. With the exception of moving airlock defines to their own
file, ALL OTHER CHANGES ARE STRICTLY PATH CHANGES.

Objects, _categorically_, are largely divided between those you can hold
in your hand/inventory and those you can't. Machinery objects are
already subtypes of Structures behaviorally, this PR just makes their
pathing reflect that, and allows for future work (tool actions, more
health/destruction functionality) to be developed without unnecessary
code duplication.

I have tested this PR by loading up the Horizon and dismantling various
machines and structures with tools, shooting guns of various types
throughout the ship, and detonating a bunch of explosions throughout the
ship.
This commit is contained in:
Batrachophreno
2026-05-26 19:35:48 +00:00
committed by GitHub
parent d8e02149e0
commit 4ecb0bc21c
1102 changed files with 114406 additions and 114428 deletions
+7 -7
View File
@@ -119,7 +119,7 @@
if(known)
plane = ABOVE_LIGHTING_PLANE
for(var/obj/machinery/computer/ship/helm/H in SSmachinery.machinery)
for(var/obj/structure/machinery/computer/ship/helm/H in SSmachinery.machinery)
H.get_known_sectors()
update_icon()
@@ -157,8 +157,8 @@
if(ishuman(usr))
var/mob/living/carbon/human/H = usr
var/client/C = H.client
if(H.machine && istype(H.machine, /obj/machinery/computer/ship/targeting) && istype(C.eye, /obj/effect/overmap))
var/obj/machinery/computer/ship/targeting/GS = H.machine
if(H.machine && istype(H.machine, /obj/structure/machinery/computer/ship/targeting) && istype(C.eye, /obj/effect/overmap))
var/obj/structure/machinery/computer/ship/targeting/GS = H.machine
if(GS.targeting)
return
if(!istype(GS.linked.loc, /turf/unsimulated/map))
@@ -198,7 +198,7 @@
. = ..()
closeToolTip(usr)
/obj/effect/overmap/visitable/proc/target(var/obj/effect/overmap/O, var/obj/machinery/computer/ship/C)
/obj/effect/overmap/visitable/proc/target(var/obj/effect/overmap/O, var/obj/structure/machinery/computer/ship/C)
C.targeting = TRUE
usr.visible_message(SPAN_WARNING("[usr] starts calibrating the targeting systems, swiping around the holographic screen..."), SPAN_WARNING("You start calibrating the targeting systems, swiping around the screen as you focus..."))
if(do_after(usr, 5 SECONDS))
@@ -224,14 +224,14 @@
C.visible_message(SPAN_DANGER("[usr] engages the targeting systems, acquiring a lock on the target!"))
if(istype(O, /obj/effect/overmap/visitable/ship))
var/obj/effect/overmap/visitable/ship/S = O
for(var/obj/machinery/computer/ship/SH in S.consoles)
if(istype(SH, /obj/machinery/computer/ship/sensors))
for(var/obj/structure/machinery/computer/ship/SH in S.consoles)
if(istype(SH, /obj/structure/machinery/computer/ship/sensors))
playsound(SH, 'sound/effects/ship_weapons/locked_on.ogg', 70)
SH.visible_message(SPAN_DANGER("<font size=4>\The [SH] beeps alarmingly, signaling an enemy lock-on!</font>"))
else
C.targeting = FALSE
/obj/effect/overmap/visitable/proc/detarget(var/obj/effect/overmap/O, var/obj/machinery/computer/C)
/obj/effect/overmap/visitable/proc/detarget(var/obj/effect/overmap/O, var/obj/structure/machinery/computer/C)
if(C)
playsound(C, 'sound/items/rfd_interrupt.ogg', 70)
if(O)