Files
BatrachophrenoandGitHub 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

96 lines
2.7 KiB
Plaintext

/obj/structure/machinery/from_beyond
name = "resonance wave emissor"
desc = "We see things only as we are constructed to see them."
icon = 'icons/obj/xenoarchaeology.dmi'
icon_state = "ano60" //TODO: get unique sprites for this
anchored = 0
density = 1
idle_power_usage = 1 KILO WATTS
active_power_usage = 10 KILO WATTS
var/active = FALSE
var/static/list/whispers = list(
"You hear something behind you.",
"Endless eyes gaze upon you from above.",
"All is gone.",
"The light is slowly dying.",
"This world is not yours, who are you?!",
"Blasphemous whispers invade your thoughts.",
"You hear a nasty ripping noise, as if flesh is being torn apart.",
"All hope is lost.",
"The abyss stares back at you.",
"The rats, the rats in the walls!",
"The air is filled with poisonous whispers and cruel truths.",
"The stars are gone, all is void now.",
"He comes...",
"The end is near.",
"You are all alone.",
"You feel like a stranger in a strange land.",
"The world crumbles under your feet.",
"You see worlds that no other living men have seen.",
"There is no escape..."
)
/obj/structure/machinery/from_beyond/attack_hand(var/mob/living/carbon/human/user as mob)
if(!active)
src.visible_message(SPAN_WARNING("[user] switches \the [src] on."))
to_chat(user, SPAN_WARNING("The world beyond opens to your eyes."))
active = TRUE
else
src.visible_message(SPAN_WARNING("[user] switches \the [src] off."))
to_chat(user, SPAN_WARNING("The world beyond vanishes before your eyes."))
active = FALSE
update_icon()
/obj/structure/machinery/from_beyond/update_icon()
if(!(stat & NOPOWER))
icon_state = "ano60"
if(active)
icon_state = "ano61"
else
icon_state = "ano60"
/obj/structure/machinery/from_beyond/process()
..()
if(active)
if(prob(25))
for(var/obj/structure/machinery/light/P in view(7, src))
P.flicker(1)
for(var/mob/living/carbon/human/L in view(7, src))
L.see_invisible = SEE_INVISIBLE_CULT
if(prob(15))
var/message = pick(whispers)
to_chat(L, SPAN_CULT("<b>[message]</b>"))
L.hallucination += 50
L.adjustBrainLoss(5, 55)
if(prob(15))
src.visible_message(SPAN_WARNING("\The [src] hums ominously."))
if(prob(5))
src.visible_message(SPAN_WARNING("\The [src] crackles with energy!"))
playsound(src, 'sound/magic/lightningbolt.ogg', 40, 1)
if(prob(1))
to_chat(L, SPAN_CULT("<b>Reality feels less stable...</b>"))
src.visible_message(SPAN_WARNING("\The [src] screeches loudly!"))
playsound(src, 'sound/magic/dimensional_rend.ogg', 100, 1)
new /obj/effect/gateway/active/rift(src.loc)
/obj/effect/gateway/active/rift
name = "interdimensional rift"
icon = 'icons/obj/wizard.dmi'
icon_state = "rift"
light_range= 5
light_color="#E260F4"