Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.

Commit ebbd385

Browse files
guh (#22479)
1 parent 0d9bd3c commit ebbd385

File tree

6 files changed

+13
-8
lines changed

6 files changed

+13
-8
lines changed

code/datums/weather/weather.dm

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -194,22 +194,27 @@
194194
var/turf/mob_turf = get_turf(mob_to_check)
195195

196196
if(!mob_turf)
197-
return
197+
return FALSE
198198

199199
if(!(mob_turf.z in impacted_z_levels))
200-
return
200+
return FALSE
201201

202202
if(istype(mob_to_check.loc, /obj/structure/closet))
203203
var/obj/structure/closet/current_locker = mob_to_check.loc
204204
if(current_locker.weather_protection)
205205
if(current_locker.weather_protection & immunity_type)
206206
return
207+
208+
if(ismecha(mob_to_check.loc))
209+
var/obj/mecha/mecha_to_check = mob_to_check.loc
210+
if(mecha_to_check.weather_protection & immunity_type)
211+
return FALSE
207212

208213
if(mob_to_check.weather_immunities & immunity_type)
209-
return
214+
return FALSE
210215

211216
if(!(get_area(mob_to_check) in impacted_areas))
212-
return
217+
return FALSE
213218

214219
return TRUE
215220

code/datums/weather/weather_types/acid_rain.dm

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,6 @@
6565

6666
/datum/weather/acid_rain/proc/is_acid_immune(atom/L)
6767
while (L && !isturf(L))
68-
if(ismecha(L)) //Mechs are immune
69-
return TRUE
7068
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
7169
var/mob/living/the_mob = L
7270
var/acid_armour = the_mob.getarmor(null, ACID)

code/datums/weather/weather_types/ash_storm.dm

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,6 @@
7777

7878
/datum/weather/ash_storm/proc/is_ash_immune(atom/L)
7979
while (L && !isturf(L))
80-
if(ismecha(L)) //Mechs are immune
81-
return TRUE
8280
if(ishuman(L)) //Are you immune?
8381
var/mob/living/carbon/human/H = L
8482
var/thermal_protection = H.get_thermal_protection()

code/game/mecha/mecha.dm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
light_on = FALSE
2929
flags_1 = HEAR_1
3030
demolition_mod = 3 // mech punch go brr
31+
var/weather_protection = WEATHER_STORM
3132
var/ruin_mecha = FALSE //if the mecha starts on a ruin, don't automatically give it a tracking beacon to prevent metagaming.
3233
var/can_move = 0 //time of next allowed movement
3334
var/mob/living/carbon/occupant = null

code/game/mecha/working/clarke.dm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
fast_pressure_step_in = 1.5
1111
slow_pressure_step_in = 2
1212
resistance_flags = LAVA_PROOF | FIRE_PROOF | ACID_PROOF
13+
weather_protection = WEATHER_LAVA|WEATHER_STORM
1314
light_power = 7
1415
deflect_chance = 10
1516
flags_1 = HEAR_1 | RAD_PROTECT_CONTENTS_1 | RAD_NO_CONTAMINATE_1

code/game/mecha/working/ripley.dm

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
var/list/cargo = new
1515
var/cargo_capacity = 15
1616
var/hides = 0
17+
weather_protection = NONE
1718
enclosed = FALSE //Normal ripley has an open cockpit design
1819
enter_delay = 10 //can enter in a quarter of the time of other mechs
1920
exit_delay = 10
@@ -72,6 +73,7 @@
7273
slow_pressure_step_in = 3 //step_in while in normal pressure conditions
7374
step_in = 3
7475
resistance_flags = LAVA_PROOF | FIRE_PROOF | ACID_PROOF
76+
weather_protection = WEATHER_LAVA|WEATHER_STORM
7577
flags_1 = HEAR_1 | RAD_PROTECT_CONTENTS_1 | RAD_NO_CONTAMINATE_1
7678
armor = list(MELEE = 40, BULLET = 30, LASER = 30, ENERGY = 0, BOMB = 60, BIO = 100, RAD = 100, FIRE = 100, ACID = 100)
7779
enclosed = TRUE

0 commit comments

Comments
 (0)