mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-23 21:12:24 +01:00
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:
@@ -118,10 +118,10 @@
|
||||
return // let proper initialisation handle it later
|
||||
|
||||
var/list/turf/turfs = list()
|
||||
var/list/obj/machinery/atmospherics/atmos_machines = list()
|
||||
var/list/obj/machinery/machines = list()
|
||||
var/list/obj/structure/machinery/atmospherics/atmos_machines = list()
|
||||
var/list/obj/structure/machinery/machines = list()
|
||||
var/list/obj/structure/cable/cables = list()
|
||||
var/list/obj/machinery/power/apc/apcs = list()
|
||||
var/list/obj/structure/machinery/power/apc/apcs = list()
|
||||
|
||||
for(var/atom/A as anything in atoms)
|
||||
if(isnull(A) || (A.flags_1 & INITIALIZED_1))
|
||||
@@ -132,11 +132,11 @@
|
||||
cables += A
|
||||
|
||||
//Not mutually exclusive anymore section, pay close attention!
|
||||
if(istype(A, /obj/machinery))
|
||||
if(istype(A, /obj/structure/machinery))
|
||||
machines += A
|
||||
if(istype(A, /obj/machinery/atmospherics))
|
||||
if(istype(A, /obj/structure/machinery/atmospherics))
|
||||
atmos_machines += A
|
||||
else if(istype(A, /obj/machinery/power/apc))
|
||||
else if(istype(A, /obj/structure/machinery/power/apc))
|
||||
apcs += A
|
||||
|
||||
var/notsuspended
|
||||
@@ -151,10 +151,10 @@
|
||||
if(notsuspended)
|
||||
SSmachinery.can_fire = TRUE
|
||||
|
||||
for (var/obj/machinery/power/apc/apc as anything in apcs)
|
||||
for (var/obj/structure/machinery/power/apc/apc as anything in apcs)
|
||||
apc.update() // map-loading areas and APCs is weird, okay
|
||||
|
||||
for (var/obj/machinery/machine as anything in machines)
|
||||
for (var/obj/structure/machinery/machine as anything in machines)
|
||||
machine.power_change()
|
||||
|
||||
for (var/turf/T as anything in turfs)
|
||||
|
||||
@@ -170,7 +170,7 @@ GLOBAL_LIST_EMPTY(banned_ruin_ids)
|
||||
qdel(monster)
|
||||
for(var/obj/structure/S in T)
|
||||
qdel(S)
|
||||
for(var/obj/machinery/M in T)
|
||||
for(var/obj/structure/machinery/M in T)
|
||||
qdel(M)
|
||||
if(LAZYLEN(T.decals))
|
||||
T.decals.Cut()
|
||||
|
||||
Reference in New Issue
Block a user