Index: binary-improvements/MapRendering/Web/Handlers/ItemIconHandler.cs
===================================================================
--- binary-improvements/MapRendering/Web/Handlers/ItemIconHandler.cs	(revision 352)
+++ binary-improvements/MapRendering/Web/Handlers/ItemIconHandler.cs	(revision 354)
@@ -53,4 +53,5 @@
 
 		public bool LoadIcons () {
+			
 			lock (icons) {
 				if (loaded) {
@@ -59,34 +60,4 @@
 
 				MicroStopwatch microStopwatch = new MicroStopwatch ();
-
-				GameObject atlasObj = GameObject.Find ("/NGUI Root (2D)/ItemIconAtlas");
-				if (atlasObj == null) {
-					Log.Error ("Web:IconHandler: Atlas object not found");
-					loaded = true;
-					return false;
-				}
-
-				DynamicUIAtlas atlas = atlasObj.GetComponent<DynamicUIAtlas> ();
-				if (atlas == null) {
-					Log.Error ("Web:IconHandler: Atlas component not found");
-					loaded = true;
-					return false;
-				}
-
-				string textureResourceName = atlas.PrebakedAtlas;
-				List<UISpriteData> sprites;
-				int elementWidth, elementHeight;
-				Texture2D atlasTex;
-
-				if (!DynamicUIAtlasTools.ReadPrebakedAtlasDescriptor (textureResourceName, out sprites,
-					out elementWidth, out elementHeight)) {
-					SdtdConsole.Instance.Output ("Web:IconHandler: Could not read dynamic atlas descriptor");
-					return false;
-				}
-
-				if (!DynamicUIAtlasTools.ReadPrebakedAtlasTexture (textureResourceName, out atlasTex)) {
-					SdtdConsole.Instance.Output ("Web:IconHandler: Could not read dynamic atlas texture");
-					return false;
-				}
 
 				// Get list of used tints for all items
@@ -107,17 +78,10 @@
 				}
 
-				// Load icons from vanilla
-				foreach (UISpriteData data in sprites) {
-					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));
-
-					AddIcon (name, tex, tintedIcons);
-
-					Object.Destroy (tex);
+				try {
+					loadIconsFromFolder (Utils.GetGameDir ("Data/ItemIcons"), tintedIcons);
+				} catch (Exception e) {
+					Log.Error ("Failed loading icons from base game");
+					Log.Exception (e);
 				}
-
-				Resources.UnloadAsset (atlasTex);
 
 				// Load icons from mods
@@ -125,24 +89,7 @@
 					try {
 						string modIconsPath = mod.Path + "/ItemIcons";
-						if (Directory.Exists (modIconsPath)) {
-							foreach (string file in Directory.GetFiles (modIconsPath)) {
-								try {
-									if (file.EndsWith (".png", StringComparison.OrdinalIgnoreCase)) {
-										string name = Path.GetFileNameWithoutExtension (file);
-										Texture2D tex = new Texture2D (1, 1, TextureFormat.ARGB32, false);
-										if (tex.LoadImage (File.ReadAllBytes (file))) {
-											if (tex.width == elementWidth && tex.height == elementHeight) {
-												AddIcon (name, tex, tintedIcons);
-											}
-
-											Object.Destroy (tex);
-										}
-									}
-								} catch (Exception e) {
-									Log.Exception (e);
-								}
-							}
-						}
+						loadIconsFromFolder (modIconsPath, tintedIcons);
 					} catch (Exception e) {
+						Log.Error ("Failed loading icons from mod " + mod.ModInfo.Name.Value);
 						Log.Exception (e);
 					}
@@ -153,4 +100,24 @@
 
 				return true;
+			}
+		}
+
+		private void loadIconsFromFolder (string _path, Dictionary<string, List<Color>> _tintedIcons) {
+			if (Directory.Exists (_path)) {
+				foreach (string file in Directory.GetFiles (_path)) {
+					try {
+						if (file.EndsWith (".png", StringComparison.OrdinalIgnoreCase)) {
+							string name = Path.GetFileNameWithoutExtension (file);
+							Texture2D tex = new Texture2D (1, 1, TextureFormat.ARGB32, false);
+							if (tex.LoadImage (File.ReadAllBytes (file))) {
+								AddIcon (name, tex, _tintedIcons);
+
+								Object.Destroy (tex);
+							}
+						}
+					} catch (Exception e) {
+						Log.Exception (e);
+					}
+				}
 			}
 		}
