Files
Paradise/code/modules/research/anomaly/anomaly.dm
T
warriorstar-orionandGitHub 525c68d617 Attack chain, initial setup. (pull *immediately* for *any* TM issues) (#26834)
* refactor: Attack chain, initial setup.

* migrate curtain to make dreamchecker happy

* update thurible

* don't call attacked_by separately for legacy attack chain

* remove duplicate proc

* condense similar code, put allowances for legacy code in new procs

* update docs, include diagram source

* add comment on how to update diagram

* fix admonition

* mindflayer updates

* remove commented out code

* clarify all steps

* after_attack should be overridable

* whoops

* retrofit recent changes

* duh, can't restrict this yet because of tool_acts

* i hate ore bags with the fire of a thousand suns

* return correct value for object attack logic

* Various cleanups.

We don't want to attempt to pull stuff out of `/obj/item/attackby`,
because those pieces are part of the related objects' migrations, not
`/obj/item` itself. Attempting to do this causes knockon effects where
things expected to call e.g. `/obj/item/storage/attackby` in the call
chain were not ferried over to the new item interaction code, because
the related objects hadn't actually been migrated over yet.

I've used refactoring /obj/vehicle as the example for migrating
`attackby` methods instead.

* simplify some argument names

* fuck it

* make it do the thing

* Rename CI module call

* Prove that CI works

* improve test output

* aaand fix it again

* fix curtain tool interactions

* fix compile error

* fix compile error

* Better docs, introduce migration plan tool.
2024-12-02 23:36:36 +00:00

99 lines
4.2 KiB
Plaintext

// Embedded signaller used in anomalies.
/obj/item/assembly/signaler/anomaly
name = "anomaly core"
desc = "The neutralized core of an anomaly. It'd probably be valuable for research."
icon_state = "anomaly_core"
item_state = "electronic"
resistance_flags = FIRE_PROOF
receiving = TRUE
var/anomaly_type = /obj/effect/anomaly
/obj/item/assembly/signaler/anomaly/signal_callback()
if(istype(loc, /obj/effect/anomaly))
var/obj/effect/anomaly/A = loc
A.anomalyNeutralize()
/obj/item/assembly/signaler/anomaly/attack_self__legacy__attackchain()
return
//Anomaly cores
/obj/item/assembly/signaler/anomaly/pyro
name = "pyroclastic anomaly core"
desc = "The neutralized core of a pyroclastic anomaly. It feels warm to the touch. It'd probably be valuable for research."
icon_state = "pyro_core"
anomaly_type = /obj/effect/anomaly/pyro
origin_tech = "plasmatech=7"
/obj/item/assembly/signaler/anomaly/cryo
name = "cryogenic anomaly core"
desc = "The neutralized core of a cryogenic anomaly. Rime is forming on its cold surface. It'd probably be valuable for research."
icon_state = "cryo_core"
anomaly_type = /obj/effect/anomaly/cryo
origin_tech = "biotech=7"
/obj/item/assembly/signaler/anomaly/grav
name = "gravitational anomaly core"
desc = "The neutralized core of a gravitational anomaly. It feels much heavier than it looks. It'd probably be valuable for research."
icon_state = "grav_core"
anomaly_type = /obj/effect/anomaly/grav
origin_tech = "magnets=7"
/obj/item/assembly/signaler/anomaly/flux
name = "flux anomaly core"
desc = "The neutralized core of a flux anomaly. Touching it makes your skin tingle. It'd probably be valuable for research."
icon_state = "flux_core"
anomaly_type = /obj/effect/anomaly/flux
origin_tech = "powerstorage=7"
/obj/item/assembly/signaler/anomaly/bluespace
name = "bluespace anomaly core"
desc = "The neutralized core of a bluespace anomaly. It keeps phasing in and out of view. It'd probably be valuable for research."
icon_state = "anomaly_core"
anomaly_type = /obj/effect/anomaly/bluespace
origin_tech = "bluespace=7"
/obj/item/assembly/signaler/anomaly/vortex
name = "vortex anomaly core"
desc = "The neutralized core of a vortex anomaly. It won't sit still, as if some invisible force is acting on it. It'd probably be valuable for research."
icon_state = "vortex_core"
anomaly_type = /obj/effect/anomaly/bhole
origin_tech = "engineering=7"
/obj/item/assembly/signaler/anomaly/random
name = "Random anomaly core"
/obj/item/assembly/signaler/anomaly/random/New()
..()
var/list/types = list(/obj/item/assembly/signaler/anomaly/pyro, /obj/item/assembly/signaler/anomaly/cryo, /obj/item/assembly/signaler/anomaly/grav, /obj/item/assembly/signaler/anomaly/flux, /obj/item/assembly/signaler/anomaly/bluespace, /obj/item/assembly/signaler/anomaly/vortex)
var/A = pick(types)
new A(loc)
qdel(src)
/obj/item/reactive_armour_shell
name = "reactive armour shell"
desc = "An experimental suit of armour, awaiting installation of an anomaly core."
icon_state = "reactiveoff"
icon = 'icons/obj/clothing/suits.dmi'
w_class = WEIGHT_CLASS_NORMAL
/obj/item/reactive_armour_shell/attackby__legacy__attackchain(obj/item/I, mob/user, params)
var/static/list/anomaly_armour_types = list(
/obj/item/assembly/signaler/anomaly/grav = /obj/item/clothing/suit/armor/reactive/repulse,
/obj/item/assembly/signaler/anomaly/flux = /obj/item/clothing/suit/armor/reactive/tesla,
/obj/item/assembly/signaler/anomaly/bluespace = /obj/item/clothing/suit/armor/reactive/teleport,
/obj/item/assembly/signaler/anomaly/pyro = /obj/item/clothing/suit/armor/reactive/fire,
/obj/item/assembly/signaler/anomaly/cryo = /obj/item/clothing/suit/armor/reactive/cryo,
/obj/item/assembly/signaler/anomaly/vortex = /obj/item/clothing/suit/armor/reactive/stealth
)
if(istype(I, /obj/item/assembly/signaler/anomaly))
var/obj/item/assembly/signaler/anomaly/A = I
var/armour_path = anomaly_armour_types[A.type]
if(!armour_path)
armour_path = /obj/item/clothing/suit/armor/reactive/stealth //Fallback
to_chat(user, "<span class='notice'>You insert [A] into the chest plate, and the armor gently hums to life.</span>")
new armour_path(get_turf(src))
qdel(src)
qdel(A)
return ..()