mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-28 07:38:05 +01:00
More weather updates
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
/**********************Lavaland Areas**************************/
|
||||
|
||||
/area/lavaland
|
||||
icon_state = "mining"
|
||||
has_gravity = 1
|
||||
|
||||
/area/lavaland/surface
|
||||
name = "Lavaland"
|
||||
icon_state = "explored"
|
||||
music = null
|
||||
requires_power = 1
|
||||
ambientsounds = list('sound/ambience/ambimine.ogg')
|
||||
|
||||
/area/lavaland/underground
|
||||
name = "Lavaland Caves"
|
||||
icon_state = "unexplored"
|
||||
music = null
|
||||
always_unpowered = 1
|
||||
requires_power = 1
|
||||
poweralm = 0
|
||||
power_environ = 0
|
||||
power_equip = 0
|
||||
power_light = 0
|
||||
ambientsounds = list('sound/ambience/ambimine.ogg')
|
||||
|
||||
|
||||
/area/lavaland/surface/outdoors
|
||||
name = "Lavaland Wastes"
|
||||
@@ -10,6 +10,8 @@ var/global/datum/weather/activeWeather
|
||||
var/start_up_time = 300 //30 seconds
|
||||
var/start_up_message = "The wind begins to pick up."
|
||||
var/duration = 120 //2 minutes
|
||||
var/duration_lower = 120
|
||||
var/duration_upper = 120
|
||||
var/duration_message = "A storm has started!"
|
||||
var/wind_down = 300 // 30 seconds
|
||||
var/wind_down_message = "The storm is passing."
|
||||
@@ -22,9 +24,11 @@ var/global/datum/weather/activeWeather
|
||||
|
||||
var/start_up_overlay = "lava"
|
||||
var/duration_overlay = "lava"
|
||||
var/overlay_layer = 10 //This is the default area layer, and above everything else. 2 is floors/below walls and mobs.
|
||||
var/purely_aesthetic = FALSE //If we just want gentle rain that doesn't hurt people
|
||||
|
||||
/datum/weather/proc/weather_start_up()
|
||||
duration = rand(duration_lower,duration_upper)
|
||||
if(activeWeather)
|
||||
return
|
||||
activeWeather = src
|
||||
@@ -47,11 +51,11 @@ var/global/datum/weather/activeWeather
|
||||
sleep(duration*10)
|
||||
else //Storm effects
|
||||
for(var/i in 1 to duration-1)
|
||||
for(var/mob/living/L in living_mob_list) .
|
||||
for(var/mob/living/L in living_mob_list)
|
||||
var/turf/Z = get_turf(L)
|
||||
if(Z.weather == src)
|
||||
storm_act(L)
|
||||
sleep(10)
|
||||
sleep(10)
|
||||
|
||||
stage = WIND_DOWN_STAGE
|
||||
weather_wind_down()
|
||||
@@ -78,19 +82,30 @@ var/global/datum/weather/activeWeather
|
||||
for(var/turf/T in get_area_turfs(area_type, target_z))
|
||||
if(exclude_walls && T.density == 1)
|
||||
continue
|
||||
switch(stage)
|
||||
if(STARTUP_STAGE)
|
||||
T.overlays += "[start_up_overlay]"
|
||||
T.weather = src
|
||||
if(MAIN_STAGE)
|
||||
T.overlays -= "[duration_overlay]"
|
||||
T.overlays += "[duration_overlay]"
|
||||
T.weather = src
|
||||
if(WIND_DOWN_STAGE)
|
||||
T.overlays -= "[duration_overlay]"
|
||||
T.overlays += "[start_up_overlay]"
|
||||
T.weather = src
|
||||
if(END_STAGE)
|
||||
T.overlays -= start_up_overlay
|
||||
T.weather = null
|
||||
activeWeather = null
|
||||
if(stage == END_STAGE)
|
||||
T.weather = null
|
||||
else
|
||||
T.weather = src
|
||||
|
||||
for(var/area/N in get_areas(area_type))
|
||||
if(N.z == target_z)
|
||||
N.layer = overlay_layer
|
||||
N.icon = 'icons/effects/weather_effects.dmi'
|
||||
N.invisibility = 0
|
||||
N.opacity = 1
|
||||
switch(stage)
|
||||
if(STARTUP_STAGE)
|
||||
N.icon_state = start_up_overlay
|
||||
|
||||
if(MAIN_STAGE)
|
||||
N.icon_state = duration_overlay
|
||||
|
||||
if(WIND_DOWN_STAGE)
|
||||
N.icon_state = start_up_overlay
|
||||
|
||||
if(END_STAGE)
|
||||
N.icon_state = initial(N.icon_state)
|
||||
N.layer = 10 //Just default back to normal area stuff since I assume setting a var is faster than initial
|
||||
N.invisibility = 100
|
||||
N.opacity = 0
|
||||
activeWeather = null
|
||||
@@ -1,8 +1,11 @@
|
||||
///The floor is lava
|
||||
|
||||
/datum/weather/floor_is_lava
|
||||
name = "floor is lava"
|
||||
start_up_time = 30 //3 seconds
|
||||
start_up_message = "The ground begins to bubble."
|
||||
duration = 60 //1 minute
|
||||
duration_lower = 45
|
||||
duration_upper = 60 //1 minute
|
||||
duration_message = "The floor is lava!"
|
||||
wind_down = 30// 3 seconds
|
||||
wind_down_message = "The ground begins to cool."
|
||||
@@ -13,14 +16,50 @@
|
||||
|
||||
start_up_overlay = "lava"
|
||||
duration_overlay = "lava"
|
||||
overlay_layer = 2 //Covers floors only
|
||||
|
||||
|
||||
/datum/weather/floor_is_lavaproc/storm_act(mob/living/L)
|
||||
var/safe = 0
|
||||
var/turf/F = get_turf(L)
|
||||
for(var/obj/structure/O in L.contents)
|
||||
if(O.level > F.level && !istype(O, /obj/structure/window)) // Something to stand on and it isn't under the floor!
|
||||
safe = 1
|
||||
break
|
||||
if(!safe)
|
||||
L.adjustFireLoss(3)
|
||||
return
|
||||
L.adjustFireLoss(3)
|
||||
|
||||
|
||||
|
||||
|
||||
//Ash storms
|
||||
|
||||
/datum/weather/ash_storm
|
||||
name = "ash storm"
|
||||
start_up_time = 300 //30 seconds
|
||||
start_up_message = "The wind begins to pick up. Seek shelter."
|
||||
duration_lower = 90 //1.5 minutes
|
||||
duration_upper = 360 //3 minutes
|
||||
duration_message = "An ash storm has started! Get inside!"
|
||||
wind_down = 300 // 30 seconds
|
||||
wind_down_message = "The storm begins to fade. Should be safe to go outside again."
|
||||
|
||||
target_z = ZLEVEL_LAVALAND
|
||||
area_type = /area/lavaland/surface/outdoors
|
||||
|
||||
start_up_overlay = "light_ash"
|
||||
duration_overlay = "ash_storm"
|
||||
overlay_layer = 10
|
||||
|
||||
|
||||
/datum/weather/ash_storm/false_alarm //No storm, just light ember fall
|
||||
purely_aesthetic = TRUE
|
||||
duration_message = "An ash storm has started! Get inside!"
|
||||
duration_overlay = "light_ash"
|
||||
duration_message = "Looks like the storm just missed the mining area. False alarm."
|
||||
wind_down_message = "The ash fall starts to trail off."
|
||||
|
||||
/datum/weather/ash_storm/storm_act(mob/living/L)
|
||||
if(ishuman(L))
|
||||
var/mob/living/carbon/human/H = L
|
||||
var/thermal_protection = H.get_thermal_protection()
|
||||
if(thermal_protection >= FIRE_IMMUNITY_SUIT_MAX_TEMP_PROTECT)
|
||||
return
|
||||
L.adjustFireLoss(4)
|
||||
@@ -245,6 +245,7 @@
|
||||
threshhold.toxins = 0
|
||||
L.contents += threshhold
|
||||
threshhold.overlays.Cut()
|
||||
threshhold.weather = null
|
||||
|
||||
var/list/turfs = room["floors"]
|
||||
for(var/turf/simulated/floor/A in turfs)
|
||||
@@ -261,5 +262,5 @@
|
||||
A.air.temperature = 293.15
|
||||
SSair.add_to_active(A)
|
||||
A.overlays.Cut()
|
||||
|
||||
A.weather = null
|
||||
L.contents += A
|
||||
|
||||
Reference in New Issue
Block a user