Files
Batrachophreno 4ecb0bc21c 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.
2026-05-26 19:35:48 +00:00

45 lines
1.3 KiB
Plaintext

/obj/item/phylactery
name = "phylactery"
desc = "A twisted mummified heart."
icon = 'icons/obj/wizard.dmi'
icon_state = "cursedheart-off"
origin_tech = list(TECH_BLUESPACE = 8, TECH_MATERIAL = 8, TECH_BIO = 8)
w_class = WEIGHT_CLASS_HUGE
light_color = "#6633CC"
light_power = 3
light_range = 4
reagents_to_add = list(/singleton/reagent/toxin/undead = 120)
var/lich = null
/obj/item/phylactery/feedback_hints(mob/user, distance, is_adjacent)
. += ..()
if(!lich)
. += "The heart is inert."
else
. += "The heart is pulsing slowly."
/obj/item/phylactery/Initialize()
. = ..()
GLOB.world_phylactery += src
/obj/item/phylactery/Destroy()
to_chat(lich, SPAN_DANGER("Your phylactery was destroyed, your soul is cast into the abyss as your immortality vanishes away!"))
GLOB.world_phylactery -= src
lich = null
return ..()
/obj/item/phylactery/attackby(obj/item/attacking_item, mob/user)
..()
if(istype(attacking_item, /obj/item/nullrod))
src.visible_message("\The [src] twists violently and explodes!")
gibs(src.loc)
qdel(src)
return
/obj/item/phylactery/pickup(mob/living/user as mob)
..()
to_chat(user, SPAN_WARNING("As you pick up \the [src], you feel a wave of dread wash over you."))
for(var/obj/structure/machinery/light/P in view(7, user))
P.flicker(1)