Changeset 420
- Timestamp:
- Mar 28, 2023, 5:11:02 PM (20 months ago)
- Location:
- binary-improvements
- Files:
-
- 11 deleted
- 24 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
binary-improvements/7dtd-binaries/README.txt
r253 r420 1 Put the Assembly-CSharp.dll, Assembly-CSharp-firstpass.dll, LogLibrary.dll, mscorlib.dll, 2 System.dll, System.Xml.dll and UnityEngine.dll from your dedicated server in this folder. 1 Put the following files from your dedicated server in this folder: 2 - 0Harmony.dll 3 - Assembly-CSharp.dll 4 - Assembly-CSharp-firstpass.dll 5 - com.rlabrecque.steamworks.net.dll 6 - LogLibrary.dll 7 - mscorlib.dll 8 - System.dll 9 - System.Xml.dll 10 - System.Xml.Linq.dll 11 - UnityEngine.CoreModule.dll 12 - UnityEngine.dll 13 - UnityEngine.ImageConversionModule.dll 14 - Utf8Json.dll 3 15 16 Also, grab the following two from the "vanilla web mods": 17 - MapRendering.dll 18 - WebServer.dll -
binary-improvements/7dtd-server-fixes/7dtd-server-fixes.csproj
r373 r420 100 100 <Compile Include="src\JSON\JSONNull.cs" /> 101 101 <Compile Include="src\JSON\MalformedJSONException.cs" /> 102 <Compile Include="src\FileCache\AbstractCache.cs" />103 <Compile Include="src\FileCache\DirectAccess.cs" />104 <Compile Include="src\FileCache\SimpleCache.cs" />105 <Compile Include="src\FileCache\MapTileCache.cs" />106 102 <Compile Include="src\API.cs" /> 107 103 <Compile Include="src\AllocsUtils.cs" /> … … 116 112 <Folder Include="src\PersistentData\" /> 117 113 <Folder Include="src\JSON\Parser\" /> 118 <Folder Include="src\FileCache\" />119 114 </ItemGroup> 120 115 <ItemGroup> -
binary-improvements/AllocsCommands/AllocsCommands.csproj
r373 r420 62 62 <Compile Include="API.cs" /> 63 63 <Compile Include="AssemblyInfo.cs" /> 64 <Compile Include="Commands\Give.cs" />65 64 <Compile Include="Commands\ListKnownPlayers.cs" /> 66 65 <Compile Include="Commands\ListLandProtection.cs" /> 67 66 <Compile Include="Commands\RemoveLandProtection.cs" /> 68 <Compile Include="Commands\Reply.cs" />69 <Compile Include="Commands\SayToPlayer.cs" />70 67 <Compile Include="Commands\ShowInventory.cs" /> 71 <Compile Include="PrivateMessageConnections.cs" />72 <Compile Include="Chat.cs" />73 <Compile Include="Commands\ListItems.cs" />74 68 </ItemGroup> 75 69 <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> -
binary-improvements/AllocsCommands/Commands/ListKnownPlayers.cs
r369 r420 4 4 namespace AllocsFixes.CustomCommands { 5 5 public class ListKnownPlayers : ConsoleCmdAbstract { 6 p ublic override string GetDescription () {6 protected override string getDescription () { 7 7 return "lists all players that were ever online"; 8 8 } 9 9 10 p ublic override string GetHelp () {10 protected override string getHelp () { 11 11 return "Usage:\n" + 12 12 " 1. listknownplayers\n" + … … 20 20 } 21 21 22 p ublic override string[] GetCommands () {22 protected override string[] getCommands () { 23 23 return new[] {"listknownplayers", "lkp"}; 24 24 } … … 61 61 if ( 62 62 (!onlineOnly || p.IsOnline) 63 && (!notBannedOnly || !admTools. IsBanned (kvp.Key, out _, out _))63 && (!notBannedOnly || !admTools.Blacklist.IsBanned (kvp.Key, out _, out _)) 64 64 && (nameFilter.Length == 0 || p.Name.ContainsCaseInsensitive (nameFilter)) 65 65 ) { -
binary-improvements/AllocsCommands/Commands/ListLandProtection.cs
r371 r420 5 5 namespace AllocsFixes.CustomCommands { 6 6 public class ListLandProtection : ConsoleCmdAbstract { 7 p ublic override string GetDescription () {7 protected override string getDescription () { 8 8 return "lists all land protection blocks and owners"; 9 9 } 10 10 11 p ublic override string GetHelp () {11 protected override string getHelp () { 12 12 return "Usage:\n" + 13 13 " 1. listlandprotection summary\n" + … … 20 20 } 21 21 22 p ublic override string[] GetCommands () {22 protected override string[] getCommands () { 23 23 return new[] {"listlandprotection", "llp"}; 24 24 } -
binary-improvements/AllocsCommands/Commands/RemoveLandProtection.cs
r369 r420 5 5 namespace AllocsFixes.CustomCommands { 6 6 public class RemoveLandProtection : ConsoleCmdAbstract { 7 p ublic override string GetDescription () {7 protected override string getDescription () { 8 8 return "removes the association of a land protection block to the owner"; 9 9 } 10 10 11 p ublic override string GetHelp () {11 protected override string getHelp () { 12 12 return "Usage:" + 13 13 " 1. removelandprotection <userid>\n" + … … 19 19 } 20 20 21 p ublic override string[] GetCommands () {21 protected override string[] getCommands () { 22 22 return new[] {"removelandprotection", "rlp"}; 23 23 } -
binary-improvements/AllocsCommands/Commands/ShowInventory.cs
r369 r420 5 5 namespace AllocsFixes.CustomCommands { 6 6 public class ShowInventory : ConsoleCmdAbstract { 7 p ublic override string GetDescription () {7 protected override string getDescription () { 8 8 return "list inventory of a given player"; 9 9 } 10 10 11 p ublic override string GetHelp () {11 protected override string getHelp () { 12 12 return "Usage:\n" + 13 13 " showinventory <user id / player name / entity id> [tag]\n" + … … 20 20 } 21 21 22 p ublic override string[] GetCommands () {22 protected override string[] getCommands () { 23 23 return new[] {"showinventory", "si"}; 24 24 } -
binary-improvements/MapRendering/API.cs
r369 r420 9 9 ModEvents.GameStartDone.RegisterHandler (GameStartDone); 10 10 ModEvents.GameShutdown.RegisterHandler (GameShutdown); 11 ModEvents.CalcChunkColorsDone.RegisterHandler (CalcChunkColorsDone);12 11 } 13 12 … … 28 27 private void GameShutdown () { 29 28 webInstance?.Shutdown (); 30 MapRendering.MapRendering.Shutdown ();31 }32 33 private void CalcChunkColorsDone (Chunk _chunk) {34 MapRendering.MapRendering.RenderSingleChunk (_chunk);35 29 } 36 30 } -
binary-improvements/MapRendering/Commands/ReloadWebPermissions.cs
r359 r420 5 5 namespace AllocsFixes.CustomCommands { 6 6 public class ReloadWebPermissions : ConsoleCmdAbstract { 7 p ublic override string GetDescription () {7 protected override string getDescription () { 8 8 return "force reload of web permissions file"; 9 9 } 10 10 11 p ublic override string[] GetCommands () {12 return new[] {"reloadwebpermissions "};11 protected override string[] getCommands () { 12 return new[] {"reloadwebpermissions_legacy"}; 13 13 } 14 14 -
binary-improvements/MapRendering/Commands/WebPermissionsCmd.cs
r372 r420 4 4 namespace AllocsFixes.CustomCommands { 5 5 public class WebPermissionsCmd : ConsoleCmdAbstract { 6 p ublic override string[] GetCommands () {7 return new[] {"webpermission "};6 protected override string[] getCommands () { 7 return new[] {"webpermission_legacy"}; 8 8 } 9 9 10 p ublic override string GetDescription () {10 protected override string getDescription () { 11 11 return "Manage web permission levels"; 12 12 } 13 13 14 p ublic override string GetHelp () {14 protected override string getHelp () { 15 15 return "Set/get permission levels required to access a given web functionality. Default\n" + 16 16 "level required for functions that are not explicitly specified is 0.\n" + 17 17 "Usage:\n" + 18 " webpermission add <webfunction> <level>\n" +19 " webpermission remove <webfunction>\n" +20 " webpermission list";18 " webpermission_legacy add <webfunction> <level>\n" + 19 " webpermission_legacy remove <webfunction>\n" + 20 " webpermission_legacy list"; 21 21 } 22 22 -
binary-improvements/MapRendering/Commands/WebTokens.cs
r326 r420 7 7 private static readonly Regex validNameTokenMatcher = new Regex (@"^\w+$"); 8 8 9 p ublic override string[] GetCommands () {10 return new[] {"webtokens "};9 protected override string[] getCommands () { 10 return new[] {"webtokens_legacy"}; 11 11 } 12 12 13 p ublic override string GetDescription () {13 protected override string getDescription () { 14 14 return "Manage web tokens"; 15 15 } 16 16 17 p ublic override string GetHelp () {17 protected override string getHelp () { 18 18 return "Set/get webtoken permission levels. A level of 0 is maximum permission.\n" + 19 19 "Usage:\n" + 20 " webtokens add <username> <usertoken> <level>\n" +21 " webtokens remove <username>\n" +22 " webtokens list";20 " webtokens_legacy add <username> <usertoken> <level>\n" + 21 " webtokens_legacy remove <username>\n" + 22 " webtokens_legacy list"; 23 23 } 24 24 -
binary-improvements/MapRendering/Commands/webstat.cs
r359 r420 5 5 namespace AllocsFixes.CustomCommands { 6 6 public class webstat : ConsoleCmdAbstract { 7 p ublic override string GetDescription () {7 protected override string getDescription () { 8 8 return "DEBUG PURPOSES ONLY"; 9 9 } 10 10 11 p ublic override string[] GetCommands () {12 return new[] {"webstat "};11 protected override string[] getCommands () { 12 return new[] {"webstat_legacy"}; 13 13 } 14 14 -
binary-improvements/MapRendering/Web/API/ExecuteConsoleCommand.cs
r360 r420 31 31 } 32 32 33 int commandPermissionLevel = GameManager.Instance.adminTools. GetCommandPermissionLevel (command.GetCommands ());33 int commandPermissionLevel = GameManager.Instance.adminTools.Commands.GetCommandPermissionLevel (command.GetCommands ()); 34 34 35 35 if (_permissionLevel > commandPermissionLevel) { -
binary-improvements/MapRendering/Web/API/GetAllowedCommands.cs
r360 r420 9 9 JSONArray entries = new JSONArray (); 10 10 foreach (IConsoleCommand cc in SdtdConsole.Instance.GetCommands ()) { 11 int commandPermissionLevel = GameManager.Instance.adminTools. GetCommandPermissionLevel (cc.GetCommands ());11 int commandPermissionLevel = GameManager.Instance.adminTools.Commands.GetCommandPermissionLevel (cc.GetCommands ()); 12 12 if (_permissionLevel <= commandPermissionLevel) { 13 13 string cmd = string.Empty; -
binary-improvements/MapRendering/Web/API/GetLandClaims.cs
r369 r420 23 23 24 24 JSONObject result = new JSONObject (); 25 result.Add ("claimsize", new JSONNumber (GamePrefs.GetInt (EnumUtils.Parse<EnumGamePrefs> ( "LandClaimSize"))));25 result.Add ("claimsize", new JSONNumber (GamePrefs.GetInt (EnumUtils.Parse<EnumGamePrefs> (nameof(EnumGamePrefs.LandClaimSize))))); 26 26 27 27 JSONArray claimOwners = new JSONArray (); -
binary-improvements/MapRendering/Web/API/GetPlayerList.cs
r369 r420 68 68 pJson.Add ("ping", new JSONNumber (p.IsOnline ? p.ClientInfo.ping : -1)); 69 69 70 JSONBoolean banned = admTools != null ? new JSONBoolean (admTools. IsBanned (kvp.Key, out _, out _)) : new JSONBoolean (false);70 JSONBoolean banned = admTools != null ? new JSONBoolean (admTools.Blacklist.IsBanned (kvp.Key, out _, out _)) : new JSONBoolean (false); 71 71 72 72 pJson.Add ("banned", banned); -
binary-improvements/MapRendering/Web/API/GetPlayersLocation.cs
r369 r420 24 24 foreach (KeyValuePair<PlatformUserIdentifierAbs, Player> kvp in playersList.Dict) { 25 25 if (admTools != null) { 26 if (admTools. IsBanned (kvp.Key, out _, out _)) {26 if (admTools.Blacklist.IsBanned (kvp.Key, out _, out _)) { 27 27 continue; 28 28 } -
binary-improvements/MapRendering/Web/Handlers/ItemIconHandler.cs
r369 r420 89 89 loadIconsFromFolder (modIconsPath, tintedIcons); 90 90 } catch (Exception e) { 91 Log.Error ("Failed loading icons from mod " + mod. ModInfo.Name.Value);91 Log.Error ("Failed loading icons from mod " + mod.Name); 92 92 Log.Exception (e); 93 93 } -
binary-improvements/MapRendering/Web/Handlers/StaticHandler.cs
r367 r420 1 1 using System.IO; 2 2 using System.Net; 3 using AllocsFixes.FileCache;3 using Webserver.FileCache; 4 4 5 5 namespace AllocsFixes.NetConnections.Servers.Web.Handlers { -
binary-improvements/MapRendering/Web/OpenID.cs
r351 r420 26 26 27 27 private const bool verboseSsl = false; 28 p ublic static booldebugOpenId;28 private static bool debugOpenId => Webserver.OpenID.debugOpenId; 29 29 30 30 static OpenID () { 31 for (int i = 0; i < Environment.GetCommandLineArgs ().Length; i++) {32 if (Environment.GetCommandLineArgs () [i].EqualsCaseInsensitive ("-debugopenid")) {33 debugOpenId = true;34 }35 }36 37 31 ServicePointManager.ServerCertificateValidationCallback = (_srvPoint, _certificate, _chain, _errors) => { 38 32 if (_errors == SslPolicyErrors.None) { -
binary-improvements/MapRendering/Web/Web.cs
r369 r420 7 7 using System.Text; 8 8 using System.Threading; 9 using AllocsFixes.FileCache;10 9 using AllocsFixes.NetConnections.Servers.Web.Handlers; 11 10 using AllocsFixes.NetConnections.Servers.Web.SSE; 12 11 using UnityEngine; 12 using Webserver.FileCache; 13 13 14 14 namespace AllocsFixes.NetConnections.Servers.Web { … … 25 25 public Web () { 26 26 try { 27 int webPort = GamePrefs.GetInt (EnumUtils.Parse<EnumGamePrefs> ( "ControlPanelPort"));27 int webPort = GamePrefs.GetInt (EnumUtils.Parse<EnumGamePrefs> (nameof(EnumGamePrefs.WebDashboardPort))); 28 28 if (webPort < 1 || webPort > 65533) { 29 Log.Out ("Webserver not started ( ControlPanelPort not within 1-65533)");29 Log.Out ("Webserver not started (WebDashboardPort not within 1-65533)"); 30 30 return; 31 31 } 32 32 33 33 if (!Directory.Exists (Path.GetDirectoryName (Assembly.GetExecutingAssembly ().Location) + 34 "/webserver ")) {35 Log.Out ("Webserver not started (folder \"webserver \" not found in WebInterface mod folder)");34 "/webserver_legacy")) { 35 Log.Out ("Webserver not started (folder \"webserver_legacy\" not found in WebInterface mod folder)"); 36 36 return; 37 37 } … … 40 40 bool useStaticCache = false; 41 41 42 string dataFolder = Path.GetDirectoryName (Assembly.GetExecutingAssembly ().Location) + "/webserver ";42 string dataFolder = Path.GetDirectoryName (Assembly.GetExecutingAssembly ().Location) + "/webserver_legacy"; 43 43 44 44 if (!HttpListener.IsSupported) { … … 60 60 RegisterPathHandler ("/map/", new StaticHandler ( 61 61 GameIO.GetSaveGameDir () + "/map", 62 MapRendering.MapRender ing.GetTileCache (),62 MapRendering.MapRenderer.GetTileCache (), 63 63 false, 64 64 "web.map") … … 248 248 if (con != null) { 249 249 _con = con; 250 return GameManager.Instance.adminTools. GetUserPermissionLevel (_con.UserId);250 return GameManager.Instance.adminTools.Users.GetUserPermissionLevel (_con.UserId); 251 251 } 252 252 } … … 270 270 WebConnection con = connectionHandler.LogIn (id, _req.RemoteEndPoint.Address); 271 271 _con = con; 272 int level = GameManager.Instance.adminTools. GetUserPermissionLevel (con.UserId);272 int level = GameManager.Instance.adminTools.Users.GetUserPermissionLevel (con.UserId); 273 273 Log.Out ("Steam OpenID login from {0} with ID {1}, permission level {2}", 274 274 remoteEndpointString, con.UserId, level); -
binary-improvements/MapRendering/Web/WebPermissions.cs
r372 r420 171 171 172 172 private string GetFilePath () { 173 return GamePrefs.GetString (EnumUtils.Parse<EnumGamePrefs> ( "SaveGameFolder"));173 return GamePrefs.GetString (EnumUtils.Parse<EnumGamePrefs> (nameof(EnumGamePrefs.SaveGameFolder))); 174 174 } 175 175 -
binary-improvements/MapRendering/WebAndMapRendering.csproj
r373 r420 9 9 <OutputType>Library</OutputType> 10 10 <RootNamespace>MapRendering</RootNamespace> 11 <AssemblyName> MapRendering</AssemblyName>11 <AssemblyName>AllocsWeb</AssemblyName> 12 12 <TargetFrameworkVersion>v4.5</TargetFrameworkVersion> 13 13 </PropertyGroup> … … 39 39 <Private>False</Private> 40 40 </Reference> 41 <Reference Include="com.rlabrecque.steamworks.net, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null"> 42 <HintPath>..\7dtd-binaries\com.rlabrecque.steamworks.net.dll</HintPath> 43 <Private>False</Private> 44 </Reference> 41 45 <Reference Include="LogLibrary"> 42 46 <HintPath>..\7dtd-binaries\LogLibrary.dll</HintPath> 47 <Private>False</Private> 48 </Reference> 49 <Reference Include="MapRendering, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null"> 50 <HintPath>..\7dtd-binaries\MapRendering.dll</HintPath> 43 51 <Private>False</Private> 44 52 </Reference> … … 75 83 <Private>False</Private> 76 84 </Reference> 85 <Reference Include="WebServer, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null"> 86 <HintPath>..\7dtd-binaries\WebServer.dll</HintPath> 87 <Private>False</Private> 88 </Reference> 77 89 </ItemGroup> 78 90 <ItemGroup> 79 91 <Compile Include="AssemblyInfo.cs" /> 80 <Compile Include="MapRendering\MapRendering.cs" />81 <Compile Include="MapRendering\MapRenderBlockBuffer.cs" />82 <Compile Include="MapRendering\Constants.cs" />83 <Compile Include="Commands\RenderMap.cs" />84 <Compile Include="Commands\EnableRendering.cs" />85 92 <Compile Include="API.cs" /> 86 93 <Compile Include="Web\API\GetAnimalsLocation.cs" /> … … 121 128 <Compile Include="Web\WebCommandResult.cs" /> 122 129 <Compile Include="Web\API\GetAllowedCommands.cs" /> 123 <Compile Include="Commands\EnableOpenIDDebug.cs" />124 130 <Compile Include="Web\API\GetPlayerInventories.cs" /> 125 131 </ItemGroup> -
binary-improvements/bundle_creation/makefile
r309 r420 30 30 @mkdir -p Mods 31 31 @cp ../bin/Mods/* Mods/ -R 32 @mkdir -p Mods/Allocs_WebAndMapRendering/webserver 33 @cp ../webserver /* Mods/Allocs_WebAndMapRendering/webserver/ -R34 @rm Mods/Allocs_WebAndMapRendering/webserver /protect -f32 @mkdir -p Mods/Allocs_WebAndMapRendering/webserver_legacy 33 @cp ../webserver_legacy/* Mods/Allocs_WebAndMapRendering/webserver_legacy/ -R 34 @rm Mods/Allocs_WebAndMapRendering/webserver_legacy/protect -f 35 35 @find . -name "*~" -exec rm {} \; 36 36
Note:
See TracChangeset
for help on using the changeset viewer.