Skip to content

Commit

Permalink
Makes it so the baseturf on lavaland is lava, not space (#18193)
Browse files Browse the repository at this point in the history
  • Loading branch information
farie82 authored Jul 3, 2022
1 parent 77767b8 commit 422f40b
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion code/game/turfs/simulated.dm
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
if(TURF_WET_PERMAFROST) // Permafrost
M.slip("the frosted floor", 10 SECONDS, tilesSlipped = 1, walkSafely = 0, slipAny = 1)

/turf/simulated/ChangeTurf(path, defer_change = FALSE, keep_icon = TRUE, ignore_air = FALSE)
/turf/simulated/ChangeTurf(path, defer_change = FALSE, keep_icon = TRUE, ignore_air = FALSE, copy_existing_baseturf = TRUE)
. = ..()
QUEUE_SMOOTH_NEIGHBORS(src)

Expand Down
2 changes: 1 addition & 1 deletion code/game/turfs/simulated/floor.dm
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ GLOBAL_LIST_INIT(icons_to_ignore_at_floor_init, list("damaged1","damaged2","dama
/turf/simulated/floor/proc/make_plating()
return ChangeTurf(/turf/simulated/floor/plating)

/turf/simulated/floor/ChangeTurf(turf/simulated/floor/T, defer_change = FALSE, keep_icon = TRUE, ignore_air = FALSE)
/turf/simulated/floor/ChangeTurf(turf/simulated/floor/T, defer_change = FALSE, keep_icon = TRUE, ignore_air = FALSE, copy_existing_baseturf = TRUE)
if(!istype(src, /turf/simulated/floor))
return ..() //fucking turfs switch the fucking src of the fucking running procs
if(!ispath(T, /turf/simulated/floor))
Expand Down
5 changes: 3 additions & 2 deletions code/game/turfs/turf.dm
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@
return ChangeTurf(path, defer_change, keep_icon, ignore_air)

//Creates a new turf
/turf/proc/ChangeTurf(path, defer_change = FALSE, keep_icon = TRUE, ignore_air = FALSE)
/turf/proc/ChangeTurf(path, defer_change = FALSE, keep_icon = TRUE, ignore_air = FALSE, copy_existing_baseturf = TRUE)
if(!path)
return
if(!GLOB.use_preloader && path == type) // Don't no-op if the map loader requires it to be reconstructed
Expand All @@ -228,7 +228,8 @@
changing_turf = TRUE
qdel(src) //Just get the side effects and call Destroy
var/turf/W = new path(src)
W.baseturf = old_baseturf
if(copy_existing_baseturf)
W.baseturf = old_baseturf

if(!defer_change)
W.AfterChange(ignore_air)
Expand Down
2 changes: 1 addition & 1 deletion code/modules/awaymissions/maploader/reader.dm
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ GLOBAL_DATUM_INIT(_preloader, /datum/dmm_suite/preloader, new())
var/turf/T = locate(x, y, z)
if(T)
if(ispath(path, /turf))
T.ChangeTurf(path, defer_change = TRUE, keep_icon = FALSE)
T.ChangeTurf(path, defer_change = TRUE, keep_icon = FALSE, copy_existing_baseturf = FALSE)
instance = T
else if(ispath(path, /area))

Expand Down
2 changes: 1 addition & 1 deletion code/modules/events/spacevine.dm
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@
if(prob(50))
ChangeTurf(baseturf)

/turf/simulated/floor/vines/ChangeTurf(turf/simulated/floor/T, defer_change = FALSE, keep_icon = TRUE, ignore_air = FALSE)
/turf/simulated/floor/vines/ChangeTurf(turf/simulated/floor/T, defer_change = FALSE, keep_icon = TRUE, ignore_air = FALSE, copy_existing_baseturf = TRUE)
. = ..()
//Do this *after* the turf has changed as qdel in spacevines will call changeturf again if it hasn't
for(var/obj/structure/spacevine/SV in src)
Expand Down

0 comments on commit 422f40b

Please sign in to comment.