mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 02:34:00 +00:00
[MIRROR] Reworks weather effects to no longer hurt phased entities (#10595)
Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
6b699a2b5b
commit
5069c8c6a6
6
code/__defines/weather.dm
Normal file
6
code/__defines/weather.dm
Normal file
@@ -0,0 +1,6 @@
|
||||
#define HAS_PLANET_EFFECT 0x1
|
||||
#define EFFECT_ALL_MOBS 0x2
|
||||
#define EFFECT_ONLY_HUMANS 0x4
|
||||
#define EFFECT_ONLY_LIVING 0x8
|
||||
#define EFFECT_ONLY_ROBOTS 0x10
|
||||
#define EFFECT_ALWAYS_HITS 0x20
|
||||
@@ -24,8 +24,17 @@ SUBSYSTEM_DEF(planets)
|
||||
for(var/P in planet_datums)
|
||||
var/datum/planet/NP = new P()
|
||||
planets.Add(NP)
|
||||
// Delete those following two lines with https://github.com/CHOMPStation2/CHOMPStation2/pull/10295
|
||||
for(var/Z in NP.expected_z_levels)
|
||||
if(Z > z_to_planet.len)
|
||||
/* Requires the map update https://github.com/CHOMPStation2/CHOMPStation2/pull/10295
|
||||
for(var/index in 1 to length(NP.expected_z_levels))
|
||||
var/Z = NP.expected_z_levels[index]
|
||||
if(!isnum(Z))
|
||||
Z = GLOB.map_templates_loaded[Z]
|
||||
NP.expected_z_levels[index] = Z
|
||||
if(Z > length(z_to_planet))
|
||||
*/
|
||||
z_to_planet.len = Z
|
||||
if(z_to_planet[Z])
|
||||
admin_notice(span_danger("Z[Z] is shared by more than one planet!"), R_DEBUG)
|
||||
|
||||
@@ -590,14 +590,14 @@ var/list/global/slot_flags_enumeration = list(
|
||||
|
||||
if(!(usr)) //BS12 EDIT
|
||||
return
|
||||
if(!usr.canmove || usr.stat || usr.restrained() || !Adjacent(usr))
|
||||
if(!usr.canmove || usr.stat || usr.restrained() || !Adjacent(usr) || usr.is_incorporeal())
|
||||
return
|
||||
if(isanimal(usr)) //VOREStation Edit Start - Allows simple mobs with hands to use the pickup verb
|
||||
var/mob/living/simple_mob/s = usr
|
||||
if(!s.has_hands)
|
||||
to_chat(usr, span_warning("You can't pick things up!"))
|
||||
return
|
||||
else if((!istype(usr, /mob/living/carbon)) || (istype(usr, /mob/living/carbon/brain)))//Is humanoid, and is not a brain
|
||||
else if((!iscarbon(usr)) || (isbrain(usr)))//Is humanoid, and is not a brain
|
||||
to_chat(usr, span_warning("You can't pick things up!"))
|
||||
return
|
||||
var/mob/living/L = usr
|
||||
@@ -610,7 +610,7 @@ var/list/global/slot_flags_enumeration = list(
|
||||
if(L.get_active_hand()) //Hand is not full //VOREStation Edit End
|
||||
to_chat(usr, span_warning("Your hand is full."))
|
||||
return
|
||||
if(!istype(src.loc, /turf)) //Object is on a turf
|
||||
if(!isturf(src.loc)) //Object is on a turf
|
||||
to_chat(usr, span_warning("You can't pick that up!"))
|
||||
return
|
||||
//All checks are done, time to pick it up!
|
||||
@@ -634,7 +634,7 @@ var/list/global/slot_flags_enumeration = list(
|
||||
|
||||
/obj/item/proc/get_loc_turf()
|
||||
var/atom/L = loc
|
||||
while(L && !istype(L, /turf/))
|
||||
while(L && !isturf(L))
|
||||
L = L.loc
|
||||
return loc
|
||||
|
||||
|
||||
@@ -42,6 +42,8 @@
|
||||
if(vorgans == "No")
|
||||
organs = 0
|
||||
|
||||
var/flavor = tgui_alert(src, "Spawn mob with their character's flavor text?", "Flavor text", list("General", "Robot", "Cancel"))
|
||||
|
||||
var/spawnloc
|
||||
if(!src.mob)
|
||||
to_chat(src, "Can't spawn them in unless you're in a valid spawn location!")
|
||||
@@ -61,10 +63,18 @@
|
||||
|
||||
|
||||
new_mob.key = picked_client.key //Finally put them in the mob
|
||||
if(flavor == "General")
|
||||
new_mob.flavor_text = new_mob?.client?.prefs?.flavor_texts["general"]
|
||||
if(flavor == "Robot")
|
||||
new_mob.flavor_text = new_mob?.client?.prefs?.flavour_texts_robot["Default"]
|
||||
if(organs)
|
||||
new_mob.copy_from_prefs_vr()
|
||||
if(LAZYLEN(new_mob.vore_organs))
|
||||
new_mob.vore_selected = new_mob.vore_organs[1]
|
||||
if(isanimal(new_mob))
|
||||
var/mob/living/simple_mob/Sm = new_mob
|
||||
Sm.vore_active = TRUE
|
||||
Sm.voremob_loaded = TRUE
|
||||
|
||||
log_admin("[key_name_admin(src)] has spawned [new_mob.key] as mob [new_mob.type].")
|
||||
message_admins("[key_name_admin(src)] has spawned [new_mob.key] as mob [new_mob.type].", 1)
|
||||
|
||||
@@ -279,7 +279,7 @@
|
||||
var/list/vorestrings = list()
|
||||
vorestrings += examine_weight()
|
||||
vorestrings += examine_nutrition()
|
||||
vorestrings += examine_reagent_bellies() //CHOMP reagent bellies
|
||||
vorestrings += examine_reagent_bellies() // reagent bellies
|
||||
vorestrings += examine_bellies()
|
||||
vorestrings += examine_pickup_size()
|
||||
vorestrings += examine_step_size()
|
||||
|
||||
@@ -183,7 +183,9 @@
|
||||
// This handles the drag-open inventory panel.
|
||||
/mob/living/MouseDrop(atom/over_object)
|
||||
var/mob/living/L = over_object
|
||||
if(istype(L) && L != src && L == usr && Adjacent(L) && !L.is_incorporeal())
|
||||
if(L.is_incorporeal())
|
||||
return
|
||||
if(istype(L) && L != src && L == usr && Adjacent(L))
|
||||
show_inventory_panel(L)
|
||||
. = ..()
|
||||
|
||||
|
||||
@@ -49,6 +49,9 @@
|
||||
if(istype(nest, /obj/structure/blob/factory))
|
||||
var/obj/structure/blob/factory/F = nest
|
||||
F.spores -= src
|
||||
if(istype(nest, /obj/structure/mob_spawner))
|
||||
var/obj/structure/mob_spawner/S = nest
|
||||
S.get_death_report(src)
|
||||
nest = null
|
||||
if(buckled)
|
||||
buckled.unbuckle_mob(src, TRUE)
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
if(!src.client) . += "It appears to be in stand-by mode." //afk
|
||||
if(UNCONSCIOUS) . += span_warning("It doesn't seem to be responding.")
|
||||
if(DEAD) . += span_deadsay("It looks completely unsalvageable.")
|
||||
. += attempt_vr(src,"examine_reagent_bellies",args) //CHOMP reagent bellies
|
||||
. += attempt_vr(src,"examine_reagent_bellies",args) // reagent bellies
|
||||
|
||||
// VOREStation Edit: Start
|
||||
. += attempt_vr(src,"examine_bellies",args) //VOREStation Edit
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
. += "It appears to be in stand-by mode." //afk
|
||||
if(UNCONSCIOUS) . += span_warning("It doesn't seem to be responding.")
|
||||
if(DEAD) . += span_deadsay("It looks completely unsalvageable.")
|
||||
. += attempt_vr(src,"examine_reagent_bellies",args) //CHOMP reagent bellies
|
||||
. += attempt_vr(src,"examine_reagent_bellies",args) // reagent bellies
|
||||
|
||||
// VOREStation Edit: Start
|
||||
. += attempt_vr(src,"examine_bellies_borg",args) //VOREStation Edit
|
||||
|
||||
@@ -25,6 +25,13 @@
|
||||
else
|
||||
. += span_notice("It can be [harvest_verb] now.")
|
||||
|
||||
. += attempt_vr(src,"examine_reagent_bellies",args)
|
||||
|
||||
. += attempt_vr(src,"examine_bellies",args)
|
||||
. += ""
|
||||
|
||||
if(print_flavor_text()) . += "<br>[print_flavor_text()]"
|
||||
|
||||
/mob/living/simple_mob/proc/livestock_harvest(var/obj/item/tool, var/mob/living/user)
|
||||
if(!LAZYLEN(harvest_results)) // Might be a unique interaction of an object using the proc to do something weird, or just someone's a donk.
|
||||
harvest_recent = world.time
|
||||
|
||||
@@ -55,6 +55,8 @@
|
||||
|
||||
// Release belly contents before being gc'd!
|
||||
/mob/living/simple_mob/Destroy()
|
||||
if(mob_radio)
|
||||
QDEL_NULL(mob_radio)
|
||||
release_vore_contents()
|
||||
LAZYCLEARLIST(prey_excludes)
|
||||
return ..()
|
||||
|
||||
@@ -129,6 +129,7 @@
|
||||
|
||||
var/obj/belly/B = new /obj/belly/macrophage(src)
|
||||
vore_selected = B
|
||||
. = ..()
|
||||
|
||||
/datum/ai_holder/simple_mob/melee/macrophage
|
||||
var/datum/disease/virus = null
|
||||
|
||||
@@ -200,6 +200,7 @@
|
||||
"The stinging and aching gives way to numbness as you're slowly smothered out. Your body is steadily reduced to nutrients and energy for the creature to continue on its way.",
|
||||
"The chaos of being digested fades as you're snuffed out by a harsh clench! You're steadily broken down into a thick paste, processed and absorbed by the predator!"
|
||||
)
|
||||
. = ..()
|
||||
|
||||
/mob/living/simple_mob/shadekin/Life()
|
||||
. = ..()
|
||||
|
||||
@@ -240,7 +240,7 @@ var/datum/planet/borealis2/planet_borealis2 = null
|
||||
)
|
||||
outdoor_sounds_type = /datum/looping_sound/weather/outside_blizzard
|
||||
indoor_sounds_type = /datum/looping_sound/weather/inside_blizzard
|
||||
|
||||
effect_flags = HAS_PLANET_EFFECT | EFFECT_ONLY_LIVING
|
||||
|
||||
/datum/weather/borealis2/blizzard/process_effects()
|
||||
..()
|
||||
@@ -252,14 +252,13 @@ var/datum/planet/borealis2/planet_borealis2 = null
|
||||
if(istype(T, /turf/simulated/floor/outdoors) && prob(50))
|
||||
T.chill()
|
||||
|
||||
for(var/thing in living_mob_list)
|
||||
var/mob/living/L = thing
|
||||
if(L.z in holder.our_planet.expected_z_levels)
|
||||
var/turf/T = get_turf(L)
|
||||
if(!T.outdoors || istype(L, /mob/living/simple_mob))
|
||||
continue // They're indoors, so no need to burn them with ash. And let's not pelter the simple_mobs either.
|
||||
/datum/weather/borealis2/blizzard/planet_effect(mob/living/L)
|
||||
if(L.z in holder.our_planet.expected_z_levels)
|
||||
var/turf/T = get_turf(L)
|
||||
if(!T.outdoors || istype(L, /mob/living/simple_mob))
|
||||
continue // They're indoors, so no need to burn them with ash. And let's not pelter the simple_mobs either.
|
||||
|
||||
L.inflict_heat_damage(rand(1, 1))
|
||||
L.inflict_heat_damage(rand(1, 1))
|
||||
|
||||
/datum/weather/borealis2/rain
|
||||
name = "rain"
|
||||
@@ -280,32 +279,31 @@ var/datum/planet/borealis2/planet_borealis2 = null
|
||||
transition_messages = list(
|
||||
"The sky is dark, and rain falls down upon you."
|
||||
)
|
||||
effect_flags = HAS_PLANET_EFFECT | EFFECT_ONLY_LIVING
|
||||
|
||||
/datum/weather/borealis2/rain/process_effects()
|
||||
..()
|
||||
for(var/mob/living/L 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.
|
||||
/datum/weather/borealis2/rain/planet_effect(mob/living/L)
|
||||
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/melee/umbrella))
|
||||
var/obj/item/melee/umbrella/U = L.get_active_hand()
|
||||
if(U.open)
|
||||
if(show_message)
|
||||
to_chat(L, span_notice("Rain patters softly onto your umbrella"))
|
||||
continue
|
||||
else if(istype(L.get_inactive_hand(), /obj/item/melee/umbrella))
|
||||
var/obj/item/melee/umbrella/U = L.get_inactive_hand()
|
||||
if(U.open)
|
||||
if(show_message)
|
||||
to_chat(L, span_notice("Rain patters softly onto your umbrella"))
|
||||
continue
|
||||
// If they have an open umbrella, it'll guard from rain
|
||||
if(istype(L.get_active_hand(), /obj/item/melee/umbrella))
|
||||
var/obj/item/melee/umbrella/U = L.get_active_hand()
|
||||
if(U.open)
|
||||
if(show_message)
|
||||
to_chat(L, span_notice("Rain patters softly onto your umbrella"))
|
||||
continue
|
||||
else if(istype(L.get_inactive_hand(), /obj/item/melee/umbrella))
|
||||
var/obj/item/melee/umbrella/U = L.get_inactive_hand()
|
||||
if(U.open)
|
||||
if(show_message)
|
||||
to_chat(L, span_notice("Rain patters softly onto your umbrella"))
|
||||
continue
|
||||
|
||||
L.water_act(1)
|
||||
if(show_message)
|
||||
to_chat(L, effect_message)
|
||||
L.water_act(1)
|
||||
if(show_message)
|
||||
to_chat(L, effect_message)
|
||||
|
||||
/datum/weather/borealis2/storm
|
||||
name = "storm"
|
||||
@@ -326,18 +324,15 @@ var/datum/planet/borealis2/planet_borealis2 = null
|
||||
"A bright flash heralds the approach of a storm."
|
||||
)
|
||||
|
||||
|
||||
transition_chances = list(
|
||||
WEATHER_RAIN = 45,
|
||||
WEATHER_STORM = 40,
|
||||
WEATHER_HAIL = 10,
|
||||
WEATHER_OVERCAST = 5
|
||||
)
|
||||
effect_flags = HAS_PLANET_EFFECT | EFFECT_ONLY_LIVING
|
||||
|
||||
|
||||
/datum/weather/borealis2/storm/process_effects()
|
||||
..()
|
||||
for(var/mob/living/L in living_mob_list)
|
||||
/datum/weather/borealis2/storm/planet_effect(mob/living/L)
|
||||
if(L.z in holder.our_planet.expected_z_levels)
|
||||
var/turf/T = get_turf(L)
|
||||
if(!T.outdoors)
|
||||
@@ -379,7 +374,8 @@ var/datum/planet/borealis2/planet_borealis2 = null
|
||||
if(show_message)
|
||||
to_chat(L, effect_message)
|
||||
|
||||
|
||||
/datum/weather/borealis2/storm/process_effects()
|
||||
..()
|
||||
handle_lightning()
|
||||
|
||||
// This gets called to do lightning periodically.
|
||||
@@ -412,43 +408,42 @@ var/datum/planet/borealis2/planet_borealis2 = null
|
||||
"It begins to hail.",
|
||||
"An intense chill is felt, and chunks of ice start to fall from the sky, towards you."
|
||||
)
|
||||
effect_flags = HAS_PLANET_EFFECT | EFFECT_ONLY_HUMANS
|
||||
|
||||
/datum/weather/borealis2/hail/process_effects()
|
||||
..()
|
||||
for(var/mob/living/carbon/human/H in living_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.
|
||||
/datum/weather/borealis2/hail/planet_effect(mob/living/carbon/H)
|
||||
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 rain
|
||||
// Message plays every time the umbrella gets stolen, just so they're especially aware of what's happening
|
||||
if(istype(H.get_active_hand(), /obj/item/melee/umbrella))
|
||||
var/obj/item/melee/umbrella/U = H.get_active_hand()
|
||||
if(U.open)
|
||||
if(show_message)
|
||||
to_chat(H, span_notice("Hail patters gently onto your umbrella."))
|
||||
continue
|
||||
else if(istype(H.get_inactive_hand(), /obj/item/melee/umbrella))
|
||||
var/obj/item/melee/umbrella/U = H.get_inactive_hand()
|
||||
if(U.open)
|
||||
if(show_message)
|
||||
to_chat(H, span_notice("Hail patters gently onto your umbrella."))
|
||||
continue
|
||||
// If they have an open umbrella, it'll guard from rain
|
||||
// Message plays every time the umbrella gets stolen, just so they're especially aware of what's happening
|
||||
if(istype(H.get_active_hand(), /obj/item/melee/umbrella))
|
||||
var/obj/item/melee/umbrella/U = H.get_active_hand()
|
||||
if(U.open)
|
||||
if(show_message)
|
||||
to_chat(H, span_notice("Hail patters gently onto your umbrella."))
|
||||
continue
|
||||
else if(istype(H.get_inactive_hand(), /obj/item/melee/umbrella))
|
||||
var/obj/item/melee/umbrella/U = H.get_inactive_hand()
|
||||
if(U.open)
|
||||
if(show_message)
|
||||
to_chat(H, span_notice("Hail patters gently onto your umbrella."))
|
||||
continue
|
||||
|
||||
var/target_zone = pick(BP_ALL)
|
||||
var/amount_blocked = H.run_armor_check(target_zone, "melee")
|
||||
var/amount_soaked = H.get_armor_soak(target_zone, "melee")
|
||||
var/target_zone = pick(BP_ALL)
|
||||
var/amount_blocked = H.run_armor_check(target_zone, "melee")
|
||||
var/amount_soaked = H.get_armor_soak(target_zone, "melee")
|
||||
|
||||
if(amount_blocked >= 100)
|
||||
continue // No need to apply damage.
|
||||
if(amount_blocked >= 100)
|
||||
continue // No need to apply damage.
|
||||
|
||||
if(amount_soaked >= 10)
|
||||
continue // No need to apply damage.
|
||||
if(amount_soaked >= 10)
|
||||
continue // No need to apply damage.
|
||||
|
||||
H.apply_damage(rand(1, 3), BRUTE, target_zone, amount_blocked, amount_soaked, used_weapon = "hail")
|
||||
if(show_message)
|
||||
to_chat(H, effect_message)
|
||||
H.apply_damage(rand(1, 3), BRUTE, target_zone, amount_blocked, amount_soaked, used_weapon = "hail")
|
||||
if(show_message)
|
||||
to_chat(H, effect_message)
|
||||
|
||||
/datum/weather/borealis2/blood_moon
|
||||
name = "blood moon"
|
||||
@@ -506,17 +501,15 @@ var/datum/planet/borealis2/planet_borealis2 = null
|
||||
// Lets recycle.
|
||||
outdoor_sounds_type = /datum/looping_sound/weather/outside_blizzard
|
||||
indoor_sounds_type = /datum/looping_sound/weather/inside_blizzard
|
||||
effect_flags = HAS_PLANET_EFFECT | EFFECT_ONLY_LIVING
|
||||
|
||||
/datum/weather/borealis2/ash_storm/process_effects()
|
||||
..()
|
||||
for(var/thing in living_mob_list)
|
||||
var/mob/living/L = thing
|
||||
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 burn them with ash.
|
||||
/datum/weather/borealis2/ash_storm/planet_effect(mob/living/L)
|
||||
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 burn them with ash.
|
||||
|
||||
L.inflict_heat_damage(rand(1, 3))
|
||||
L.inflict_heat_damage(rand(1, 3))
|
||||
|
||||
|
||||
// Totally radical.
|
||||
@@ -543,18 +536,16 @@ var/datum/planet/borealis2/planet_borealis2 = null
|
||||
// How much radiation is bursted onto a random tile near a mob.
|
||||
var/fallout_rad_low = RAD_LEVEL_HIGH
|
||||
var/fallout_rad_high = RAD_LEVEL_VERY_HIGH
|
||||
effect_flags = HAS_PLANET_EFFECT | EFFECT_ONLY_LIVING
|
||||
|
||||
/datum/weather/borealis2/fallout/process_effects()
|
||||
..()
|
||||
for(var/thing in living_mob_list)
|
||||
var/mob/living/L = thing
|
||||
if(L.z in holder.our_planet.expected_z_levels)
|
||||
irradiate_nearby_turf(L)
|
||||
var/turf/T = get_turf(L)
|
||||
if(!T.outdoors)
|
||||
continue // They're indoors, so no need to irradiate them with fallout.
|
||||
/datum/weather/borealis2/fallout/planet_effect(mob/living/L)
|
||||
if(L.z in holder.our_planet.expected_z_levels)
|
||||
irradiate_nearby_turf(L)
|
||||
var/turf/T = get_turf(L)
|
||||
if(!T.outdoors)
|
||||
continue // They're indoors, so no need to irradiate them with fallout.
|
||||
|
||||
L.rad_act(rand(direct_rad_low, direct_rad_high))
|
||||
L.rad_act(rand(direct_rad_low, direct_rad_high))
|
||||
|
||||
// This makes random tiles near people radioactive for awhile.
|
||||
// Tiles far away from people are left alone, for performance.
|
||||
|
||||
@@ -301,28 +301,27 @@ var/datum/planet/sif/planet_sif = null
|
||||
)
|
||||
outdoor_sounds_type = /datum/looping_sound/weather/rain
|
||||
indoor_sounds_type = /datum/looping_sound/weather/rain/indoors
|
||||
effect_flags = HAS_PLANET_EFFECT | EFFECT_ONLY_LIVING
|
||||
|
||||
/datum/weather/sif/rain/process_effects()
|
||||
..()
|
||||
for(var/mob/living/L as anything in living_mob_list)
|
||||
if(L?.z in holder.our_planet.expected_z_levels) // CHOMPedit Add a check that L has to be valid and not null
|
||||
var/turf/T = get_turf(L)
|
||||
if(!T.is_outdoors())
|
||||
continue // They're indoors, so no need to rain on them.
|
||||
/datum/weather/sif/rain/planet_effect(mob/living/L)
|
||||
if(L.z in holder.our_planet.expected_z_levels)
|
||||
var/turf/T = get_turf(L)
|
||||
if(!T.is_outdoors())
|
||||
return // They're indoors, so no need to rain on them.
|
||||
|
||||
// If they have an open umbrella, it'll guard from rain
|
||||
var/obj/item/melee/umbrella/U = L.get_active_hand()
|
||||
if(!istype(U) || !U.open)
|
||||
U = L.get_inactive_hand()
|
||||
// If they have an open umbrella, it'll guard from rain
|
||||
var/obj/item/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_notice("Rain patters softly onto your umbrella."))
|
||||
continue
|
||||
|
||||
L.water_act(1)
|
||||
if(istype(U) && U.open)
|
||||
if(show_message)
|
||||
to_chat(L, effect_message)
|
||||
to_chat(L, span_notice("Rain patters softly onto your umbrella."))
|
||||
return
|
||||
|
||||
L.water_act(1)
|
||||
if(show_message)
|
||||
to_chat(L, effect_message)
|
||||
|
||||
/datum/weather/sif/storm
|
||||
name = "storm"
|
||||
@@ -355,30 +354,31 @@ var/datum/planet/sif/planet_sif = null
|
||||
WEATHER_FOG = 3,
|
||||
WEATHER_OVERCAST = 2
|
||||
)
|
||||
effect_flags = HAS_PLANET_EFFECT | EFFECT_ONLY_LIVING
|
||||
|
||||
/datum/weather/sif/storm/planet_effect(mob/living/L)
|
||||
if(L.z in holder.our_planet.expected_z_levels)
|
||||
var/turf/T = get_turf(L)
|
||||
if(!T.is_outdoors())
|
||||
return // They're indoors, so no need to rain on them.
|
||||
|
||||
// If they have an open umbrella, it'll guard from rain
|
||||
var/obj/item/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_notice("Rain showers loudly onto your umbrella!"))
|
||||
return
|
||||
|
||||
|
||||
L.water_act(2)
|
||||
if(show_message)
|
||||
to_chat(L, effect_message)
|
||||
|
||||
/datum/weather/sif/storm/process_effects()
|
||||
..()
|
||||
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.is_outdoors())
|
||||
continue // They're indoors, so no need to rain on them.
|
||||
|
||||
// If they have an open umbrella, it'll guard from rain
|
||||
var/obj/item/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_notice("Rain showers loudly onto your umbrella!"))
|
||||
continue
|
||||
|
||||
|
||||
L.water_act(2)
|
||||
if(show_message)
|
||||
to_chat(L, effect_message)
|
||||
|
||||
handle_lightning()
|
||||
|
||||
// This gets called to do lightning periodically.
|
||||
@@ -413,41 +413,40 @@ var/datum/planet/sif/planet_sif = null
|
||||
"It begins to hail.",
|
||||
"An intense chill is felt, and chunks of ice start to fall from the sky, towards you."
|
||||
)
|
||||
effect_flags = HAS_PLANET_EFFECT | EFFECT_ONLY_HUMANS
|
||||
|
||||
/datum/weather/sif/hail/process_effects()
|
||||
..()
|
||||
for(var/mob/living/carbon/H as anything in human_mob_list)
|
||||
if(H?.z in holder.our_planet.expected_z_levels) // CHOMPedit Add a check that L has to be valid and not null
|
||||
var/turf/T = get_turf(H)
|
||||
if(!T.is_outdoors())
|
||||
continue // They're indoors, so no need to pelt them with ice.
|
||||
/datum/weather/sif/hail/planet_effect(mob/living/carbon/H)
|
||||
if(H.z in holder.our_planet.expected_z_levels)
|
||||
var/turf/T = get_turf(H)
|
||||
if(!T.is_outdoors())
|
||||
return // 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/melee/umbrella/U = H.get_active_hand()
|
||||
if(!istype(U) || !U.open)
|
||||
U = H.get_inactive_hand()
|
||||
// If they have an open umbrella, it'll guard from hail
|
||||
var/obj/item/melee/umbrella/U = H.get_active_hand()
|
||||
if(!istype(U) || !U.open)
|
||||
U = H.get_inactive_hand()
|
||||
|
||||
if(istype(U) && U.open)
|
||||
if(show_message)
|
||||
to_chat(H, span_notice("Hail patters onto your umbrella."))
|
||||
continue
|
||||
|
||||
var/target_zone = pick(BP_ALL)
|
||||
var/amount_blocked = H.run_armor_check(target_zone, "melee")
|
||||
var/amount_soaked = H.get_armor_soak(target_zone, "melee")
|
||||
|
||||
var/damage = rand(1,3)
|
||||
|
||||
if(amount_blocked >= 30)
|
||||
continue // No need to apply damage. Hardhats are 30. They should probably protect you from hail on your head.
|
||||
//Voidsuits are likewise 40, and riot, 80. Clothes are all less than 30.
|
||||
|
||||
if(amount_soaked >= damage)
|
||||
continue // No need to apply damage.
|
||||
|
||||
H.apply_damage(damage, BRUTE, target_zone, amount_blocked, amount_soaked, used_weapon = "hail")
|
||||
if(istype(U) && U.open)
|
||||
if(show_message)
|
||||
to_chat(H, effect_message)
|
||||
to_chat(H, span_notice("Hail patters onto your umbrella."))
|
||||
return
|
||||
|
||||
var/target_zone = pick(BP_ALL)
|
||||
var/amount_blocked = H.run_armor_check(target_zone, "melee")
|
||||
var/amount_soaked = H.get_armor_soak(target_zone, "melee")
|
||||
|
||||
var/damage = rand(1,3)
|
||||
|
||||
if(amount_blocked >= 30)
|
||||
return // No need to apply damage. Hardhats are 30. They should probably protect you from hail on your head.
|
||||
//Voidsuits are likewise 40, and riot, 80. Clothes are all less than 30.
|
||||
|
||||
if(amount_soaked >= damage)
|
||||
return // No need to apply damage.
|
||||
|
||||
H.apply_damage(damage, BRUTE, target_zone, amount_blocked, amount_soaked, used_weapon = "hail")
|
||||
if(show_message)
|
||||
to_chat(H, effect_message)
|
||||
|
||||
/datum/weather/sif/fog
|
||||
name = "fog"
|
||||
@@ -532,16 +531,15 @@ var/datum/planet/sif/planet_sif = null
|
||||
// Lets recycle.
|
||||
outdoor_sounds_type = /datum/looping_sound/weather/outside_blizzard
|
||||
indoor_sounds_type = /datum/looping_sound/weather/inside_blizzard
|
||||
effect_flags = HAS_PLANET_EFFECT | EFFECT_ONLY_LIVING
|
||||
|
||||
/datum/weather/sif/ash_storm/process_effects()
|
||||
..()
|
||||
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.is_outdoors())
|
||||
continue // They're indoors, so no need to burn them with ash.
|
||||
/datum/weather/sif/ash_storm/planet_effect(mob/living/L)
|
||||
if(L.z in holder.our_planet.expected_z_levels)
|
||||
var/turf/T = get_turf(L)
|
||||
if(!T.is_outdoors())
|
||||
return // They're indoors, so no need to burn them with ash.
|
||||
|
||||
L.inflict_heat_damage(rand(1, 3))
|
||||
L.inflict_heat_damage(rand(1, 3))
|
||||
|
||||
|
||||
// Totally radical.
|
||||
@@ -569,17 +567,16 @@ var/datum/planet/sif/planet_sif = null
|
||||
// How much radiation is bursted onto a random tile near a mob.
|
||||
var/fallout_rad_low = RAD_LEVEL_HIGH
|
||||
var/fallout_rad_high = RAD_LEVEL_VERY_HIGH
|
||||
effect_flags = HAS_PLANET_EFFECT | EFFECT_ONLY_LIVING
|
||||
|
||||
/datum/weather/sif/fallout/process_effects()
|
||||
..()
|
||||
for(var/mob/living/L as anything in living_mob_list)
|
||||
if(L.z in holder.our_planet.expected_z_levels)
|
||||
irradiate_nearby_turf(L)
|
||||
var/turf/T = get_turf(L)
|
||||
if(!T.is_outdoors())
|
||||
continue // They're indoors, so no need to irradiate them with fallout.
|
||||
/datum/weather/sif/fallout/planet_effect(mob/living/L)
|
||||
if(L.z in holder.our_planet.expected_z_levels)
|
||||
irradiate_nearby_turf(L)
|
||||
var/turf/T = get_turf(L)
|
||||
if(!T.is_outdoors())
|
||||
return // They're indoors, so no need to irradiate them with fallout.
|
||||
|
||||
L.rad_act(rand(direct_rad_low, direct_rad_high))
|
||||
L.rad_act(rand(direct_rad_low, direct_rad_high))
|
||||
|
||||
// This makes random tiles near people radioactive for awhile.
|
||||
// Tiles far away from people are left alone, for performance.
|
||||
|
||||
@@ -268,28 +268,27 @@ var/datum/planet/thor/planet_thor = null
|
||||
imminent_transition_message = "Light drips of water are starting to fall from the sky."
|
||||
outdoor_sounds_type = /datum/looping_sound/weather/rain
|
||||
indoor_sounds_type = /datum/looping_sound/weather/rain/indoors
|
||||
effect_flags = HAS_PLANET_EFFECT | EFFECT_ONLY_LIVING
|
||||
|
||||
/datum/weather/thor/rain/process_effects()
|
||||
..()
|
||||
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.is_outdoors())
|
||||
continue // They're indoors, so no need to rain on them.
|
||||
/datum/weather/thor/rain/planet_effect(mob/living/L)
|
||||
if(L.z in holder.our_planet.expected_z_levels)
|
||||
var/turf/T = get_turf(L)
|
||||
if(!T.is_outdoors())
|
||||
return // They're indoors, so no need to rain on them.
|
||||
|
||||
// If they have an open umbrella, it'll guard from rain
|
||||
var/obj/item/melee/umbrella/U = L.get_active_hand()
|
||||
if(!istype(U) || !U.open)
|
||||
U = L.get_inactive_hand()
|
||||
// If they have an open umbrella, it'll guard from rain
|
||||
var/obj/item/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_notice("Rain patters softly onto your umbrella."))
|
||||
continue
|
||||
|
||||
L.water_act(1)
|
||||
if(istype(U) && U.open)
|
||||
if(show_message)
|
||||
to_chat(L, effect_message)
|
||||
to_chat(L, span_notice("Rain patters softly onto your umbrella."))
|
||||
return
|
||||
|
||||
L.water_act(1)
|
||||
if(show_message)
|
||||
to_chat(L, effect_message)
|
||||
|
||||
/datum/weather/thor/storm
|
||||
name = "storm"
|
||||
@@ -318,30 +317,31 @@ var/datum/planet/thor/planet_thor = null
|
||||
WEATHER_STORM = 10,
|
||||
WEATHER_RAIN = 80
|
||||
)
|
||||
effect_flags = HAS_PLANET_EFFECT | EFFECT_ONLY_LIVING
|
||||
|
||||
/datum/weather/thor/storm/planet_effect(mob/living/L)
|
||||
if(L.z in holder.our_planet.expected_z_levels)
|
||||
var/turf/T = get_turf(L)
|
||||
if(!T.is_outdoors())
|
||||
return // They're indoors, so no need to rain on them.
|
||||
|
||||
// If they have an open umbrella, it'll guard from rain
|
||||
var/obj/item/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_notice("Rain showers loudly onto your umbrella!"))
|
||||
return
|
||||
|
||||
|
||||
L.water_act(2)
|
||||
if(show_message)
|
||||
to_chat(L, effect_message)
|
||||
|
||||
/datum/weather/thor/storm/process_effects()
|
||||
..()
|
||||
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.is_outdoors())
|
||||
continue // They're indoors, so no need to rain on them.
|
||||
|
||||
// If they have an open umbrella, it'll guard from rain
|
||||
var/obj/item/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_notice("Rain showers loudly onto your umbrella!"))
|
||||
continue
|
||||
|
||||
|
||||
L.water_act(2)
|
||||
if(show_message)
|
||||
to_chat(L, effect_message)
|
||||
|
||||
handle_lightning()
|
||||
|
||||
// This gets called to do lightning periodically.
|
||||
@@ -374,41 +374,40 @@ var/datum/planet/thor/planet_thor = null
|
||||
"An intense chill is felt, and chunks of ice start to fall from the sky, towards you."
|
||||
)
|
||||
imminent_transition_message = "Small bits of ice are falling from the sky, growing larger by the second. Hail is starting, get to cover!"
|
||||
effect_flags = HAS_PLANET_EFFECT | EFFECT_ONLY_HUMANS
|
||||
|
||||
/datum/weather/thor/hail/process_effects()
|
||||
..()
|
||||
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.is_outdoors())
|
||||
continue // They're indoors, so no need to pelt them with ice.
|
||||
/datum/weather/thor/hail/planet_effect(mob/living/carbon/H)
|
||||
if(H.z in holder.our_planet.expected_z_levels)
|
||||
var/turf/T = get_turf(H)
|
||||
if(!T.is_outdoors())
|
||||
return // 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/melee/umbrella/U = H.get_active_hand()
|
||||
if(!istype(U) || !U.open)
|
||||
U = H.get_inactive_hand()
|
||||
// If they have an open umbrella, it'll guard from hail
|
||||
var/obj/item/melee/umbrella/U = H.get_active_hand()
|
||||
if(!istype(U) || !U.open)
|
||||
U = H.get_inactive_hand()
|
||||
|
||||
if(istype(U) && U.open)
|
||||
if(show_message)
|
||||
to_chat(H, span_notice("Hail patters onto your umbrella."))
|
||||
continue
|
||||
|
||||
var/target_zone = pick(BP_ALL)
|
||||
var/amount_blocked = H.run_armor_check(target_zone, "melee")
|
||||
var/amount_soaked = H.get_armor_soak(target_zone, "melee")
|
||||
|
||||
var/damage = rand(1,3)
|
||||
|
||||
if(amount_blocked >= 30)
|
||||
continue // No need to apply damage. Hardhats are 30. They should probably protect you from hail on your head.
|
||||
//Voidsuits are likewise 40, and riot, 80. Clothes are all less than 30.
|
||||
|
||||
if(amount_soaked >= damage)
|
||||
continue // No need to apply damage.
|
||||
|
||||
H.apply_damage(damage, BRUTE, target_zone, amount_blocked, amount_soaked, used_weapon = "hail")
|
||||
if(istype(U) && U.open)
|
||||
if(show_message)
|
||||
to_chat(H, effect_message)
|
||||
to_chat(H, span_notice("Hail patters onto your umbrella."))
|
||||
return
|
||||
|
||||
var/target_zone = pick(BP_ALL)
|
||||
var/amount_blocked = H.run_armor_check(target_zone, "melee")
|
||||
var/amount_soaked = H.get_armor_soak(target_zone, "melee")
|
||||
|
||||
var/damage = rand(1,3)
|
||||
|
||||
if(amount_blocked >= 30)
|
||||
return // No need to apply damage. Hardhats are 30. They should probably protect you from hail on your head.
|
||||
//Voidsuits are likewise 40, and riot, 80. Clothes are all less than 30.
|
||||
|
||||
if(amount_soaked >= damage)
|
||||
return // No need to apply damage.
|
||||
|
||||
H.apply_damage(damage, BRUTE, target_zone, amount_blocked, amount_soaked, used_weapon = "hail")
|
||||
if(show_message)
|
||||
to_chat(H, effect_message)
|
||||
|
||||
/datum/weather/thor/fog
|
||||
name = "fog"
|
||||
@@ -494,16 +493,15 @@ var/datum/planet/thor/planet_thor = null
|
||||
// Lets recycle.
|
||||
outdoor_sounds_type = /datum/looping_sound/weather/outside_blizzard
|
||||
indoor_sounds_type = /datum/looping_sound/weather/inside_blizzard
|
||||
effect_flags = HAS_PLANET_EFFECT | EFFECT_ONLY_LIVING
|
||||
|
||||
/datum/weather/thor/ash_storm/process_effects()
|
||||
..()
|
||||
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.is_outdoors())
|
||||
continue // They're indoors, so no need to burn them with ash.
|
||||
/datum/weather/thor/ash_storm/planet_effect(mob/living/L)
|
||||
if(L.z in holder.our_planet.expected_z_levels)
|
||||
var/turf/T = get_turf(L)
|
||||
if(!T.is_outdoors())
|
||||
return // They're indoors, so no need to burn them with ash.
|
||||
|
||||
L.inflict_heat_damage(rand(1, 3))
|
||||
L.inflict_heat_damage(rand(1, 3))
|
||||
|
||||
//A non-lethal variant of the ash_storm. Stays on indefinitely.
|
||||
/datum/weather/thor/ash_storm_safe
|
||||
@@ -554,17 +552,16 @@ var/datum/planet/thor/planet_thor = null
|
||||
// How much radiation is bursted onto a random tile near a mob.
|
||||
var/fallout_rad_low = RAD_LEVEL_HIGH
|
||||
var/fallout_rad_high = RAD_LEVEL_VERY_HIGH
|
||||
effect_flags = HAS_PLANET_EFFECT | EFFECT_ONLY_LIVING
|
||||
|
||||
/datum/weather/thor/fallout/process_effects()
|
||||
..()
|
||||
for(var/mob/living/L as anything in living_mob_list)
|
||||
if(L.z in holder.our_planet.expected_z_levels)
|
||||
irradiate_nearby_turf(L)
|
||||
var/turf/T = get_turf(L)
|
||||
if(!T.is_outdoors())
|
||||
continue // They're indoors, so no need to irradiate them with fallout.
|
||||
/datum/weather/thor/fallout/planet_effect(mob/living/L)
|
||||
if(L.z in holder.our_planet.expected_z_levels)
|
||||
irradiate_nearby_turf(L)
|
||||
var/turf/T = get_turf(L)
|
||||
if(!T.is_outdoors())
|
||||
return // They're indoors, so no need to irradiate them with fallout.
|
||||
|
||||
L.rad_act(rand(direct_rad_low, direct_rad_high))
|
||||
L.rad_act(rand(direct_rad_low, direct_rad_high))
|
||||
|
||||
// This makes random tiles near people radioactive for awhile.
|
||||
// Tiles far away from people are left alone, for performance.
|
||||
@@ -646,32 +643,33 @@ var/datum/planet/thor/planet_thor = null
|
||||
)
|
||||
outdoor_sounds_type = /datum/looping_sound/weather/rainheavy
|
||||
indoor_sounds_type = /datum/looping_sound/weather/rainindoors
|
||||
effect_flags = HAS_PLANET_EFFECT | EFFECT_ONLY_LIVING
|
||||
|
||||
/datum/weather/thor/downpour/planet_effect(mob/living/L)
|
||||
if(L.z in holder.our_planet.expected_z_levels)
|
||||
var/turf/T = get_turf(L)
|
||||
if(!T.is_outdoors())
|
||||
return // They're indoors, so no need to rain on them.
|
||||
|
||||
// If they have an open umbrella, knock it off
|
||||
if(ishuman(L))
|
||||
var/mob/living/carbon/human/H = L
|
||||
var/obj/item/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_notice("The rain pushes the umbrella off your hands!"))
|
||||
H.drop_both_hands()
|
||||
|
||||
L.water_act(2)
|
||||
L.Weaken(3)
|
||||
if(show_message)
|
||||
to_chat(L, effect_message)
|
||||
|
||||
/datum/weather/thor/downpour/process_effects()
|
||||
..()
|
||||
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.is_outdoors())
|
||||
continue // They're indoors, so no need to rain on them.
|
||||
|
||||
// If they have an open umbrella, knock it off
|
||||
if(ishuman(L))
|
||||
var/mob/living/carbon/human/H = L
|
||||
var/obj/item/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_notice("The rain pushes the umbrella off your hands!"))
|
||||
H.drop_both_hands()
|
||||
|
||||
L.water_act(2)
|
||||
L.Weaken(3)
|
||||
if(show_message)
|
||||
to_chat(L, effect_message)
|
||||
|
||||
handle_lightning()
|
||||
|
||||
// This gets called to do lightning periodically.
|
||||
@@ -706,45 +704,45 @@ var/datum/planet/thor/planet_thor = null
|
||||
//No transition message, supposed to be the 'actual' rain
|
||||
outdoor_sounds_type = /datum/looping_sound/weather/rainextreme
|
||||
indoor_sounds_type = /datum/looping_sound/weather/rainindoors
|
||||
effect_flags = HAS_PLANET_EFFECT | EFFECT_ONLY_LIVING
|
||||
|
||||
/datum/weather/thor/downpourfatal/planet_effect(mob/living/L)
|
||||
if(L.z in holder.our_planet.expected_z_levels)
|
||||
var/turf/T = get_turf(L)
|
||||
if(!T.is_outdoors())
|
||||
return // They're indoors, so no need to rain on them.
|
||||
|
||||
// Knock the umbrella off your hands, aint protecting you c:
|
||||
if(ishuman(L))
|
||||
var/mob/living/carbon/human/H = L
|
||||
var/obj/item/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_notice("The rain pushes the umbrella off your hands!"))
|
||||
H.drop_both_hands()
|
||||
|
||||
var/target_zone = pick(BP_ALL)
|
||||
var/amount_blocked = L.run_armor_check(target_zone, "melee")
|
||||
var/amount_soaked = L.get_armor_soak(target_zone, "melee")
|
||||
|
||||
var/damage = rand(10,30) //Ow
|
||||
|
||||
if(amount_blocked >= 30)
|
||||
return
|
||||
|
||||
if(amount_soaked >= damage)
|
||||
return // No need to apply damage.
|
||||
|
||||
L.apply_damage(damage, BRUTE, target_zone, amount_blocked, amount_soaked, used_weapon = "rain bludgoning")
|
||||
L.Weaken(3)
|
||||
if(show_message)
|
||||
to_chat(L, effect_message)
|
||||
|
||||
/datum/weather/thor/downpourfatal/process_effects()
|
||||
..()
|
||||
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.is_outdoors())
|
||||
continue // They're indoors, so no need to rain on them.
|
||||
|
||||
// Knock the umbrella off your hands, aint protecting you c:
|
||||
if(ishuman(L))
|
||||
var/mob/living/carbon/human/H = L
|
||||
var/obj/item/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_notice("The rain pushes the umbrella off your hands!"))
|
||||
H.drop_both_hands()
|
||||
|
||||
var/target_zone = pick(BP_ALL)
|
||||
var/amount_blocked = L.run_armor_check(target_zone, "melee")
|
||||
var/amount_soaked = L.get_armor_soak(target_zone, "melee")
|
||||
|
||||
var/damage = rand(10,30) //Ow
|
||||
|
||||
if(amount_blocked >= 30)
|
||||
continue
|
||||
|
||||
if(amount_soaked >= damage)
|
||||
continue // No need to apply damage.
|
||||
|
||||
L.apply_damage(damage, BRUTE, target_zone, amount_blocked, amount_soaked, used_weapon = "rain bludgoning")
|
||||
L.Weaken(3)
|
||||
if(show_message)
|
||||
to_chat(L, effect_message)
|
||||
|
||||
|
||||
handle_lightning()
|
||||
|
||||
// This gets called to do lightning periodically.
|
||||
|
||||
@@ -285,28 +285,27 @@ var/datum/planet/virgo3b/planet_virgo3b = null
|
||||
imminent_transition_message = "Light drips of water are starting to fall from the sky."
|
||||
outdoor_sounds_type = /datum/looping_sound/weather/rain
|
||||
indoor_sounds_type = /datum/looping_sound/weather/rain/indoors
|
||||
effect_flags = HAS_PLANET_EFFECT | EFFECT_ONLY_LIVING
|
||||
|
||||
/datum/weather/virgo3b/rain/process_effects()
|
||||
..()
|
||||
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.is_outdoors())
|
||||
continue // They're indoors, so no need to rain on them.
|
||||
/datum/weather/virgo3b/rain/planet_effect(mob/living/L)
|
||||
if(L.z in holder.our_planet.expected_z_levels)
|
||||
var/turf/T = get_turf(L)
|
||||
if(!T.is_outdoors())
|
||||
return // They're indoors, so no need to rain on them.
|
||||
|
||||
// If they have an open umbrella, it'll guard from rain
|
||||
var/obj/item/melee/umbrella/U = L.get_active_hand()
|
||||
if(!istype(U) || !U.open)
|
||||
U = L.get_inactive_hand()
|
||||
// If they have an open umbrella, it'll guard from rain
|
||||
var/obj/item/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_notice("Rain patters softly onto your umbrella."))
|
||||
continue
|
||||
|
||||
L.water_act(1)
|
||||
if(istype(U) && U.open)
|
||||
if(show_message)
|
||||
to_chat(L, effect_message)
|
||||
to_chat(L, span_notice("Rain patters softly onto your umbrella."))
|
||||
return
|
||||
|
||||
L.water_act(1)
|
||||
if(show_message)
|
||||
to_chat(L, effect_message)
|
||||
|
||||
/datum/weather/virgo3b/storm
|
||||
name = "storm"
|
||||
@@ -338,30 +337,31 @@ var/datum/planet/virgo3b/planet_virgo3b = null
|
||||
WEATHER_HAIL = 10,
|
||||
WEATHER_OVERCAST = 5
|
||||
)
|
||||
effect_flags = HAS_PLANET_EFFECT | EFFECT_ONLY_LIVING
|
||||
|
||||
/datum/weather/virgo3b/storm/planet_effect(mob/living/L)
|
||||
if(L.z in holder.our_planet.expected_z_levels)
|
||||
var/turf/T = get_turf(L)
|
||||
if(!T.is_outdoors())
|
||||
return // They're indoors, so no need to rain on them.
|
||||
|
||||
// If they have an open umbrella, it'll guard from rain
|
||||
var/obj/item/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_notice("Rain patters softly onto your umbrella."))
|
||||
return
|
||||
|
||||
|
||||
L.water_act(2)
|
||||
if(show_message)
|
||||
to_chat(L, effect_message)
|
||||
|
||||
/datum/weather/virgo3b/storm/process_effects()
|
||||
..()
|
||||
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.is_outdoors())
|
||||
continue // They're indoors, so no need to rain on them.
|
||||
|
||||
// If they have an open umbrella, it'll guard from rain
|
||||
var/obj/item/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_notice("Rain patters softly onto your umbrella."))
|
||||
continue
|
||||
|
||||
|
||||
L.water_act(2)
|
||||
if(show_message)
|
||||
to_chat(L, effect_message)
|
||||
|
||||
handle_lightning()
|
||||
|
||||
// This gets called to do lightning periodically.
|
||||
@@ -396,41 +396,40 @@ var/datum/planet/virgo3b/planet_virgo3b = null
|
||||
"An intense chill is felt, and chunks of ice start to fall from the sky, towards you."
|
||||
)
|
||||
imminent_transition_message = "Small bits of ice are falling from the sky, growing larger by the second. Hail is starting, get to cover!"
|
||||
effect_flags = HAS_PLANET_EFFECT | EFFECT_ONLY_HUMANS
|
||||
|
||||
/datum/weather/virgo3b/hail/process_effects()
|
||||
..()
|
||||
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.is_outdoors())
|
||||
continue // They're indoors, so no need to pelt them with ice.
|
||||
/datum/weather/virgo3b/hail/planet_effect(mob/living/carbon/H)
|
||||
if(H.z in holder.our_planet.expected_z_levels)
|
||||
var/turf/T = get_turf(H)
|
||||
if(!T.is_outdoors())
|
||||
return // 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/melee/umbrella/U = H.get_active_hand()
|
||||
if(!istype(U) || !U.open)
|
||||
U = H.get_inactive_hand()
|
||||
// If they have an open umbrella, it'll guard from hail
|
||||
var/obj/item/melee/umbrella/U = H.get_active_hand()
|
||||
if(!istype(U) || !U.open)
|
||||
U = H.get_inactive_hand()
|
||||
|
||||
if(istype(U) && U.open)
|
||||
if(show_message)
|
||||
to_chat(H, span_notice("Hail patters onto your umbrella."))
|
||||
continue
|
||||
|
||||
var/target_zone = pick(BP_ALL)
|
||||
var/amount_blocked = H.run_armor_check(target_zone, "melee")
|
||||
var/amount_soaked = H.get_armor_soak(target_zone, "melee")
|
||||
|
||||
var/damage = rand(1,3)
|
||||
|
||||
if(amount_blocked >= 30)
|
||||
continue // No need to apply damage. Hardhats are 30. They should probably protect you from hail on your head.
|
||||
//Voidsuits are likewise 40, and riot, 80. Clothes are all less than 30.
|
||||
|
||||
if(amount_soaked >= damage)
|
||||
continue // No need to apply damage.
|
||||
|
||||
H.apply_damage(damage, BRUTE, target_zone, amount_blocked, amount_soaked)
|
||||
if(istype(U) && U.open)
|
||||
if(show_message)
|
||||
to_chat(H, effect_message)
|
||||
to_chat(H, span_notice("Hail patters onto your umbrella."))
|
||||
return
|
||||
|
||||
var/target_zone = pick(BP_ALL)
|
||||
var/amount_blocked = H.run_armor_check(target_zone, "melee")
|
||||
var/amount_soaked = H.get_armor_soak(target_zone, "melee")
|
||||
|
||||
var/damage = rand(1,3)
|
||||
|
||||
if(amount_blocked >= 30)
|
||||
return // No need to apply damage. Hardhats are 30. They should probably protect you from hail on your head.
|
||||
//Voidsuits are likewise 40, and riot, 80. Clothes are all less than 30.
|
||||
|
||||
if(amount_soaked >= damage)
|
||||
return // No need to apply damage.
|
||||
|
||||
H.apply_damage(damage, BRUTE, target_zone, amount_blocked, amount_soaked)
|
||||
if(show_message)
|
||||
to_chat(H, effect_message)
|
||||
|
||||
/datum/weather/virgo3b/fog
|
||||
name = "fog"
|
||||
@@ -516,16 +515,15 @@ var/datum/planet/virgo3b/planet_virgo3b = null
|
||||
// Lets recycle.
|
||||
outdoor_sounds_type = /datum/looping_sound/weather/outside_blizzard
|
||||
indoor_sounds_type = /datum/looping_sound/weather/inside_blizzard
|
||||
effect_flags = HAS_PLANET_EFFECT | EFFECT_ONLY_LIVING
|
||||
|
||||
/datum/weather/virgo3b/ash_storm/process_effects()
|
||||
..()
|
||||
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.is_outdoors())
|
||||
continue // They're indoors, so no need to burn them with ash.
|
||||
/datum/weather/virgo3b/ash_storm/planet_effect(mob/living/L)
|
||||
if(L.z in holder.our_planet.expected_z_levels)
|
||||
var/turf/T = get_turf(L)
|
||||
if(!T.is_outdoors())
|
||||
return // They're indoors, so no need to burn them with ash.
|
||||
|
||||
L.inflict_heat_damage(rand(1, 3))
|
||||
L.inflict_heat_damage(rand(1, 3))
|
||||
|
||||
/datum/weather/virgo3b/ash_storm_safe
|
||||
name = "light ash storm"
|
||||
@@ -575,17 +573,16 @@ var/datum/planet/virgo3b/planet_virgo3b = null
|
||||
// How much radiation is bursted onto a random tile near a mob.
|
||||
var/fallout_rad_low = RAD_LEVEL_HIGH
|
||||
var/fallout_rad_high = RAD_LEVEL_VERY_HIGH
|
||||
effect_flags = HAS_PLANET_EFFECT | EFFECT_ONLY_LIVING
|
||||
|
||||
/datum/weather/virgo3b/fallout/process_effects()
|
||||
..()
|
||||
for(var/mob/living/L as anything in living_mob_list)
|
||||
if(L.z in holder.our_planet.expected_z_levels)
|
||||
irradiate_nearby_turf(L)
|
||||
var/turf/T = get_turf(L)
|
||||
if(!T.is_outdoors())
|
||||
continue // They're indoors, so no need to irradiate them with fallout.
|
||||
/datum/weather/virgo3b/fallout/planet_effect(mob/living/L)
|
||||
if(L.z in holder.our_planet.expected_z_levels)
|
||||
irradiate_nearby_turf(L)
|
||||
var/turf/T = get_turf(L)
|
||||
if(!T.is_outdoors())
|
||||
return // They're indoors, so no need to irradiate them with fallout.
|
||||
|
||||
L.rad_act(rand(direct_rad_low, direct_rad_high))
|
||||
L.rad_act(rand(direct_rad_low, direct_rad_high))
|
||||
|
||||
// This makes random tiles near people radioactive for awhile.
|
||||
// Tiles far away from people are left alone, for performance.
|
||||
|
||||
@@ -274,28 +274,27 @@ var/datum/planet/virgo3c/planet_virgo3c = null
|
||||
"The sky is dark, and rain falls down upon you."
|
||||
)
|
||||
imminent_transition_message = "Light drips of water are starting to fall from the sky."
|
||||
effect_flags = HAS_PLANET_EFFECT | EFFECT_ONLY_LIVING
|
||||
|
||||
/datum/weather/virgo3c/rain/process_effects()
|
||||
..()
|
||||
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.is_outdoors())
|
||||
continue // They're indoors, so no need to rain on them.
|
||||
/datum/weather/virgo3c/rain/planet_effect(mob/living/L)
|
||||
if(L.z in holder.our_planet.expected_z_levels)
|
||||
var/turf/T = get_turf(L)
|
||||
if(!T.is_outdoors())
|
||||
return // They're indoors, so no need to rain on them.
|
||||
|
||||
// If they have an open umbrella, it'll guard from rain
|
||||
var/obj/item/melee/umbrella/U = L.get_active_hand()
|
||||
if(!istype(U) || !U.open)
|
||||
U = L.get_inactive_hand()
|
||||
// If they have an open umbrella, it'll guard from rain
|
||||
var/obj/item/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_notice("Rain patters softly onto your umbrella."))
|
||||
continue
|
||||
|
||||
L.water_act(1)
|
||||
if(istype(U) && U.open)
|
||||
if(show_message)
|
||||
to_chat(L, effect_message)
|
||||
to_chat(L, span_notice("Rain patters softly onto your umbrella."))
|
||||
return
|
||||
|
||||
L.water_act(1)
|
||||
if(show_message)
|
||||
to_chat(L, effect_message)
|
||||
|
||||
/datum/weather/virgo3c/storm
|
||||
name = "storm"
|
||||
@@ -328,30 +327,31 @@ var/datum/planet/virgo3c/planet_virgo3c = null
|
||||
WEATHER_BLIZZARD = 5,
|
||||
WEATHER_HAIL = 5
|
||||
)
|
||||
effect_flags = HAS_PLANET_EFFECT | EFFECT_ONLY_LIVING
|
||||
|
||||
/datum/weather/virgo3c/storm/planet_effect(mob/living/L)
|
||||
if(L.z in holder.our_planet.expected_z_levels)
|
||||
var/turf/T = get_turf(L)
|
||||
if(!T.is_outdoors())
|
||||
return // They're indoors, so no need to rain on them.
|
||||
|
||||
// If they have an open umbrella, it'll guard from rain
|
||||
var/obj/item/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_notice("Rain showers loudly onto your umbrella!"))
|
||||
return
|
||||
|
||||
|
||||
L.water_act(2)
|
||||
if(show_message)
|
||||
to_chat(L, effect_message)
|
||||
|
||||
/datum/weather/virgo3c/storm/process_effects()
|
||||
..()
|
||||
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.is_outdoors())
|
||||
continue // They're indoors, so no need to rain on them.
|
||||
|
||||
// If they have an open umbrella, it'll guard from rain
|
||||
var/obj/item/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_notice("Rain showers loudly onto your umbrella!"))
|
||||
continue
|
||||
|
||||
|
||||
L.water_act(2)
|
||||
if(show_message)
|
||||
to_chat(L, effect_message)
|
||||
|
||||
handle_lightning()
|
||||
|
||||
// This gets called to do lightning periodically.
|
||||
@@ -386,41 +386,40 @@ var/datum/planet/virgo3c/planet_virgo3c = null
|
||||
"An intense chill is felt, and chunks of ice start to fall from the sky, towards you."
|
||||
)
|
||||
imminent_transition_message = "Small bits of ice are falling from the sky, growing larger by the second. Hail is starting, get to cover!"
|
||||
effect_flags = HAS_PLANET_EFFECT | EFFECT_ONLY_HUMANS
|
||||
|
||||
/datum/weather/virgo3c/hail/process_effects()
|
||||
..()
|
||||
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.is_outdoors())
|
||||
continue // They're indoors, so no need to pelt them with ice.
|
||||
/datum/weather/virgo3c/hail/planet_effect(mob/living/carbon/H)
|
||||
if(H.z in holder.our_planet.expected_z_levels)
|
||||
var/turf/T = get_turf(H)
|
||||
if(!T.is_outdoors())
|
||||
return // 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/melee/umbrella/U = H.get_active_hand()
|
||||
if(!istype(U) || !U.open)
|
||||
U = H.get_inactive_hand()
|
||||
// If they have an open umbrella, it'll guard from hail
|
||||
var/obj/item/melee/umbrella/U = H.get_active_hand()
|
||||
if(!istype(U) || !U.open)
|
||||
U = H.get_inactive_hand()
|
||||
|
||||
if(istype(U) && U.open)
|
||||
if(show_message)
|
||||
to_chat(H, span_notice("Hail patters onto your umbrella."))
|
||||
continue
|
||||
|
||||
var/target_zone = pick(BP_ALL)
|
||||
var/amount_blocked = H.run_armor_check(target_zone, "melee")
|
||||
var/amount_soaked = H.get_armor_soak(target_zone, "melee")
|
||||
|
||||
var/damage = rand(1,3)
|
||||
|
||||
if(amount_blocked >= 30)
|
||||
continue // No need to apply damage. Hardhats are 30. They should probably protect you from hail on your head.
|
||||
//Voidsuits are likewise 40, and riot, 80. Clothes are all less than 30.
|
||||
|
||||
if(amount_soaked >= damage)
|
||||
continue // No need to apply damage.
|
||||
|
||||
H.apply_damage(damage, BRUTE, target_zone, amount_blocked, amount_soaked)
|
||||
if(istype(U) && U.open)
|
||||
if(show_message)
|
||||
to_chat(H, effect_message)
|
||||
to_chat(H, span_notice("Hail patters onto your umbrella."))
|
||||
return
|
||||
|
||||
var/target_zone = pick(BP_ALL)
|
||||
var/amount_blocked = H.run_armor_check(target_zone, "melee")
|
||||
var/amount_soaked = H.get_armor_soak(target_zone, "melee")
|
||||
|
||||
var/damage = rand(1,3)
|
||||
|
||||
if(amount_blocked >= 30)
|
||||
return // No need to apply damage. Hardhats are 30. They should probably protect you from hail on your head.
|
||||
//Voidsuits are likewise 40, and riot, 80. Clothes are all less than 30.
|
||||
|
||||
if(amount_soaked >= damage)
|
||||
return // No need to apply damage.
|
||||
|
||||
H.apply_damage(damage, BRUTE, target_zone, amount_blocked, amount_soaked)
|
||||
if(show_message)
|
||||
to_chat(H, effect_message)
|
||||
|
||||
/datum/weather/virgo3c/fog
|
||||
name = "fog"
|
||||
@@ -515,19 +514,18 @@ var/datum/planet/virgo3c/planet_virgo3c = null
|
||||
// Lets recycle.
|
||||
outdoor_sounds_type = /datum/looping_sound/weather/outside_blizzard
|
||||
indoor_sounds_type = /datum/looping_sound/weather/inside_blizzard
|
||||
effect_flags = HAS_PLANET_EFFECT | EFFECT_ONLY_LIVING
|
||||
|
||||
/datum/weather/virgo3c/ash_storm/process_effects()
|
||||
..()
|
||||
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.is_outdoors())
|
||||
continue // They're indoors, so no need to burn them with ash.
|
||||
else if (isanimal(L))
|
||||
continue //Don't murder the wildlife, they live here it's fine
|
||||
/datum/weather/virgo3c/ash_storm/planet_effect(mob/living/L)
|
||||
if(L.z in holder.our_planet.expected_z_levels)
|
||||
var/turf/T = get_turf(L)
|
||||
if(!T.is_outdoors())
|
||||
return // They're indoors, so no need to burn them with ash.
|
||||
else if (isanimal(L))
|
||||
return //Don't murder the wildlife, they live here it's fine
|
||||
|
||||
L.inflict_heat_damage(1)
|
||||
to_chat(L, span_warning("Smoldering ash singes you!"))
|
||||
L.inflict_heat_damage(1)
|
||||
to_chat(L, span_warning("Smoldering ash singes you!"))
|
||||
|
||||
|
||||
|
||||
@@ -579,17 +577,16 @@ var/datum/planet/virgo3c/planet_virgo3c = null
|
||||
// How much radiation is bursted onto a random tile near a mob.
|
||||
var/fallout_rad_low = RAD_LEVEL_HIGH
|
||||
var/fallout_rad_high = RAD_LEVEL_VERY_HIGH
|
||||
effect_flags = HAS_PLANET_EFFECT | EFFECT_ONLY_LIVING
|
||||
|
||||
/datum/weather/virgo3c/fallout/process_effects()
|
||||
..()
|
||||
for(var/mob/living/L as anything in living_mob_list)
|
||||
if(L.z in holder.our_planet.expected_z_levels)
|
||||
irradiate_nearby_turf(L)
|
||||
var/turf/T = get_turf(L)
|
||||
if(!T.is_outdoors())
|
||||
continue // They're indoors, so no need to irradiate them with fallout.
|
||||
/datum/weather/virgo3c/fallout/planet_effect(mob/living/L)
|
||||
if(L.z in holder.our_planet.expected_z_levels)
|
||||
irradiate_nearby_turf(L)
|
||||
var/turf/T = get_turf(L)
|
||||
if(!T.is_outdoors())
|
||||
return // They're indoors, so no need to irradiate them with fallout.
|
||||
|
||||
L.rad_act(rand(direct_rad_low, direct_rad_high))
|
||||
L.rad_act(rand(direct_rad_low, direct_rad_high))
|
||||
|
||||
// This makes random tiles near people radioactive for awhile.
|
||||
// Tiles far away from people are left alone, for performance.
|
||||
|
||||
@@ -264,28 +264,27 @@ var/datum/planet/virgo4/planet_virgo4 = null
|
||||
imminent_transition_message = "Light drips of water are starting to fall from the sky."
|
||||
outdoor_sounds_type = /datum/looping_sound/weather/rain
|
||||
indoor_sounds_type = /datum/looping_sound/weather/rain/indoors
|
||||
effect_flags = HAS_PLANET_EFFECT | EFFECT_ONLY_LIVING
|
||||
|
||||
/datum/weather/virgo4/rain/process_effects()
|
||||
..()
|
||||
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.is_outdoors())
|
||||
continue // They're indoors, so no need to rain on them.
|
||||
/datum/weather/virgo4/rain/planet_effect(mob/living/L)
|
||||
if(L.z in holder.our_planet.expected_z_levels)
|
||||
var/turf/T = get_turf(L)
|
||||
if(!T.is_outdoors())
|
||||
return // They're indoors, so no need to rain on them.
|
||||
|
||||
// If they have an open umbrella, it'll guard from rain
|
||||
var/obj/item/melee/umbrella/U = L.get_active_hand()
|
||||
if(!istype(U) || !U.open)
|
||||
U = L.get_inactive_hand()
|
||||
// If they have an open umbrella, it'll guard from rain
|
||||
var/obj/item/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_notice("Rain patters softly onto your umbrella."))
|
||||
continue
|
||||
|
||||
L.water_act(1)
|
||||
if(istype(U) && U.open)
|
||||
if(show_message)
|
||||
to_chat(L, effect_message)
|
||||
to_chat(L, span_notice("Rain patters softly onto your umbrella."))
|
||||
return
|
||||
|
||||
L.water_act(1)
|
||||
if(show_message)
|
||||
to_chat(L, effect_message)
|
||||
|
||||
/datum/weather/virgo4/storm
|
||||
name = "storm"
|
||||
@@ -314,30 +313,31 @@ var/datum/planet/virgo4/planet_virgo4 = null
|
||||
WEATHER_STORM = 10,
|
||||
WEATHER_RAIN = 80
|
||||
)
|
||||
effect_flags = HAS_PLANET_EFFECT | EFFECT_ONLY_LIVING
|
||||
|
||||
/datum/weather/virgo4/storm/planet_effect(mob/living/L)
|
||||
if(L.z in holder.our_planet.expected_z_levels)
|
||||
var/turf/T = get_turf(L)
|
||||
if(!T.is_outdoors())
|
||||
return // They're indoors, so no need to rain on them.
|
||||
|
||||
// If they have an open umbrella, it'll guard from rain
|
||||
var/obj/item/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_notice("Rain showers loudly onto your umbrella!"))
|
||||
return
|
||||
|
||||
|
||||
L.water_act(2)
|
||||
if(show_message)
|
||||
to_chat(L, effect_message)
|
||||
|
||||
/datum/weather/virgo4/storm/process_effects()
|
||||
..()
|
||||
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.is_outdoors())
|
||||
continue // They're indoors, so no need to rain on them.
|
||||
|
||||
// If they have an open umbrella, it'll guard from rain
|
||||
var/obj/item/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_notice("Rain showers loudly onto your umbrella!"))
|
||||
continue
|
||||
|
||||
|
||||
L.water_act(2)
|
||||
if(show_message)
|
||||
to_chat(L, effect_message)
|
||||
|
||||
handle_lightning()
|
||||
|
||||
// This gets called to do lightning periodically.
|
||||
@@ -370,41 +370,40 @@ var/datum/planet/virgo4/planet_virgo4 = null
|
||||
"An intense chill is felt, and chunks of ice start to fall from the sky, towards you."
|
||||
)
|
||||
imminent_transition_message = "Small bits of ice are falling from the sky, growing larger by the second. Hail is starting, get to cover!"
|
||||
effect_flags = HAS_PLANET_EFFECT | EFFECT_ONLY_HUMANS
|
||||
|
||||
/datum/weather/virgo4/hail/process_effects()
|
||||
..()
|
||||
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.is_outdoors())
|
||||
continue // They're indoors, so no need to pelt them with ice.
|
||||
/datum/weather/virgo4/hail/planet_effect(mob/living/carbon/H)
|
||||
if(H.z in holder.our_planet.expected_z_levels)
|
||||
var/turf/T = get_turf(H)
|
||||
if(!T.is_outdoors())
|
||||
return // 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/melee/umbrella/U = H.get_active_hand()
|
||||
if(!istype(U) || !U.open)
|
||||
U = H.get_inactive_hand()
|
||||
// If they have an open umbrella, it'll guard from hail
|
||||
var/obj/item/melee/umbrella/U = H.get_active_hand()
|
||||
if(!istype(U) || !U.open)
|
||||
U = H.get_inactive_hand()
|
||||
|
||||
if(istype(U) && U.open)
|
||||
if(show_message)
|
||||
to_chat(H, span_notice("Hail patters onto your umbrella."))
|
||||
continue
|
||||
|
||||
var/target_zone = pick(BP_ALL)
|
||||
var/amount_blocked = H.run_armor_check(target_zone, "melee")
|
||||
var/amount_soaked = H.get_armor_soak(target_zone, "melee")
|
||||
|
||||
var/damage = rand(1,3)
|
||||
|
||||
if(amount_blocked >= 30)
|
||||
continue // No need to apply damage. Hardhats are 30. They should probably protect you from hail on your head.
|
||||
//Voidsuits are likewise 40, and riot, 80. Clothes are all less than 30.
|
||||
|
||||
if(amount_soaked >= damage)
|
||||
continue // No need to apply damage.
|
||||
|
||||
H.apply_damage(damage, BRUTE, target_zone, amount_blocked, amount_soaked)
|
||||
if(istype(U) && U.open)
|
||||
if(show_message)
|
||||
to_chat(H, effect_message)
|
||||
to_chat(H, span_notice("Hail patters onto your umbrella."))
|
||||
return
|
||||
|
||||
var/target_zone = pick(BP_ALL)
|
||||
var/amount_blocked = H.run_armor_check(target_zone, "melee")
|
||||
var/amount_soaked = H.get_armor_soak(target_zone, "melee")
|
||||
|
||||
var/damage = rand(1,3)
|
||||
|
||||
if(amount_blocked >= 30)
|
||||
return // No need to apply damage. Hardhats are 30. They should probably protect you from hail on your head.
|
||||
//Voidsuits are likewise 40, and riot, 80. Clothes are all less than 30.
|
||||
|
||||
if(amount_soaked >= damage)
|
||||
return // No need to apply damage.
|
||||
|
||||
H.apply_damage(damage, BRUTE, target_zone, amount_blocked, amount_soaked)
|
||||
if(show_message)
|
||||
to_chat(H, effect_message)
|
||||
|
||||
/datum/weather/virgo4/fog
|
||||
name = "fog"
|
||||
@@ -490,16 +489,15 @@ var/datum/planet/virgo4/planet_virgo4 = null
|
||||
// Lets recycle.
|
||||
outdoor_sounds_type = /datum/looping_sound/weather/outside_blizzard
|
||||
indoor_sounds_type = /datum/looping_sound/weather/inside_blizzard
|
||||
effect_flags = HAS_PLANET_EFFECT | EFFECT_ONLY_LIVING
|
||||
|
||||
/datum/weather/virgo4/ash_storm/process_effects()
|
||||
..()
|
||||
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.is_outdoors())
|
||||
continue // They're indoors, so no need to burn them with ash.
|
||||
/datum/weather/virgo4/ash_storm/planet_effect(mob/living/L)
|
||||
if(L.z in holder.our_planet.expected_z_levels)
|
||||
var/turf/T = get_turf(L)
|
||||
if(!T.is_outdoors())
|
||||
return // They're indoors, so no need to burn them with ash.
|
||||
|
||||
L.inflict_heat_damage(rand(1, 3))
|
||||
L.inflict_heat_damage(rand(1, 3))
|
||||
|
||||
//A non-lethal variant of the ash_storm. Stays on indefinitely.
|
||||
/datum/weather/virgo4/ash_storm_safe
|
||||
@@ -550,17 +548,16 @@ var/datum/planet/virgo4/planet_virgo4 = null
|
||||
// How much radiation is bursted onto a random tile near a mob.
|
||||
var/fallout_rad_low = RAD_LEVEL_HIGH
|
||||
var/fallout_rad_high = RAD_LEVEL_VERY_HIGH
|
||||
effect_flags = HAS_PLANET_EFFECT | EFFECT_ONLY_LIVING
|
||||
|
||||
/datum/weather/virgo4/fallout/process_effects()
|
||||
..()
|
||||
for(var/mob/living/L as anything in living_mob_list)
|
||||
if(L.z in holder.our_planet.expected_z_levels)
|
||||
irradiate_nearby_turf(L)
|
||||
var/turf/T = get_turf(L)
|
||||
if(!T.is_outdoors())
|
||||
continue // They're indoors, so no need to irradiate them with fallout.
|
||||
/datum/weather/virgo4/fallout/planet_effect(mob/living/L)
|
||||
if(L.z in holder.our_planet.expected_z_levels)
|
||||
irradiate_nearby_turf(L)
|
||||
var/turf/T = get_turf(L)
|
||||
if(!T.is_outdoors())
|
||||
return // They're indoors, so no need to irradiate them with fallout.
|
||||
|
||||
L.rad_act(rand(direct_rad_low, direct_rad_high))
|
||||
L.rad_act(rand(direct_rad_low, direct_rad_high))
|
||||
|
||||
// This makes random tiles near people radioactive for awhile.
|
||||
// Tiles far away from people are left alone, for performance.
|
||||
|
||||
@@ -202,6 +202,7 @@
|
||||
var/datum/looping_sound/indoor_sounds = null
|
||||
var/outdoor_sounds_type = null
|
||||
var/indoor_sounds_type = null
|
||||
var/effect_flags = NONE
|
||||
|
||||
/datum/weather/New()
|
||||
if(outdoor_sounds_type)
|
||||
@@ -215,6 +216,29 @@
|
||||
if(world.time >= last_message + message_delay)
|
||||
last_message = world.time // Reset the timer
|
||||
show_message = TRUE // Tell the rest of the process that we need to make a message
|
||||
if(effect_flags & HAS_PLANET_EFFECT)
|
||||
if(effect_flags & EFFECT_ALL_MOBS)
|
||||
for(var/mob/M as anything in mob_list)
|
||||
if(M.is_incorporeal() && !(effect_flags & EFFECT_ALWAYS_HITS))
|
||||
continue
|
||||
planet_effect(M)
|
||||
if(effect_flags & EFFECT_ONLY_LIVING)
|
||||
for(var/mob/living/L as anything in living_mob_list)
|
||||
if(L.is_incorporeal() && !(effect_flags & EFFECT_ALWAYS_HITS))
|
||||
continue
|
||||
planet_effect(L)
|
||||
if(effect_flags & EFFECT_ONLY_HUMANS)
|
||||
for(var/mob/living/carbon/H as anything in human_mob_list)
|
||||
if(H.is_incorporeal() && !(effect_flags & EFFECT_ALWAYS_HITS))
|
||||
continue
|
||||
planet_effect(H)
|
||||
if(effect_flags & EFFECT_ONLY_ROBOTS)
|
||||
for(var/mob/living/silicon/R as anything in silicon_mob_list)
|
||||
if(R.is_incorporeal() && !(effect_flags & EFFECT_ALWAYS_HITS))
|
||||
continue
|
||||
planet_effect(R)
|
||||
|
||||
/datum/weather/proc/planet_effect(mob/living/L)
|
||||
return
|
||||
|
||||
/datum/weather/proc/process_sounds()
|
||||
|
||||
@@ -50,6 +50,6 @@
|
||||
. = ..()
|
||||
|
||||
if(istype(over_object))
|
||||
if(!QDELETED(src) && istype(loc, /turf) && is_anomalous() && Adjacent(over_object) && CanMouseDrop(over_object, usr))
|
||||
if(!QDELETED(src) && isturf(loc) && is_anomalous() && Adjacent(over_object) && CanMouseDrop(over_object, usr))
|
||||
Bumped(usr)
|
||||
over_object.contain(src)
|
||||
|
||||
@@ -116,39 +116,38 @@
|
||||
WEATHER_OVERCAST = 100
|
||||
)
|
||||
imminent_transition_message = "The sky fills with green clouds."
|
||||
effect_flags = HAS_PLANET_EFFECT | EFFECT_ONLY_HUMANS
|
||||
|
||||
/datum/weather/sif/toxinrain/process_effects()
|
||||
..()
|
||||
for(var/mob/living/carbon/H as anything in human_mob_list)
|
||||
if(H?.z in holder.our_planet.expected_z_levels) // CHOMPedit Add a check that L has to be valid and not null
|
||||
var/turf/T = get_turf(H)
|
||||
if(!T.is_outdoors())
|
||||
continue
|
||||
/datum/weather/sif/toxinrain/planet_effect(mob/living/carbon/H)
|
||||
if(H.z in holder.our_planet.expected_z_levels)
|
||||
var/turf/T = get_turf(H)
|
||||
if(!T.is_outdoors())
|
||||
return
|
||||
|
||||
var/obj/item/melee/umbrella/U = H.get_active_hand()
|
||||
if(!istype(U) || !U.open)
|
||||
U = H.get_inactive_hand()
|
||||
var/obj/item/melee/umbrella/U = H.get_active_hand()
|
||||
if(!istype(U) || !U.open)
|
||||
U = H.get_inactive_hand()
|
||||
|
||||
if(istype(U) && U.open)
|
||||
if(show_message)
|
||||
to_chat(H, span_notice("Rain patters onto your umbrella."))
|
||||
continue
|
||||
|
||||
var/target_zone = pick(BP_ALL)
|
||||
var/amount_blocked = H.run_armor_check(target_zone, "bio")
|
||||
var/amount_soaked = H.get_armor_soak(target_zone, "bio")
|
||||
|
||||
var/damage = rand(1,5)
|
||||
|
||||
if(amount_blocked >= 40)
|
||||
continue
|
||||
|
||||
if(amount_soaked >= damage)
|
||||
continue // No need to apply damage.
|
||||
|
||||
H.apply_damage(damage, BURN, target_zone, amount_blocked, amount_soaked, used_weapon = "acidic rain")
|
||||
if(istype(U) && U.open)
|
||||
if(show_message)
|
||||
to_chat(H, effect_message)
|
||||
to_chat(H, span_notice("Rain patters onto your umbrella."))
|
||||
return
|
||||
|
||||
var/target_zone = pick(BP_ALL)
|
||||
var/amount_blocked = H.run_armor_check(target_zone, "bio")
|
||||
var/amount_soaked = H.get_armor_soak(target_zone, "bio")
|
||||
|
||||
var/damage = rand(1,5)
|
||||
|
||||
if(amount_blocked >= 40)
|
||||
return
|
||||
|
||||
if(amount_soaked >= damage)
|
||||
return // No need to apply damage.
|
||||
|
||||
H.apply_damage(damage, BURN, target_zone, amount_blocked, amount_soaked, used_weapon = "acidic rain")
|
||||
if(show_message)
|
||||
to_chat(H, effect_message)
|
||||
|
||||
/datum/weather/sif/sandstorm
|
||||
name = "Sandstorm"
|
||||
@@ -159,31 +158,29 @@
|
||||
WEATHER_OVERCAST = 100
|
||||
)
|
||||
imminent_transition_message = "Pebbles fly through the sky."
|
||||
effect_flags = HAS_PLANET_EFFECT | EFFECT_ONLY_HUMANS
|
||||
|
||||
/datum/weather/sif/sandstorm/planet_effect(mob/living/carbon/H)
|
||||
if(H.z in holder.our_planet.expected_z_levels)
|
||||
var/turf/T = get_turf(H)
|
||||
if(!T.is_outdoors())
|
||||
return
|
||||
|
||||
/datum/weather/sif/sandstorm/process_effects()
|
||||
..()
|
||||
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.is_outdoors())
|
||||
continue
|
||||
var/target_zone = pick(BP_ALL)
|
||||
var/amount_blocked = H.run_armor_check(target_zone, "melee")
|
||||
var/amount_soaked = H.get_armor_soak(target_zone, "melee")
|
||||
|
||||
var/target_zone = pick(BP_ALL)
|
||||
var/amount_blocked = H.run_armor_check(target_zone, "melee")
|
||||
var/amount_soaked = H.get_armor_soak(target_zone, "melee")
|
||||
var/damage = rand(1,2)
|
||||
|
||||
var/damage = rand(1,2)
|
||||
if(amount_blocked >= 10)
|
||||
return
|
||||
|
||||
if(amount_blocked >= 10)
|
||||
continue
|
||||
if(amount_soaked >= damage)
|
||||
return // No need to apply damage.
|
||||
|
||||
if(amount_soaked >= damage)
|
||||
continue // No need to apply damage.
|
||||
|
||||
H.apply_damage(damage, BRUTE, target_zone, amount_blocked, amount_soaked, used_weapon = "sand")
|
||||
if(show_message)
|
||||
to_chat(H, effect_message)
|
||||
H.apply_damage(damage, BRUTE, target_zone, amount_blocked, amount_soaked, used_weapon = "sand")
|
||||
if(show_message)
|
||||
to_chat(H, effect_message)
|
||||
|
||||
//datum/weather/sif/stupidbrainwantingthingsinfives
|
||||
|
||||
@@ -198,15 +195,14 @@
|
||||
WEATHER_OVERCAST = 100
|
||||
)
|
||||
imminent_transition_message = "Stars begin to dance closer then before."
|
||||
effect_flags = HAS_PLANET_EFFECT | EFFECT_ONLY_HUMANS
|
||||
|
||||
/datum/weather/sif/starryrift/process_effects()
|
||||
..()
|
||||
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.is_outdoors())
|
||||
continue
|
||||
H.add_modifier(/datum/modifier/starrynight_boon, 1 SECONDS, src)
|
||||
/datum/weather/sif/starryrift/planet_effect(mob/living/carbon/H)
|
||||
if(H.z in holder.our_planet.expected_z_levels)
|
||||
var/turf/T = get_turf(H)
|
||||
if(!T.is_outdoors())
|
||||
return
|
||||
H.add_modifier(/datum/modifier/starrynight_boon, 1 SECONDS, src)
|
||||
|
||||
/datum/modifier/starrynight_boon
|
||||
name = "Starry Night"
|
||||
@@ -246,15 +242,14 @@
|
||||
WEATHER_OVERCAST = 100
|
||||
)
|
||||
imminent_transition_message = "Fog emerges from nowhere."
|
||||
effect_flags = HAS_PLANET_EFFECT | EFFECT_ONLY_HUMANS
|
||||
|
||||
/datum/weather/sif/midnightfog/process_effects()
|
||||
..()
|
||||
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.is_outdoors())
|
||||
continue
|
||||
H.add_modifier(/datum/modifier/midnightfog_boon, 1 SECONDS, src)
|
||||
/datum/weather/sif/midnightfog/planet_effect(mob/living/carbon/H)
|
||||
if(H.z in holder.our_planet.expected_z_levels)
|
||||
var/turf/T = get_turf(H)
|
||||
if(!T.is_outdoors())
|
||||
return
|
||||
H.add_modifier(/datum/modifier/midnightfog_boon, 1 SECONDS, src)
|
||||
|
||||
/datum/weather/sif/fallout/temp
|
||||
name = "short-term fallout"
|
||||
@@ -314,32 +309,33 @@
|
||||
)
|
||||
outdoor_sounds_type = /datum/looping_sound/weather/rainheavy
|
||||
indoor_sounds_type = /datum/looping_sound/weather/rainindoors
|
||||
effect_flags = HAS_PLANET_EFFECT | EFFECT_ONLY_LIVING
|
||||
|
||||
/datum/weather/sif/downpour/planet_effect(mob/living/L)
|
||||
if(L.z in holder.our_planet.expected_z_levels)
|
||||
var/turf/T = get_turf(L)
|
||||
if(!T.is_outdoors())
|
||||
return // They're indoors, so no need to rain on them.
|
||||
|
||||
// If they have an open umbrella, knock it off, this is more then an umbrella
|
||||
if(ishuman(L))
|
||||
var/mob/living/carbon/human/H = L
|
||||
var/obj/item/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_notice("The rain pushes the umbrella off your hands!"))
|
||||
H.drop_both_hands()
|
||||
|
||||
L.water_act(2)
|
||||
L.Weaken(3)
|
||||
if(show_message)
|
||||
to_chat(L, effect_message)
|
||||
|
||||
/datum/weather/sif/downpour/process_effects()
|
||||
..()
|
||||
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.is_outdoors())
|
||||
continue // They're indoors, so no need to rain on them.
|
||||
|
||||
// If they have an open umbrella, knock it off, this is more then an umbrella
|
||||
if(ishuman(L))
|
||||
var/mob/living/carbon/human/H = L
|
||||
var/obj/item/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_notice("The rain pushes the umbrella off your hands!"))
|
||||
H.drop_both_hands()
|
||||
|
||||
L.water_act(2)
|
||||
L.Weaken(3)
|
||||
if(show_message)
|
||||
to_chat(L, effect_message)
|
||||
|
||||
handle_lightning()
|
||||
|
||||
// This gets called to do lightning periodically.
|
||||
@@ -376,45 +372,45 @@
|
||||
//No transition message, supposed to be the 'actual' rain
|
||||
outdoor_sounds_type = /datum/looping_sound/weather/rainextreme
|
||||
indoor_sounds_type = /datum/looping_sound/weather/rainindoors
|
||||
effect_flags = HAS_PLANET_EFFECT | EFFECT_ONLY_LIVING
|
||||
|
||||
/datum/weather/sif/downpourfatal/planet_effect(mob/living/L)
|
||||
if(L.z in holder.our_planet.expected_z_levels)
|
||||
var/turf/T = get_turf(L)
|
||||
if(!T.is_outdoors())
|
||||
return // They're indoors, so no need to rain on them.
|
||||
|
||||
// Knock the umbrella off your hands, aint protecting you c:
|
||||
if(ishuman(L))
|
||||
var/mob/living/carbon/human/H = L
|
||||
var/obj/item/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_notice("The rain pushes the umbrella off your hands!"))
|
||||
H.drop_both_hands()
|
||||
|
||||
var/target_zone = pick(BP_ALL)
|
||||
var/amount_blocked = L.run_armor_check(target_zone, "melee")
|
||||
var/amount_soaked = L.get_armor_soak(target_zone, "melee")
|
||||
|
||||
var/damage = rand(10,30) //Ow
|
||||
|
||||
if(amount_blocked >= 30)
|
||||
return
|
||||
|
||||
if(amount_soaked >= damage)
|
||||
return // No need to apply damage.
|
||||
|
||||
L.apply_damage(damage, BRUTE, target_zone, amount_blocked, amount_soaked, used_weapon = "rain bludgoning")
|
||||
L.Weaken(3)
|
||||
if(show_message)
|
||||
to_chat(L, effect_message)
|
||||
|
||||
/datum/weather/sif/downpourfatal/process_effects()
|
||||
..()
|
||||
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.is_outdoors())
|
||||
continue // They're indoors, so no need to rain on them.
|
||||
|
||||
// Knock the umbrella off your hands, aint protecting you c:
|
||||
if(ishuman(L))
|
||||
var/mob/living/carbon/human/H = L
|
||||
var/obj/item/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_notice("The rain pushes the umbrella off your hands!"))
|
||||
H.drop_both_hands()
|
||||
|
||||
var/target_zone = pick(BP_ALL)
|
||||
var/amount_blocked = L.run_armor_check(target_zone, "melee")
|
||||
var/amount_soaked = L.get_armor_soak(target_zone, "melee")
|
||||
|
||||
var/damage = rand(10,30) //Ow
|
||||
|
||||
if(amount_blocked >= 30)
|
||||
continue
|
||||
|
||||
if(amount_soaked >= damage)
|
||||
continue // No need to apply damage.
|
||||
|
||||
L.apply_damage(damage, BRUTE, target_zone, amount_blocked, amount_soaked, used_weapon = "rain bludgoning")
|
||||
L.Weaken(3)
|
||||
if(show_message)
|
||||
to_chat(L, effect_message)
|
||||
|
||||
|
||||
handle_lightning()
|
||||
|
||||
// This gets called to do lightning periodically.
|
||||
|
||||
@@ -160,30 +160,29 @@ var/datum/planet/tyr/planet_tyr = null
|
||||
sky_visible = TRUE
|
||||
observed_message = "The sky is on fire."
|
||||
imminent_transition_message = "The sky is set ablaze."
|
||||
effect_flags = HAS_PLANET_EFFECT | EFFECT_ONLY_HUMANS
|
||||
|
||||
/datum/weather/tyr/flamestorm/process_effects()
|
||||
..()
|
||||
for(var/mob/living/carbon/H as anything in human_mob_list)
|
||||
if(H?.z in holder.our_planet.expected_z_levels) // CHOMPedit Add a check that L has to be valid and not null
|
||||
var/turf/T = get_turf(H)
|
||||
if(!T.is_outdoors())
|
||||
continue
|
||||
/datum/weather/tyr/flamestorm/planet_effect(mob/living/carbon/H)
|
||||
if(H.z in holder.our_planet.expected_z_levels)
|
||||
var/turf/T = get_turf(H)
|
||||
if(!T.is_outdoors())
|
||||
return
|
||||
|
||||
var/target_zone = pick(BP_ALL)
|
||||
var/amount_blocked = H.run_armor_check(target_zone, "bio")
|
||||
var/amount_soaked = H.get_armor_soak(target_zone, "bio")
|
||||
var/target_zone = pick(BP_ALL)
|
||||
var/amount_blocked = H.run_armor_check(target_zone, "bio")
|
||||
var/amount_soaked = H.get_armor_soak(target_zone, "bio")
|
||||
|
||||
var/damage = rand(1,1)
|
||||
var/damage = rand(1,1)
|
||||
|
||||
if(amount_blocked >= 40)
|
||||
continue
|
||||
if(amount_blocked >= 40)
|
||||
return
|
||||
|
||||
if(amount_soaked >= damage)
|
||||
continue // No need to apply damage.
|
||||
if(amount_soaked >= damage)
|
||||
return // No need to apply damage.
|
||||
|
||||
H.apply_damage(damage, BURN, target_zone, amount_blocked, amount_soaked, used_weapon = "burning ash")
|
||||
if(show_message)
|
||||
to_chat(H, effect_message)
|
||||
H.apply_damage(damage, BURN, target_zone, amount_blocked, amount_soaked, used_weapon = "burning ash")
|
||||
if(show_message)
|
||||
to_chat(H, effect_message)
|
||||
|
||||
/datum/weather/tyr/sandstorm
|
||||
name = "sandstorm"
|
||||
@@ -198,31 +197,29 @@ var/datum/planet/tyr/planet_tyr = null
|
||||
sky_visible = TRUE
|
||||
observed_message = "The sky is full of sand."
|
||||
imminent_transition_message = "Pebbles begin to fill the sky."
|
||||
effect_flags = HAS_PLANET_EFFECT | EFFECT_ONLY_HUMANS
|
||||
|
||||
/datum/weather/tyr/sandstorm/planet_effect(mob/living/carbon/H)
|
||||
if(H.z in holder.our_planet.expected_z_levels)
|
||||
var/turf/T = get_turf(H)
|
||||
if(!T.is_outdoors())
|
||||
return
|
||||
|
||||
/datum/weather/tyr/sandstorm/process_effects()
|
||||
..()
|
||||
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.is_outdoors())
|
||||
continue
|
||||
var/target_zone = pick(BP_ALL)
|
||||
var/amount_blocked = H.run_armor_check(target_zone, "melee")
|
||||
var/amount_soaked = H.get_armor_soak(target_zone, "melee")
|
||||
|
||||
var/target_zone = pick(BP_ALL)
|
||||
var/amount_blocked = H.run_armor_check(target_zone, "melee")
|
||||
var/amount_soaked = H.get_armor_soak(target_zone, "melee")
|
||||
var/damage = rand(2,2)
|
||||
|
||||
var/damage = rand(2,2)
|
||||
if(amount_blocked >= 10)
|
||||
return
|
||||
|
||||
if(amount_blocked >= 10)
|
||||
continue
|
||||
if(amount_soaked >= damage)
|
||||
return // No need to apply damage.
|
||||
|
||||
if(amount_soaked >= damage)
|
||||
continue // No need to apply damage.
|
||||
|
||||
H.apply_damage(damage, BRUTE, target_zone, amount_blocked, amount_soaked, used_weapon = "sand")
|
||||
if(show_message)
|
||||
to_chat(H, effect_message)
|
||||
H.apply_damage(damage, BRUTE, target_zone, amount_blocked, amount_soaked, used_weapon = "sand")
|
||||
if(show_message)
|
||||
to_chat(H, effect_message)
|
||||
|
||||
/datum/weather/tyr/sandstorm_fierce
|
||||
name = "fierce sandstorm"
|
||||
@@ -240,30 +237,29 @@ var/datum/planet/tyr/planet_tyr = null
|
||||
light_modifier = 0.5
|
||||
|
||||
imminent_transition_message = "The sky is blocked out by rock."
|
||||
effect_flags = HAS_PLANET_EFFECT | EFFECT_ONLY_HUMANS
|
||||
|
||||
/datum/weather/tyr/sandstorm_fierce/process_effects()
|
||||
..()
|
||||
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.is_outdoors())
|
||||
continue
|
||||
/datum/weather/tyr/sandstorm_fierce/planet_effect(mob/living/carbon/H)
|
||||
if(H.z in holder.our_planet.expected_z_levels)
|
||||
var/turf/T = get_turf(H)
|
||||
if(!T.is_outdoors())
|
||||
return
|
||||
|
||||
var/target_zone = pick(BP_ALL)
|
||||
var/amount_blocked = H.run_armor_check(target_zone, "melee")
|
||||
var/amount_soaked = H.get_armor_soak(target_zone, "melee")
|
||||
var/target_zone = pick(BP_ALL)
|
||||
var/amount_blocked = H.run_armor_check(target_zone, "melee")
|
||||
var/amount_soaked = H.get_armor_soak(target_zone, "melee")
|
||||
|
||||
var/damage = rand(5,5)
|
||||
var/damage = rand(5,5)
|
||||
|
||||
if(amount_blocked >= 40)
|
||||
continue
|
||||
if(amount_blocked >= 40)
|
||||
return
|
||||
|
||||
if(amount_soaked >= damage)
|
||||
continue // No need to apply damage.
|
||||
if(amount_soaked >= damage)
|
||||
return // No need to apply damage.
|
||||
|
||||
H.apply_damage(damage, BRUTE, target_zone, amount_blocked, amount_soaked, used_weapon = "sand")
|
||||
if(show_message)
|
||||
to_chat(H, effect_message)
|
||||
H.apply_damage(damage, BRUTE, target_zone, amount_blocked, amount_soaked, used_weapon = "sand")
|
||||
if(show_message)
|
||||
to_chat(H, effect_message)
|
||||
|
||||
//Anomalous/summonable weather
|
||||
/datum/weather/tyr/starrynight
|
||||
@@ -274,15 +270,14 @@ var/datum/planet/tyr/planet_tyr = null
|
||||
WEATHER_FALLOUT_TEMP = 50)
|
||||
|
||||
imminent_transition_message = "The sky is rapidly begins to glow."
|
||||
effect_flags = HAS_PLANET_EFFECT | EFFECT_ONLY_HUMANS
|
||||
|
||||
/datum/weather/tyr/starrynight/process_effects()
|
||||
..()
|
||||
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.is_outdoors())
|
||||
continue
|
||||
H.add_modifier(/datum/modifier/starrynight_boon, 1 SECONDS, src)
|
||||
/datum/weather/tyr/starrynight/planet_effect(mob/living/carbon/H)
|
||||
if(H.z in holder.our_planet.expected_z_levels)
|
||||
var/turf/T = get_turf(H)
|
||||
if(!T.is_outdoors())
|
||||
return
|
||||
H.add_modifier(/datum/modifier/starrynight_boon, 1 SECONDS, src)
|
||||
|
||||
/datum/weather/tyr/blizzard
|
||||
name = "blizzard"
|
||||
@@ -319,17 +314,16 @@ var/datum/planet/tyr/planet_tyr = null
|
||||
// How much radiation is bursted onto a random tile near a mob.
|
||||
var/fallout_rad_low = RAD_LEVEL_HIGH
|
||||
var/fallout_rad_high = RAD_LEVEL_VERY_HIGH
|
||||
effect_flags = HAS_PLANET_EFFECT | EFFECT_ONLY_LIVING
|
||||
|
||||
/datum/weather/tyr/storm/process_effects()
|
||||
..()
|
||||
for(var/mob/living/L as anything in living_mob_list)
|
||||
if(L.z in holder.our_planet.expected_z_levels)
|
||||
irradiate_nearby_turf(L)
|
||||
var/turf/T = get_turf(L)
|
||||
if(!T.is_outdoors())
|
||||
continue // They're indoors, so no need to irradiate them with fallout.
|
||||
/datum/weather/tyr/storm/planet_effect(mob/living/L)
|
||||
if(L.z in holder.our_planet.expected_z_levels)
|
||||
irradiate_nearby_turf(L)
|
||||
var/turf/T = get_turf(L)
|
||||
if(!T.is_outdoors())
|
||||
return // They're indoors, so no need to irradiate them with fallout.
|
||||
|
||||
L.rad_act(rand(direct_rad_low, direct_rad_high))
|
||||
L.rad_act(rand(direct_rad_low, direct_rad_high))
|
||||
|
||||
// This makes random tiles near people radioactive for awhile.
|
||||
// Tiles far away from people are left alone, for performance.
|
||||
@@ -359,30 +353,31 @@ var/datum/planet/tyr/planet_tyr = null
|
||||
var/next_lightning_strike = 0 // world.time when lightning will strike.
|
||||
var/min_lightning_cooldown = 5 SECONDS
|
||||
var/max_lightning_cooldown = 1 MINUTE
|
||||
effect_flags = HAS_PLANET_EFFECT | EFFECT_ONLY_LIVING
|
||||
|
||||
/datum/weather/tyr/fog/planet_effect(mob/living/L)
|
||||
if(L.z in holder.our_planet.expected_z_levels)
|
||||
var/turf/T = get_turf(L)
|
||||
if(!T.is_outdoors())
|
||||
return // They're indoors, so no need to rain on them.
|
||||
|
||||
// If they have an open umbrella, it'll guard from rain
|
||||
var/obj/item/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_notice("Rain showers loudly onto your umbrella!"))
|
||||
return
|
||||
|
||||
|
||||
L.water_act(2)
|
||||
if(show_message)
|
||||
to_chat(L, effect_message)
|
||||
|
||||
/datum/weather/tyr/fog/process_effects()
|
||||
..()
|
||||
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.is_outdoors())
|
||||
continue // They're indoors, so no need to rain on them.
|
||||
|
||||
// If they have an open umbrella, it'll guard from rain
|
||||
var/obj/item/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_notice("Rain showers loudly onto your umbrella!"))
|
||||
continue
|
||||
|
||||
|
||||
L.water_act(2)
|
||||
if(show_message)
|
||||
to_chat(L, effect_message)
|
||||
|
||||
handle_lightning()
|
||||
|
||||
// This gets called to do lightning periodically.
|
||||
|
||||
@@ -181,6 +181,7 @@
|
||||
#include "code\__defines\vore_prefs.dm"
|
||||
#include "code\__defines\vote.dm"
|
||||
#include "code\__defines\vv.dm"
|
||||
#include "code\__defines\weather.dm"
|
||||
#include "code\__defines\webhooks.dm"
|
||||
#include "code\__defines\wiki.dm"
|
||||
#include "code\__defines\wires.dm"
|
||||
|
||||
Reference in New Issue
Block a user