From 33026ae9544e61e5bcabd166918aa43333e11cc0 Mon Sep 17 00:00:00 2001 From: lavillastrangiato <63124803+lavillastrangiato@users.noreply.github.com> Date: Sun, 15 Dec 2024 10:29:59 -0700 Subject: [PATCH] Deletes the rain that wasn't particle weather and some other things (#1244) * weather deletions * deletes all the old rain ambience, redefines the fill condition on bins, redefines the fill condition on reagent containers, this is also where i touched lighting and screen objects * final * final final * nope * this shouldn't be here * ??? * guh? * this wasn't deleted for some reason --------- Co-authored-by: La Villa Strangiato --- code/_onclick/hud/screen_objects.dm | 7 +- .../controllers/subsystem/particle_weather.dm | 10 +- code/controllers/subsystem/weather.dm | 4 - .../particle_weathers/datum_types/rain.dm | 2 + .../datums/weather/weather_types/acid_rain.dm | 32 ----- .../datums/weather/weather_types/ash_storm.dm | 113 ---------------- .../weather/weather_types/floor_is_lava.dm | 39 ------ .../weather_types/{roguetown => }/fog.dm | 0 .../weather/weather_types/radiation_storm.dm | 67 ---------- .../weather/weather_types/roguetown/rain.dm | 123 ------------------ code/game/area/areas.dm | 15 --- .../game/objects/lighting/_base_roguelight.dm | 4 - code/modules/admin/secrets.dm | 3 - code/modules/events/radiation_storm.dm | 19 --- code/modules/events/wizard/lava.dm | 15 --- .../simple_animal/hostile/megafauna/legion.dm | 68 ---------- code/modules/reagents/reagent_containers.dm | 32 ++--- .../reagents/reagent_containers/bottle.dm | 2 + modular/Neu_Farming/code/bin.dm | 4 - stonekeep.dme | 9 +- 20 files changed, 29 insertions(+), 539 deletions(-) delete mode 100644 code/datums/weather/weather_types/acid_rain.dm delete mode 100644 code/datums/weather/weather_types/ash_storm.dm delete mode 100644 code/datums/weather/weather_types/floor_is_lava.dm rename code/datums/weather/weather_types/{roguetown => }/fog.dm (100%) delete mode 100644 code/datums/weather/weather_types/radiation_storm.dm delete mode 100644 code/datums/weather/weather_types/roguetown/rain.dm delete mode 100644 code/modules/events/radiation_storm.dm delete mode 100644 code/modules/events/wizard/lava.dm diff --git a/code/_onclick/hud/screen_objects.dm b/code/_onclick/hud/screen_objects.dm index a0384c2fad..176fe9df25 100644 --- a/code/_onclick/hud/screen_objects.dm +++ b/code/_onclick/hud/screen_objects.dm @@ -1868,10 +1868,9 @@ if("dawn") icon_state = "dawn" name = "Sir Sun - Dawn" - for(var/datum/weather/rain/R in SSweather.curweathers) - if(R.stage < 2) - add_overlay("clouds") - if(R.stage == 2) + /* if(R.stage < 2) + add_overlay("clouds") */ + if(PARTICLEWEATHER_RAIN) add_overlay("rainlay") /atom/movable/screen/rogfat diff --git a/code/controllers/subsystem/particle_weather.dm b/code/controllers/subsystem/particle_weather.dm index bdb8619a7f..08a179c2bb 100644 --- a/code/controllers/subsystem/particle_weather.dm +++ b/code/controllers/subsystem/particle_weather.dm @@ -4,7 +4,7 @@ SUBSYSTEM_DEF(ParticleWeather) flags = SS_BACKGROUND wait = 10 runlevels = RUNLEVEL_GAME - var/list/elligble_weather = list() + var/list/eligible_weather = list() var/datum/particle_weather/runningWeather // var/list/next_hit = list() //Used by barometers to know when the next storm is coming @@ -22,7 +22,7 @@ SUBSYSTEM_DEF(ParticleWeather) runningWeather.weather_obj_act(act_on) else // start random weather - var/datum/particle_weather/our_event = pickweight(elligble_weather) //possible_weather + var/datum/particle_weather/our_event = pickweight(eligible_weather) //possible_weather if(our_event) run_weather(our_event) @@ -36,8 +36,8 @@ SUBSYSTEM_DEF(ParticleWeather) // any weather with a probability set may occur at random if (probability && (target_trait in GLOB.vanderlin_weather)) //TODO VANDERLIN: Map trait this. - LAZYINITLIST(elligble_weather) - elligble_weather[W] = probability + LAZYINITLIST(eligible_weather) + eligible_weather[W] = probability return ..() /datum/controller/subsystem/ParticleWeather/proc/run_weather(datum/particle_weather/weather_datum_type, force = 0) @@ -65,7 +65,7 @@ SUBSYSTEM_DEF(ParticleWeather) /datum/controller/subsystem/ParticleWeather/proc/make_eligible(possible_weather) - elligble_weather = possible_weather + eligible_weather = possible_weather // next_hit = null /datum/controller/subsystem/ParticleWeather/proc/getweatherEffect() diff --git a/code/controllers/subsystem/weather.dm b/code/controllers/subsystem/weather.dm index cb933e4ad1..57d2efc28c 100644 --- a/code/controllers/subsystem/weather.dm +++ b/code/controllers/subsystem/weather.dm @@ -108,10 +108,6 @@ SUBSYSTEM_DEF(weather) /atom/proc/weather_trigger(W) return -/mob/living/weather_trigger(W) - if(W==/datum/weather/rain) - START_PROCESSING(SSweather,src) - /turf/proc/trigger_weather(atom/A) if(A) var/area/AR = get_area(src) diff --git a/code/datums/particle_weathers/datum_types/rain.dm b/code/datums/particle_weathers/datum_types/rain.dm index 10c81b8f9e..6b18bfa7d8 100644 --- a/code/datums/particle_weathers/datum_types/rain.dm +++ b/code/datums/particle_weathers/datum_types/rain.dm @@ -36,6 +36,7 @@ //Makes you a little chilly /datum/particle_weather/rain_gentle/weather_act(mob/living/L) L.adjust_bodytemperature(-rand(1,3)) + L.adjust_fire_stacks(-50) /datum/particle_weather/rain_storm name = "Rain" @@ -58,3 +59,4 @@ //Makes you a bit chilly /datum/particle_weather/rain_storm/weather_act(mob/living/L) L.adjust_bodytemperature(-rand(3,5)) + L.SoakMob(FULL_BODY) diff --git a/code/datums/weather/weather_types/acid_rain.dm b/code/datums/weather/weather_types/acid_rain.dm deleted file mode 100644 index 8cd5b2ba37..0000000000 --- a/code/datums/weather/weather_types/acid_rain.dm +++ /dev/null @@ -1,32 +0,0 @@ -//Acid rain is part of the natural weather cycle in the humid forests of Planetstation, and cause acid damage to anyone unprotected. -/datum/weather/acid_rain - name = "acid rain" - desc = "" - - telegraph_duration = 400 - telegraph_message = "Thunder rumbles far above. You hear droplets drumming against the canopy. Seek shelter." - telegraph_sound = 'sound/blank.ogg' - - weather_message = "Acidic rain pours down around you! Get inside!" - weather_overlay = "acid_rain" - weather_duration_lower = 600 - weather_duration_upper = 1500 - weather_sound = 'sound/blank.ogg' - - end_duration = 100 - end_message = "The downpour gradually slows to a light shower. It should be safe outside now." - end_sound = 'sound/blank.ogg' - - area_type = /area/lavaland/surface/outdoors - target_trait = ZTRAIT_MINING - - immunity_type = "acid" // temp - - barometer_predictable = TRUE - - -/datum/weather/acid_rain/weather_act(mob/living/L) - var/resist = L.getarmor(null, "acid") - if(prob(max(0,100-resist))) - L.acid_act(20,20) - return TRUE diff --git a/code/datums/weather/weather_types/ash_storm.dm b/code/datums/weather/weather_types/ash_storm.dm deleted file mode 100644 index d073060651..0000000000 --- a/code/datums/weather/weather_types/ash_storm.dm +++ /dev/null @@ -1,113 +0,0 @@ -//Ash storms happen frequently on lavaland. They heavily obscure vision, and cause high fire damage to anyone caught outside. -/datum/weather/ash_storm - name = "ash storm" - desc = "" - - telegraph_message = "An eerie moan rises on the wind. Sheets of burning ash blacken the horizon. Seek shelter." - telegraph_duration = 300 - telegraph_overlay = "light_ash" - - weather_message = "Smoldering clouds of scorching ash billow down around you! Get inside!" - weather_duration_lower = 600 - weather_duration_upper = 1200 - weather_overlay = "ash_storm" - - end_message = "The shrieking wind whips away the last of the ash and falls to its usual murmur. It should be safe to go outside now." - end_duration = 300 - end_overlay = "light_ash" - - area_type = /area/lavaland/surface/outdoors - target_trait = ZTRAIT_MINING - - immunity_type = "ash" - - probability = 90 - - barometer_predictable = TRUE - - var/datum/looping_sound/active_outside_ashstorm/sound_ao = new(list(), FALSE, TRUE) - var/datum/looping_sound/active_inside_ashstorm/sound_ai = new(list(), FALSE, TRUE) - var/datum/looping_sound/weak_outside_ashstorm/sound_wo = new(list(), FALSE, TRUE) - var/datum/looping_sound/weak_inside_ashstorm/sound_wi = new(list(), FALSE, TRUE) - -/datum/weather/ash_storm/telegraph() - . = ..() - var/list/inside_areas = list() - var/list/outside_areas = list() - var/list/eligible_areas = list() - for (var/z in impacted_z_levels) - eligible_areas += SSmapping.areas_in_z["[z]"] - for(var/i in 1 to eligible_areas.len) - var/area/place = eligible_areas[i] - if(place.outdoors) - outside_areas += place - else - inside_areas += place - CHECK_TICK - -// sound_ao.output_atoms = outside_areas -// sound_ai.output_atoms = inside_areas -// sound_wo.output_atoms = outside_areas -// sound_wi.output_atoms = inside_areas - - sound_wo.start() - sound_wi.start() - -/datum/weather/ash_storm/start() - . = ..() - sound_wo.stop() - sound_wi.stop() - - sound_ao.start() - sound_ai.start() - -/datum/weather/ash_storm/wind_down() - . = ..() - sound_ao.stop() - sound_ai.stop() - - sound_wo.start() - sound_wi.start() - -/datum/weather/ash_storm/end() - . = ..() - sound_wo.stop() - sound_wi.stop() - -/datum/weather/ash_storm/proc/is_ash_immune(atom/L) - while (L && !isturf(L)) - if(ismecha(L)) //Mechs are immune - return TRUE - if(ishuman(L)) //Are you immune? - var/mob/living/carbon/human/H = L - var/thermal_protection = H.get_thermal_protection() - if(thermal_protection >= FIRE_IMMUNITY_MAX_TEMP_PROTECT) - return TRUE - if(isliving(L))// if we're a non immune mob inside an immune mob we have to reconsider if that mob is immune to protect ourselves - var/mob/living/the_mob = L - if("ash" in the_mob.weather_immunities) - return TRUE - L = L.loc //Check parent items immunities (recurses up to the turf) - return FALSE //RIP you - -/datum/weather/ash_storm/weather_act(mob/living/L) - if(is_ash_immune(L)) - return - L.adjustFireLoss(4) - return ..() - - -//Emberfalls are the result of an ash storm passing by close to the playable area of lavaland. They have a 10% chance to trigger in place of an ash storm. -/datum/weather/ash_storm/emberfall - name = "emberfall" - desc = "" - - weather_message = "Gentle embers waft down around you like grotesque snow. The storm seems to have passed you by..." - weather_overlay = "light_ash" - - end_message = "The emberfall slows, stops. Another layer of hardened soot to the basalt beneath your feet." - end_sound = null - - aesthetic = TRUE - - probability = 10 diff --git a/code/datums/weather/weather_types/floor_is_lava.dm b/code/datums/weather/weather_types/floor_is_lava.dm deleted file mode 100644 index ab15cc2dd7..0000000000 --- a/code/datums/weather/weather_types/floor_is_lava.dm +++ /dev/null @@ -1,39 +0,0 @@ -//Causes fire damage to anyone not standing on a dense object. -/datum/weather/floor_is_lava - name = "the floor is lava" - desc = "" - - telegraph_message = "I feel the ground beneath you getting hot. Waves of heat distort the air." - telegraph_duration = 150 - - weather_message = "The floor is lava! Get on top of something!" - weather_duration_lower = 300 - weather_duration_upper = 600 - weather_overlay = "lava" - - end_message = "The ground cools and returns to its usual form." - end_duration = 0 - - area_type = /area - protected_areas = list(/area/space) - target_trait = ZTRAIT_STATION - - overlay_layer = ABOVE_OPEN_TURF_LAYER //Covers floors only - overlay_plane = FLOOR_PLANE - immunity_type = "lava" - - -/datum/weather/floor_is_lava/weather_act(mob/living/L) - if(istype(L.buckled, /obj/structure/bed)) - return - for(var/obj/structure/O in L.loc) - if(O.density) - return - if(L.loc.density) - return - if(!L.client) //Only sentient people are going along with it! - return - if(L.movement_type & FLYING) - return - L.adjustFireLoss(3) - return ..() diff --git a/code/datums/weather/weather_types/roguetown/fog.dm b/code/datums/weather/weather_types/fog.dm similarity index 100% rename from code/datums/weather/weather_types/roguetown/fog.dm rename to code/datums/weather/weather_types/fog.dm diff --git a/code/datums/weather/weather_types/radiation_storm.dm b/code/datums/weather/weather_types/radiation_storm.dm deleted file mode 100644 index 38577b56ff..0000000000 --- a/code/datums/weather/weather_types/radiation_storm.dm +++ /dev/null @@ -1,67 +0,0 @@ -//Radiation storms occur when the station passes through an irradiated area, and irradiate anyone not standing in protected areas (maintenance, emergency storage, etc.) -/datum/weather/rad_storm - name = "radiation storm" - desc = "" - - telegraph_duration = 400 - telegraph_message = "The air begins to grow warm." - - weather_message = "I feel waves of heat wash over you! Find shelter!" - weather_overlay = "ash_storm" - weather_duration_lower = 600 - weather_duration_upper = 1500 - weather_color = "green" - weather_sound = 'sound/blank.ogg' - - end_duration = 100 - end_message = "The air seems to be cooling off again." - - area_type = /area - protected_areas = list(/area/maintenance, /area/ai_monitored/turret_protected/ai_upload, /area/ai_monitored/turret_protected/ai_upload_foyer, - /area/ai_monitored/turret_protected/ai, /area/storage/emergency/starboard, /area/storage/emergency/port, /area/shuttle) - target_trait = ZTRAIT_STATION - - immunity_type = "rad" - -/datum/weather/rad_storm/telegraph() - ..() - status_alarm(TRUE) - - -/datum/weather/rad_storm/weather_act(mob/living/L) - var/resist = L.getarmor(null, "rad") - if(prob(40)) - if(ishuman(L)) - var/mob/living/carbon/human/H = L - if(H.dna && !HAS_TRAIT(H, TRAIT_RADIMMUNE)) - if(prob(max(0,100-resist))) - H.randmuti() - if(prob(50)) - if(prob(90)) - H.easy_randmut(NEGATIVE+MINOR_NEGATIVE) - else - H.easy_randmut(POSITIVE) - H.domutcheck() - L.rad_act(20) - return ..() - -/datum/weather/rad_storm/end() - if(..()) - return - priority_announce("The radiation threat has passed. Please return to your workplaces.", "Anomaly Alert") - status_alarm(FALSE) - -/datum/weather/rad_storm/proc/status_alarm(active) //Makes the status displays show the radiation warning for those who missed the announcement. - var/datum/radio_frequency/frequency = SSradio.return_frequency(FREQ_STATUS_DISPLAYS) - if(!frequency) - return - - var/datum/signal/signal = new - if (active) - signal.data["command"] = "alert" - signal.data["picture_state"] = "radiation" - else - signal.data["command"] = "shuttle" - - var/atom/movable/virtualspeaker/virt = new(null) - frequency.post_signal(virt, signal) diff --git a/code/datums/weather/weather_types/roguetown/rain.dm b/code/datums/weather/weather_types/roguetown/rain.dm deleted file mode 100644 index ad41d067a4..0000000000 --- a/code/datums/weather/weather_types/roguetown/rain.dm +++ /dev/null @@ -1,123 +0,0 @@ -/datum/weather/rain - name = "rain" - desc = "" - - telegraph_duration = 10 SECONDS - telegraph_message = span_warning("") // still spams at start, TO DO - telegraph_sound = 'sound/blank.ogg' - - weather_message = "" - weather_overlay = "rain" - weather_duration_lower = 5 MINUTES - weather_duration_upper = 12 MINUTES - weather_sound = 'sound/blank.ogg' - weather_alpha = 200 - - probability = 3 - - end_duration = 5 SECONDS - end_message = "" - end_sound = 'sound/blank.ogg' - - area_type = /area/rogue/outdoors - protected_areas = list(/area/rogue/indoors,/area/rogue/under) - impacted_z_levels = list() - var/lastlightning = 0 - - particles = list(/obj/emitters/weather/rain) - -/datum/weather/rain/New(z_levels) - impacted_z_levels = GLOB.sky_z.Copy() - . = ..() - -/datum/weather/rain/weather_act(atom/A) - if(isliving(A)) - var/mob/living/M = A - M.adjust_fire_stacks(-100) - M.SoakMob(FULL_BODY) - return TRUE - var/datum/reagent/water/W = new() - if(isobj(A)) - var/obj/O = A - W.reaction_obj(O, 100) - if(isopenturf(A)) - var/turf/open/T = A - W.reaction_turf(T, 300) - qdel(W) - return ..() - -/datum/weather/rain/get_used_state() - switch(stage) - if(STARTUP_STAGE) - return "bla1" -// return telegraph_overlay - if(MAIN_STAGE) - return pick("rain") - if(WIND_DOWN_STAGE) - return "bla2" - return "bla3" - -/datum/weather/rain/starteffected() - ..() //the parent does all living mobs already -// for(var/mob/living/L in GLOB.mob_living_list) -// if(can_weather_act(L)) -// SSweather.uniqueadd(L) -// START_PROCESSING(SSweather, L) -// for(var/obj/O in GLOB.rain_update) -// if(can_weather_act(O)) -// SSweather.uniqueadd(O) -// START_PROCESSING(SSweather, O) -// for(var/obj/O in GLOB.fires_list) -// if(can_weather_act(O)) -// START_PROCESSING(SSweather,O) - -/datum/weather/rain/initialprocess() - ..() -// for(var/turf/T in GLOB.dirt_list) -// if(can_weather_act(T)) -/// SSweather.uniqueadd(T, TRUE) -// START_PROCESSING(SSweather, T) - -/mob/living/carbon/proc/reset_lightning() - if(lightning_flashing) - lightning_flashing = FALSE - update_sight() - -/datum/weather/rain/process() -#ifndef TESTSERVER - if(GLOB.forecast != "rain") - wind_down() - return -#endif - if(world.time < lastlightning + 66 SECONDS) - return - lastlightning = world.time - for(var/mob/living/carbon/M in GLOB.player_list) - var/area/A = get_area(M) - if(istype(A, /area/rogue/outdoors)) - M.playsound_local(M, pick('sound/ambience/noises/thunout (1).ogg','sound/ambience/noises/thunout (2).ogg','sound/ambience/noises/thunout (3).ogg','sound/ambience/noises/thunout (4).ogg'), 100, FALSE) - M.lightning_flashing = TRUE - M.update_sight() - addtimer(CALLBACK(M, TYPE_PROC_REF(/mob/living/carbon, reset_lightning)), 1) - continue - if(istype(A, /area/rogue/indoors)) - M.playsound_local(M, pick('sound/ambience/noises/thunin (1).ogg','sound/ambience/noises/thunin (2).ogg','sound/ambience/noises/thunin (3).ogg','sound/ambience/noises/thunin (4).ogg'), 100, FALSE) - continue - /*for(var/obj/machinery/light/sun/L in GLOB.machines) - L.lightningflash()*/ - -/datum/weather/rain/start() - . = ..() - for(var/M in GLOB.player_list) - if(isliving(M)) - var/mob/living/L = M - if(L.client) - SSdroning.play_rain(get_area(L), L.client) - -/datum/weather/rain/end() - . = ..() - for(var/M in GLOB.player_list) - if(isliving(M)) - var/mob/living/L = M - if(L.client) - SSdroning.kill_rain(L.client) diff --git a/code/game/area/areas.dm b/code/game/area/areas.dm index bf9b5c1cb1..3373183ef9 100644 --- a/code/game/area/areas.dm +++ b/code/game/area/areas.dm @@ -396,11 +396,6 @@ GLOBAL_LIST_EMPTY(teleportlocs) //Ambience if combat mode is off SSdroning.area_entered(src, living_arrived.client) SSdroning.play_loop(src, living_arrived.client) - var/found = FALSE - for(var/datum/weather/rain/R in SSweather.curweathers) - found = TRUE - if(found) - SSdroning.play_rain(src, living_arrived.client) // L.play_ambience(src) @@ -532,19 +527,9 @@ GLOBAL_LIST_EMPTY(teleportlocs) SSdroning.area_entered(src, boarder.client) boarder.client.update_ambience_pref() SSdroning.play_loop(src, boarder.client) - var/found = FALSE - for(var/datum/weather/rain/R in SSweather.curweathers) - found = TRUE - if(found) - SSdroning.play_rain(get_area(boarder.client), boarder.client) /area/reconnect_game(mob/living/boarder) . = ..() if(istype(boarder) && boarder.client) SSdroning.area_entered(src, boarder.client) SSdroning.play_loop(src, boarder.client) - var/found = FALSE - for(var/datum/weather/rain/R in SSweather.curweathers) - found = TRUE - if(found) - SSdroning.play_rain(get_area(boarder.client), boarder.client) diff --git a/code/game/objects/lighting/_base_roguelight.dm b/code/game/objects/lighting/_base_roguelight.dm index bdb1889341..2fcb6c0c9f 100644 --- a/code/game/objects/lighting/_base_roguelight.dm +++ b/code/game/objects/lighting/_base_roguelight.dm @@ -23,10 +23,6 @@ seton(TRUE) . = ..() -/obj/machinery/light/rogue/weather_trigger(W) - if(W==/datum/weather/rain) - START_PROCESSING(SSweather,src) - /obj/machinery/light/rogue/OnCrafted(dirin) . = ..() can_damage = TRUE diff --git a/code/modules/admin/secrets.dm b/code/modules/admin/secrets.dm index d431d996b4..906b5968eb 100644 --- a/code/modules/admin/secrets.dm +++ b/code/modules/admin/secrets.dm @@ -372,9 +372,6 @@ for(var/obj/machinery/light/L in GLOB.machines) L.fix() - if("floorlava") - SSweather.run_weather(/datum/weather/floor_is_lava) - if("virus") if(!check_rights(R_FUN)) return diff --git a/code/modules/events/radiation_storm.dm b/code/modules/events/radiation_storm.dm deleted file mode 100644 index 98e33755db..0000000000 --- a/code/modules/events/radiation_storm.dm +++ /dev/null @@ -1,19 +0,0 @@ -/datum/round_event_control/radiation_storm - name = "Radiation Storm" - typepath = /datum/round_event/radiation_storm - max_occurrences = 1 - -/datum/round_event/radiation_storm - - -/datum/round_event/radiation_storm/setup() - startWhen = 3 - endWhen = startWhen + 1 - announceWhen = 1 - -/datum/round_event/radiation_storm/announce(fake) - priority_announce("High levels of radiation detected near the station. Maintenance is best shielded from radiation.", "Anomaly Alert", 'sound/blank.ogg') - //sound not longer matches the text, but an audible warning is probably good - -/datum/round_event/radiation_storm/start() - SSweather.run_weather(/datum/weather/rad_storm) diff --git a/code/modules/events/wizard/lava.dm b/code/modules/events/wizard/lava.dm deleted file mode 100644 index 9a882b45df..0000000000 --- a/code/modules/events/wizard/lava.dm +++ /dev/null @@ -1,15 +0,0 @@ -/datum/round_event_control/wizard/lava //THE LEGEND NEVER DIES - name = "The Floor Is LAVA!" - weight = 2 - typepath = /datum/round_event/wizard/lava - max_occurrences = 3 - earliest_start = 0 MINUTES - -/datum/round_event/wizard/lava - endWhen = 0 - var/started = FALSE - -/datum/round_event/wizard/lava/start() - if(!started) - started = TRUE - SSweather.run_weather(/datum/weather/floor_is_lava) diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/legion.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/legion.dm index 68c0c656c5..c6a09fc570 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/legion.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/legion.dm @@ -188,15 +188,6 @@ return if(Split()) return - //We check what loot we should drop. - var/last_legion = TRUE - for(var/mob/living/simple_animal/hostile/megafauna/legion/other in GLOB.mob_living_list) - if(other != src) - last_legion = FALSE - break - if(last_legion) - loot = list(/obj/item/staff/storm) - elimination = FALSE return ..() ///Splits legion into smaller skulls. @@ -241,65 +232,6 @@ //Loot -/obj/item/staff/storm - name = "staff of storms" - desc = "" - icon_state = "staffofstorms" - item_state = "staffofstorms" - icon = 'icons/obj/guns/magic.dmi' - slot_flags = ITEM_SLOT_BACK - w_class = WEIGHT_CLASS_BULKY - force = 25 - damtype = BURN - hitsound = 'sound/blank.ogg' - var/storm_type = /datum/weather/ash_storm - var/storm_cooldown = 0 - var/static/list/excluded_areas = list() - -/obj/item/staff/storm/attack_self(mob/user) - if(storm_cooldown > world.time) - to_chat(user, "The staff is still recharging!") - return - - var/area/user_area = get_area(user) - var/turf/user_turf = get_turf(user) - if(!user_area || !user_turf || (user_area.type in excluded_areas)) - to_chat(user, "Something is preventing you from using the staff here.") - return - var/datum/weather/A - for(var/V in SSweather.curweathers) - var/datum/weather/W = V - if((user_turf.z in W.impacted_z_levels) && W.area_type == user_area.type) - A = W - break - - if(A) - if(A.stage != END_STAGE) - if(A.stage == WIND_DOWN_STAGE) - to_chat(user, "The storm is already ending! It would be a waste to use the staff now.") - return - user.visible_message("[user] holds [src] skywards as an orange beam travels into the sky!", \ - "I hold [src] skyward, dispelling the storm!") - playsound(user, 'sound/blank.ogg', 200, FALSE) - A.wind_down() - log_game("[user] ([key_name(user)]) has dispelled a storm at [AREACOORD(user_turf)]") - return - else - A = new storm_type(list(user_turf.z)) - A.name = "staff storm" - log_game("[user] ([key_name(user)]) has summoned [A] at [AREACOORD(user_turf)]") - if (is_special_character(user)) - message_admins("[A] has been summoned in [ADMIN_VERBOSEJMP(user_turf)] by [ADMIN_LOOKUPFLW(user)], a non-antagonist") - A.area_type = user_area.type - A.telegraph_duration = 100 - A.end_duration = 100 - - user.visible_message("[user] holds [src] skywards as red lightning crackles into the sky!", \ - "I hold [src] skyward, calling down a terrible storm!") - playsound(user, 'sound/blank.ogg', 200, FALSE) - A.telegraph() - storm_cooldown = world.time + 200 - ///A basic turret that shoots at nearby mobs. Intended to be used for the legion megafauna. /obj/structure/legionturret name = "\improper Legion sentinel" diff --git a/code/modules/reagents/reagent_containers.dm b/code/modules/reagents/reagent_containers.dm index 77a606ff7c..d6fd85887f 100644 --- a/code/modules/reagents/reagent_containers.dm +++ b/code/modules/reagents/reagent_containers.dm @@ -20,9 +20,7 @@ var/short_cooktime = FALSE // based on cooking skill var/long_cooktime = FALSE // based on cooking skill -/obj/item/reagent_containers/weather_trigger(W) - if(W==/datum/weather/rain) - START_PROCESSING(SSweather,src) + COOLDOWN_DECLARE(fill_cooldown) /obj/item/reagent_containers/Initialize(mapload, vol) . = ..() @@ -36,22 +34,24 @@ add_initial_reagents() + if(spillable) + GLOB.weather_act_upon_list |= src + +/obj/item/reagent_containers/weather_act_on(weather_trait, severity) + if(weather_trait != PARTICLEWEATHER_RAIN || !COOLDOWN_FINISHED(src, fill_cooldown)) + return + + reagents.add_reagent(/datum/reagent/water, clamp(severity * 0.5, 1, 5)) + COOLDOWN_START(src, fill_cooldown, 10 SECONDS) + +/obj/item/reagent_containers/Destroy() + . = ..() + if(spillable) + GLOB.weather_act_upon_list -= src + /obj/item/reagent_containers/proc/add_initial_reagents() if(list_reagents) reagents.add_reagent_list(list_reagents) -/* -/obj/item/reagent_containers/attack_self(mob/user) - if(possible_transfer_amounts.len) - var/i=0 - for(var/A in possible_transfer_amounts) - i++ - if(A == amount_per_transfer_from_this) - if(i[src]'s transfer amount is now [amount_per_transfer_from_this] units.") - return*/ /obj/item/reagent_containers/attack(mob/M, mob/user, def_zone) return ..() diff --git a/code/modules/reagents/reagent_containers/bottle.dm b/code/modules/reagents/reagent_containers/bottle.dm index eb36614e43..b999ed40af 100644 --- a/code/modules/reagents/reagent_containers/bottle.dm +++ b/code/modules/reagents/reagent_containers/bottle.dm @@ -77,6 +77,7 @@ GLOBAL_LIST_INIT(wisdoms, world.file2list("strings/rt/wisdoms.txt")) reagent_flags = TRANSPARENT reagents.flags = reagent_flags spillable = FALSE + GLOB.weather_act_upon_list -= src if(!fancy) desc = "A bottle with a cork." else @@ -84,6 +85,7 @@ GLOBAL_LIST_INIT(wisdoms, world.file2list("strings/rt/wisdoms.txt")) reagents.flags = reagent_flags playsound(user.loc,'sound/items/uncork.ogg', 100, TRUE) spillable = TRUE + GLOB.weather_act_upon_list |= src if(!fancy) desc = "An open bottle, hopefully a cork is close by." update_icon() diff --git a/modular/Neu_Farming/code/bin.dm b/modular/Neu_Farming/code/bin.dm index 090f7cc492..77bba54d6a 100644 --- a/modular/Neu_Farming/code/bin.dm +++ b/modular/Neu_Farming/code/bin.dm @@ -18,10 +18,6 @@ blade_dulling = DULLING_BASHCHOP obj_flags = CAN_BE_HIT -/obj/item/roguebin/weather_trigger(W) - if(W==/datum/weather/rain) - START_PROCESSING(SSweather,src) - /obj/item/roguebin/Initialize() if(!base_state) create_reagents(600, DRAINABLE | AMOUNT_VISIBLE | REFILLABLE) diff --git a/stonekeep.dme b/stonekeep.dme index 8228547581..c600e98440 100644 --- a/stonekeep.dme +++ b/stonekeep.dme @@ -737,12 +737,7 @@ #include "code\datums\traits\negative.dm" #include "code\datums\traits\neutral.dm" #include "code\datums\weather\weather.dm" -#include "code\datums\weather\weather_types\acid_rain.dm" -#include "code\datums\weather\weather_types\ash_storm.dm" -#include "code\datums\weather\weather_types\floor_is_lava.dm" -#include "code\datums\weather\weather_types\radiation_storm.dm" -#include "code\datums\weather\weather_types\roguetown\fog.dm" -#include "code\datums\weather\weather_types\roguetown\rain.dm" +#include "code\datums\weather\weather_types\fog.dm" #include "code\datums\wounds\_wound.dm" #include "code\datums\wounds\arteries.dm" #include "code\datums\wounds\bites.dm" @@ -1600,7 +1595,6 @@ #include "code\modules\events\mass_hallucination.dm" #include "code\modules\events\mice_migration.dm" #include "code\modules\events\portal_storm.dm" -#include "code\modules\events\radiation_storm.dm" #include "code\modules\events\spacevine.dm" #include "code\modules\events\spider_infestation.dm" #include "code\modules\events\spontaneous_appendicitis.dm" @@ -1626,7 +1620,6 @@ #include "code\modules\events\wizard\greentext.dm" #include "code\modules\events\wizard\imposter.dm" #include "code\modules\events\wizard\invincible.dm" -#include "code\modules\events\wizard\lava.dm" #include "code\modules\events\wizard\madness.dm" #include "code\modules\events\wizard\magicarp.dm" #include "code\modules\events\wizard\petsplosion.dm"