mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-27 14:08:44 +01:00
Adds the dust anomaly (#19228)
* Dust anomaly * FILTH * Check for simulated turf instead
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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()
|
||||
@@ -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
|
||||
|
||||
@@ -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,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user