Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
baaef2d
it's cool and i like the sound of rain
Moltijoe Jul 1, 2024
afc8148
Update acid_rain.dm
Moltijoe Jul 1, 2024
f15333d
flavour
Moltijoe Jul 1, 2024
a418c04
Update acid_rain.dm
Moltijoe Jul 1, 2024
00b5417
Update acid_rain.dm
Moltijoe Jul 1, 2024
3f8eb7e
Update acid_rain.dm
Moltijoe Jul 1, 2024
10b4d74
Update acid_rain.dm
Moltijoe Jul 1, 2024
99c34fa
SOUND EFFECTS FUCK YEAH
Moltijoe Jul 2, 2024
6fd73a2
Update acid_rain.dm
Moltijoe Jul 2, 2024
856c041
numbers numbers numbers
Moltijoe Jul 2, 2024
dd6deb9
split ends but good
Moltijoe Jul 2, 2024
f5c1a55
should be done now
Moltijoe Jul 2, 2024
4f1a648
Update weather.dm
Moltijoe Jul 2, 2024
565fa51
fix mobs dying
Moltijoe Jul 2, 2024
01a1f63
flag refactor
Moltijoe Jul 3, 2024
5b8cd93
tweaks
Moltijoe Jul 3, 2024
7388c0c
visible
Moltijoe Jul 3, 2024
0639187
common rain
Moltijoe Jul 3, 2024
83e3722
more toxic
Moltijoe Jul 3, 2024
54f47bd
lol
Moltijoe Jul 4, 2024
aadfdd1
Update acid_rain.dm
Moltijoe Jul 4, 2024
5706c1c
Update acid_rain.dm
Moltijoe Jul 4, 2024
39a5350
Update acid_rain.dm
Moltijoe Jul 4, 2024
a31af1d
Update acid_rain.dm
Moltijoe Jul 4, 2024
760e2e7
Update acid_rain.dm
Moltijoe Jul 4, 2024
4701831
Update lava.dm
Moltijoe Jul 5, 2024
8d36f26
Update acid_rain.dm
Moltijoe Jul 6, 2024
0c8ce85
Update acid_rain.dm
Moltijoe Jul 8, 2024
6f5da7e
Update acid_rain.dm
Moltijoe Jul 8, 2024
7a8fa37
Merge branch 'yogstation13:master' into EnableAcidRain
Moltijoe Jul 10, 2024
3d507fc
Update weather.dm
Moltijoe Jul 10, 2024
c1606c5
Update plantpeople.dm
Moltijoe Jul 10, 2024
c0eeed4
Merge branch 'yogstation13:master' into EnableAcidRain
Moltijoe Jul 10, 2024
4ae10c3
tweak metabolites
Moltijoe Jul 19, 2024
c83fcb3
Update jungle_datums.dm
Moltijoe Jul 19, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion _maps/map_files/mining/Lavaland.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -1514,7 +1514,7 @@
loot = list(/obj/effect/decal/remains/human);
name = "Jim The Door Technician";
wander = 0;
weather_immunities = list("ash")
weather_immunities = 1
},
/turf/open/floor/plating/asteroid/basalt/lava_land_surface,
/area/lavaland/surface/outdoors)
Expand Down
15 changes: 8 additions & 7 deletions code/__DEFINES/combat.dm
Original file line number Diff line number Diff line change
Expand Up @@ -298,10 +298,11 @@ GLOBAL_LIST_INIT(shove_disarming_types, typecacheof(list(
#define BULLET_ACT_PENETRATE (1<<4)

// Weather immunities //
#define WEATHER_STORM "storm"
#define WEATHER_ACID "acid"
#define WEATHER_ASH "ash"
#define WEATHER_LAVA "lava"
#define WEATHER_RAD "rad"
#define WEATHER_SNOW "snow"
#define WEATHER_ALL "all"
#define WEATHER_LAVA (1<<0)
#define WEATHER_ACID (1<<1)
#define WEATHER_ASH (1<<2)
#define WEATHER_RAD (1<<3)
#define WEATHER_SNOW (1<<4)
#define WEATHER_VOIDSTORM (1<<5)

#define WEATHER_STORM (WEATHER_ACID | WEATHER_ASH | WEATHER_RAD | WEATHER_SNOW | WEATHER_VOIDSTORM)
2 changes: 1 addition & 1 deletion code/controllers/subsystem/weather.dm
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ SUBSYSTEM_DEF(weather)
var/datum/weather/W = pickweight(possible_weather)
run_weather(W, list(text2num(z)))
eligible_zlevels -= z
var/randTime = rand(3000, 6000)
var/randTime = rand(W.cooldown_lower, W.cooldown_higher)
addtimer(CALLBACK(src, PROC_REF(make_eligible), z, possible_weather), randTime + initial(W.weather_duration_upper), TIMER_UNIQUE) //Around 5-10 minutes between weathers
next_hit_by_zlevel["[z]"] = world.time + randTime + initial(W.telegraph_duration)

Expand Down
4 changes: 2 additions & 2 deletions code/datums/diseases/advance/symptoms/necropolis.dm
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,6 @@
if(fireproof)
REMOVE_TRAIT(H, TRAIT_RESISTHIGHPRESSURE, DISEASE_TRAIT)
REMOVE_TRAIT(H, TRAIT_RESISTHEAT, DISEASE_TRAIT)
H.weather_immunities -= WEATHER_ASH
H.weather_immunities -= WEATHER_LAVA
H.weather_immunities &= ~WEATHER_ASH
H.weather_immunities &= ~WEATHER_LAVA

32 changes: 32 additions & 0 deletions code/datums/looping_sounds/weather.dm
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,35 @@
start_length = 130
end_sound = 'sound/weather/ashstorm/inside/weak_end.ogg'
volume = 20


/datum/looping_sound/outside_acid_rain
start_sound = 'sound/weather/acidrain/outside/acidrain_outside_start.ogg'
start_length = 12 SECONDS

mid_sounds = list(
'sound/weather/acidrain/outside/acidrain_outside_mid1.ogg'=1,
'sound/weather/acidrain/outside/acidrain_outside_mid2.ogg'=1,
'sound/weather/acidrain/outside/acidrain_outside_mid3.ogg'=1,
'sound/weather/acidrain/outside/acidrain_outside_mid4.ogg'=1
)
mid_length = 12 SECONDS

end_sound = 'sound/weather/acidrain/outside/acidrain_outside_end.ogg'
volume = 55

/datum/looping_sound/inside_acid_rain
start_sound = 'sound/weather/acidrain/inside/acidrain_inside_start.ogg'
start_length = 12 SECONDS

mid_sounds = list(
'sound/weather/acidrain/inside/acidrain_inside_mid1.ogg'=1,
'sound/weather/acidrain/inside/acidrain_inside_mid2.ogg'=1,
'sound/weather/acidrain/inside/acidrain_inside_mid3.ogg'=1,
'sound/weather/acidrain/inside/acidrain_inside_mid4.ogg'=1
)
mid_length = 12 SECONDS

end_sound = 'sound/weather/acidrain/inside/acidrain_inside_end.ogg'

volume = 35 //the audio files are already just a bit quieter than the outside ones, but it should still be notably quieter
9 changes: 7 additions & 2 deletions code/datums/weather/weather.dm
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@
/// Color to apply to the area while weather is occuring
var/weather_color = null

/// In deciseconds, how long until the next weather on this Z level once this starts (lower end)
var/cooldown_lower = 3000
/// In deciseconds, how long until the next weather on this z level once this starts (higher end)
var/cooldown_higher = 6000

/// Displayed once the weather is over
var/end_message = "<span class='danger'>The wind relents its assault.</span>"
/// In deciseconds, how long the "wind-down" graphic will appear before vanishing entirely
Expand Down Expand Up @@ -197,10 +202,10 @@
if(istype(mob_to_check.loc, /obj/structure/closet))
var/obj/structure/closet/current_locker = mob_to_check.loc
if(current_locker.weather_protection)
if((immunity_type in current_locker.weather_protection) || (WEATHER_ALL in current_locker.weather_protection))
if(current_locker.weather_protection & immunity_type)
return

if((immunity_type in mob_to_check.weather_immunities) || (WEATHER_ALL in mob_to_check.weather_immunities))
if(mob_to_check.weather_immunities & immunity_type)
return

if(!(get_area(mob_to_check) in impacted_areas))
Expand Down
85 changes: 75 additions & 10 deletions code/datums/weather/weather_types/acid_rain.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,95 @@
name = "acid rain"
desc = "The planet's thunderstorms are by nature acidic, and will incinerate anyone standing beneath them without protection."

telegraph_duration = 400
telegraph_message = span_boldwarning("Thunder rumbles far above. You hear droplets drumming against the canopy. Seek shelter.")
telegraph_sound = 'sound/ambience/acidrain_start.ogg'
telegraph_duration = 30 SECONDS //if you change this i will kill you because the sound file lines up with this
telegraph_sound = 'sound/weather/acidrain/acidrain_telegraph.ogg'

weather_message = span_userdanger("<i>Acidic rain pours down around you! Get inside!</i>")
weather_overlay = "acid_rain"
weather_duration_lower = 600
weather_duration_upper = 1500
weather_sound = 'sound/ambience/acidrain_mid.ogg'
overlay_plane = HIGHEST_EVER_PLANE + 1 //why does this work, it shouldn't work, this is stupid and i hate it, why is this the ONLY thing that works, why won't it just show up normally, it shows up normally on lavaland, but not on jungleland, i don't understand it doesn't make any sense, this is all wrong

//lasts shorter
weather_duration_lower = 30 SECONDS
weather_duration_upper = 180 SECONDS //inconsistent tropical storms

end_duration = 100
//happens slightly more often
cooldown_lower = 3 MINUTES
cooldown_higher = 5 MINUTES

end_duration = 20 SECONDS
end_message = span_boldannounce("The downpour gradually slows to a light shower. It should be safe outside now.")
end_sound = 'sound/ambience/acidrain_end.ogg'

area_type = /area
protect_indoors = TRUE
target_trait = ZTRAIT_ACIDRAIN

immunity_type = WEATHER_ACID // temp

probability = 90

barometer_predictable = TRUE

var/datum/looping_sound/outside_acid_rain/sound_outside = new(list(), FALSE, TRUE)
var/datum/looping_sound/inside_acid_rain/sound_inside = new(list(), FALSE, TRUE)

/datum/weather/acid_rain/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_outside.output_atoms = outside_areas
sound_inside.output_atoms = inside_areas

/datum/weather/acid_rain/start()
. = ..()
sound_outside.start()
sound_inside.start()

/datum/weather/acid_rain/wind_down()
. = ..()
sound_outside.stop()
sound_inside.stop()

/datum/weather/acid_rain/proc/is_acid_immune(atom/L)
while (L && !isturf(L))
if(ismecha(L)) //Mechs are immune
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
var/acid_armour = the_mob.getarmor(null, ACID)
if(acid_armour >= 65) //give a bit of wiggle room, this isn't supposed to be that dangerous for someone that's prepared
return TRUE

if(the_mob.weather_immunities & immunity_type)
return TRUE
if(istype(L, /obj/structure/closet))
var/obj/structure/closet/the_locker = L
if(the_locker.weather_protection & immunity_type)
return TRUE
L = L.loc //Check parent items immunities (recurses up to the turf)
return FALSE //RIP you

/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)
L.adjust_wet_stacks(2)
if(is_acid_immune(L))
return
if(HAS_TRAIT(L,TRAIT_SULPH_PIT_IMMUNE)) //immunity to the acid doesn't mean immunity to the wet
return
if(ishuman(L)) //inject metabolites
var/mob/living/carbon/human/humie = L
if(humie.reagents.get_reagent_amount(/datum/reagent/toxic_metabolites) <= 25) //don't let them get up to the absolute highest metabolites tier, but they should still need to be worried
humie.reagents.add_reagent(/datum/reagent/toxic_metabolites, 2)
else
L.apply_damage_type(0.5, BURN)
L.apply_damage_type(0.5, TOX)
7 changes: 3 additions & 4 deletions code/datums/weather/weather_types/ash_storm.dm
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,12 @@
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((WEATHER_ASH in the_mob.weather_immunities) || (WEATHER_ALL in the_mob.weather_immunities))
if(the_mob.weather_immunities & immunity_type)
return TRUE
if(istype(L, /obj/structure/closet))
var/obj/structure/closet/the_locker = L
if(the_locker.weather_protection)
if((WEATHER_ASH in the_locker.weather_protection) || (WEATHER_ALL in the_locker.weather_protection))
return TRUE
if(the_locker.weather_protection & immunity_type)
return TRUE
L = L.loc //Check parent items immunities (recurses up to the turf)
return FALSE //RIP you

Expand Down
2 changes: 1 addition & 1 deletion code/datums/weather/weather_types/void_storm.dm
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
protect_indoors = FALSE
target_trait = ZTRAIT_VOIDSTORM

immunity_type = TRAIT_VOIDSTORM_IMMUNE
immunity_type = WEATHER_VOIDSTORM

barometer_predictable = FALSE

Expand Down
4 changes: 2 additions & 2 deletions code/game/objects/items/robot/robot_upgrades.dm
Original file line number Diff line number Diff line change
Expand Up @@ -503,13 +503,13 @@
. = ..()
if(!.)
return FALSE
R.weather_immunities += WEATHER_LAVA
R.weather_immunities |= WEATHER_LAVA

/obj/item/borg/upgrade/lavaproof/deactivate(mob/living/silicon/robot/R, user = usr)
. = ..()
if(!.)
return FALSE
R.weather_immunities -= WEATHER_LAVA
R.weather_immunities &= ~WEATHER_LAVA

/obj/item/borg/upgrade/selfrepair
name = "self-repair module"
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/structures/crates_lockers/closets.dm
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ GLOBAL_LIST_EMPTY(lockers)
var/icon_welded = "welded"
var/icon_broken = "sparking"
/// Protection against weather that being inside of it provides.
var/list/weather_protection = null
var/weather_protection = NONE
/// How close being inside of the thing provides complete pressure safety. Must be between 0 and 1!
contents_pressure_protection = 0
/// How insulated the thing is, for the purposes of calculating body temperature. Must be between 0 and 1!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,8 @@
mob_storage_capacity = 1
contents_pressure_protection = 0.8
contents_thermal_insulation = 0.5
foldedbag_path = /obj/item/bodybag/environmental/
weather_protection = list(WEATHER_ACID, WEATHER_ASH, WEATHER_RAD, WEATHER_SNOW, ) // Does not protect against lava or the The Floor Is Lava spell.
foldedbag_path = /obj/item/bodybag/environmental
weather_protection = WEATHER_STORM

/obj/structure/closet/body_bag/environmental/nanotrasen
name = "elite environmental protection bag"
Expand All @@ -167,7 +167,7 @@
contents_pressure_protection = 1
contents_thermal_insulation = 1
foldedbag_path = /obj/item/bodybag/environmental/nanotrasen/
weather_protection = list(WEATHER_ALL)
weather_protection = WEATHER_STORM

/// Securable enviro. bags

Expand Down Expand Up @@ -288,7 +288,7 @@
contents_pressure_protection = 1
contents_thermal_insulation = 1
foldedbag_path = /obj/item/bodybag/environmental/prisoner/syndicate
weather_protection = list(WEATHER_ALL)
weather_protection = WEATHER_STORM
breakout_time = 8 MINUTES
sinch_time = 4 SECONDS

Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/structures/flora.dm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/obj/structure/flora
resistance_flags = FLAMMABLE
resistance_flags = FLAMMABLE | UNACIDABLE
max_integrity = 150
anchored = TRUE

Expand Down
4 changes: 2 additions & 2 deletions code/game/turfs/open/lava.dm
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ GLOBAL_LIST_INIT(lavasafeties, typecacheof(list(/obj/structure/lattice/catwalk,
return
else if(isliving(buckle_check))
var/mob/living/live = buckle_check
if(WEATHER_LAVA in live.weather_immunities)
if(live.weather_immunities & WEATHER_LAVA)
return

if(!L.on_fire)
Expand All @@ -83,7 +83,7 @@ GLOBAL_LIST_INIT(lavasafeties, typecacheof(list(/obj/structure/lattice/catwalk,
if(S && H && S.clothing_flags & LAVAPROTECT && H.clothing_flags & LAVAPROTECT)
return

if(WEATHER_LAVA in L.weather_immunities)
if(L.weather_immunities & WEATHER_LAVA)
return

L.adjustFireLoss(20 * delta_time)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
melee_damage_upper = 15
attacktext = "slashes"
attack_sound = 'sound/weapons/bladeslice.ogg'
weather_immunities = list(WEATHER_LAVA)
weather_immunities = ALL
movement_type = FLYING
combat_mode = TRUE
loot = list(/obj/item/clockwork/component/geis_capacitor/fallen_armor)
Expand Down
4 changes: 2 additions & 2 deletions code/modules/awaymissions/mission_code/snowdin.dm
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@
var/mob/living/L = thing
if(L.movement_type & FLYING)
return //YOU'RE FLYING OVER IT
if(WEATHER_SNOW in L.weather_immunities)
if(L.weather_immunities & WEATHER_SNOW)
return

var/buckle_check = L.buckling
Expand All @@ -193,7 +193,7 @@

else if(isliving(buckle_check))
var/mob/living/live = buckle_check
if(WEATHER_SNOW in live.weather_immunities)
if(live.weather_immunities & WEATHER_SNOW)
return

L.adjustFireLoss(2)
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mining/minebot.dm
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
icon_living = "mining_drone"
status_flags = CANSTUN|CANKNOCKDOWN|CANPUSH
mouse_opacity = MOUSE_OPACITY_ICON
weather_immunities = list(WEATHER_ASH)
weather_immunities = WEATHER_STORM
faction = list("neutral")
combat_mode = TRUE
atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0)
Expand Down
4 changes: 2 additions & 2 deletions code/modules/mob/living/carbon/alien/humanoid/caste/hunter.dm
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,13 @@

else //Maybe uses plasma in the future, although that wouldn't make any sense...
leaping = 1
weather_immunities += WEATHER_LAVA
weather_immunities |= WEATHER_LAVA
update_icons()
throw_at(A, MAX_ALIEN_LEAP_DIST, 1, src, FALSE, TRUE, callback = CALLBACK(src, PROC_REF(leap_end)))

/mob/living/carbon/alien/humanoid/hunter/proc/leap_end()
leaping = 0
weather_immunities -= WEATHER_LAVA
weather_immunities &= ~WEATHER_LAVA
update_icons()

/mob/living/carbon/alien/humanoid/hunter/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
Expand Down
8 changes: 4 additions & 4 deletions code/modules/mob/living/carbon/human/species_types/golems.dm
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@

/datum/species/golem/titanium/on_species_loss(mob/living/carbon/C)
. = ..()
C.weather_immunities -= WEATHER_ASH
C.weather_immunities &= ~WEATHER_ASH

//Immune to ash storms and lava
/datum/species/golem/plastitanium
Expand All @@ -278,8 +278,8 @@

/datum/species/golem/plastitanium/on_species_loss(mob/living/carbon/C)
. = ..()
C.weather_immunities -= WEATHER_ASH
C.weather_immunities -= WEATHER_LAVA
C.weather_immunities &= ~WEATHER_ASH
C.weather_immunities &= ~WEATHER_LAVA

//Fast and regenerates... but can only speak like an abductor
/datum/species/golem/alloy
Expand Down Expand Up @@ -1026,7 +1026,7 @@

/datum/species/golem/snow/on_species_loss(mob/living/carbon/remove_from)
. = ..()
remove_from.weather_immunities -= WEATHER_SNOW
remove_from.weather_immunities &= ~WEATHER_SNOW
QDEL_NULL(snowball)
QDEL_NULL(cryo)
return ..()
Expand Down
Loading