diff --git a/code/game/turfs/closed.dm b/code/game/turfs/closed.dm
index 79ab9742dc4..66c96b6dcde 100644
--- a/code/game/turfs/closed.dm
+++ b/code/game/turfs/closed.dm
@@ -10,6 +10,9 @@
icon = 'icons/turf/walls.dmi'
explosion_block = 50
+/turf/closed/indestructible/TerraformTurf(path, defer_change = FALSE, ignore_air = FALSE)
+ return
+
/turf/closed/indestructible/acid_act(acidpwr, acid_volume, acid_id)
return 0
diff --git a/code/game/turfs/open.dm b/code/game/turfs/open.dm
index 27918fbd65c..14d323201a9 100644
--- a/code/game/turfs/open.dm
+++ b/code/game/turfs/open.dm
@@ -10,6 +10,9 @@
icon = 'icons/turf/floors.dmi'
icon_state = "floor"
+/turf/open/indestructible/TerraformTurf(path, defer_change = FALSE, ignore_air = FALSE)
+ return
+
/turf/open/indestructible/sound
name = "squeeky floor"
var/sound
diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm
index 8d9c8b9b59f..d086027ce7f 100644
--- a/code/game/turfs/turf.dm
+++ b/code/game/turfs/turf.dm
@@ -157,8 +157,12 @@
if(L)
qdel(L)
+//wrapper for ChangeTurf()s that you want to prevent/affect without overriding ChangeTurf() itself
+/turf/proc/TerraformTurf(path, defer_change = FALSE, ignore_air = FALSE)
+ return ChangeTurf(path, defer_change, ignore_air)
+
//Creates a new turf
-/turf/proc/ChangeTurf(path, defer_change = FALSE,ignore_air = FALSE)
+/turf/proc/ChangeTurf(path, defer_change = FALSE, ignore_air = FALSE)
if(!path)
return
if(!use_preloader && path == type) // Don't no-op if the map loader requires it to be reconstructed
@@ -172,8 +176,8 @@
Destroy() //❄
var/turf/W = new path(src)
W.proximity_checkers = old_checkers
-
-
+
+
if(!defer_change)
W.AfterChange(ignore_air)
W.blueprint_data = old_blueprint_data
diff --git a/code/modules/mining/lavaland/necropolis_chests.dm b/code/modules/mining/lavaland/necropolis_chests.dm
index 2735174c3f1..4ecbea61cef 100644
--- a/code/modules/mining/lavaland/necropolis_chests.dm
+++ b/code/modules/mining/lavaland/necropolis_chests.dm
@@ -665,21 +665,22 @@
user.visible_message("[user] points [src] at [T]!")
timer = world.time + create_delay + 1
if(do_after(user, create_delay, target = T))
- user.visible_message("[user] turns \the [T] into [transform_string]!")
- message_admins("[key_name_admin(user)] fired the lava staff at [get_area(target)]. [ADMIN_COORDJMP(T)]")
- log_game("[key_name(user)] fired the lava staff at [get_area(target)] [COORD(T)].")
- T.ChangeTurf(turf_type)
- timer = world.time + create_cooldown
- qdel(L)
+ var/old_name = T.name
+ if(T.TerraformTurf(turf_type))
+ user.visible_message("[user] turns \the [old_name] into [transform_string]!")
+ message_admins("[key_name_admin(user)] fired the lava staff at [get_area(target)]. [ADMIN_COORDJMP(T)]")
+ log_game("[key_name(user)] fired the lava staff at [get_area(target)] [COORD(T)].")
+ timer = world.time + create_cooldown
+ playsound(T,'sound/magic/Fireball.ogg', 200, 1)
else
timer = world.time
- qdel(L)
- return
+ qdel(L)
else
- user.visible_message("[user] turns \the [T] into [reset_string]!")
- T.ChangeTurf(reset_turf_type)
- timer = world.time + reset_cooldown
- playsound(T,'sound/magic/Fireball.ogg', 200, 1)
+ var/old_name = T.name
+ if(T.TerraformTurf(reset_turf_type))
+ user.visible_message("[user] turns \the [old_name] into [reset_string]!")
+ timer = world.time + reset_cooldown
+ playsound(T,'sound/magic/Fireball.ogg', 200, 1)
/obj/effect/overlay/temp/lavastaff
icon_state = "lavastaff_warn"
diff --git a/code/modules/mob/living/simple_animal/hostile/mining_mobs.dm b/code/modules/mob/living/simple_animal/hostile/mining_mobs.dm
index 2bdd60d8af1..3ff74f59998 100644
--- a/code/modules/mob/living/simple_animal/hostile/mining_mobs.dm
+++ b/code/modules/mob/living/simple_animal/hostile/mining_mobs.dm
@@ -1047,7 +1047,7 @@
visible_message("The tendril falls inward, the ground around it widening into a yawning chasm!")
for(var/turf/T in range(2,src))
if(!T.density)
- T.ChangeTurf(/turf/open/chasm/straight_down/lava_land_surface)
+ T.TerraformTurf(/turf/open/chasm/straight_down/lava_land_surface)
qdel(src)
/mob/living/simple_animal/hostile/spawner/lavaland/goliath