Fixes Indoor Rain

This commit is contained in:
Neerti
2021-07-12 14:19:59 -04:00
parent 9932e13f6d
commit 6b4ee972dd
11 changed files with 32 additions and 27 deletions

View File

@@ -40,13 +40,13 @@
for(var/obj/machinery/power/thing in range(LIGHTNING_REDIRECT_RANGE, T))
if(istype(thing, /obj/machinery/power/tesla_coil))
var/turf/simulated/coil_turf = get_turf(thing)
if(istype(coil_turf) && thing.anchored && coil_turf.outdoors == OUTDOORS_YES)
if(istype(coil_turf) && thing.anchored && coil_turf.is_outdoors())
coil = thing
break
if(istype(thing, /obj/machinery/power/grounding_rod))
var/turf/simulated/rod_turf = get_turf(thing)
if(istype(rod_turf) && thing.anchored && rod_turf.outdoors == OUTDOORS_YES)
if(istype(rod_turf) && thing.anchored && rod_turf.is_outdoors())
ground = thing
if(coil) // Coil gets highest priority.

View File

@@ -12,7 +12,7 @@
to_chat(usr, span("warning", "You appear to be in a place without any sort of concept of direction. You have bigger problems to worry about."))
return
if(T.outdoors == OUTDOORS_NO) // They're inside.
if(!T.is_outdoors()) // They're inside.
to_chat(usr, "You see nothing interesting.")
return

View File

@@ -43,7 +43,7 @@ var/global/list/total_extraction_beacons = list()
return
if(!can_use_indoors)
var/turf/T = get_turf(A)
if(T && T.outdoors == OUTDOORS_NO)
if(T && !T.is_outdoors())
to_chat(user, "[src] can only be used on things that are outdoors!")
return
if(!flag)
@@ -146,7 +146,7 @@ var/global/list/total_extraction_beacons = list()
/obj/item/fulton_core/attack_self(mob/user)
var/turf/T = get_turf(user)
var/outdoors = T.outdoors == OUTDOORS_YES
var/outdoors = T.is_outdoors()
if(do_after(user,15,target = user) && !QDELETED(src) && outdoors)
new /obj/structure/extraction_point(get_turf(user))
qdel(src)

View File

@@ -146,7 +146,7 @@
. += turf_move_cost
// Wind makes it easier or harder to move, depending on if you're with or against the wind.
if((T.outdoors == OUTDOORS_YES) && (T.z <= SSplanets.z_to_planet.len))
if((T.is_outdoors()) && (T.z <= SSplanets.z_to_planet.len))
var/datum/planet/P = SSplanets.z_to_planet[z]
if(P)
var/datum/weather_holder/WH = P.weather_holder

View File

@@ -299,7 +299,7 @@ var/datum/planet/sif/planet_sif = null
for(var/mob/living/L as anything in living_mob_list)
if(L.z in holder.our_planet.expected_z_levels)
var/turf/T = get_turf(L)
if(T.outdoors == OUTDOORS_NO)
if(!T.is_outdoors())
continue // They're indoors, so no need to rain on them.
// If they have an open umbrella, it'll guard from rain
@@ -352,7 +352,7 @@ var/datum/planet/sif/planet_sif = null
for(var/mob/living/L as anything in living_mob_list)
if(L.z in holder.our_planet.expected_z_levels)
var/turf/T = get_turf(L)
if(T.outdoors == OUTDOORS_NO)
if(!T.is_outdoors())
continue // They're indoors, so no need to rain on them.
// If they have an open umbrella, it'll guard from rain
@@ -410,7 +410,7 @@ var/datum/planet/sif/planet_sif = null
for(var/mob/living/carbon/H as anything in human_mob_list)
if(H.z in holder.our_planet.expected_z_levels)
var/turf/T = get_turf(H)
if(T.outdoors == OUTDOORS_NO)
if(!T.is_outdoors())
continue // They're indoors, so no need to pelt them with ice.
// If they have an open umbrella, it'll guard from hail
@@ -506,7 +506,7 @@ var/datum/planet/sif/planet_sif = null
var/mob/living/L = thing
if(L.z in holder.our_planet.expected_z_levels)
var/turf/T = get_turf(L)
if(T.outdoors == OUTDOORS_NO)
if(!T.is_outdoors())
continue // They're indoors, so no need to burn them with ash.
L.inflict_heat_damage(rand(1, 3))
@@ -544,7 +544,7 @@ var/datum/planet/sif/planet_sif = null
if(L.z in holder.our_planet.expected_z_levels)
irradiate_nearby_turf(L)
var/turf/T = get_turf(L)
if(T.outdoors == OUTDOORS_NO)
if(!T.is_outdoors())
continue // They're indoors, so no need to irradiate them with fallout.
L.rad_act(rand(direct_rad_low, direct_rad_high))
@@ -558,5 +558,5 @@ var/datum/planet/sif/planet_sif = null
var/turf/T = pick(turfs) // We get one try per tick.
if(!istype(T))
return
if(T.outdoors == OUTDOORS_YES)
if(T.is_outdoors())
SSradiation.radiate(T, rand(fallout_rad_low, fallout_rad_high))

View File

@@ -123,7 +123,7 @@
for(var/mob/M in player_list) // Don't need to care about clientless mobs.
if(M.z in our_planet.expected_z_levels)
var/turf/T = get_turf(M)
if(T.outdoors == OUTDOORS_NO)
if(!T.is_outdoors())
continue
to_chat(M, message)
@@ -200,7 +200,7 @@
// Otherwise they should hear some sounds, depending on if they're inside or not.
var/turf/T = get_turf(M)
if(istype(T))
if(T.outdoors == OUTDOORS_YES) // Mob is currently outdoors.
if(T.is_outdoors()) // Mob is currently outdoors.
hear_outdoor_sounds(M, TRUE)
hear_indoor_sounds(M, FALSE)