diff --git a/code/game/turfs/simulated/floor/plating.dm b/code/game/turfs/simulated/floor/plating.dm index afca2aebd16..7117d9592b5 100644 --- a/code/game/turfs/simulated/floor/plating.dm +++ b/code/game/turfs/simulated/floor/plating.dm @@ -231,7 +231,7 @@ else if (istype(thing, /mob/living)) . = 1 var/mob/living/L = thing - if("mining" in L.faction) + if("lava" in L.weather_immunities) continue if(L.buckled) if(isobj(L.buckled)) @@ -239,8 +239,8 @@ if(O.burn_state == LAVA_PROOF) continue if(isliving(L.buckled)) //Goliath riding - var/mob/living/liv = L.buckled - if("mining" in liv.faction) + var/mob/living/live = L.buckled + if("lava" in live.weather_immunities) continue L.adjustFireLoss(20) diff --git a/code/modules/mining/lavaland/weather.dm b/code/modules/mining/lavaland/weather.dm index d0572ff0531..fed8c95c19f 100644 --- a/code/modules/mining/lavaland/weather.dm +++ b/code/modules/mining/lavaland/weather.dm @@ -25,6 +25,7 @@ var/overlay_layer = 10 //This is the default area layer, and above everything else. 2 is floors/below walls and mobs. var/purely_aesthetic = FALSE //If we just want gentle rain that doesn't hurt people var/list/impacted_areas = list() + var/immunity_type = "storm" /datum/weather/proc/weather_start_up() for(var/area/N in get_areas(area_type)) @@ -73,9 +74,8 @@ /datum/weather/proc/storm_act(mob/living/L) - if(prob(30)) //Dont want it spammed very tick - L << "You're buffeted by the storm!" - L.adjustBruteLoss(1) + if(immunity_type in L.weather_immunities) + return /datum/weather/proc/update_areas() for(var/area/N in impacted_areas) diff --git a/code/modules/mining/lavaland/weather_types.dm b/code/modules/mining/lavaland/weather_types.dm index 181569c8792..a8da9385436 100644 --- a/code/modules/mining/lavaland/weather_types.dm +++ b/code/modules/mining/lavaland/weather_types.dm @@ -18,8 +18,11 @@ duration_overlay = "lava" overlay_layer = 2 //Covers floors only + immunity_type = "lava" + /datum/weather/floor_is_lava/storm_act(mob/living/L) + ..() var/turf/F = get_turf(L) for(var/obj/structure/O in F.contents) if(O.level > F.level && !istype(O, /obj/structure/window)) // Something to stand on and it isn't under the floor! @@ -77,6 +80,8 @@ duration_overlay = "ash_storm" overlay_layer = 10 + immunity_type = "ash" + /datum/weather/ash_storm/false_alarm //No storm, just light ember fall purely_aesthetic = TRUE @@ -85,8 +90,7 @@ wind_down_message = "The ash fall starts to trail off." /datum/weather/ash_storm/storm_act(mob/living/L) - if("mining" in L.faction) - return + ..() if(istype(L.loc, /obj/mecha)) return if(ishuman(L)) diff --git a/code/modules/mob/living/living_defines.dm b/code/modules/mob/living/living_defines.dm index dab7e893b8a..4de30606990 100644 --- a/code/modules/mob/living/living_defines.dm +++ b/code/modules/mob/living/living_defines.dm @@ -60,4 +60,6 @@ var/list/butcher_results = null var/hellbound = 0 //People who've signed infernal contracts are unrevivable. - + + var/list/weather_immunities = list() + diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/dragon.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/dragon.dm index 2d1206f0d7b..1b84f433d99 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/dragon.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/dragon.dm @@ -11,6 +11,7 @@ friendly = "stares down" icon = 'icons/mob/lavaland/dragon.dmi' faction = list("mining") + weather_immunities = list("lava","ash") speak_emote = list("roars") luminosity = 3 armour_penetration = 40 diff --git a/code/modules/mob/living/simple_animal/hostile/mining_mobs.dm b/code/modules/mob/living/simple_animal/hostile/mining_mobs.dm index 130ec9d0ff2..f6c43c56c3f 100644 --- a/code/modules/mob/living/simple_animal/hostile/mining_mobs.dm +++ b/code/modules/mob/living/simple_animal/hostile/mining_mobs.dm @@ -2,6 +2,7 @@ vision_range = 2 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) faction = list("mining") + weather_immunities = list("lava","ash") environment_smash = 2 minbodytemp = 0 maxbodytemp = INFINITY @@ -881,6 +882,7 @@ speak_emote = list("warbles", "quavers") emote_hear = list("trills.") emote_see = list("sniffs.", "burps.") + weather_immunities = list("lava","ash") faction = list("mining", "ashwalker") density = 0 speak_chance = 1 @@ -994,6 +996,7 @@ icon_living = "tendril" icon_dead = "tendril" faction = list("mining") + weather_immunities = list("lava","ash") health = 250 maxHealth = 250 max_mobs = 3 diff --git a/code/modules/mob/living/simple_animal/spawner.dm b/code/modules/mob/living/simple_animal/spawner.dm index 2c2eb731b63..204d2b400f7 100644 --- a/code/modules/mob/living/simple_animal/spawner.dm +++ b/code/modules/mob/living/simple_animal/spawner.dm @@ -19,6 +19,7 @@ minbodytemp = 0 maxbodytemp = 350 layer = MOB_LAYER-0.1 + sentience_type = SENTIENCE_BOSS /mob/living/simple_animal/hostile/spawner/Destroy()