mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-20 19:44:09 +01:00
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:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user