village borders
i know I saw someone suggest this, but I cant find where. Idea is simple, a border around the outside of your village, to aid in the distinguishing of villages from their surroundings. I liked the Idea, so I whipped up a sloppy solution.
the code is this. call it from function mapmove when tile.name !=null
function drawUserTile(tileName,x,y){ $('#' + tileName).css('border', 'none').css('background-color', '#' + mapdata[x][y].n).attr('title', mapdata[x][y].name).attr('data-original-title', mapdata[x][y].name).tooltip('fixTitle'); if(x>1){ if(mapdata[x-1][y].nid != mapdata[x][y].nid){ $('#' + tileName).css('border-left', 'thick dotted gold'); } } if(x<25){ if(mapdata[x+1][y].nid != mapdata[x][y].nid){ $('#' + tileName).css('border-right', 'thick dotted gold'); } } if(y>1){ if(mapdata[x][y-1].nid != mapdata[x][y].nid){ $('#' + tileName).css('border-top', 'thick dotted gold'); } } if(y<25){ if(mapdata[x][y+1].nid != mapdata[x][y].nid){ $('#' + tileName).css('border-bottom', 'thick dotted gold'); } } }
I use this AoB tool to make all the AoBs I post. Try the online version if you dont feel like downloading it.
"Obviously, windows are central to Windows. They are so important that they named the operating system after them. But what is a window?"