Merge pull request #5967 from Verkister/patch-21

Fixes submap footprint miscalculations
This commit is contained in:
Atermonera
2019-02-20 00:31:13 -08:00
committed by VirgoBot
parent 57997f7185
commit e4268e2ddb

View File

@@ -40,8 +40,12 @@ var/list/global/map_templates = list()
/datum/map_template/proc/preload_size(path, orientation = SOUTH)
var/bounds = maploader.load_map(file(path), 1, 1, 1, cropMap=FALSE, measureOnly=TRUE, orientation=orientation)
if(bounds)
width = bounds[MAP_MAXX] // Assumes all templates are rectangular, have a single Z level, and begin at 1,1,1
height = bounds[MAP_MAXY]
if(orientation & (90 | 270))
width = bounds[MAP_MAXY]
height = bounds[MAP_MAXX]
else
width = bounds[MAP_MAXX] // Assumes all templates are rectangular, have a single Z level, and begin at 1,1,1
height = bounds[MAP_MAXY]
return bounds
/datum/map_template/proc/initTemplateBounds(var/list/bounds)