Continual updates until merged
This commit is contained in:
+18
-14
@@ -28,26 +28,30 @@
|
||||
if(!cached_map)
|
||||
return
|
||||
|
||||
discover_port_offset()
|
||||
|
||||
if(!cache)
|
||||
cached_map = null
|
||||
|
||||
/datum/map_template/shuttle/proc/discover_port_offset()
|
||||
var/key
|
||||
var/list/models = cached_map.grid_models
|
||||
for(key in models)
|
||||
if(findtext(models[key], "[/obj/docking_port/mobile]")) // Yay compile time checks
|
||||
break // This works by assuming there will ever only be one mobile dock in a template at most
|
||||
|
||||
var/datum/grid_set/gset
|
||||
|
||||
for(var/i in cached_map.gridSets)
|
||||
gset = i
|
||||
var/datum/grid_set/gset = i
|
||||
var/ycrd = gset.ycrd
|
||||
for(var/line in gset.gridLines)
|
||||
if(key != line)
|
||||
ycrd--
|
||||
continue
|
||||
port_x_offset = gset.xcrd
|
||||
port_y_offset = ycrd
|
||||
break
|
||||
|
||||
if(!cache)
|
||||
cached_map = null
|
||||
var/xcrd = gset.xcrd
|
||||
for(var/j in 1 to length(line) step cached_map.key_len)
|
||||
if(key == copytext(line, j, j + cached_map.key_len))
|
||||
port_x_offset = xcrd
|
||||
port_y_offset = ycrd
|
||||
return
|
||||
++xcrd
|
||||
--ycrd
|
||||
|
||||
/datum/map_template/shuttle/load(turf/T, centered, register=TRUE)
|
||||
. = ..()
|
||||
@@ -67,7 +71,7 @@
|
||||
if(register)
|
||||
port.register()
|
||||
if(isnull(port_x_offset))
|
||||
return
|
||||
continue
|
||||
switch(port.dir) // Yeah this looks a little ugly but mappers had to do this in their head before
|
||||
if(NORTH)
|
||||
port.width = width
|
||||
@@ -519,4 +523,4 @@
|
||||
|
||||
/datum/map_template/shuttle/snowdin/excavation
|
||||
suffix = "excavation"
|
||||
name = "Snowdin Excavation Elevator"
|
||||
name = "Snowdin Excavation Elevator"
|
||||
Reference in New Issue
Block a user