From b65f87dda73fe9338e41c5863666181dc3ceae39 Mon Sep 17 00:00:00 2001 From: Paxilmaniac Date: Tue, 25 Jun 2024 19:40:31 -0400 Subject: [PATCH] edge turf fix --- .../map_generator_and_areas/id_river_generator.dm | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/code/modules/fantasystation_map_generation/map_generator_and_areas/id_river_generator.dm b/code/modules/fantasystation_map_generation/map_generator_and_areas/id_river_generator.dm index a08695212fc4a..614a9d0ff4621 100644 --- a/code/modules/fantasystation_map_generation/map_generator_and_areas/id_river_generator.dm +++ b/code/modules/fantasystation_map_generation/map_generator_and_areas/id_river_generator.dm @@ -24,7 +24,6 @@ GLOBAL_LIST_EMPTY(tagged_river_nodes) if (waypoints.z != target_z || waypoints.connected) continue waypoints.connected = TRUE - // Workaround around ChangeTurf that's safe because of when this proc is called var/turf/cur_turf = get_turf(waypoints) cur_turf = new edge_turf(cur_turf) var/turf/target_turf = get_turf(pick(river_nodes_south - waypoints)) @@ -34,7 +33,7 @@ GLOBAL_LIST_EMPTY(tagged_river_nodes) var/cur_dir = get_dir(cur_turf, target_turf) while(cur_turf != target_turf) - if(detouring) //randomly snake around a bit + if(detouring) if(prob(20)) detouring = FALSE cur_dir = get_dir(cur_turf, target_turf) @@ -55,7 +54,6 @@ GLOBAL_LIST_EMPTY(tagged_river_nodes) if (waypoints.z != target_z || waypoints.connected) continue waypoints.connected = TRUE - // Workaround around ChangeTurf that's safe because of when this proc is called var/turf/cur_turf = get_turf(waypoints) cur_turf = new edge_turf(cur_turf) var/turf/target_turf = get_turf(pick(river_nodes_east - waypoints)) @@ -65,7 +63,7 @@ GLOBAL_LIST_EMPTY(tagged_river_nodes) var/cur_dir = get_dir(cur_turf, target_turf) while(cur_turf != target_turf) - if(detouring) //randomly snake around a bit + if(detouring) if(prob(20)) detouring = FALSE cur_dir = get_dir(cur_turf, target_turf) @@ -83,7 +81,7 @@ GLOBAL_LIST_EMPTY(tagged_river_nodes) turfs_to_mud += cur_turf for(var/turf/turf_to_generate_mud in turfs_to_mud) - var/turf/mud_turf = new shallow_turf(turf_to_generate_mud) + var/turf/mud_turf = new edge_turf(turf_to_generate_mud) turfs_to_deep += mud_turf mud_turf.spread_better(30, 5, whitelist_area)