diff --git a/code/__defines/anomaly.dm b/code/__defines/anomaly.dm index 2da7c5aea61..ef3db08b371 100644 --- a/code/__defines/anomaly.dm +++ b/code/__defines/anomaly.dm @@ -46,3 +46,4 @@ #define HALLUCINATION_ANOMALY "hallucination_anomaly" #define DIMENSIONAL_ANOMALY "dimensional_anomaly" #define WEATHER_ANOMALY "weather_anomaly" +#define DUST_ANOMALY "dust_anomaly" diff --git a/code/controllers/subsystems/research.dm b/code/controllers/subsystems/research.dm index 814c6a955a6..7297436a045 100644 --- a/code/controllers/subsystems/research.dm +++ b/code/controllers/subsystems/research.dm @@ -53,6 +53,7 @@ SUBSYSTEM_DEF(research) /obj/item/assembly/signaler/anomaly/hallucination = list(TECHWEB_POINT_TYPE_GENERIC = TECHWEB_TIER_5_POINTS), /obj/item/assembly/signaler/anomaly/pyro = list(TECHWEB_POINT_TYPE_GENERIC = TECHWEB_TIER_5_POINTS), /obj/item/assembly/signaler/anomaly/weather = list(TECHWEB_POINT_TYPE_GENERIC = TECHWEB_TIER_5_POINTS), + /obj/item/assembly/signaler/anomaly/dust = list(TECHWEB_POINT_TYPE_GENERIC = TECHWEB_TIER_5_POINTS), /obj/item/slime_extract/grey = list(TECHWEB_POINT_TYPE_GENERIC = TECHWEB_TIER_1_POINTS*0.1), /obj/item/slime_extract/purple = list(TECHWEB_POINT_TYPE_GENERIC = TECHWEB_TIER_1_POINTS*0.1), /obj/item/slime_extract/orange = list(TECHWEB_POINT_TYPE_GENERIC = TECHWEB_TIER_1_POINTS*0.1), diff --git a/code/game/objects/effects/anomalies/_anomalies.dm b/code/game/objects/effects/anomalies/_anomalies.dm index 33704b47d2c..5afd62f4286 100644 --- a/code/game/objects/effects/anomalies/_anomalies.dm +++ b/code/game/objects/effects/anomalies/_anomalies.dm @@ -120,3 +120,5 @@ new /obj/effect/anomaly/dimensional(local_turf, null, drops_core) if(WEATHER_ANOMALY) new /obj/effect/anomaly/weather(local_turf, null, drops_core) + if(DUST_ANOMALY) + new /obj/effect/anomaly/dust(local_turf, null, drops_core) diff --git a/code/game/objects/effects/anomalies/anomalies_dust.dm b/code/game/objects/effects/anomalies/anomalies_dust.dm new file mode 100644 index 00000000000..9997e15ba3a --- /dev/null +++ b/code/game/objects/effects/anomalies/anomalies_dust.dm @@ -0,0 +1,73 @@ +/obj/effect/anomaly/dust + name = "dust anomaly" + icon_state = "dust" + density = FALSE + anomaly_core = /obj/item/assembly/signaler/anomaly/dust + pass_flags = PASSTABLE | PASSGRILLE + layer = ABOVE_MOB_LAYER + lifespan = ANOMALY_COUNTDOWN_TIMER * 1.5 + + move_chance = 80 + + COOLDOWN_DECLARE(pulse_cooldown) + var/pulse_delay = 5 SECONDS + +/obj/effect/anomaly/dust/Initialize(mapload, new_lifespan, drops_core) + . = ..() + var/static/list/loc_connections = list( + COMSIG_ATOM_ENTERED = PROC_REF(on_entered) + ) + AddElement(/datum/element/connect_loc, loc_connections) + + animate(src, transform = matrix()*0.85, time = 3, loop = -1) + animate(transform = matrix(), time = 3, loop = -1) + +/obj/effect/anomaly/dust/proc/on_entered(datum/source, atom/movable/AM) + SIGNAL_HANDLER + if(istype(AM, /turf/simulated/floor)) + var/turf/simulated/floor/floor = AM + if(floor.can_dirty) + floor.dirt += 50 + floor.update_dirt() + +/obj/effect/anomaly/dust/anomalyEffect(seconds_per_tick) + . = ..() + + if(!COOLDOWN_FINISHED(src, pulse_cooldown)) + return + + new /obj/effect/temp_visual/circle_wave/dirt(get_turf(src)) + playsound(src, 'sound/effects/cosmic_energy.ogg', vol = 50, vary = TRUE) + COOLDOWN_START(src, pulse_cooldown, pulse_delay) + for(var/mob/living/carbon/human/person in viewers(5, src)) + person.germ_level += rand(5, 10) + if(person.isSynthetic()) + continue + if(person.is_mouth_covered()) + continue + if(!person.has_lungs()) + continue + person.emote(prob(50) ? "cough" : "sneeze") + person.Stun(2) + person.adjustOxyLoss(5) + if(prob(15)) + person.Stun(2) + to_chat(person, span_danger(pick("You have a coughing fit!", "You can't stop coughing!"))) + addtimer(CALLBACK(person, TYPE_PROC_REF(/mob, emote), "cough"), 1 SECONDS) + addtimer(CALLBACK(person, TYPE_PROC_REF(/mob, emote), "cough"), 3 SECONDS) + addtimer(CALLBACK(person, TYPE_PROC_REF(/mob, emote), "cough"), 6 SECONDS) + + for(var/turf/simulated/floor/ground in circleviewturfs(src, 3)) + if(ground.can_dirty) + ground.dirt += 20 + ground.update_dirt() + + if(prob(1)) + new /obj/random/mob/vermin(ground) + + if(prob(2)) + new /obj/effect/decal/cleanable/filth(ground) + +/obj/effect/anomaly/dust/detonate() + COOLDOWN_RESET(src, pulse_cooldown) + anomalyEffect() diff --git a/code/game/objects/effects/temporary_visuals/miscellaneous.dm b/code/game/objects/effects/temporary_visuals/miscellaneous.dm index f724f1667dd..363c152cbff 100644 --- a/code/game/objects/effects/temporary_visuals/miscellaneous.dm +++ b/code/game/objects/effects/temporary_visuals/miscellaneous.dm @@ -145,3 +145,6 @@ /obj/effect/temp_visual/circle_wave/star_blast color = COLOR_VOID_PURPLE + +/obj/effect/temp_visual/circle_wave/dirt + color = COLOR_ASTEROID_ROCK diff --git a/code/game/objects/random/mob.dm b/code/game/objects/random/mob.dm index d68a687bd27..896b10bb8c4 100644 --- a/code/game/objects/random/mob.dm +++ b/code/game/objects/random/mob.dm @@ -419,3 +419,21 @@ /mob/living/simple_mob/animal/sif/sakimm ) ) + +/obj/random/mob/vermin + name = "Random Vermin" + desc = "Often found in trash." + icon_state = "animal" + spawn_nothing_percentage = 15 + +/obj/random/mob/vermin/item_to_spawn() + return pick(prob(15);/mob/living/simple_mob/animal/passive/mouse/white, + prob(15);/mob/living/simple_mob/animal/passive/mouse/black, + prob(30);/mob/living/simple_mob/animal/passive/mouse/brown, + prob(30);/mob/living/simple_mob/animal/passive/mouse/gray, + prob(30);/mob/living/simple_mob/animal/passive/mouse/rat, + prob(30);/obj/effect/spider/spiderling/non_growing, + prob(30);/mob/living/simple_mob/animal/passive/raccoon, + prob(30);/mob/living/simple_mob/animal/passive/opossum, + prob(40);/mob/living/simple_mob/animal/passive/cockroach, + ) diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 0bca4a4817c..9531bef9100 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -1476,6 +1476,13 @@ return 1 return 0 +/mob/living/carbon/human/has_lungs() + if(internal_organs_by_name[O_LUNGS]) + var/obj/item/organ/lungs = internal_organs_by_name[O_LUNGS] + if(lungs && istype(lungs) && !(lungs.status & ORGAN_CUT_AWAY)) + return TRUE + return FALSE + /mob/living/carbon/human/slip(var/slipped_on, stun_duration=8) var/list/equipment = list(src.w_uniform,src.wear_suit,src.shoes) var/footcoverage_check = FALSE diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index eb2bbee59e5..20639278540 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -905,6 +905,9 @@ /mob/living/proc/has_eyes() return 1 +/mob/living/proc/has_lungs() + return TRUE + /mob/living/proc/get_restraining_bolt() var/obj/item/implant/restrainingbolt/RB = locate() in src if(RB) diff --git a/code/modules/research/anomaly/anomaly_core.dm b/code/modules/research/anomaly/anomaly_core.dm index d6840fd1ffb..84eb0f7e17a 100644 --- a/code/modules/research/anomaly/anomaly_core.dm +++ b/code/modules/research/anomaly/anomaly_core.dm @@ -100,3 +100,9 @@ desc = "The neutralized core of a weather anomaly. The sound of thunder can be heard in the distance. It'd probably be valuable for research." icon_state = "weather_core" anomaly_type = /obj/effect/anomaly/weather + +/obj/item/assembly/signaler/anomaly/dust + name = "\improper dust anomaly core" + desc = "The neutralized core of a dust anomaly. It seems to leave some dirt on touch. It'd probably be valuable for research." + icon_state = "dust_core" + anomaly_type = /obj/effect/anomaly/dust diff --git a/icons/effects/anomalies.dmi b/icons/effects/anomalies.dmi index b40d14d3897..92dd1951645 100644 Binary files a/icons/effects/anomalies.dmi and b/icons/effects/anomalies.dmi differ diff --git a/icons/obj/assemblies/new_assemblies.dmi b/icons/obj/assemblies/new_assemblies.dmi index 7e0d1801678..b3fdd979803 100644 Binary files a/icons/obj/assemblies/new_assemblies.dmi and b/icons/obj/assemblies/new_assemblies.dmi differ diff --git a/vorestation.dme b/vorestation.dme index e7ae627bc5d..350e4fd9f56 100644 --- a/vorestation.dme +++ b/vorestation.dme @@ -1571,6 +1571,7 @@ #include "code\game\objects\effects\anomalies\anomalies_bluespace.dm" #include "code\game\objects\effects\anomalies\anomalies_dimensional.dm" #include "code\game\objects\effects\anomalies\anomalies_dimensional_themes.dm" +#include "code\game\objects\effects\anomalies\anomalies_dust.dm" #include "code\game\objects\effects\anomalies\anomalies_flux.dm" #include "code\game\objects\effects\anomalies\anomalies_gravity.dm" #include "code\game\objects\effects\anomalies\anomalies_hallucination.dm"