Changeset 446 for binary-improvements/MapRendering
- Timestamp:
- Jun 12, 2023, 3:21:34 PM (18 months ago)
- Location:
- binary-improvements/MapRendering
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
binary-improvements/MapRendering/ModInfo.xml
r442 r446 5 5 <Description value="Render the game map to image map tiles as it is uncovered" /> 6 6 <Author value="Christian 'Alloc' Illy" /> 7 <Version value="4 0" />7 <Version value="41" /> 8 8 <Website value="http://7dtd.illy.bz" /> 9 9 </ModInfo> -
binary-improvements/MapRendering/Web/API/GetLandClaims.cs
r420 r446 51 51 52 52 owner.Add ("steamid", new JSONString (kvp.Key.PlatformId.CombinedString)); 53 owner.Add ("crossplatformid", new JSONString (kvp.Key.CrossPlatformId?.CombinedString ?? "")); 53 54 owner.Add ("claimactive", new JSONBoolean (kvp.Key.LandProtectionActive)); 54 55 -
binary-improvements/MapRendering/Web/API/GetPlayerInventories.cs
r369 r446 20 20 21 21 if (p.IsOnline) { 22 AllInventoriesResult.Add (GetPlayerInventory.DoPlayer ( kvp.Key.CombinedString,p, showIconColor, showIconName));22 AllInventoriesResult.Add (GetPlayerInventory.DoPlayer (p, showIconColor, showIconName)); 23 23 } 24 24 } -
binary-improvements/MapRendering/Web/API/GetPlayerInventory.cs
r369 r446 21 21 } 22 22 23 Player p = PersistentContainer.Instance.Players [userId, false];23 Player p = PersistentContainer.Instance.Players.GetByUserId (userId); 24 24 if (p == null) { 25 25 _resp.StatusCode = (int) HttpStatusCode.NotFound; … … 30 30 GetInventoryArguments (_req, out bool showIconColor, out bool showIconName); 31 31 32 JSONObject result = DoPlayer ( userIdString,p, showIconColor, showIconName);32 JSONObject result = DoPlayer (p, showIconColor, showIconName); 33 33 34 34 WriteJSON (_resp, result); … … 45 45 } 46 46 47 internal static JSONObject DoPlayer ( string _steamId,Player _player, bool _showIconColor, bool _showIconName) {47 internal static JSONObject DoPlayer (Player _player, bool _showIconColor, bool _showIconName) { 48 48 PersistentData.Inventory inv = _player.Inventory; 49 49 … … 53 53 JSONArray belt = new JSONArray (); 54 54 JSONObject equipment = new JSONObject (); 55 result.Add ("userid", new JSONString (_steamId)); 55 result.Add ("userid", new JSONString (_player.PlatformId.CombinedString)); 56 result.Add ("crossplatformid", new JSONString (_player.CrossPlatformId?.CombinedString ?? "")); 56 57 result.Add ("entityid", new JSONNumber (_player.EntityID)); 57 58 result.Add ("playername", new JSONString (_player.Name)); -
binary-improvements/MapRendering/Web/API/GetPlayerList.cs
r420 r446 49 49 Player p = kvp.Value; 50 50 51 if (bViewAll || p. PlatformId.Equals (userId)) {51 if (bViewAll || p.InternalId.Equals (userId)) { 52 52 JSONObject pos = new JSONObject (); 53 53 pos.Add ("x", new JSONNumber (p.LastPosition.x)); … … 56 56 57 57 JSONObject pJson = new JSONObject (); 58 pJson.Add ("steamid", new JSONString (kvp.Key.CombinedString)); 58 pJson.Add ("steamid", new JSONString (kvp.Value.PlatformId.CombinedString)); 59 pJson.Add ("crossplatformid", new JSONString (kvp.Value.CrossPlatformId?.CombinedString ?? "")); 59 60 pJson.Add ("entityid", new JSONNumber (p.EntityID)); 60 61 pJson.Add ("ip", new JSONString (p.IP)); -
binary-improvements/MapRendering/Web/API/GetPlayersLocation.cs
r420 r446 32 32 33 33 if (listOffline || p.IsOnline) { 34 if (bViewAll || p. PlatformId.Equals (userId)) {34 if (bViewAll || p.InternalId.Equals (userId)) { 35 35 JSONObject pos = new JSONObject (); 36 36 pos.Add ("x", new JSONNumber (p.LastPosition.x)); … … 39 39 40 40 JSONObject pJson = new JSONObject (); 41 pJson.Add ("steamid", new JSONString (kvp.Key.CombinedString)); 41 pJson.Add ("steamid", new JSONString (kvp.Value.PlatformId.CombinedString)); 42 pJson.Add ("crossplatformid", new JSONString (kvp.Value.CrossPlatformId?.CombinedString ?? "")); 42 43 43 44 // pJson.Add("entityid", new JSONNumber (p.EntityID)); -
binary-improvements/MapRendering/Web/API/GetPlayersOnline.cs
r371 r446 13 13 foreach (KeyValuePair<int, EntityPlayer> current in w.Players.dict) { 14 14 ClientInfo ci = ConnectionManager.Instance.Clients.ForEntityId (current.Key); 15 Player player = PersistentContainer.Instance.Players [ci.InternalId, false];15 Player player = PersistentContainer.Instance.Players.GetByInternalId (ci.InternalId); 16 16 17 17 JSONObject pos = new JSONObject (); … … 22 22 JSONObject p = new JSONObject (); 23 23 p.Add ("steamid", new JSONString (ci.PlatformId.CombinedString)); 24 p.Add ("crossplatformid", new JSONString (ci.CrossplatformId?.CombinedString ?? "")); 24 25 p.Add ("entityid", new JSONNumber (ci.entityId)); 25 26 p.Add ("ip", new JSONString (ci.ip));
Note:
See TracChangeset
for help on using the changeset viewer.