mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
[MIRROR] [MIRROR] Optimizes SSplanets initialization (#1788)
* Merge pull request #10119 from VOREStation/upstream-merge-8015 [MIRROR] Optimizes SSplanets initialization * [MIRROR] Optimizes SSplanets initialization Co-authored-by: Novacat <35587478+Novacat@users.noreply.github.com>
This commit is contained in:
@@ -216,15 +216,17 @@ var/datum/planet/sif/planet_sif = null
|
||||
outdoor_sounds_type = /datum/looping_sound/weather/outside_snow
|
||||
indoor_sounds_type = /datum/looping_sound/weather/inside_snow
|
||||
|
||||
/*
|
||||
/datum/weather/sif/snow/process_effects()
|
||||
..()
|
||||
for(var/turf/simulated/floor/outdoors/snow/S in SSplanets.new_outdoor_turfs) //This didn't make any sense before SSplanets, either
|
||||
for(var/turf/simulated/floor/outdoors/snow/S as anything in SSplanets.new_outdoor_turfs) //This didn't make any sense before SSplanets, either
|
||||
if(S.z in holder.our_planet.expected_z_levels)
|
||||
for(var/dir_checked in cardinal)
|
||||
var/turf/simulated/floor/T = get_step(S, dir_checked)
|
||||
if(istype(T))
|
||||
if(istype(T, /turf/simulated/floor/outdoors) && prob(33))
|
||||
T.chill()
|
||||
*/
|
||||
|
||||
/datum/weather/sif/blizzard
|
||||
name = "blizzard"
|
||||
@@ -249,15 +251,17 @@ var/datum/planet/sif/planet_sif = null
|
||||
outdoor_sounds_type = /datum/looping_sound/weather/outside_blizzard
|
||||
indoor_sounds_type = /datum/looping_sound/weather/inside_blizzard
|
||||
|
||||
/*
|
||||
/datum/weather/sif/blizzard/process_effects()
|
||||
..()
|
||||
for(var/turf/simulated/floor/outdoors/snow/S in SSplanets.new_outdoor_turfs) //This didn't make any sense before SSplanets, either
|
||||
for(var/turf/simulated/floor/outdoors/snow/S as anything in SSplanets.new_outdoor_turfs) //This didn't make any sense before SSplanets, either
|
||||
if(S.z in holder.our_planet.expected_z_levels)
|
||||
for(var/dir_checked in cardinal)
|
||||
var/turf/simulated/floor/T = get_step(S, dir_checked)
|
||||
if(istype(T))
|
||||
if(istype(T, /turf/simulated/floor/outdoors) && prob(50))
|
||||
T.chill()
|
||||
*/
|
||||
|
||||
/datum/weather/sif/rain
|
||||
name = "rain"
|
||||
@@ -283,25 +287,21 @@ var/datum/planet/sif/planet_sif = null
|
||||
|
||||
/datum/weather/sif/rain/process_effects()
|
||||
..()
|
||||
for(var/mob/living/L in living_mob_list)
|
||||
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)
|
||||
continue // They're indoors, so no need to rain on them.
|
||||
|
||||
// If they have an open umbrella, it'll guard from rain
|
||||
if(istype(L.get_active_hand(), /obj/item/weapon/melee/umbrella))
|
||||
var/obj/item/weapon/melee/umbrella/U = L.get_active_hand()
|
||||
if(U.open)
|
||||
if(show_message)
|
||||
to_chat(L, "<span class='notice'>Rain patters softly onto your umbrella.</span>")
|
||||
continue
|
||||
else if(istype(L.get_inactive_hand(), /obj/item/weapon/melee/umbrella))
|
||||
var/obj/item/weapon/melee/umbrella/U = L.get_inactive_hand()
|
||||
if(U.open)
|
||||
if(show_message)
|
||||
to_chat(L, "<span class='notice'>Rain patters softly onto your umbrella.</span>")
|
||||
continue
|
||||
var/obj/item/weapon/melee/umbrella/U = L.get_active_hand()
|
||||
if(!istype(U) || !U.open)
|
||||
U = L.get_inactive_hand()
|
||||
|
||||
if(istype(U) && U.open)
|
||||
if(show_message)
|
||||
to_chat(L, "<span class='notice'>Rain patters softly onto your umbrella.</span>")
|
||||
continue
|
||||
|
||||
L.water_act(1)
|
||||
if(show_message)
|
||||
@@ -340,24 +340,21 @@ var/datum/planet/sif/planet_sif = null
|
||||
|
||||
/datum/weather/sif/storm/process_effects()
|
||||
..()
|
||||
for(var/mob/living/L in living_mob_list)
|
||||
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)
|
||||
continue // They're indoors, so no need to rain on them.
|
||||
|
||||
// If they have an open umbrella, it'll guard from rain
|
||||
if(istype(L.get_active_hand(), /obj/item/weapon/melee/umbrella))
|
||||
var/obj/item/weapon/melee/umbrella/U = L.get_active_hand()
|
||||
if(U.open)
|
||||
if(show_message)
|
||||
to_chat(L, "<span class='notice'>Rain showers loudly onto your umbrella!</span>")
|
||||
continue
|
||||
else if(istype(L.get_inactive_hand(), /obj/item/weapon/melee/umbrella))
|
||||
var/obj/item/weapon/melee/umbrella/U = L.get_inactive_hand()
|
||||
if(U.open)
|
||||
if(show_message)
|
||||
to_chat(L, "<span class='notice'>Rain showers loudly onto your umbrella!</span>")
|
||||
continue
|
||||
var/obj/item/weapon/melee/umbrella/U = L.get_active_hand()
|
||||
if(!istype(U) || !U.open)
|
||||
U = L.get_inactive_hand()
|
||||
|
||||
if(istype(U) && U.open)
|
||||
if(show_message)
|
||||
to_chat(L, "<span class='notice'>Rain showers loudly onto your umbrella!</span>")
|
||||
continue
|
||||
|
||||
|
||||
L.water_act(2)
|
||||
@@ -401,20 +398,18 @@ var/datum/planet/sif/planet_sif = null
|
||||
|
||||
/datum/weather/sif/hail/process_effects()
|
||||
..()
|
||||
for(var/humie in human_mob_list)
|
||||
var/mob/living/carbon/human/H = humie
|
||||
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)
|
||||
continue // They're indoors, so no need to pelt them with ice.
|
||||
|
||||
// If they have an open umbrella, it'll guard from hail
|
||||
var/obj/item/weapon/melee/umbrella/U
|
||||
if(istype(H.get_active_hand(), /obj/item/weapon/melee/umbrella))
|
||||
U = H.get_active_hand()
|
||||
else if(istype(H.get_inactive_hand(), /obj/item/weapon/melee/umbrella))
|
||||
var/obj/item/weapon/melee/umbrella/U = H.get_active_hand()
|
||||
if(!istype(U) || !U.open)
|
||||
U = H.get_inactive_hand()
|
||||
if(U && U.open)
|
||||
|
||||
if(istype(U) && U.open)
|
||||
if(show_message)
|
||||
to_chat(H, "<span class='notice'>Hail patters onto your umbrella.</span>")
|
||||
continue
|
||||
|
||||
@@ -156,15 +156,17 @@ var/datum/planet/virgo3b_better/planet_virgo3b_better = null
|
||||
outdoor_sounds_type = /datum/looping_sound/weather/outside_snow
|
||||
indoor_sounds_type = /datum/looping_sound/weather/inside_snow
|
||||
|
||||
/*
|
||||
/datum/weather/virgo3b_better/snow/process_effects()
|
||||
..()
|
||||
for(var/turf/simulated/floor/outdoors/snow/S in SSplanets.new_outdoor_turfs) //This didn't make any sense before SSplanets, either
|
||||
for(var/turf/simulated/floor/outdoors/snow/S as anything in SSplanets.new_outdoor_turfs) //This didn't make any sense before SSplanets, either
|
||||
if(S.z in holder.our_planet.expected_z_levels)
|
||||
for(var/dir_checked in cardinal)
|
||||
var/turf/simulated/floor/T = get_step(S, dir_checked)
|
||||
if(istype(T))
|
||||
if(istype(T, /turf/simulated/floor/outdoors) && prob(33))
|
||||
T.chill()
|
||||
*/
|
||||
|
||||
/datum/weather/virgo3b_better/blizzard
|
||||
name = "blizzard"
|
||||
@@ -189,15 +191,17 @@ var/datum/planet/virgo3b_better/planet_virgo3b_better = null
|
||||
outdoor_sounds_type = /datum/looping_sound/weather/outside_blizzard
|
||||
indoor_sounds_type = /datum/looping_sound/weather/inside_blizzard
|
||||
|
||||
/*
|
||||
/datum/weather/virgo3b_better/blizzard/process_effects()
|
||||
..()
|
||||
for(var/turf/simulated/floor/outdoors/snow/S in SSplanets.new_outdoor_turfs) //This didn't make any sense before SSplanets, either
|
||||
for(var/turf/simulated/floor/outdoors/snow/S as anything in SSplanets.new_outdoor_turfs) //This didn't make any sense before SSplanets, either
|
||||
if(S.z in holder.our_planet.expected_z_levels)
|
||||
for(var/dir_checked in cardinal)
|
||||
var/turf/simulated/floor/T = get_step(S, dir_checked)
|
||||
if(istype(T))
|
||||
if(istype(T, /turf/simulated/floor/outdoors) && prob(50))
|
||||
T.chill()
|
||||
*/
|
||||
|
||||
/datum/weather/virgo3b_better/rain
|
||||
name = "rain"
|
||||
@@ -220,25 +224,21 @@ var/datum/planet/virgo3b_better/planet_virgo3b_better = null
|
||||
|
||||
/datum/weather/virgo3b_better/rain/process_effects()
|
||||
..()
|
||||
for(var/mob/living/L in living_mob_list)
|
||||
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)
|
||||
continue // They're indoors, so no need to rain on them.
|
||||
|
||||
// If they have an open umbrella, it'll guard from rain
|
||||
if(istype(L.get_active_hand(), /obj/item/weapon/melee/umbrella))
|
||||
var/obj/item/weapon/melee/umbrella/U = L.get_active_hand()
|
||||
if(U.open)
|
||||
if(show_message)
|
||||
to_chat(L, "<span class='notice'>Rain patters softly onto your umbrella.</span>")
|
||||
continue
|
||||
else if(istype(L.get_inactive_hand(), /obj/item/weapon/melee/umbrella))
|
||||
var/obj/item/weapon/melee/umbrella/U = L.get_inactive_hand()
|
||||
if(U.open)
|
||||
if(show_message)
|
||||
to_chat(L, "<span class='notice'>Rain patters softly onto your umbrella.</span>")
|
||||
continue
|
||||
var/obj/item/weapon/melee/umbrella/U = L.get_active_hand()
|
||||
if(!istype(U) || !U.open)
|
||||
U = L.get_inactive_hand()
|
||||
|
||||
if(istype(U) && U.open)
|
||||
if(show_message)
|
||||
to_chat(L, "<span class='notice'>Rain patters softly onto your umbrella.</span>")
|
||||
continue
|
||||
|
||||
L.water_act(1)
|
||||
if(show_message)
|
||||
@@ -275,25 +275,21 @@ var/datum/planet/virgo3b_better/planet_virgo3b_better = null
|
||||
|
||||
/datum/weather/virgo3b_better/storm/process_effects()
|
||||
..()
|
||||
for(var/mob/living/L in living_mob_list)
|
||||
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)
|
||||
continue // They're indoors, so no need to rain on them.
|
||||
|
||||
// If they have an open umbrella, it'll guard from rain
|
||||
if(istype(L.get_active_hand(), /obj/item/weapon/melee/umbrella))
|
||||
var/obj/item/weapon/melee/umbrella/U = L.get_active_hand()
|
||||
if(U.open)
|
||||
if(show_message)
|
||||
to_chat(L, "<span class='notice'>Rain showers loudly onto your umbrella!</span>")
|
||||
continue
|
||||
else if(istype(L.get_inactive_hand(), /obj/item/weapon/melee/umbrella))
|
||||
var/obj/item/weapon/melee/umbrella/U = L.get_inactive_hand()
|
||||
if(U.open)
|
||||
if(show_message)
|
||||
to_chat(L, "<span class='notice'>Rain showers loudly onto your umbrella!</span>")
|
||||
continue
|
||||
var/obj/item/weapon/melee/umbrella/U = L.get_active_hand()
|
||||
if(!istype(U) || !U.open)
|
||||
U = L.get_inactive_hand()
|
||||
|
||||
if(istype(U) && U.open)
|
||||
if(show_message)
|
||||
to_chat(L, "<span class='notice'>Rain showers loudly onto your umbrella!</span>")
|
||||
continue
|
||||
|
||||
|
||||
L.water_act(2)
|
||||
@@ -335,20 +331,18 @@ var/datum/planet/virgo3b_better/planet_virgo3b_better = null
|
||||
|
||||
/datum/weather/virgo3b_better/hail/process_effects()
|
||||
..()
|
||||
for(var/humie in human_mob_list)
|
||||
var/mob/living/carbon/human/H = humie
|
||||
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)
|
||||
continue // They're indoors, so no need to pelt them with ice.
|
||||
|
||||
// If they have an open umbrella, it'll guard from hail
|
||||
var/obj/item/weapon/melee/umbrella/U
|
||||
if(istype(H.get_active_hand(), /obj/item/weapon/melee/umbrella))
|
||||
U = H.get_active_hand()
|
||||
else if(istype(H.get_inactive_hand(), /obj/item/weapon/melee/umbrella))
|
||||
var/obj/item/weapon/melee/umbrella/U = H.get_active_hand()
|
||||
if(!istype(U) || !U.open)
|
||||
U = H.get_inactive_hand()
|
||||
if(U && U.open)
|
||||
|
||||
if(istype(U) && U.open)
|
||||
if(show_message)
|
||||
to_chat(H, "<span class='notice'>Hail patters onto your umbrella.</span>")
|
||||
continue
|
||||
|
||||
@@ -203,15 +203,17 @@ var/datum/planet/virgo3b/planet_virgo3b = null
|
||||
outdoor_sounds_type = /datum/looping_sound/weather/outside_snow
|
||||
indoor_sounds_type = /datum/looping_sound/weather/inside_snow
|
||||
|
||||
/*
|
||||
/datum/weather/virgo3b/snow/process_effects()
|
||||
..()
|
||||
for(var/turf/simulated/floor/outdoors/snow/S in SSplanets.new_outdoor_turfs) //This didn't make any sense before SSplanets, either
|
||||
for(var/turf/simulated/floor/outdoors/snow/S as anything in SSplanets.new_outdoor_turfs) //This didn't make any sense before SSplanets, either
|
||||
if(S.z in holder.our_planet.expected_z_levels)
|
||||
for(var/dir_checked in cardinal)
|
||||
var/turf/simulated/floor/T = get_step(S, dir_checked)
|
||||
if(istype(T))
|
||||
if(istype(T, /turf/simulated/floor/outdoors) && prob(33))
|
||||
T.chill()
|
||||
*/
|
||||
|
||||
/datum/weather/virgo3b/blizzard
|
||||
name = "blizzard"
|
||||
@@ -236,15 +238,17 @@ var/datum/planet/virgo3b/planet_virgo3b = null
|
||||
outdoor_sounds_type = /datum/looping_sound/weather/outside_blizzard
|
||||
indoor_sounds_type = /datum/looping_sound/weather/inside_blizzard
|
||||
|
||||
/*
|
||||
/datum/weather/virgo3b/blizzard/process_effects()
|
||||
..()
|
||||
for(var/turf/simulated/floor/outdoors/snow/S in SSplanets.new_outdoor_turfs) //This didn't make any sense before SSplanets, either
|
||||
for(var/turf/simulated/floor/outdoors/snow/S as anything in SSplanets.new_outdoor_turfs) //This didn't make any sense before SSplanets, either
|
||||
if(S.z in holder.our_planet.expected_z_levels)
|
||||
for(var/dir_checked in cardinal)
|
||||
var/turf/simulated/floor/T = get_step(S, dir_checked)
|
||||
if(istype(T))
|
||||
if(istype(T, /turf/simulated/floor/outdoors) && prob(50))
|
||||
T.chill()
|
||||
*/
|
||||
|
||||
/datum/weather/virgo3b/rain
|
||||
name = "rain"
|
||||
@@ -270,25 +274,21 @@ var/datum/planet/virgo3b/planet_virgo3b = null
|
||||
|
||||
/datum/weather/virgo3b/rain/process_effects()
|
||||
..()
|
||||
for(var/mob/living/L in living_mob_list)
|
||||
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)
|
||||
continue // They're indoors, so no need to rain on them.
|
||||
|
||||
// If they have an open umbrella, it'll guard from rain
|
||||
if(istype(L.get_active_hand(), /obj/item/weapon/melee/umbrella))
|
||||
var/obj/item/weapon/melee/umbrella/U = L.get_active_hand()
|
||||
if(U.open)
|
||||
if(show_message)
|
||||
to_chat(L, "<span class='notice'>Rain patters softly onto your umbrella.</span>")
|
||||
continue
|
||||
else if(istype(L.get_inactive_hand(), /obj/item/weapon/melee/umbrella))
|
||||
var/obj/item/weapon/melee/umbrella/U = L.get_inactive_hand()
|
||||
if(U.open)
|
||||
if(show_message)
|
||||
to_chat(L, "<span class='notice'>Rain patters softly onto your umbrella.</span>")
|
||||
continue
|
||||
var/obj/item/weapon/melee/umbrella/U = L.get_active_hand()
|
||||
if(!istype(U) || !U.open)
|
||||
U = L.get_inactive_hand()
|
||||
|
||||
if(istype(U) && U.open)
|
||||
if(show_message)
|
||||
to_chat(L, "<span class='notice'>Rain patters softly onto your umbrella.</span>")
|
||||
continue
|
||||
|
||||
L.water_act(1)
|
||||
if(show_message)
|
||||
@@ -325,25 +325,21 @@ var/datum/planet/virgo3b/planet_virgo3b = null
|
||||
|
||||
/datum/weather/virgo3b/storm/process_effects()
|
||||
..()
|
||||
for(var/mob/living/L in living_mob_list)
|
||||
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)
|
||||
continue // They're indoors, so no need to rain on them.
|
||||
|
||||
// If they have an open umbrella, it'll guard from rain
|
||||
if(istype(L.get_active_hand(), /obj/item/weapon/melee/umbrella))
|
||||
var/obj/item/weapon/melee/umbrella/U = L.get_active_hand()
|
||||
if(U.open)
|
||||
if(show_message)
|
||||
to_chat(L, "<span class='notice'>Rain showers loudly onto your umbrella!</span>")
|
||||
continue
|
||||
else if(istype(L.get_inactive_hand(), /obj/item/weapon/melee/umbrella))
|
||||
var/obj/item/weapon/melee/umbrella/U = L.get_inactive_hand()
|
||||
if(U.open)
|
||||
if(show_message)
|
||||
to_chat(L, "<span class='notice'>Rain showers loudly onto your umbrella!</span>")
|
||||
continue
|
||||
var/obj/item/weapon/melee/umbrella/U = L.get_active_hand()
|
||||
if(!istype(U) || !U.open)
|
||||
U = L.get_inactive_hand()
|
||||
|
||||
if(istype(U) && U.open)
|
||||
if(show_message)
|
||||
to_chat(L, "<span class='notice'>Rain patters softly onto your umbrella.</span>")
|
||||
continue
|
||||
|
||||
|
||||
L.water_act(2)
|
||||
@@ -385,20 +381,18 @@ var/datum/planet/virgo3b/planet_virgo3b = null
|
||||
|
||||
/datum/weather/virgo3b/hail/process_effects()
|
||||
..()
|
||||
for(var/humie in human_mob_list)
|
||||
var/mob/living/carbon/human/H = humie
|
||||
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)
|
||||
continue // They're indoors, so no need to pelt them with ice.
|
||||
|
||||
// If they have an open umbrella, it'll guard from hail
|
||||
var/obj/item/weapon/melee/umbrella/U
|
||||
if(istype(H.get_active_hand(), /obj/item/weapon/melee/umbrella))
|
||||
U = H.get_active_hand()
|
||||
else if(istype(H.get_inactive_hand(), /obj/item/weapon/melee/umbrella))
|
||||
var/obj/item/weapon/melee/umbrella/U = H.get_active_hand()
|
||||
if(!istype(U) || !U.open)
|
||||
U = H.get_inactive_hand()
|
||||
if(U && U.open)
|
||||
|
||||
if(istype(U) && U.open)
|
||||
if(show_message)
|
||||
to_chat(H, "<span class='notice'>Hail patters onto your umbrella.</span>")
|
||||
continue
|
||||
|
||||
@@ -187,15 +187,17 @@ var/datum/planet/virgo4/planet_virgo4 = null
|
||||
outdoor_sounds_type = /datum/looping_sound/weather/outside_snow
|
||||
indoor_sounds_type = /datum/looping_sound/weather/inside_snow
|
||||
|
||||
/*
|
||||
/datum/weather/virgo4/snow/process_effects()
|
||||
..()
|
||||
for(var/turf/simulated/floor/outdoors/snow/S in SSplanets.new_outdoor_turfs) //This didn't make any sense before SSplanets, either
|
||||
for(var/turf/simulated/floor/outdoors/snow/S as anything in SSplanets.new_outdoor_turfs) //This didn't make any sense before SSplanets, either
|
||||
if(S.z in holder.our_planet.expected_z_levels)
|
||||
for(var/dir_checked in cardinal)
|
||||
var/turf/simulated/floor/T = get_step(S, dir_checked)
|
||||
if(istype(T))
|
||||
if(istype(T, /turf/simulated/floor/outdoors) && prob(33))
|
||||
T.chill()
|
||||
*/
|
||||
|
||||
/datum/weather/virgo4/blizzard
|
||||
name = "blizzard"
|
||||
@@ -217,15 +219,17 @@ var/datum/planet/virgo4/planet_virgo4 = null
|
||||
outdoor_sounds_type = /datum/looping_sound/weather/outside_blizzard
|
||||
indoor_sounds_type = /datum/looping_sound/weather/inside_blizzard
|
||||
|
||||
/*
|
||||
/datum/weather/virgo4/blizzard/process_effects()
|
||||
..()
|
||||
for(var/turf/simulated/floor/outdoors/snow/S in SSplanets.new_outdoor_turfs) //This didn't make any sense before SSplanets, either
|
||||
for(var/turf/simulated/floor/outdoors/snow/S as anything in SSplanets.new_outdoor_turfs) //This didn't make any sense before SSplanets, either
|
||||
if(S.z in holder.our_planet.expected_z_levels)
|
||||
for(var/dir_checked in cardinal)
|
||||
var/turf/simulated/floor/T = get_step(S, dir_checked)
|
||||
if(istype(T))
|
||||
if(istype(T, /turf/simulated/floor/outdoors) && prob(50))
|
||||
T.chill()
|
||||
*/
|
||||
|
||||
/datum/weather/virgo4/rain
|
||||
name = "rain"
|
||||
@@ -248,25 +252,21 @@ var/datum/planet/virgo4/planet_virgo4 = null
|
||||
|
||||
/datum/weather/virgo4/rain/process_effects()
|
||||
..()
|
||||
for(var/mob/living/L in living_mob_list)
|
||||
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)
|
||||
continue // They're indoors, so no need to rain on them.
|
||||
|
||||
// If they have an open umbrella, it'll guard from rain
|
||||
if(istype(L.get_active_hand(), /obj/item/weapon/melee/umbrella))
|
||||
var/obj/item/weapon/melee/umbrella/U = L.get_active_hand()
|
||||
if(U.open)
|
||||
if(show_message)
|
||||
to_chat(L, "<span class='notice'>Rain patters softly onto your umbrella.</span>")
|
||||
continue
|
||||
else if(istype(L.get_inactive_hand(), /obj/item/weapon/melee/umbrella))
|
||||
var/obj/item/weapon/melee/umbrella/U = L.get_inactive_hand()
|
||||
if(U.open)
|
||||
if(show_message)
|
||||
to_chat(L, "<span class='notice'>Rain patters softly onto your umbrella.</span>")
|
||||
continue
|
||||
var/obj/item/weapon/melee/umbrella/U = L.get_active_hand()
|
||||
if(!istype(U) || !U.open)
|
||||
U = L.get_inactive_hand()
|
||||
|
||||
if(istype(U) && U.open)
|
||||
if(show_message)
|
||||
to_chat(L, "<span class='notice'>Rain patters softly onto your umbrella.</span>")
|
||||
continue
|
||||
|
||||
L.water_act(1)
|
||||
if(show_message)
|
||||
@@ -298,25 +298,21 @@ var/datum/planet/virgo4/planet_virgo4 = null
|
||||
|
||||
/datum/weather/virgo4/storm/process_effects()
|
||||
..()
|
||||
for(var/mob/living/L in living_mob_list)
|
||||
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)
|
||||
continue // They're indoors, so no need to rain on them.
|
||||
|
||||
// If they have an open umbrella, it'll guard from rain
|
||||
if(istype(L.get_active_hand(), /obj/item/weapon/melee/umbrella))
|
||||
var/obj/item/weapon/melee/umbrella/U = L.get_active_hand()
|
||||
if(U.open)
|
||||
if(show_message)
|
||||
to_chat(L, "<span class='notice'>Rain showers loudly onto your umbrella!</span>")
|
||||
continue
|
||||
else if(istype(L.get_inactive_hand(), /obj/item/weapon/melee/umbrella))
|
||||
var/obj/item/weapon/melee/umbrella/U = L.get_inactive_hand()
|
||||
if(U.open)
|
||||
if(show_message)
|
||||
to_chat(L, "<span class='notice'>Rain showers loudly onto your umbrella!</span>")
|
||||
continue
|
||||
var/obj/item/weapon/melee/umbrella/U = L.get_active_hand()
|
||||
if(!istype(U) || !U.open)
|
||||
U = L.get_inactive_hand()
|
||||
|
||||
if(istype(U) && U.open)
|
||||
if(show_message)
|
||||
to_chat(L, "<span class='notice'>Rain showers loudly onto your umbrella!</span>")
|
||||
continue
|
||||
|
||||
|
||||
L.water_act(2)
|
||||
@@ -355,20 +351,18 @@ var/datum/planet/virgo4/planet_virgo4 = null
|
||||
|
||||
/datum/weather/virgo4/hail/process_effects()
|
||||
..()
|
||||
for(var/humie in human_mob_list)
|
||||
var/mob/living/carbon/human/H = humie
|
||||
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)
|
||||
continue // They're indoors, so no need to pelt them with ice.
|
||||
|
||||
// If they have an open umbrella, it'll guard from hail
|
||||
var/obj/item/weapon/melee/umbrella/U
|
||||
if(istype(H.get_active_hand(), /obj/item/weapon/melee/umbrella))
|
||||
U = H.get_active_hand()
|
||||
else if(istype(H.get_inactive_hand(), /obj/item/weapon/melee/umbrella))
|
||||
var/obj/item/weapon/melee/umbrella/U = H.get_active_hand()
|
||||
if(!istype(U) || !U.open)
|
||||
U = H.get_inactive_hand()
|
||||
if(U && U.open)
|
||||
|
||||
if(istype(U) && U.open)
|
||||
if(show_message)
|
||||
to_chat(H, "<span class='notice'>Hail patters onto your umbrella.</span>")
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user