diff --git a/code/game/objects/effects/anomalies/_anomalies.dm b/code/game/objects/effects/anomalies/_anomalies.dm index 4a85f9321154..8e259471887b 100644 --- a/code/game/objects/effects/anomalies/_anomalies.dm +++ b/code/game/objects/effects/anomalies/_anomalies.dm @@ -8,9 +8,7 @@ anchored = TRUE light_range = 3 - //aSignal drops as the core, bSignal allows people to signal to detonate - var/obj/item/assembly/signaler/anomaly/aSignal = /obj/item/assembly/signaler/anomaly - var/obj/item/assembly/signaler/anomaly/bSignal = /obj/item/assembly/signaler/anomaly/det_signal + var/obj/item/assembly/signaler/anomaly/Core = /obj/item/assembly/signaler/anomaly var/area/impact_area var/lifespan = 990 @@ -46,27 +44,17 @@ pulse_delay = rand(pulse_delay*0.5, pulse_delay*1.5) src.drops_core = drops_core - if(aSignal) - aSignal = new aSignal(src) - aSignal.code = rand(1,100) - aSignal.anomaly_type = type - aSignal.research = research_value + if(Core) + Core = new Core(src) + Core.code = rand(1,100) + Core.code_b = rand(1,100) + Core.anomaly_type = type + Core.research = research_value var/frequency = rand(MIN_FREE_FREQ, MAX_FREE_FREQ) if(ISMULTIPLE(frequency, 2))//signaller frequencies are always uneven! frequency++ - aSignal.set_frequency(frequency) - - if(bSignal) - bSignal = new bSignal(src) - bSignal.code = rand(1,100) - bSignal.anomaly_type = type - var/frequency = rand(MIN_FREE_FREQ, MAX_FREE_FREQ) - if(ISMULTIPLE(frequency, 2))//signaller frequencies are always uneven! - frequency++ - bSignal.set_frequency(frequency) - - + Core.set_frequency(frequency) if(lifespan) if(new_lifespan) @@ -97,7 +85,7 @@ /obj/effect/anomaly/Destroy() STOP_PROCESSING(SSobj, src) QDEL_NULL(countdown) - QDEL_NULL(aSignal) + QDEL_NULL(Core) return ..() /obj/effect/anomaly/proc/anomalyEffect(seconds_per_tick) @@ -118,30 +106,26 @@ /obj/effect/anomaly/proc/anomalyNeutralize() new /obj/effect/particle_effect/smoke/bad(loc) - if(drops_core) - if(isnull(aSignal)) + if(isnull(Core)) stack_trace("An anomaly ([src]) exists that drops a core, yet has no core!") else - aSignal.forceMove(drop_location()) - aSignal = null + Core.forceMove(drop_location()) + Core = null // else, anomaly core gets deleted by qdel(src). qdel(src) /obj/effect/anomaly/attackby(obj/item/weapon, mob/user, params) - if(weapon.tool_behaviour == TOOL_ANALYZER && aSignal) + if(weapon.tool_behaviour == TOOL_ANALYZER && Core) to_chat(user, span_notice("You start analyzing [src].")) if(do_after(user, 20, src, hidden = TRUE)) - to_chat(user, span_notice("[src]'s primary field is fluctuating along frequency [format_frequency(aSignal.frequency)], code [aSignal.code].")) - if(bSignal) - to_chat(user, span_notice("A second field is fluctuating along [format_frequency(bSignal.frequency)], code [bSignal.code]. It is highly unstable." )) - return TRUE + to_chat(user, span_notice("[src]'s primary field is fluctuating along frequency [format_frequency(Core.frequency)], code [Core.code].")) + return TRUE return ..() - /obj/effect/anomaly/examine(mob/user) . = ..() if(user.research_scanner == TRUE) diff --git a/code/game/objects/effects/anomalies/anomalies_bluespace.dm b/code/game/objects/effects/anomalies/anomalies_bluespace.dm index f7012e532944..789b4295554f 100644 --- a/code/game/objects/effects/anomalies/anomalies_bluespace.dm +++ b/code/game/objects/effects/anomalies/anomalies_bluespace.dm @@ -2,9 +2,9 @@ /obj/effect/anomaly/bluespace name = "jumper" icon_state = "bluespace" - desc = "A mysterious anomaly that causes teleportation around it." + desc = "A hole in the fabric of bluespace, perforating reality around it." density = TRUE - aSignal = /obj/item/assembly/signaler/anomaly/bluespace + Core = /obj/item/assembly/signaler/anomaly/bluespace ///range from which we can teleport someone effectrange = 3 var/reagent_amount = 3 diff --git a/code/game/objects/effects/anomalies/anomalies_flux.dm b/code/game/objects/effects/anomalies/anomalies_flux.dm index b1318953f4a6..9a8e724f6153 100644 --- a/code/game/objects/effects/anomalies/anomalies_flux.dm +++ b/code/game/objects/effects/anomalies/anomalies_flux.dm @@ -1,9 +1,10 @@ /obj/effect/anomaly/flux name = "tesla" icon_state = "flux" - desc = "A mysterious anomaly that sends out a near constant stream of electrical arcs." + //double-check that these only happen in atmosphere now + desc = "A break in the atmosphere, small yet potent lightning arcs flashing off it." density = TRUE - aSignal = /obj/item/assembly/signaler/anomaly/flux + Core = /obj/item/assembly/signaler/anomaly/flux pulse_delay = 2 SECONDS effectrange = 0 var/canshock = FALSE @@ -99,3 +100,7 @@ /obj/effect/anomaly/flux/big/planetary immortal = TRUE immobile = TRUE + +/obj/effect/anomaly/flux/storm + drops_core = FALSE + explosive = FLUX_LOW_EXPLOSIVE diff --git a/code/game/objects/effects/anomalies/anomalies_gravity.dm b/code/game/objects/effects/anomalies/anomalies_gravity.dm index 1dea7049fc97..842f81749fe0 100644 --- a/code/game/objects/effects/anomalies/anomalies_gravity.dm +++ b/code/game/objects/effects/anomalies/anomalies_gravity.dm @@ -9,10 +9,9 @@ /obj/effect/anomaly/grav name = "throngler" icon_state = "gravity" - desc = "A mysterious anomaly that sucks things towards it with a gravitational field, ending in what has been termed a 'throngling'." + desc = "A miniature gravity well, constantly pulling the world around it into a 'throngling'." density = FALSE - aSignal = /obj/item/assembly/signaler/anomaly/grav - bSignal = null + Core = /obj/item/assembly/signaler/anomaly/grav effectrange = 4 var/boing = 0 ///Warp effect holder for displacement filter to "pulse" the anomaly diff --git a/code/game/objects/effects/anomalies/anomalies_hallucination.dm b/code/game/objects/effects/anomalies/anomalies_hallucination.dm index ab859a3b3215..37c60e1af4e6 100644 --- a/code/game/objects/effects/anomalies/anomalies_hallucination.dm +++ b/code/game/objects/effects/anomalies/anomalies_hallucination.dm @@ -2,7 +2,8 @@ /obj/effect/anomaly/hallucination name = "hallucination anomaly" icon_state = "hallucination" - aSignal = /obj/item/assembly/signaler/anomaly/hallucination + desc = "A shimmering mirage suspended above the ground, never in the same place as it was a second ago." + Core = /obj/item/assembly/signaler/anomaly/hallucination /// Time passed since the last effect, increased by delta_time of the SSobj var/ticks = 0 /// How many seconds between each small hallucination pulses diff --git a/code/game/objects/effects/anomalies/anomalies_heartbeat.dm b/code/game/objects/effects/anomalies/anomalies_heartbeat.dm index 1b691d898436..d83d7c82cd34 100644 --- a/code/game/objects/effects/anomalies/anomalies_heartbeat.dm +++ b/code/game/objects/effects/anomalies/anomalies_heartbeat.dm @@ -1,9 +1,9 @@ /obj/effect/anomaly/heartbeat name = "heartbeat" icon_state = "heartbeat" - desc = "A mysterious anomaly, it ionizes the world around it." + desc = "A throbbing vertex, spreading a cancer to the world around itself." density = TRUE - aSignal = /obj/item/assembly/signaler/anomaly/heartbeat + Core = /obj/item/assembly/signaler/anomaly/heartbeat effectrange = 3 pulse_delay = 6 SECONDS var/reagent_amount = 5 diff --git a/code/game/objects/effects/anomalies/anomalies_melter.dm b/code/game/objects/effects/anomalies/anomalies_melter.dm index d906d4f4bad2..98d9efa08a34 100644 --- a/code/game/objects/effects/anomalies/anomalies_melter.dm +++ b/code/game/objects/effects/anomalies/anomalies_melter.dm @@ -1,10 +1,10 @@ /obj/effect/anomaly/melter name = "melter" icon_state = "melter" - desc = "A mysterious anomaly. Everburning green flames with a horrid sizzle, melting what's near" + desc = "Everburning green flames, eager to lash out at anything that intrudes near." effectrange = 2 pulse_delay = 10 SECONDS - aSignal = /obj/item/assembly/signaler/anomaly/melter + Core = /obj/item/assembly/signaler/anomaly/melter /obj/effect/anomaly/melter/anomalyEffect(seconds_per_tick) ..() @@ -20,7 +20,7 @@ I.acid_act(20, 20) I.update_appearance() for (var/obj/item/melt in range(effectrange, src)) - + //don't melt yourself if(istype(melt, /obj/item/assembly/signaler/anomaly)) return else diff --git a/code/game/objects/effects/anomalies/anomalies_phantom.dm b/code/game/objects/effects/anomalies/anomalies_phantom.dm index 9407bbcbf920..7a0cfc3f502f 100644 --- a/code/game/objects/effects/anomalies/anomalies_phantom.dm +++ b/code/game/objects/effects/anomalies/anomalies_phantom.dm @@ -1,9 +1,9 @@ /obj/effect/anomaly/phantom name = "phantom" icon_state = "phantom" - desc = "A mysterious anomaly, the outline of a humanoid, endlessly screaming in agony." + desc = "A familiar outline, it calls out for companionship. It screams for you." density = FALSE - aSignal = /obj/item/assembly/signaler/anomaly/phantom + Core = /obj/item/assembly/signaler/anomaly/phantom effectrange = 3 pulse_delay = 2 SECONDS diff --git a/code/game/objects/effects/anomalies/anomalies_plasmasoul.dm b/code/game/objects/effects/anomalies/anomalies_plasmasoul.dm index 006d42ac28d3..2420d4647e30 100644 --- a/code/game/objects/effects/anomalies/anomalies_plasmasoul.dm +++ b/code/game/objects/effects/anomalies/anomalies_plasmasoul.dm @@ -1,9 +1,9 @@ /obj/effect/anomaly/plasmasoul name = "plasma soul" icon_state = "plasmasoul" - desc = "A mysterious anomaly, it slowly leaks plasma into the world around it." + desc = "A plasmatic pool, small crystals growing around it, spreading into the ground." density = TRUE - aSignal = /obj/item/assembly/signaler/anomaly/plasmasoul + Core = /obj/item/assembly/signaler/anomaly/plasmasoul effectrange = 3 pulse_delay = 6 SECONDS var/reagent_amount = 5 diff --git a/code/game/objects/effects/anomalies/anomalies_pulsar.dm b/code/game/objects/effects/anomalies/anomalies_pulsar.dm index 1f75acee56b8..1fe99ff2d5b3 100644 --- a/code/game/objects/effects/anomalies/anomalies_pulsar.dm +++ b/code/game/objects/effects/anomalies/anomalies_pulsar.dm @@ -1,9 +1,9 @@ /obj/effect/anomaly/pulsar name = "pulsar" icon_state = "pulsar" - desc = "A mysterious anomaly, endless electromagnetic disturbances roll out from it" + desc = "A near transparent shell hovering, containing a near constant electromagnetic turmoil." density = TRUE - aSignal = /obj/item/assembly/signaler/anomaly/pulsar + Core = /obj/item/assembly/signaler/anomaly/pulsar effectrange = 4 pulse_delay = 15 SECONDS diff --git a/code/game/objects/effects/anomalies/anomalies_pyroclastic.dm b/code/game/objects/effects/anomalies/anomalies_pyroclastic.dm index b4c93868e670..7923db6e4c8f 100644 --- a/code/game/objects/effects/anomalies/anomalies_pyroclastic.dm +++ b/code/game/objects/effects/anomalies/anomalies_pyroclastic.dm @@ -2,17 +2,16 @@ /obj/effect/anomaly/pyro name = "plasmaball" icon_state = "pyroclastic" - desc = "A mysterious anomaly, made of an everburning gas. Those who approach it tend to absorb it's heat, or even ignite." + desc = "A floating orb of everburning gas, not unlike a sun. It radiates a dangerous amount of heat." effectrange = 4 pulse_delay = 10 SECONDS - aSignal = /obj/item/assembly/signaler/anomaly/pyro + Core = /obj/item/assembly/signaler/anomaly/pyro /obj/effect/anomaly/pyro/anomalyEffect(seconds_per_tick) ..() for(var/mob/living/carbon/nearby in range(effectrange, src)) nearby.adjust_bodytemperature(20) - visible_message("[src] pulses!") if(!COOLDOWN_FINISHED(src, pulse_cooldown)) return @@ -21,7 +20,7 @@ for(var/mob/living/carbon/nearby in range(effectrange/2, src)) nearby.fire_stacks += 3 nearby.IgniteMob() - visible_message("[src] ignites [nearby]!") + visible_message("[src] lets out a flare, igniting [nearby]!") /obj/effect/anomaly/pyro/Bumped(atom/movable/AM) @@ -84,3 +83,6 @@ /obj/effect/anomaly/pyro/big/planetary immortal = TRUE immobile = TRUE + +/obj/effect/anomaly/pyro/storm + drops_core = FALSE diff --git a/code/game/objects/effects/anomalies/anomalies_sparkler.dm b/code/game/objects/effects/anomalies/anomalies_sparkler.dm index 0b26e6fd6a1c..31e0193d8204 100644 --- a/code/game/objects/effects/anomalies/anomalies_sparkler.dm +++ b/code/game/objects/effects/anomalies/anomalies_sparkler.dm @@ -1,9 +1,9 @@ /obj/effect/anomaly/sparkler name = "sparkler" icon_state = "sparkler" - desc = "A mysterious anomaly, constantly throwing sparks into its vicinity." + desc = "A series of shimmering sparks flying to and fro. They try to spread, yet fail." density = TRUE - aSignal = /obj/item/assembly/signaler/anomaly/sparkler + Core = /obj/item/assembly/signaler/anomaly/sparkler effectrange = 4 pulse_delay = 1 SECONDS diff --git a/code/game/objects/effects/anomalies/anomalies_static.dm b/code/game/objects/effects/anomalies/anomalies_static.dm index ab574ee475dd..3de6e36d5796 100644 --- a/code/game/objects/effects/anomalies/anomalies_static.dm +++ b/code/game/objects/effects/anomalies/anomalies_static.dm @@ -1,9 +1,25 @@ +GLOBAL_LIST_INIT(tvstatic_sayings, list( + "... Help me...", + "... I need to get out ...", + "...No hope....", + "...Let me loose...", + "...stay with me...", + "...Not like this...", + "...please don't go...", + "...don't forget me...", + "...Are you there...?", + "...it hurts...", + "...the eyes...", + "...need to run...", + "...is anyone there..." +)) + /obj/effect/anomaly/tvstatic name = "static" icon_state = "static" - desc = "A mysterious anomaly. A hole in the world, endless buzzing emitting from it." + desc = "A hole in the world emitting an endless buzzing. It hides something precious." density = TRUE - aSignal = /obj/item/assembly/signaler/anomaly/tvstatic + Core = /obj/item/assembly/signaler/anomaly/tvstatic effectrange = 4 pulse_delay = 4 SECONDS verb_say = "pleads" @@ -48,7 +64,7 @@ var/mob/living/carbon/victim = looking var/obj/effect/anomaly/tvstatic/planetary/expansion expansion = new(get_turf(victim)) - visible_message(span_warning("The static overtakes [victim], [expansion] taking their place!")) + visible_message(span_warning("[src] overtakes [victim], [expansion] taking their place!")) victim.death() expansion.stored_mob = victim victim.forceMove(expansion) @@ -58,44 +74,18 @@ anomalyEffect() /obj/effect/anomaly/tvstatic/proc/say_fucky_things() - switch(rand(1, 13)) - if(1) - say("... Help me...") - if(2) - say("... I need to get out ...") - if(3) - say("...No hope....") - if(4) - say("....Let me loose...") - if(5) - say("...stay with me...") - if(6) - say("...I hope I live...") - if(7) - say("...please don't go...") - if(8) - say("...don't forget me...") - if(9) - say("...Are you there...?") - if(10) - say("...it hurts...") - if(11) - say("...the eyes...") - if(12) - say("...need to run...") - if(13) - say("...don't become like me...") + say(pick(GLOB.tvstatic_sayings)) return /obj/effect/anomaly/tvstatic/detonate() for(var/mob/living/carbon/human/looking in range(effectrange, src)) - visible_message(span_boldwarning(" The static lashes out, agony filling your mind as its tendrils scrape your thoughts!")) + visible_message(span_boldwarning("[src] lashes out, agony filling your mind as its tendrils scrape your thoughts!")) if (!HAS_TRAIT(looking, TRAIT_MINDSHIELD) && looking.stat != DEAD) looking.adjustOrganLoss(ORGAN_SLOT_BRAIN, 100, 200) playsound(src, 'sound/effects/stall.ogg', 100) if(stored_mob) mangle_corpse() - visible_message(span_warning("The static sputters out [stored_mob], their body coming out in a burst of blood and gore!")) + visible_message(span_warning("[src] sputters out [stored_mob], their body coming out in a burst of blood and gore!")) new /obj/effect/gibspawner/human(loc) stored_mob.forceMove(get_turf(src)) stored_mob = null @@ -111,7 +101,7 @@ var/turf/T = get_turf(src) if(T) if(stored_mob) - visible_message(span_warning("The static spits out [stored_mob], their body coming out in a burst!")) + visible_message(span_warning("[src] spits out [stored_mob], their body coming out in a burst!")) stored_mob.forceMove(get_turf(src)) stored_mob = null . = ..() diff --git a/code/game/objects/effects/anomalies/anomalies_transfusion.dm b/code/game/objects/effects/anomalies/anomalies_transfusion.dm new file mode 100644 index 000000000000..e94f0fb91512 --- /dev/null +++ b/code/game/objects/effects/anomalies/anomalies_transfusion.dm @@ -0,0 +1,69 @@ +/obj/effect/anomaly/transfusion + name = "transfusion" + icon_state = "veins" + desc = "A throbbing field floating mid-air, crimson particulate hovering around it." + density = TRUE + Core = /obj/item/assembly/signaler/anomaly/transfusion + effectrange = 3 + pulse_delay = 5 SECONDS + +/obj/effect/anomaly/transfusion/anomalyEffect() + ..() + + if(!COOLDOWN_FINISHED(src, pulse_cooldown)) + return + + COOLDOWN_START(src, pulse_cooldown, pulse_delay) + blood_music() + return + +/obj/effect/anomaly/transfusion/proc/blood_music() //by greg bear + //this is hacky *because* in an ideal world - it would involve making the core have a reagent container for the blood + //however - I am a lazy bitch + for( var/mob/living/carbon/victim in range(effectrange, src) ) + //if we're not hungry, we're not hungry. + if (Core?:get_blood_max() < Core?:get_blood_stored()) + new /obj/effect/temp_visual/dir_setting/bloodsplatter(src.loc, rand(1, 8)) + visible_message(span_boldwarning("[src] vomits up blood, seemingly satiated!")) + Core?:set_blood_stored(Core?:get_blood_max()) + return + //if there's blood to take, take it + if (victim.blood_volume > BLOOD_VOLUME_SAFE) + var/bleeder + bleeder = rand(10,30) + victim.bleed(bleeder) + victim.spray_blood(get_dir(victim, src), splatter_strength = 1) //slurp + visible_message(span_boldwarning("Ichor flows out of [victim], and into [src]!")) + Core?:set_blood_stored(bleeder) + break + //but if there's blood to give, share. + if(victim.blood_volume < BLOOD_VOLUME_SAFE && Core?:get_blood_stored() > (Core?:get_blood_max() / 2)) + var/present_time + present_time = rand((Core?:get_blood_stored() / 10), (Core?:get_blood_stored() / 2)) + visible_message(span_boldwarning("Globules of ichor fly away from [src], and into [victim]!")) + Core?:set_blood_stored(-present_time) + victim.blood_volume += present_time + break + return + +/obj/effect/anomaly/transfusion/Bumped(atom/movable/AM) + if(!COOLDOWN_FINISHED(src, pulse_secondary_cooldown)) + return + COOLDOWN_START(src, pulse_secondary_cooldown, 10) + if( istype(AM, /mob/living/carbon)) + var/mob/living/carbon/victim = AM + visible_message(span_boldwarning("[victim] touches [src], and as they pull away their blood flows away from them!")) + var/amount = rand(50, 200) + victim.bleed(amount) + Core?:set_blood_stored(amount) + +/obj/effect/anomaly/transfusion/detonate() + for(var/mob/living/carbon/victim in range(effectrange, src)) + victim.bleed(rand(100, 250)) + victim.spray_blood(get_dir(src, victim), splatter_strength = 3) //slurp + visible_message(span_boldwarning("[src] screams as it tries to pull all the blood around into itself!")) + . = ..() + +/obj/effect/anomaly/transfusion/planetary + immortal = TRUE + immobile = TRUE diff --git a/code/game/objects/effects/anomalies/anomalies_veins.dm b/code/game/objects/effects/anomalies/anomalies_veins.dm index 416e325ccdbd..261e96848632 100644 --- a/code/game/objects/effects/anomalies/anomalies_veins.dm +++ b/code/game/objects/effects/anomalies/anomalies_veins.dm @@ -1,9 +1,9 @@ /obj/effect/anomaly/veins name = "veins" icon_state = "veins" - desc = "A mysterious anomaly, throbbing purple veins, suspended midair." + desc = "Throbbing purple veins, an exposed artery of the world. It thirsts." density = TRUE - aSignal = /obj/item/assembly/signaler/anomaly/veins + Core = /obj/item/assembly/signaler/anomaly/veins effectrange = 3 pulse_delay = 4 SECONDS diff --git a/code/game/objects/effects/anomalies/anomalies_vortex.dm b/code/game/objects/effects/anomalies/anomalies_vortex.dm index 16a30cbaa9c6..ba46cde50aa6 100644 --- a/code/game/objects/effects/anomalies/anomalies_vortex.dm +++ b/code/game/objects/effects/anomalies/anomalies_vortex.dm @@ -2,9 +2,8 @@ /obj/effect/anomaly/vortex name = "vortex" icon_state = "vortex" - desc = "A mysterious anomaly, this one destroys everything around it." - aSignal = /obj/item/assembly/signaler/anomaly/vortex - bSignal = null + desc = "An incredibly compact black orb, it's hunger unquenchable." + Core = /obj/item/assembly/signaler/anomaly/vortex /obj/effect/anomaly/vortex/anomalyEffect() ..() diff --git a/code/game/objects/effects/spawners/lootdrop.dm b/code/game/objects/effects/spawners/lootdrop.dm index 8eadf9c62a2c..923658fd309d 100644 --- a/code/game/objects/effects/spawners/lootdrop.dm +++ b/code/game/objects/effects/spawners/lootdrop.dm @@ -1002,8 +1002,8 @@ /obj/effect/spawner/lootdrop/anomaly/storm loot = list( - /obj/effect/anomaly/flux, - /obj/effect/anomaly/pyro, + /obj/effect/anomaly/flux/storm, + /obj/effect/anomaly/pyro/storm, /obj/effect/anomaly/sparkler, /obj/effect/anomaly/veins, /obj/effect/anomaly/phantom, diff --git a/code/modules/assembly/anomalies.dm b/code/modules/assembly/anomalies.dm new file mode 100644 index 000000000000..40612b276755 --- /dev/null +++ b/code/modules/assembly/anomalies.dm @@ -0,0 +1,248 @@ +///Base anomaly signaller +// Embedded signaller used in anomalies. +/obj/item/assembly/signaler/anomaly + name = "anomaly core" + desc = "The stabilized core of an anomaly. It'd probably be valuable for research." + icon_state = "anomaly core" + item_state = "electronic" + lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi' + righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi' + resistance_flags = FIRE_PROOF + //allows anomaly cores to recieve multiple signals + var/code_b = DEFAULT_SIGNALER_CODE + var/anomaly_type = /obj/effect/anomaly + var/research + +/obj/item/assembly/signaler/anomaly/Initialize() + . = ..() + set_frequency(frequency) + +/obj/item/assembly/signaler/anomaly/attack_self() + return + +/obj/item/assembly/signaler/anomaly/receive_signal(datum/signal/signal) + if(!signal) + return FALSE + if(signal.data["code"] == code) + for(var/obj/effect/anomaly/Anomaly in get_turf(src)) + Anomaly.anomalyNeutralize() + return TRUE + if(signal.data["code"] == code_b ) + for(var/obj/effect/anomaly/Anomaly in get_turf(src)) + Anomaly.detonate() + anomaly_core_detonation() + return TRUE + return FALSE + +//extend this on a per anomaly basis. +/obj/item/assembly/signaler/anomaly/proc/anomaly_core_detonation() + new /obj/effect/particle_effect/smoke/bad(loc) + qdel(src) + +/obj/item/assembly/signaler/anomaly/attackby(obj/item/I, mob/user, params) + if(I.tool_behaviour == TOOL_ANALYZER) + to_chat(user, "Analyzing... [src]'s stabilized field is fluctuating along frequency [format_frequency(frequency)], code [code]. An unstable frequency is present at code [code_b].") + ..() + +///Bluespace Anomaly +/obj/item/assembly/signaler/anomaly/bluespace + name = "\improper bluespace anomaly core" + desc = "The stabilized core of a bluespace anomaly. It keeps phasing in and out of view." + icon_state = "anomaly core" + +/obj/item/assembly/signaler/anomaly/bluespace/anomaly_core_detonation() + //just teleports people + visible_message(span_warning("[src] creates a bluespace fracture around itself!")) + for(var/mob/living/Mob in range(1,src)) + do_teleport(Mob, locate(Mob.x, Mob.y, Mob.z), 8, channel = TELEPORT_CHANNEL_BLUESPACE) + ..() + +//Flux Anomaly +/obj/item/assembly/signaler/anomaly/flux + name = "\improper flux anomaly core" + desc = "The stabilized core of a flux anomaly. Touching it makes your skin tingle." + icon_state = "flux core" + +/obj/item/assembly/signaler/anomaly/flux/anomaly_core_detonation() + //zap + visible_message(span_warning("Electrical arcs flash off of [src] as it fizzles out!")) + tesla_zap(src, 3, 1000, ZAP_FUSION_FLAGS) + ..() + +///Gravity Anomaly +/obj/item/assembly/signaler/anomaly/grav + name = "\improper gravitational anomaly core" + desc = "The stabilized core of a gravitational anomaly. It feels much heavier than it looks." + icon_state = "grav core" + +/obj/item/assembly/signaler/anomaly/grav/anomaly_core_detonation() + //throngles u cutely + visible_message(span_warning("[src] implodes into itself, light itself bending for a split second!")) + for(var/mob/living/carbon/carbon in range(1,src)) + if(carbon.run_armor_check(attack_flag = "melee") >= 20) + carbon.break_random_bone() + else if(carbon.run_armor_check(attack_flag = "melee") >= 40) + carbon.break_all_bones() //crunch + carbon.apply_damage(20, BRUTE) + +///Hallucination Anomaly +/obj/item/assembly/signaler/anomaly/hallucination + name = "\improper hallucination anomaly core" + desc = "The stabilized core of a hallucination anomaly. It's never entirely there." + icon_state = "hallucination_core" + +///Heartbeat Anomaly +/obj/item/assembly/signaler/anomaly/heartbeat + name = "\improper heartbeat anomaly core" + desc = "The stabilized core of a heartbeat anomaly. Pulses of heat run across it's shell." + +/obj/item/assembly/signaler/anomaly/heartbeat/anomaly_core_detonation() + visible_message(span_warning("[src] expands and throbs, before shattering into dozens of fragments!")) + radiation_pulse(src, 500, 2) + new /obj/effect/decal/cleanable/glass/strange(src) + ..() + +///Melter Anomaly +/obj/item/assembly/signaler/anomaly/melter + name = "\improper melter anomaly core" + desc = "The stabilized core of a melter anomaly. It sizzles and crackles." + icon_state = "pyro core" + +/obj/item/assembly/signaler/anomaly/melter/anomaly_core_detonation() + visible_message(span_warning("[src] melts into a glowing residue!")) + new /obj/effect/decal/cleanable/greenglow(src.loc) + ..() + +///Phantom Anomaly +/obj/item/assembly/signaler/anomaly/phantom + name = "\improper phantom anomaly core" + desc = "The stabilized core of a phantom anomaly. It quietly screams." + +/obj/item/assembly/signaler/anomaly/phantom/anomaly_core_detonation() + playsound(src,'sound/hallucinations/far_noise.ogg', 100, 0, 50, TRUE, TRUE) + visible_message(span_warning("[src] screams as it disappates!")) + ..() + +///Plasmasoul Anomaly +/obj/item/assembly/signaler/anomaly/plasmasoul + name = "\improper plasmasoul anomaly core" + desc = "The stabilized core of a plasmasoul anomaly. The air around it hisses." + +/obj/item/assembly/signaler/anomaly/plasmasoul/anomaly_core_detonation() + visible_message(span_warning("[src] rapidly delaminates, leaving behind trace vapors!")) + ..() + +///Pulsar Anomaly +/obj/item/assembly/signaler/anomaly/pulsar + name = "\improper pulsar anomaly core" + desc = "The stabilized core of a pulsar anomaly. Electromagnetic crackles come off it." + +/obj/item/assembly/signaler/anomaly/pulsar/anomaly_core_detonation() + visible_message(span_warning("[src] gives off one last pulse as it melts!")) + empulse(loc, 3, 1) + ..() + +///Pyroclastic Anomaly +/obj/item/assembly/signaler/anomaly/pyro + name = "\improper pyroclastic anomaly core" + desc = "The stabilized core of a pyroclastic anomaly. It almost burns to touch." + icon_state = "pyro core" + +//glorified molotov +/obj/item/assembly/signaler/anomaly/pyro/anomaly_core_detonation() + //this is tg's ash heretic ash heretic ascenscion power tuned down a bit. + visible_message(span_warning("[src] loses coherence, bursting into brilliant flames!")) + for(var/i in 0 to 3) + for(var/turf/nearby_turf as anything in spiral_range_turfs(i + 1, src.loc)) + var/obj/effect/hotspot/flame_tile = locate(nearby_turf) || new(nearby_turf) + flame_tile.alpha = 125 + nearby_turf.hotspot_expose(750, 25, 1) + qdel(src) + +///Sparkler Anomaly +/obj/item/assembly/signaler/anomaly/sparkler + name = "\improper sparkler anomaly core" + desc = "The stabilized core of a sparkler anomaly. Tiny electrical sparks arc off it." + +/obj/item/assembly/signaler/anomaly/sparkler/anomaly_core_detonation() + visible_message(span_warning("[src] shoots out one last assortment of sparks!")) + tesla_zap(src, 2, 5000, ZAP_FUSION_FLAGS) + ..() + +///Static Anomaly +/obj/item/assembly/signaler/anomaly/tvstatic + name = "\improper static anomaly core" + desc = "The stabilized core of a static anomaly. Your head hurts just staring at it" + +/obj/item/assembly/signaler/anomaly/tvstatic/anomaly_core_detonation() + visible_message(span_warning("[src] withdraws into itself, one last message escaping it!")) + say(pick(GLOB.tvstatic_sayings)) + for(var/mob/living/carbon/human/looking in range(4, src)) + if (!HAS_TRAIT(looking, TRAIT_MINDSHIELD) && looking.stat != DEAD) + looking.adjustOrganLoss(ORGAN_SLOT_BRAIN, 20, 40) + playsound(src, 'sound/effects/stall.ogg', 100) + ..() + +///Transfusion Anomaly +/obj/item/assembly/signaler/anomaly/transfusion + name = "\improper transfusion anomaly core" + desc = "The stabilized core of a tranfusion anomaly. Crimson slowly seeps out of the containment unit." + icon_state = "pyro core" + var/blood_stored + var/blood_max + +/obj/item/assembly/signaler/anomaly/transfusion/Initialize() + . = ..() + blood_max = rand(400, 1200) + +/obj/item/assembly/signaler/anomaly/transfusion/proc/set_blood_stored(int) + blood_stored += int + +/obj/item/assembly/signaler/anomaly/transfusion/proc/set_blood_max(int) + blood_max = int + +/obj/item/assembly/signaler/anomaly/transfusion/proc/get_blood_stored() + return blood_stored + +/obj/item/assembly/signaler/anomaly/transfusion/proc/get_blood_max() + return blood_max + +/obj/item/assembly/signaler/anomaly/transfusion/anomaly_core_detonation() + visible_message(span_warning("Ichor flies out of [src], trying to force itself into everything around!")) + while(blood_stored > 0) + for(var/mob/living/carbon/victim in range(2, src)) + var/present_time + present_time = rand((blood_stored / 10), (blood_stored / 2)) + visible_message(span_boldwarning("[victim] finds themselves transfused with the crimson ichor!")) + victim.blood_volume += present_time + blood_stored += -present_time + ..() + +///Veins Anomaly +/obj/item/assembly/signaler/anomaly/veins + name = "\improper fountain anomaly core" + desc = "The stabilized core of a fountain anomaly. It's slippery, like an intestine." + +/obj/item/assembly/signaler/anomaly/veins/anomaly_core_detonation() + //goreshit + var/obj/effect/gibspawner/mess = pick(list( + /obj/effect/gibspawner/human, + /obj/effect/gibspawner/xeno, + /obj/effect/gibspawner/generic/animal + )) + visible_message(span_warning("[src] erupts into a fountain of gore and viserca!")) + new mess(src.loc) + ..() + +///Vortex Anomaly +/obj/item/assembly/signaler/anomaly/vortex + name = "\improper vortex anomaly core" + desc = "The stabilized core of a vortex anomaly. It won't sit still, as if some invisible force is acting on it." + icon_state = "vortex core" + +/obj/item/assembly/signaler/anomaly/vortex/anomaly_core_detonation() + //disappears bigly + playsound(src,'sound/effects/phasein.ogg', 100, 0, 50, TRUE, TRUE) + new /obj/effect/particle_effect/sparks/quantum(loc) + visible_message(span_warning("[src] shakes violently and - hey, where'd it go?")) + ..() diff --git a/code/modules/assembly/signaler.dm b/code/modules/assembly/signaler.dm index 0bfac86ee0df..b1203d358e7f 100644 --- a/code/modules/assembly/signaler.dm +++ b/code/modules/assembly/signaler.dm @@ -144,126 +144,6 @@ return return ..(signal) -// 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" - lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi' - righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi' - resistance_flags = FIRE_PROOF - var/anomaly_type = /obj/effect/anomaly - var/research - -/obj/item/assembly/signaler/anomaly/receive_signal(datum/signal/signal) - if(!signal) - return FALSE - if(signal.data["code"] != code) - return FALSE - for(var/obj/effect/anomaly/Anomaly in get_turf(src)) - Anomaly.anomalyNeutralize() - return TRUE - -/obj/item/assembly/signaler/anomaly/attackby(obj/item/I, mob/user, params) - if(I.tool_behaviour == TOOL_ANALYZER) - to_chat(user, "Analyzing... [src]'s stabilized field is fluctuating along frequency [format_frequency(frequency)], code [code].") - ..() - -/obj/item/assembly/signaler/anomaly/det_signal - name = "anomaly field" - research = null - anomaly_type = null - -/obj/item/assembly/signaler/anomaly/det_signal/receive_signal(datum/signal/signal) - if(!signal) - return FALSE - if(signal.data["code"] != code) - return FALSE - for(var/obj/effect/anomaly/Anomaly in get_turf(src)) - Anomaly.detonate() - return TRUE - - -//Anomaly cores - -/obj/item/assembly/signaler/anomaly/pyro - name = "\improper 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 - -/obj/item/assembly/signaler/anomaly/grav - name = "\improper 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 - -/obj/item/assembly/signaler/anomaly/flux - name = "\improper 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 - -/obj/item/assembly/signaler/anomaly/bluespace - name = "\improper 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 - -/obj/item/assembly/signaler/anomaly/vortex - name = "\improper 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/vortex - -/obj/item/assembly/signaler/anomaly/hallucination - name = "\improper hallucination anomaly core" - desc = "The neutralized core of a hallucination anomaly. It seems to be moving, but it's probably your imagination. It'd probably be valuable for research." - icon_state = "hallucination_core" - anomaly_type = /obj/effect/anomaly/hallucination - -/obj/item/assembly/signaler/anomaly/sparkler - name = "\improper sparkler anomaly core" - desc = "The neutralized core of a sparkler anomaly. Tiny electrical sparks arc off it." - anomaly_type = /obj/effect/anomaly/sparkler - -/obj/item/assembly/signaler/anomaly/veins - name = "\improper fountain anomaly core" - desc = "The neutralized core of a fountain anomaly. Blood drips off of it." - anomaly_type = /obj/effect/anomaly/sparkler - -/obj/item/assembly/signaler/anomaly/phantom - name = "\improper phantom anomaly core" - desc = "The neutralized core of a phantom anomaly. It quietly screams." - anomaly_type = /obj/effect/anomaly/phantom - -/obj/item/assembly/signaler/anomaly/pulsar - name = "\improper pulsar anomaly core" - desc = "The neutralized core of a pulsar anomaly. Electromagnetic crackles come off it." - -/obj/item/assembly/signaler/anomaly/plasmasoul - name = "\improper plasmasoul anomaly core" - desc = "The neutralized core of a plasmasoul anomaly. The air around it hisses." - -/obj/item/assembly/signaler/anomaly/heartbeat - name = "\improper heartbeat anomaly core" - desc = "The neutralized core of a heartbeat anomaly. It's concerningly warm to the touch." - -/obj/item/assembly/signaler/anomaly/tvstatic - name = "\improper static anomaly core" - desc = "The neutralized core of a static anomaly. Your head hurts just staring at it" - -/obj/item/assembly/signaler/anomaly/melter - name = "\improper melter anomaly core" - desc = "The neutralized core of a melter anomaly. It sizzles and crackles. It'd probably be valuable for research." - icon_state = "pyro core" - - - -/obj/item/assembly/signaler/anomaly/attack_self() - return - /obj/item/assembly/signaler/cyborg /obj/item/assembly/signaler/cyborg/attackby(obj/item/W, mob/user, params) diff --git a/shiptest.dme b/shiptest.dme index 55ad11a800d5..59b92433332b 100644 --- a/shiptest.dme +++ b/shiptest.dme @@ -1097,6 +1097,7 @@ #include "code\game\objects\effects\anomalies\anomalies_pyroclastic.dm" #include "code\game\objects\effects\anomalies\anomalies_sparkler.dm" #include "code\game\objects\effects\anomalies\anomalies_static.dm" +#include "code\game\objects\effects\anomalies\anomalies_transfusion.dm" #include "code\game\objects\effects\anomalies\anomalies_veins.dm" #include "code\game\objects\effects\anomalies\anomalies_vortex.dm" #include "code\game\objects\effects\decals\cleanable.dm" @@ -1759,6 +1760,7 @@ #include "code\modules\antagonists\wizard\equipment\soulstone.dm" #include "code\modules\antagonists\wizard\equipment\spellbook.dm" #include "code\modules\antagonists\xeno\xeno.dm" +#include "code\modules\assembly\anomalies.dm" #include "code\modules\assembly\assembly.dm" #include "code\modules\assembly\bomb.dm" #include "code\modules\assembly\doorcontrol.dm"