Changeset 383
- Timestamp:
- Aug 1, 2022, 1:16:11 PM (2 years ago)
- Location:
- binary-improvements2
- Files:
-
- 27 edited
Legend:
- Unmodified
- Added
- Removed
-
binary-improvements2/7dtd-server-fixes/src/JSON/JSONObject.cs
r351 r383 104 104 //Log.Out ("JSON:Parsed Object: " + obj.ToString ()); 105 105 return obj; 106 default:107 break;108 106 } 109 107 } -
binary-improvements2/7dtd-server-fixes/src/PersistentData/Players.cs
r369 r383 2 2 using System.Collections.Generic; 3 3 using System.Text.RegularExpressions; 4 using Platform.Steam;5 4 6 5 namespace AllocsFixes.PersistentData { -
binary-improvements2/AllocsCommands/Commands/Give.cs
r359 r383 1 using System;2 1 using System.Collections.Generic; 3 2 using UnityEngine; -
binary-improvements2/AllocsCommands/Commands/SayToPlayer.cs
r359 r383 1 using System;2 1 using System.Collections.Generic; 3 2 -
binary-improvements2/AllocsCommands/Commands/ShowInventory.cs
r369 r383 1 using System;2 1 using System.Collections.Generic; 3 2 using AllocsFixes.PersistentData; … … 127 126 // no Tag defined -> readable output 128 127 if (item.quality < 0) { 129 SdtdConsole.Instance.Output (string.Format (" Slot {0:8}: {1:000}", _slotname, 130 item.itemName)); 128 SdtdConsole.Instance.Output ($" Slot {_slotname:8}: {item.itemName:000}"); 131 129 } else { 132 SdtdConsole.Instance.Output (string.Format (" Slot {0:8}: {1:000} - quality: {2}", 133 _slotname, item.itemName, item.quality)); 130 SdtdConsole.Instance.Output ($" Slot {_slotname:8}: {item.itemName:000} - quality: {item.quality}"); 134 131 } 135 132 … … 157 154 // no currentMessage given -> readable output 158 155 if (_parts [i].quality < 0) { 159 SdtdConsole.Instance.Output (string.Format ("{0} - {1}", indenter, 160 _parts [i].itemName)); 156 SdtdConsole.Instance.Output ($"{indenter} - {_parts [i].itemName}"); 161 157 } else { 162 SdtdConsole.Instance.Output (string.Format ("{0} - {1} - quality: {2}", 163 indenter, _parts [i].itemName, _parts [i].quality)); 158 SdtdConsole.Instance.Output ($"{indenter} - {_parts [i].itemName} - quality: {_parts [i].quality}"); 164 159 } 165 160 -
binary-improvements2/AllocsCommands/PrivateMessageConnections.cs
r369 r383 1 1 using System.Collections.Generic; 2 using Steamworks;3 2 4 3 namespace AllocsFixes.CustomCommands { -
binary-improvements2/MapRendering/Commands/EnableOpenIDDebug.cs
r359 r383 1 using System;2 1 using System.Collections.Generic; 3 2 using AllocsFixes.NetConnections.Servers.Web; -
binary-improvements2/MapRendering/Commands/EnableRendering.cs
r359 r383 1 using System;2 1 using System.Collections.Generic; 3 2 -
binary-improvements2/MapRendering/Commands/ReloadWebPermissions.cs
r359 r383 1 using System;2 1 using System.Collections.Generic; 3 2 using AllocsFixes.NetConnections.Servers.Web; -
binary-improvements2/MapRendering/Commands/RenderMap.cs
r359 r383 1 using System;2 1 using System.Collections.Generic; 3 2 -
binary-improvements2/MapRendering/Commands/webstat.cs
r359 r383 1 using System;2 1 using System.Collections.Generic; 3 2 using AllocsFixes.NetConnections.Servers.Web; -
binary-improvements2/MapRendering/MapRendering/MapRendering.cs
r369 r383 24 24 private bool renderingFullMap; 25 25 private float renderTimeout = float.MaxValue; 26 private bool shutdown; 26 27 27 28 private MapRendering () { … … 59 60 60 61 public static void Shutdown () { 61 if (Instance?.renderCoroutineRef != null) { 62 if (Instance == null) { 63 return; 64 } 65 66 Instance.shutdown = true; 67 68 if (Instance.renderCoroutineRef != null) { 62 69 ThreadManager.StopCoroutine (Instance.renderCoroutineRef); 63 70 Instance.renderCoroutineRef = null; … … 201 208 202 209 private IEnumerator renderCoroutine () { 203 while ( true) {210 while (!shutdown) { 204 211 lock (lockObject) { 205 if (dirtyChunks.Count > 0 && renderTimeout == float.MaxValue) {212 if (dirtyChunks.Count > 0 && renderTimeout >= float.MaxValue / 2) { 206 213 renderTimeout = Time.time + 0.5f; 207 214 } … … 239 246 //Log.Out ("Start Dirty: " + chunkPos); 240 247 241 Vector2i block, blockOffset; 242 getBlockNumber (chunkPos, out block, out blockOffset, Constants.MAP_BLOCK_TO_CHUNK_DIV, 243 Constants.MAP_CHUNK_SIZE); 248 getBlockNumber (chunkPos, out Vector2i block, out _, Constants.MAP_BLOCK_TO_CHUNK_DIV, Constants.MAP_CHUNK_SIZE); 244 249 245 250 zoomLevelBuffers [Constants.ZOOMLEVELS - 1].LoadBlock (block); -
binary-improvements2/MapRendering/Web/API/GetAllowedCommands.cs
r382 r383 1 using System.Net;2 1 using AllocsFixes.JSON; 3 2 using HttpListenerRequest = SpaceWizards.HttpListener.HttpListenerRequest; -
binary-improvements2/MapRendering/Web/API/GetAnimalsLocation.cs
r382 r383 1 1 using System.Collections.Generic; 2 using System.Net;3 2 using AllocsFixes.JSON; 4 3 using AllocsFixes.LiveData; -
binary-improvements2/MapRendering/Web/API/GetHostileLocation.cs
r382 r383 1 1 using System.Collections.Generic; 2 using System.Net;3 2 using AllocsFixes.JSON; 4 3 using AllocsFixes.LiveData; -
binary-improvements2/MapRendering/Web/API/GetLog.cs
r382 r383 1 1 using System.Collections.Generic; 2 using System.Net;3 2 using AllocsFixes.JSON; 4 3 using HttpListenerRequest = SpaceWizards.HttpListener.HttpListenerRequest; -
binary-improvements2/MapRendering/Web/API/GetPlayerInventories.cs
r382 r383 1 1 using System.Collections.Generic; 2 using System.Net;3 2 using AllocsFixes.JSON; 4 3 using AllocsFixes.PersistentData; -
binary-improvements2/MapRendering/Web/API/GetPlayerList.cs
r382 r383 2 2 using System.Collections.Generic; 3 3 using System.Linq; 4 using System.Net;5 4 using System.Text.RegularExpressions; 6 5 using AllocsFixes.JSON; -
binary-improvements2/MapRendering/Web/API/GetPlayersLocation.cs
r382 r383 1 1 using System.Collections.Generic; 2 using System.Net;3 2 using AllocsFixes.JSON; 4 3 using AllocsFixes.PersistentData; -
binary-improvements2/MapRendering/Web/API/GetPlayersOnline.cs
r382 r383 1 1 using System.Collections.Generic; 2 using System.Net;3 2 using AllocsFixes.JSON; 4 3 using AllocsFixes.PersistentData; -
binary-improvements2/MapRendering/Web/API/GetServerInfo.cs
r382 r383 1 1 using System; 2 using System.Net;3 2 using AllocsFixes.JSON; 4 3 using HttpListenerRequest = SpaceWizards.HttpListener.HttpListenerRequest; -
binary-improvements2/MapRendering/Web/API/GetStats.cs
r382 r383 1 using System.Net;2 1 using AllocsFixes.JSON; 3 2 using AllocsFixes.LiveData; -
binary-improvements2/MapRendering/Web/API/GetWebUIUpdates.cs
r382 r383 1 using System.Net;2 1 using AllocsFixes.JSON; 3 2 using AllocsFixes.LiveData; -
binary-improvements2/MapRendering/Web/API/Null.cs
r382 r383 1 using System.Net; 2 using System.Text; 1 using System.Text; 3 2 using HttpListenerRequest = SpaceWizards.HttpListener.HttpListenerRequest; 4 3 using HttpListenerResponse = SpaceWizards.HttpListener.HttpListenerResponse; -
binary-improvements2/MapRendering/Web/Handlers/AbsHandler.cs
r382 r383 1 using System.Net;2 1 using HttpListenerRequest = SpaceWizards.HttpListener.HttpListenerRequest; 3 2 using HttpListenerResponse = SpaceWizards.HttpListener.HttpListenerResponse; -
binary-improvements2/MapRendering/Web/Handlers/SimpleRedirectHandler.cs
r382 r383 1 using System.Net;2 1 using HttpListenerRequest = SpaceWizards.HttpListener.HttpListenerRequest; 3 2 using HttpListenerResponse = SpaceWizards.HttpListener.HttpListenerResponse; -
binary-improvements2/MapRendering/Web/Web.cs
r382 r383 164 164 response.ProtocolVersion = httpProtocolVersion; 165 165 166 // No game yet -> fail request 167 if (GameManager.Instance.World == null) { 168 response.StatusCode = (int) HttpStatusCode.ServiceUnavailable; 169 return; 170 } 171 172 if (request.Url == null) { 173 response.StatusCode = (int) HttpStatusCode.BadRequest; 174 return; 175 } 176 166 177 #if ENABLE_PROFILER 167 178 authSampler.Begin (); … … 172 183 #endif 173 184 174 175 185 //Log.Out ("Login status: conn!=null: {0}, permissionlevel: {1}", conn != null, permissionLevel); 176 177 186 178 187 if (conn != null) { … … 186 195 } 187 196 188 // No game yet -> fail request189 if (GameManager.Instance.World == null) {190 response.StatusCode = (int) HttpStatusCode.ServiceUnavailable;191 return;192 }193 194 197 string requestPath = request.Url.AbsolutePath; 195 198
Note:
See TracChangeset
for help on using the changeset viewer.