Removes all locate() calls in block() (#25772)

* Removes all `locate()` calls in `block()`

* Maybe actually push fixes

* Revert bad merge master

* Forgot this one

* Maybe actually push fixes

---------

Signed-off-by: DGamerL <108773801+DGamerL@users.noreply.github.com>
This commit is contained in:
DGamerL
2024-06-28 22:33:38 +02:00
committed by GitHub
parent 02759bcb31
commit efd6f2dfa6
18 changed files with 33 additions and 34 deletions
+3 -4
View File
@@ -93,8 +93,7 @@
var/max_x = min_x + width-1
var/max_y = min_y + height-1
placement = locate(max(min_x,1), max(min_y,1), placement.z)
return block(placement, locate(min(max_x, world.maxx), min(max_y, world.maxy), placement.z))
return block(max(min_x, 1), max(min_y, 1), placement.z, min(max_x, world.maxx), min(max_y, world.maxy), placement.z)
/datum/map_template/proc/fits_in_map_bounds(turf/T, centered = 0)
var/turf/placement = T
@@ -107,9 +106,9 @@
var/max_x = min_x + width-1
var/max_y = min_y + height-1
if(min_x < 1 || min_y < 1 || max_x > world.maxx || max_y > world.maxy)
return 0
return FALSE
else
return 1
return TRUE
/proc/preloadTemplates(path = "_maps/map_files/templates/") //see master controller setup
+1 -1
View File
@@ -19,7 +19,7 @@
var/watch = start_watch()
log_debug("Counting station atoms")
var/station_zlevel = level_name_to_num(MAIN_STATION)
for(var/turf/T in block(locate(1, 1, station_zlevel), locate(world.maxx, world.maxy, station_zlevel)))
for(var/turf/T in block(1, 1, station_zlevel, world.maxx, world.maxy, station_zlevel))
if(istype(T, /turf/simulated/floor))
var/turf/simulated/floor/T2 = T