better map icon logic
This changes the way maps should be named in worlds.txt and how the sidebar shows the icons. Added missing map icons.
After Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 340 B After Width: | Height: | Size: 340 B |
After Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 339 B After Width: | Height: | Size: 339 B |
Before Width: | Height: | Size: 387 B After Width: | Height: | Size: 387 B |
Before Width: | Height: | Size: 342 B After Width: | Height: | Size: 342 B |
@ -278,12 +278,17 @@ DynMap.prototype = {
|
||||
worldsadded[wname] = true;
|
||||
}
|
||||
|
||||
var worldName = wname;
|
||||
if(wname.startsWith('world_')) {
|
||||
worldName = wname.substring(6);
|
||||
}
|
||||
|
||||
map.element = $('<li/>')
|
||||
.addClass('map item')
|
||||
.append($('<a/>')
|
||||
.attr({ title: map.options.title, href: '#' })
|
||||
.addClass('maptype')
|
||||
.css({ backgroundImage: 'url(' + (map.options.icon || ('images/block_' + mapindex + '.png')) + ')' })
|
||||
.css({ backgroundImage: 'url(' + (map.options.icon || ('images/block_' + worldName + '_' + mapindex + '.png')) + ')' })
|
||||
.text(map.options.title)
|
||||
)
|
||||
.click(function() {
|
||||
|
@ -115,9 +115,9 @@ worlds:
|
||||
# background: "#300806"
|
||||
# mapzoomin: 1
|
||||
# - class: org.dynmap.hdmap.HDMap
|
||||
# name: nether
|
||||
# name: surface
|
||||
# title: "Surface"
|
||||
# prefix: nt
|
||||
# prefix: surface
|
||||
# perspective: iso_SE_30_hires
|
||||
# shader: stdtexture
|
||||
# lighting: nethershadows
|
||||
|