From cef6b3bb54a2eefadf1444e41a2b2db9d6dd1b19 Mon Sep 17 00:00:00 2001 From: fescen9 Date: Sun, 12 Dec 2010 23:01:13 +0000 Subject: [PATCH] Make player portraits optional on map and in player list. --- web/map.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/web/map.js b/web/map.js index a5f81a0e..d79d8e38 100644 --- a/web/map.js +++ b/web/map.js @@ -1,7 +1,9 @@ var setup = { tileUrl: 'http://www.yourdomain.com/minecraft/tiles/', updateUrl: 'http://www.yourdomain.com/minecraft/up/', // Or if using ASP.NET: http://www.yourdomain.com/minecraft/up/default.aspx?lasttimestamp= - updateRate: 2000 //Seconds the map should poll for updates. (Seconds) * 1000. The default is 2000 (every 2 seconds). + updateRate: 2000, //Seconds the map should poll for updates. (Seconds) * 1000. The default is 2000 (every 2 seconds). + showPortraitsOnMap: true, + showPortraitsInPlayerList: true }; /* THERE SHOULD BE NO NEED FOR MANUAL CONFIGURATION BEYOND THIS POINT */ @@ -591,8 +593,11 @@ function makeRequest(url, func, type, fail, post, contenttype) if (p[1] == 'player') { if(playerlst != '') playerlst += '
'; - playerlst += '' + p[0] + ''; - image = setup.tileUrl + p[0] + '.png'; + playerlst += '' + ((setup.showPortraitsInPlayerList)?'':'') + p[0] + ''; + + if (setup.showPortraitsOnMap) { + image = setup.tileUrl + p[0] + '.png'; + } } if (p[1] == 'warp') numwarps++;