Files
Bubberstation/code/modules/research/anomaly/raw_anomaly.dm
SkyratBot a4bfe65cb1 [MIRROR] Dimensional Anomaly [MDB IGNORE] (#15974)
* Dimensional Anomaly (#69512)

About The Pull Request

Everyone has been asking: "When will there be an anomaly like the bioscrambler, but for the space station? Please, we need more things which replace objects with different objects from the same typepath."
Well I made it and it looked like ass because non-tiling floor and walls look terrible, so then I made this instead.
Dimensional.mp4

The "dimensional anomaly" shifts matter into a parallel dimension where objects are made out of something else.
Like the Bioscrambler anomaly, it does not expire on its own and only leaves when someone signals it or uses an anomaly remover.
When it spawns it picks a "theme" and converts terrain around it until it covers a 7x7 square, then it teleports somewhere else and picks a new theme.

A lot of these themes are relatively benign like "meat", "fancy carpet", or "gold". Some of them are kind of annoying like "icebox" because it creates floor which slows you down, or "clown" because bananium is intentionally annoying. Some of them are actively dangerous, mostly "uranium" and "plasma".
The main problem this will usually cause for crewmembers is decreasing area security. When it replaces doors it replaces them with ones which don't have any access control, and it will also replace RWalls with normal and much more vulnerable walls which will make breaking and entering significantly easier until someone has taken the time to fix the damage. But also sometimes it will irradiate them, you never know.

The fact that sometimes the changes are benign (or provide uncommon materials) and might be happening in places you don't care about access to might encourage people to push their luck and leave it alone until it starts turning the captain's office into a bamboo room or repainting medbay a fetching shade of flammable purple, which I would consider a success.
Armour.mp4

If you successfully harvest the anomaly core you can place it into the reactive armour to get Reactive Barricade Armour, which shifts your dimension when you take damage and attempts to place some randomised (not terribly durable) objects between you and hopefully your attacker (it really just picks up to four random unoccupied tiles next to you). If you're EMPed then the changes it make to the environment will often be as unpleasant for you as they are for a pursuer, and significantly more likely to harm both of you rather than just provide obstacles.

Other changes:
I split anomalies out into their own dmi file, seems to be all the rage lately.
I moved the anomaly placing code into a datum instead of the event because I wanted to reuse it but if you have a better idea about where I could have put it let me know.
This also fixes a bug where the material spreader component wasn't working when I applied plasma materials to something, the extra whitespace was parsing as another argument for some reason and meant it would runtime.
Supermatter delamination was still pointing to Delimber anomalies instead of Bioscrambler.

* Dimensional Anomaly

* Fixes the upstream merge skew

Co-authored-by: Jacquerel <hnevard@gmail.com>
Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>
Co-authored-by: GoldenAlpharex <jerego1234@hotmail.com>
2022-09-05 17:59:34 -04:00

92 lines
3.2 KiB
Plaintext

/**
* # Raw Anomaly Cores
*
* The current precursor to anomaly cores, these are manufactured into 'finished' anomaly cores for use in research, items, and more.
*
* The current amounts created is stored in `SSresearch.created_anomaly_types[ANOMALY_CORE_TYPE_DEFINE] = amount`.
* The hard limits are in `code/__DEFINES/anomalies.dm`.
*/
/obj/item/raw_anomaly_core
name = "raw anomaly core"
desc = "You shouldn't be seeing this. Someone screwed up."
icon = 'icons/obj/assemblies/new_assemblies.dmi'
icon_state = "broken_state"
/// Anomaly type
var/anomaly_type
/obj/item/raw_anomaly_core/bluespace
name = "raw bluespace core"
desc = "The raw core of a bluespace anomaly, glowing and full of potential."
anomaly_type = /obj/item/assembly/signaler/anomaly/bluespace
icon_state = "rawcore_bluespace"
/obj/item/raw_anomaly_core/vortex
name = "raw vortex core"
desc = "The raw core of a vortex anomaly. Feels heavy to the touch."
anomaly_type = /obj/item/assembly/signaler/anomaly/vortex
icon_state = "rawcore_vortex"
/obj/item/raw_anomaly_core/grav
name = "raw gravity core"
desc = "The raw core of a gravity anomaly. The air seems attracted to it."
anomaly_type = /obj/item/assembly/signaler/anomaly/grav
icon_state = "rawcore_grav"
/obj/item/raw_anomaly_core/pyro
desc = "The raw core of a pyro anomaly. It is warm to the touch."
name = "raw pyro core"
anomaly_type = /obj/item/assembly/signaler/anomaly/pyro
icon_state = "rawcore_pyro"
/obj/item/raw_anomaly_core/flux
name = "raw flux core"
desc = "The raw core of a flux anomaly, faintly crackling with energy."
anomaly_type = /obj/item/assembly/signaler/anomaly/flux
icon_state = "rawcore_flux"
/obj/item/raw_anomaly_core/hallucination
name = "raw hallucination core"
desc = "The raw core of a hallucination anomaly, makes your head spin."
anomaly_type = /obj/item/assembly/signaler/anomaly/hallucination
icon_state = "rawcore_hallucination"
/obj/item/raw_anomaly_core/random
name = "random raw core"
desc = "You should not see this!"
icon_state = "rawcore_bluespace"
/obj/item/raw_anomaly_core/bioscrambler
name = "raw bioscrambler core"
desc = "The raw core of a bioscrambler anomaly, it squirms."
anomaly_type = /obj/item/assembly/signaler/anomaly/bioscrambler
icon_state = "rawcore_bioscrambler"
/obj/item/raw_anomaly_core/dimensional
name = "raw dimensional core"
desc = "The raw core of a dimensional anomaly, vibrating with infinite potential."
anomaly_type = /obj/item/assembly/signaler/anomaly/dimensional
icon_state = "rawcore_dimensional"
/obj/item/raw_anomaly_core/random/Initialize(mapload)
. = ..()
var/path = pick(subtypesof(/obj/item/raw_anomaly_core))
new path(loc)
return INITIALIZE_HINT_QDEL
/**
* Created the resulting core after being "made" into it.
*
* Arguments:
* * newloc - Where the new core will be created
* * del_self - should we qdel(src)
* * count_towards_limit - should we increment the amount of created cores on SSresearch
*/
/obj/item/raw_anomaly_core/proc/create_core(newloc, del_self = FALSE, count_towards_limit = FALSE)
. = new anomaly_type(newloc)
if(count_towards_limit)
var/existing = SSresearch.created_anomaly_types[anomaly_type] || 0
SSresearch.created_anomaly_types[anomaly_type] = existing + 1
if(del_self)
qdel(src)