Changeset 437 for binary-improvements2
- Timestamp:
- May 18, 2023, 4:31:05 PM (20 months ago)
- Location:
- binary-improvements2
- Files:
-
- 3 added
- 15 edited
- 3 moved
Legend:
- Unmodified
- Added
- Removed
-
binary-improvements2/MapRendering/src/MapRenderer.cs
r425 r437 317 317 writer.WriteBeginObject (); 318 318 319 writer.WriteString ("blockSize"); 320 writer.WriteNameSeparator (); 319 writer.WritePropertyName ("blockSize"); 321 320 writer.WriteInt32 (Constants.MapBlockSize); 322 321 323 322 writer.WriteValueSeparator (); 324 writer.WriteString ("maxZoom"); 325 writer.WriteNameSeparator (); 323 writer.WritePropertyName ("maxZoom"); 326 324 writer.WriteInt32 (Constants.Zoomlevels - 1); 327 325 -
binary-improvements2/WebServer/ModInfo.xml
r436 r437 5 5 <Description value="Integrated Webserver for the Web Dashboard and server APIs" /> 6 6 <Author value="The Fun Pimps LLC" /> 7 <Version value="21.0.289. 1" />7 <Version value="21.0.289.2" /> 8 8 <Website value="" /> 9 9 </xml> -
binary-improvements2/WebServer/WebServer.csproj
r436 r437 120 120 <Compile Include="src\WebAPI\AbsRestApi.cs" /> 121 121 <Compile Include="src\WebAPI\AbsWebAPI.cs" /> 122 <Compile Include="src\WebAPI\APIs\Bloodmoon.cs" />123 122 <Compile Include="src\WebAPI\APIs\Command.cs" /> 124 123 <Compile Include="src\WebAPI\APIs\GameData\Item.cs" /> … … 134 133 <Compile Include="src\WebAPI\APIs\Permissions\WebUsers.cs" /> 135 134 <Compile Include="src\WebAPI\APIs\Permissions\Whitelist.cs" /> 136 <Compile Include="src\WebAPI\APIs\ServerInfo.cs" /> 137 <Compile Include="src\WebAPI\APIs\ServerStats.cs" /> 135 <Compile Include="src\WebAPI\APIs\ServerState\GamePrefs.cs" /> 136 <Compile Include="src\WebAPI\APIs\ServerState\GameStats.cs" /> 137 <Compile Include="src\WebAPI\APIs\ServerState\ServerInfo.cs" /> 138 <Compile Include="src\WebAPI\APIs\ServerState\ServerStats.cs" /> 138 139 <Compile Include="src\WebAPI\APIs\WorldState\Animal.cs" /> 140 <Compile Include="src\WebAPI\APIs\WorldState\Bloodmoon.cs" /> 139 141 <Compile Include="src\WebAPI\APIs\WorldState\GetLandClaims.cs" /> 140 142 <Compile Include="src\WebAPI\APIs\WorldState\GetPlayerInventories.cs" /> -
binary-improvements2/WebServer/src/WebAPI/APIs/GameData/Item.cs
r434 r437 57 57 } 58 58 59 public override int DefaultPermissionLevel () { 60 return AdminWebModules.PermissionLevelGuest; 61 } 59 public override int DefaultPermissionLevel () => AdminWebModules.PermissionLevelGuest; 62 60 } 63 61 } -
binary-improvements2/WebServer/src/WebAPI/APIs/ServerState/ServerInfo.cs
r436 r437 2 2 using JetBrains.Annotations; 3 3 using Utf8Json; 4 using Webserver.Permissions; 4 5 5 namespace Webserver.WebAPI.APIs {6 namespace Webserver.WebAPI.APIs.ServerState { 6 7 [UsedImplicitly] 7 8 public class ServerInfo : AbsRestApi { … … 23 24 GameServerInfo gsi = ConnectionManager.Instance.LocalServerInfo; 24 25 26 bool first = true; 27 25 28 IList<GameInfoString> list = EnumUtils.Values<GameInfoString> (); 26 29 for (int i = 0; i < list.Count; i++) { 27 30 GameInfoString stringGamePref = list [i]; 28 31 29 if ( i > 0) {32 if (!first) { 30 33 writer.WriteValueSeparator (); 31 34 } 32 35 33 writer.WriteString (stringGamePref.ToStringCached ()); 34 writer.WriteNameSeparator (); 36 first = false; 37 38 writer.WritePropertyName (stringGamePref.ToStringCached ()); 35 39 36 40 writer.WriteRaw (keyType); … … 47 51 GameInfoInt intGamePref = ints [i]; 48 52 49 if ( i > 0) {53 if (!first) { 50 54 writer.WriteValueSeparator (); 51 55 } 52 56 53 writer.WriteString (intGamePref.ToStringCached ()); 54 writer.WriteNameSeparator (); 57 first = false; 58 59 writer.WritePropertyName (intGamePref.ToStringCached ()); 55 60 56 61 writer.WriteRaw (keyType); … … 67 72 GameInfoBool boolGamePref = prefs [i]; 68 73 69 if ( i > 0) {74 if (!first) { 70 75 writer.WriteValueSeparator (); 71 76 } 72 77 73 writer.WriteString (boolGamePref.ToStringCached ()); 74 writer.WriteNameSeparator (); 78 first = false; 79 80 writer.WritePropertyName (boolGamePref.ToStringCached ()); 75 81 76 82 writer.WriteRaw (keyType); … … 94 100 SendEnvelopedResult (_context, ref writer); 95 101 } 102 103 public override int DefaultPermissionLevel () => AdminWebModules.PermissionLevelGuest; 96 104 } 97 105 } -
binary-improvements2/WebServer/src/WebAPI/APIs/ServerState/ServerStats.cs
r436 r437 4 4 using Webserver.Permissions; 5 5 6 namespace Webserver.WebAPI.APIs {6 namespace Webserver.WebAPI.APIs.ServerState { 7 7 [UsedImplicitly] 8 8 public class ServerStats : AbsRestApi { -
binary-improvements2/WebServer/src/WebAPI/APIs/WorldState/Bloodmoon.cs
r436 r437 2 2 using Utf8Json; 3 3 4 namespace Webserver.WebAPI.APIs {4 namespace Webserver.WebAPI.APIs.WorldState { 5 5 [UsedImplicitly] 6 6 public class Bloodmoon : AbsRestApi { -
binary-improvements2/bin/Mods/TFP_WebServer/ModInfo.xml
r436 r437 5 5 <Description value="Integrated Webserver for the Web Dashboard and server APIs" /> 6 6 <Author value="The Fun Pimps LLC" /> 7 <Version value="21.0.289. 1" />7 <Version value="21.0.289.2" /> 8 8 <Website value="" /> 9 9 </xml>
Note:
See TracChangeset
for help on using the changeset viewer.