Skip to content

Commit

Permalink
Merge pull request #8 from Paxilmaniac/rivers
Browse files Browse the repository at this point in the history
edge turf fix
  • Loading branch information
Paxilmaniac authored Jun 25, 2024
2 parents feb6782 + b65f87d commit c1d36b6
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand All @@ -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)
Expand All @@ -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))
Expand All @@ -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)
Expand All @@ -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)

Expand Down

0 comments on commit c1d36b6

Please sign in to comment.