Fix html not loading currently (#10366)

There was an issue due to the fact the mapname I was using was a directory name, which browse_rsc() ignores all for the last portion of, and the js was trying to read the full name with the directory.

This makes it just use the nameShort of the map which has no directory which will be truncated.
This commit is contained in:
clusterfack
2016-06-03 05:29:20 -05:00
parent bf299409e4
commit 27f393c765
3 changed files with 4 additions and 7 deletions

View File

@@ -68,7 +68,7 @@ var/global/datum/interactive_map/camera/adv_camera = new
if (!src.interfaces["[z]"])
src.interfaces["[z]"] = new/datum/html_interface/nanotrasen(src, "Security Cameras", 900, 800, \
"[MAPHEADER] </script><script type=\"text/javascript\">\
var mapname = [getMinimapShort()]; \
var mapname = [map.nameShort]; \
var z = [z]; \
var tile_size = [world.icon_size]; \
var maxx = [world.maxx]; \

View File

@@ -106,7 +106,7 @@ var/global/datum/interactive_map/crewmonitor/crewmonitor = new
src.interfaces["[z]"] = new/datum/html_interface/nanotrasen(src, "Crew Monitoring", 900, 800, "[MAPHEADER] \
<link rel=\"stylesheet\" type=\"text/css\" href=\"crewmonitor.css\" /></script>\
<script type=\"text/javascript\">\
var mapname = [getMinimapShort()]; \
var mapname = [map.nameShort]; \
var z = [z]; \
var tile_size = [world.icon_size]; \
var maxx = [world.maxx]; \

View File

@@ -88,13 +88,10 @@ var/const/ALLOW_CENTCOMM = FALSE
C << browse_rsc('map_shared.css')
for (var/z = 1 to world.maxz)
if(z == CENTCOMM_Z) continue
C << browse_rsc(file("[getMinimapFile(z)].png"), "[getMinimapFile(z)].png")
C << browse_rsc(file("[getMinimapFile(z)].png"), "[map.nameShort][z].png")
/proc/getMinimapFile(z)
return "[getMinimapShort()][z]"
/proc/getMinimapShort()
return "data/minimaps/map_[map.nameLong]" //Missing only z
return "data/minimaps/map_[map.nameLong][z]"
// Activate this to debug tile mismatches in the minimap.
// This will store the full information on each tile and compare it the next time you run the minimap.