Index: binary-improvements/MapRendering/Web/API/GetPlayerInventory.cs
===================================================================
--- binary-improvements/MapRendering/Web/API/GetPlayerInventory.cs	(revision 326)
+++ binary-improvements/MapRendering/Web/API/GetPlayerInventory.cs	(revision 348)
@@ -6,21 +6,41 @@
 namespace AllocsFixes.NetConnections.Servers.Web.API {
 	public class GetPlayerInventory : WebAPI {
-		public override void HandleRequest (HttpListenerRequest req, HttpListenerResponse resp, WebConnection user,
-			int permissionLevel) {
-			if (req.QueryString ["steamid"] == null) {
-				resp.StatusCode = (int) HttpStatusCode.InternalServerError;
-				Web.SetResponseTextContent (resp, "No SteamID given");
+		public override void HandleRequest (HttpListenerRequest _req, HttpListenerResponse _resp, WebConnection _user,
+			int _permissionLevel) {
+			if (_req.QueryString ["steamid"] == null) {
+				_resp.StatusCode = (int) HttpStatusCode.BadRequest;
+				Web.SetResponseTextContent (_resp, "No SteamID given");
 				return;
 			}
 
-			Player p = PersistentContainer.Instance.Players [req.QueryString ["steamid"], false];
+			string steamId = _req.QueryString ["steamid"];
+
+			Player p = PersistentContainer.Instance.Players [steamId, false];
 			if (p == null) {
-				resp.StatusCode = (int) HttpStatusCode.InternalServerError;
-				Web.SetResponseTextContent (resp, "Invalid or unknown SteamID given");
+				_resp.StatusCode = (int) HttpStatusCode.NotFound;
+				Web.SetResponseTextContent (_resp, "Invalid or unknown SteamID given");
 				return;
 			}
 
-			PersistentData.Inventory inv = p.Inventory;
+			bool showIconColor, showIconName;
+			GetInventoryArguments (_req, out showIconColor, out showIconName);
 
+			JSONObject result = DoPlayer (steamId, p, showIconColor, showIconName);
+
+			WriteJSON (_resp, result);
+		}
+
+		internal static void GetInventoryArguments (HttpListenerRequest _req, out bool _showIconColor, out bool _showIconName) {
+			if (_req.QueryString ["showiconcolor"] == null || !bool.TryParse (_req.QueryString ["showiconcolor"], out _showIconColor)) {
+				_showIconColor = true;
+			}
+			
+			if (_req.QueryString ["showiconname"] == null || !bool.TryParse (_req.QueryString ["showiconname"], out _showIconName)) {
+				_showIconName = true;
+			}
+		}
+
+		internal static JSONObject DoPlayer (string _steamId, Player _player, bool _showIconColor, bool _showIconName) {
+			PersistentData.Inventory inv = _player.Inventory;
 
 			JSONObject result = new JSONObject ();
@@ -29,36 +49,38 @@
 			JSONArray belt = new JSONArray ();
 			JSONObject equipment = new JSONObject ();
-			result.Add ("playername", new JSONString (p.Name));
+			result.Add ("steamid", new JSONString (_steamId));
+			result.Add ("entityid", new JSONNumber (_player.EntityID));
+			result.Add ("playername", new JSONString (_player.Name));
 			result.Add ("bag", bag);
 			result.Add ("belt", belt);
 			result.Add ("equipment", equipment);
 
-			DoInventory (belt, inv.belt);
-			DoInventory (bag, inv.bag);
+			DoInventory (belt, inv.belt, _showIconColor, _showIconName);
+			DoInventory (bag, inv.bag, _showIconColor, _showIconName);
 
-			AddEquipment (equipment, "head", inv.equipment, EquipmentSlots.Headgear);
-			AddEquipment (equipment, "eyes", inv.equipment, EquipmentSlots.Eyewear);
-			AddEquipment (equipment, "face", inv.equipment, EquipmentSlots.Face);
+			AddEquipment (equipment, "head", inv.equipment, EquipmentSlots.Headgear, _showIconColor, _showIconName);
+			AddEquipment (equipment, "eyes", inv.equipment, EquipmentSlots.Eyewear, _showIconColor, _showIconName);
+			AddEquipment (equipment, "face", inv.equipment, EquipmentSlots.Face, _showIconColor, _showIconName);
 
-			AddEquipment (equipment, "armor", inv.equipment, EquipmentSlots.ChestArmor);
-			AddEquipment (equipment, "jacket", inv.equipment, EquipmentSlots.Jacket);
-			AddEquipment (equipment, "shirt", inv.equipment, EquipmentSlots.Shirt);
+			AddEquipment (equipment, "armor", inv.equipment, EquipmentSlots.ChestArmor, _showIconColor, _showIconName);
+			AddEquipment (equipment, "jacket", inv.equipment, EquipmentSlots.Jacket, _showIconColor, _showIconName);
+			AddEquipment (equipment, "shirt", inv.equipment, EquipmentSlots.Shirt, _showIconColor, _showIconName);
 
-			AddEquipment (equipment, "legarmor", inv.equipment, EquipmentSlots.LegArmor);
-			AddEquipment (equipment, "pants", inv.equipment, EquipmentSlots.Legs);
-			AddEquipment (equipment, "boots", inv.equipment, EquipmentSlots.Feet);
+			AddEquipment (equipment, "legarmor", inv.equipment, EquipmentSlots.LegArmor, _showIconColor, _showIconName);
+			AddEquipment (equipment, "pants", inv.equipment, EquipmentSlots.Legs, _showIconColor, _showIconName);
+			AddEquipment (equipment, "boots", inv.equipment, EquipmentSlots.Feet, _showIconColor, _showIconName);
 
-			AddEquipment (equipment, "gloves", inv.equipment, EquipmentSlots.Hands);
+			AddEquipment (equipment, "gloves", inv.equipment, EquipmentSlots.Hands, _showIconColor, _showIconName);
 
-			WriteJSON (resp, result);
+			return result;
 		}
 
-		internal static void DoInventory (JSONArray _jsonRes, List<InvItem> _inv) {
+		private static void DoInventory (JSONArray _jsonRes, List<InvItem> _inv, bool _showIconColor, bool _showIconName) {
 			for (int i = 0; i < _inv.Count; i++) {
-				_jsonRes.Add (GetJsonForItem (_inv [i]));
+				_jsonRes.Add (GetJsonForItem (_inv [i], _showIconColor, _showIconName));
 			}
 		}
 
-		internal static void AddEquipment (JSONObject _eq, string _slotname, InvItem[] _items, EquipmentSlots _slot) {
+		private static void AddEquipment (JSONObject _eq, string _slotname, InvItem[] _items, EquipmentSlots _slot, bool _showIconColor, bool _showIconName) {
 			int[] slotindices = XUiM_PlayerEquipment.GetSlotIndicesByEquipmentSlot (_slot);
 
@@ -66,5 +88,5 @@
 				if (_items != null && _items [slotindices [i]] != null) {
 					InvItem item = _items [slotindices [i]];
-					_eq.Add (_slotname, GetJsonForItem (item));
+					_eq.Add (_slotname, GetJsonForItem (item, _showIconColor, _showIconName));
 					return;
 				}
@@ -74,5 +96,5 @@
 		}
 
-		internal static JSONNode GetJsonForItem (InvItem _item) {
+		private static JSONNode GetJsonForItem (InvItem _item, bool _showIconColor, bool _showIconName) {
 			if (_item == null) {
 				return new JSONNull ();
@@ -82,6 +104,13 @@
 			jsonItem.Add ("count", new JSONNumber (_item.count));
 			jsonItem.Add ("name", new JSONString (_item.itemName));
-			jsonItem.Add ("icon", new JSONString (_item.icon));
-			jsonItem.Add ("iconcolor", new JSONString (_item.iconcolor));
+			
+			if (_showIconName) {
+				jsonItem.Add ("icon", new JSONString (_item.icon));
+			}
+
+			if (_showIconColor) {
+				jsonItem.Add ("iconcolor", new JSONString (_item.iconcolor));
+			}
+
 			jsonItem.Add ("quality", new JSONNumber (_item.quality));
 			if (_item.quality >= 0) {
