Index: binary-improvements/MapRendering/MapRendering/MapRenderBlockBuffer.cs
===================================================================
--- binary-improvements/MapRendering/MapRendering/MapRenderBlockBuffer.cs	(revision 236)
+++ binary-improvements/MapRendering/MapRendering/MapRenderBlockBuffer.cs	(revision 238)
@@ -53,20 +53,20 @@
 		}
 
-		public void SetPart (Vector2i offset, int partSize, Color[] pixels) {
+		public void SetPart (Vector2i offset, int partSize, Color32[] pixels) {
 			if (offset.x + partSize > blockMap.width || offset.y + partSize > blockMap.height) {
 				Log.Error (string.Format ("MapBlockBuffer[{0}].SetPart ({1}, {2}, {3}) has blockMap.size ({4}/{5})", zoomLevel, offset, partSize, pixels.Length, blockMap.width, blockMap.height));
 				return;
 			}
-			blockMap.SetPixels (offset.x, offset.y, partSize, partSize, pixels);
+			blockMap.SetPixels32 (offset.x, offset.y, partSize, partSize, pixels);
 		}
 
-		public Color[] GetHalfScaled ()
+		public Color32[] GetHalfScaled ()
 		{
 			zoomBuffer.Resize (Constants.MAP_BLOCK_SIZE, Constants.MAP_BLOCK_SIZE);
-			zoomBuffer.SetPixels (blockMap.GetPixels ());
+			zoomBuffer.SetPixels32 (blockMap.GetPixels32 ());
 
 			TextureScale.Point (zoomBuffer, Constants.MAP_BLOCK_SIZE / 2, Constants.MAP_BLOCK_SIZE / 2);
 
-			return zoomBuffer.GetPixels ();
+			return zoomBuffer.GetPixels32 ();
 		}
 
Index: binary-improvements/MapRendering/MapRendering/MapRendering.cs
===================================================================
--- binary-improvements/MapRendering/MapRendering/MapRendering.cs	(revision 236)
+++ binary-improvements/MapRendering/MapRendering/MapRendering.cs	(revision 238)
@@ -24,5 +24,5 @@
 		private static object lockObject = new object ();
 		private MapRenderBlockBuffer[] zoomLevelBuffers;
-		private Dictionary<Vector2i, Color[]> dirtyChunks = new Dictionary<Vector2i, Color[]> ();
+		private Dictionary<Vector2i, Color32[]> dirtyChunks = new Dictionary<Vector2i, Color32[]> ();
 		private System.Timers.Timer chunkSaveTimer = new System.Timers.Timer (500);
 		private bool renderingFullMap = false;
@@ -37,5 +37,5 @@
 		private MapRendering ()
 		{
-			Constants.MAP_DIRECTORY = StaticDirectories.GetSaveGameDir () + "/map";
+			Constants.MAP_DIRECTORY = GameUtils.GetSaveGameDir () + "/map";
 
 			lock (lockObject) {
@@ -69,7 +69,7 @@
 								ushort[] mapColors = c.GetMapColors ();
 								if (mapColors != null) {
-									Color[] realColors = new Color[Constants.MAP_CHUNK_SIZE * Constants.MAP_CHUNK_SIZE];
+									Color32[] realColors = new Color32[Constants.MAP_CHUNK_SIZE * Constants.MAP_CHUNK_SIZE];
 									for (int i_colors = 0; i_colors < mapColors.Length; i_colors++) {
-										realColors [i_colors] = shortColorToColor (mapColors [i_colors]);
+										realColors [i_colors] = shortColorToColor32 (mapColors [i_colors]);
 									}
 									Instance.dirtyChunks [cPos2] = realColors;
@@ -91,5 +91,5 @@
 			MicroStopwatch microStopwatch = new MicroStopwatch ();
 
-			string regionSaveDir = StaticDirectories.GetSaveGameRegionDir ();
+			string regionSaveDir = GameUtils.GetSaveGameRegionDir ();
 			RegionFileManager rfm = new RegionFileManager (regionSaveDir, regionSaveDir, 0, false);
 			Texture2D fullMapTexture = null;
@@ -119,5 +119,5 @@
 				renderingFullMap = true;
 
-				if (widthPix <= 8000 && heightPix <= 8000)
+				if (widthPix <= 8192 && heightPix <= 8192)
 					fullMapTexture = new Texture2D (widthPix, heightPix);
 
@@ -135,11 +135,11 @@
 								ushort[] mapColors = c.GetMapColors ();
 								if (mapColors != null) {
-									Color[] realColors = new Color[Constants.MAP_CHUNK_SIZE * Constants.MAP_CHUNK_SIZE];
+									Color32[] realColors = new Color32[Constants.MAP_CHUNK_SIZE * Constants.MAP_CHUNK_SIZE];
 									for (int i_colors = 0; i_colors < mapColors.Length; i_colors++) {
-										realColors [i_colors] = shortColorToColor (mapColors [i_colors]);
+										realColors [i_colors] = shortColorToColor32 (mapColors [i_colors]);
 									}
 									dirtyChunks [curChunkPos] = realColors;
 									if (fullMapTexture != null)
-										fullMapTexture.SetPixels (curFullMapPos.x, curFullMapPos.y, Constants.MAP_CHUNK_SIZE, Constants.MAP_CHUNK_SIZE, realColors);
+										fullMapTexture.SetPixels32 (curFullMapPos.x, curFullMapPos.y, Constants.MAP_CHUNK_SIZE, Constants.MAP_CHUNK_SIZE, realColors);
 								}
 							}
@@ -160,5 +160,5 @@
 				byte[] array = fullMapTexture.EncodeToPNG ();
 				File.WriteAllBytes (Constants.MAP_DIRECTORY + "/map.png", array);
-				Texture2D.Destroy (fullMapTexture);
+				UnityEngine.Object.Destroy (fullMapTexture);
 				fullMapTexture = null;
 			}
@@ -337,4 +337,12 @@
 		}
 
+		private static Color32 shortColorToColor32 (ushort col)
+		{
+			byte r = (byte)(256 * (col >> 10 & 31) / 32);
+			byte g = (byte)(256 * (col >> 5 & 31) / 32);
+			byte b = (byte)(256 * (col & 31) / 32);
+			byte a = 255;
+			return new Color32 (r, g, b, a);
+		}
 	}
 }
Index: binary-improvements/MapRendering/ModInfo.xml
===================================================================
--- binary-improvements/MapRendering/ModInfo.xml	(revision 236)
+++ binary-improvements/MapRendering/ModInfo.xml	(revision 238)
@@ -5,5 +5,5 @@
 		<Description value="Render the game map to image map tiles as it is uncovered" />
 		<Author value="Christian 'Alloc' Illy" />
-		<Version value="3" />
+		<Version value="4" />
 		<Website value="http://7dtd.illy.bz" />
 	</ModInfo>
Index: binary-improvements/MapRendering/Web/API/GetLandClaims.cs
===================================================================
--- binary-improvements/MapRendering/Web/API/GetLandClaims.cs	(revision 236)
+++ binary-improvements/MapRendering/Web/API/GetLandClaims.cs	(revision 238)
@@ -29,5 +29,5 @@
 			result.Add ("claimowners", claimOwners);
 
-			Dictionary<Vector3i, PersistentPlayerData> d = GameManager.Instance.GetPersistentPlayerList ().positionToLPBlockOwner;
+			Dictionary<Vector3i, PersistentPlayerData> d = GameManager.Instance.GetPersistentPlayerList ().m_lpBlockMap;
 			if (d != null) {
 				World w = GameManager.Instance.World;
@@ -45,5 +45,5 @@
 					if (steamid.Length == 0 || kvp.Key.PlayerId.Equals (steamid)) {
 						string curID = kvp.Key.PlayerId;
-						bool isActive = w.LandClaimIsActive (kvp.Key);
+						bool isActive = w.IsLandProtectionValidForPlayer (kvp.Key);
 
 						JSONObject owner = new JSONObject ();
Index: binary-improvements/MapRendering/Web/ItemIconHandler.cs
===================================================================
--- binary-improvements/MapRendering/Web/ItemIconHandler.cs	(revision 238)
+++ binary-improvements/MapRendering/Web/ItemIconHandler.cs	(revision 238)
@@ -0,0 +1,77 @@
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Net;
+using System.Threading;
+
+using UnityEngine;
+
+namespace AllocsFixes.NetConnections.Servers.Web
+{
+	public class ItemIconHandler : PathHandler
+	{
+		private string staticPart;
+		private bool logMissingFiles;
+		private Dictionary<string, byte[]> icons = new Dictionary<string, byte[]> ();
+		private bool loaded = false;
+
+		public ItemIconHandler (string staticPart, bool logMissingFiles) {
+			this.staticPart = staticPart;
+			this.logMissingFiles = logMissingFiles;
+		}
+
+		public override void HandleRequest (HttpListenerRequest req, HttpListenerResponse resp, HttpListenerBasicIdentity user) {
+			if (!loaded) {
+				if (!LoadIcons ()) {
+					resp.StatusCode = (int)HttpStatusCode.NotFound;
+					Log.Out ("Web:IconHandler: Could not load icons");
+					return;
+				}
+			}
+
+			string fn = req.Url.AbsolutePath.Remove (0, staticPart.Length);
+			fn = fn.Remove (fn.LastIndexOf ('.'));
+
+			if (icons.ContainsKey (fn)) {
+				resp.ContentType = MimeType.GetMimeType (".png");
+				resp.ContentLength64 = icons [fn].Length;
+				resp.OutputStream.Write (icons [fn], 0, icons [fn].Length);
+			} else {
+				resp.StatusCode = (int)HttpStatusCode.NotFound;
+				if (logMissingFiles)
+					Log.Out ("Web:IconHandler:FileNotFound: \"" + req.Url.AbsolutePath + "\" ");
+				return;
+			}
+		}
+
+		private bool LoadIcons () {
+			loaded = true;
+
+			GameObject atlasObj = GameObject.Find ("/NGUI Root (2D)/ItemIconAtlas");
+			if (atlasObj == null) {
+				Log.Error ("Web:IconHandler: Atlas object not found");
+				return false;
+			}
+			DynamicUIAtlas atlas = atlasObj.GetComponent<DynamicUIAtlas> ();
+			if (atlas == null) {
+				Log.Error ("Web:IconHandler: Atlas component not found");
+				return false;
+			}
+
+			Texture2D atlasTex = atlas.texture as Texture2D;
+
+			foreach (UISpriteData data in atlas.spriteList) {
+				string name = data.name;
+				Texture2D tex = new Texture2D (data.width, data.height, TextureFormat.ARGB32, false);
+				tex.SetPixels (atlasTex.GetPixels (data.x, atlasTex.height - data.height - data.y, data.width, data.height));
+				byte[] pixData = tex.EncodeToPNG ();
+
+				icons.Add (name, pixData);
+				UnityEngine.Object.Destroy (tex);
+			}
+
+			return true;
+		}
+	}
+}
+
Index: binary-improvements/MapRendering/Web/Web.cs
===================================================================
--- binary-improvements/MapRendering/Web/Web.cs	(revision 236)
+++ binary-improvements/MapRendering/Web/Web.cs	(revision 238)
@@ -56,8 +56,15 @@
 
 				handlers.Add (
+					"/itemicons/",
+					new ItemIconHandler (
+						"/itemicons/",
+						true)
+				);
+
+				handlers.Add (
 					"/map/",
 					new StaticHandler (
 						"/map/",
-						StaticDirectories.GetSaveGameDir () + "/map",
+						GameUtils.GetSaveGameDir () + "/map",
 						MapRendering.MapRendering.GetTileCache (),
 						false)
Index: binary-improvements/MapRendering/WebAndMapRendering.csproj
===================================================================
--- binary-improvements/MapRendering/WebAndMapRendering.csproj	(revision 236)
+++ binary-improvements/MapRendering/WebAndMapRendering.csproj	(revision 238)
@@ -59,4 +59,5 @@
     <Compile Include="Web\API\GetLandClaims.cs" />
     <Compile Include="Commands\webstat.cs" />
+    <Compile Include="Web\ItemIconHandler.cs" />
   </ItemGroup>
   <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
