[MIRROR] Lavaland ash storms once again replenish ash on the ground. [MDB IGNORE] (#9639)

* Lavaland ash storms once again replenish ash on the ground. (#62954)

* Lavaland ash storms once again replenish ash on the ground.

Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
This commit is contained in:
SkyratBot
2021-11-23 09:56:18 -05:00
committed by GitHub
co-authored by Ghom
parent 0e851c8ac6
commit f2dca7d757
2 changed files with 25 additions and 9 deletions
@@ -72,6 +72,17 @@
/datum/weather/ash_storm/weather_act(mob/living/victim)
victim.adjustFireLoss(4)
/datum/weather/ash_storm/end()
. = ..()
for(var/turf/open/floor/plating/asteroid/basalt/basalt as anything in GLOB.dug_up_basalt)
if(!(basalt.loc in impacted_areas) || !(basalt.z in impacted_z_levels))
continue
GLOB.dug_up_basalt -= basalt
basalt.dug = FALSE
basalt.icon_state = "[basalt.base_icon_state]"
if(prob(basalt.floor_variance))
basalt.icon_state += "[rand(0,12)]"
//Emberfalls are the result of an ash storm passing by close to the playable area of lavaland. They have a 10% chance to trigger in place of an ash storm.
/datum/weather/ash_storm/emberfall
name = "emberfall"
+14 -9
View File
@@ -20,9 +20,7 @@
/// Itemstack to drop when dug by a shovel
var/obj/item/stack/digResult = /obj/item/stack/ore/glass/basalt
/// Whether the turf has been dug or not
var/dug
/// Whether to change the turf's icon_state to "[base_icon_state]_dug" when its dugged up
var/postdig_icon_change = TRUE
var/dug = FALSE
/turf/open/floor/plating/asteroid/setup_broken_states()
return list("asteroid_dug")
@@ -38,8 +36,7 @@
/turf/open/floor/plating/asteroid/proc/getDug()
dug = TRUE
new digResult(src, 5)
if(postdig_icon_change)
icon_state = "[base_icon_state]_dug"
icon_state = "[base_icon_state]_dug"
/// If the user can dig the turf
/turf/open/floor/plating/asteroid/proc/can_dig(mob/user)
@@ -93,6 +90,9 @@
/turf/open/floor/plating/lavaland_baseturf
baseturfs = /turf/open/floor/plating/asteroid/basalt/lava_land_surface
/// Used by ashstorms to replenish basalt tiles that have been dug up without going through all of them.
GLOBAL_LIST_EMPTY(dug_up_basalt)
/turf/open/floor/plating/asteroid/basalt
name = "volcanic floor"
baseturfs = /turf/open/floor/plating/asteroid/basalt
@@ -102,6 +102,15 @@
floor_variance = 15
digResult = /obj/item/stack/ore/glass/basalt
/turf/open/floor/plating/asteroid/basalt/getDug()
set_light(0)
GLOB.dug_up_basalt |= src
return ..()
/turf/open/floor/plating/asteroid/basalt/Destroy()
GLOB.dug_up_basalt -= src
return ..()
/turf/open/floor/plating/asteroid/basalt/setup_broken_states()
return list("basalt_dug")
@@ -115,10 +124,6 @@
. = ..()
set_basalt_light(src)
/turf/open/floor/plating/asteroid/getDug()
set_light(0)
return ..()
/proc/set_basalt_light(turf/open/floor/B)
switch(B.icon_state)
if("basalt1", "basalt2", "basalt3")