Release 1.9.7.0 - Summer Update 2025
This commit is contained in:
@@ -21,6 +21,7 @@ namespace Barotrauma.Networking
|
||||
ServerMessageBox = 10,
|
||||
ServerMessageBoxInGame = 11,
|
||||
Team = 12,
|
||||
BlockedBySpamFilter = 13,
|
||||
}
|
||||
|
||||
public enum PlayerConnectionChangeType { None = 0, Joined = 1, Kicked = 2, Disconnected = 3, Banned = 4 }
|
||||
@@ -39,24 +40,26 @@ namespace Barotrauma.Networking
|
||||
/// </summary>
|
||||
public const float SpeakRangeVOIP = 1000.0f;
|
||||
|
||||
public const float BlockedBySpamFilterTime = 10.0f;
|
||||
|
||||
private static readonly string dateTimeFormatLongTimePattern = System.Globalization.CultureInfo.CurrentCulture.DateTimeFormat.ShortTimePattern;
|
||||
|
||||
public static Color[] MessageColor =
|
||||
{
|
||||
new Color(190, 198, 205), //default
|
||||
new Color(204, 74, 78), //error
|
||||
new Color(136, 177, 255), //dead
|
||||
new Color(136, 177, 255), //dead
|
||||
new Color(157, 225, 160), //server
|
||||
new Color(238, 208, 0), //radio
|
||||
new Color(64, 240, 89), //private
|
||||
new Color(255, 255, 255), //console
|
||||
new Color(255, 255, 255), //messagebox
|
||||
new Color(255, 128, 0), //order
|
||||
new Color(), // ServerLog
|
||||
new Color(), // ServerMessageBox
|
||||
new Color(), // ServerMessageBoxInGame
|
||||
//new Color(128, 0, 255), // team
|
||||
new Color(86, 91, 205), // team
|
||||
new Color(255, 128, 0), //order
|
||||
new Color(), // ServerLog
|
||||
new Color(), // ServerMessageBox
|
||||
new Color(), // ServerMessageBoxInGame
|
||||
new Color(86, 91, 205), // team
|
||||
new Color(255, 0, 0), // blocked by spam filter
|
||||
};
|
||||
|
||||
public readonly string Text;
|
||||
|
||||
@@ -92,13 +92,6 @@ namespace Barotrauma.Networking
|
||||
CharacterID = value.ID;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (value != null)
|
||||
{
|
||||
DebugConsole.NewMessage(value.Name, Color.Yellow);
|
||||
}
|
||||
}
|
||||
character = value;
|
||||
if (character != null)
|
||||
{
|
||||
@@ -272,12 +265,15 @@ namespace Barotrauma.Networking
|
||||
SetPermissions(permissions, permittedCommands);
|
||||
}
|
||||
|
||||
public static string SanitizeName(string name)
|
||||
/// <summary>
|
||||
/// Strips out newlines and some common non-renderable symbols (ASCII codes below 32) out of the name, and optionally limits the maximum size.
|
||||
/// </summary>
|
||||
public static string SanitizeName(string name, int maxLength = MaxNameLength)
|
||||
{
|
||||
name = name.Trim();
|
||||
if (name.Length > MaxNameLength)
|
||||
name = name.Trim().Replace("\r\n", " ").Replace('\n', ' ').Replace('\r', ' ');
|
||||
if (name.Length > maxLength)
|
||||
{
|
||||
name = name.Substring(0, MaxNameLength);
|
||||
name = name.Substring(0, maxLength);
|
||||
}
|
||||
string rName = "";
|
||||
for (int i = 0; i < name.Length; i++)
|
||||
|
||||
@@ -377,6 +377,7 @@ namespace Barotrauma
|
||||
if (IsInRemoveQueue(item) || item.Removed) { return; }
|
||||
|
||||
spawnOrRemoveQueue.Enqueue(item);
|
||||
item.IsInRemoveQueue = true;
|
||||
|
||||
foreach (var containedItem in item.ContainedItems)
|
||||
{
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
using Barotrauma.Items.Components;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace Barotrauma.Networking
|
||||
{
|
||||
@@ -103,6 +101,7 @@ namespace Barotrauma.Networking
|
||||
CIRCUITBOX,
|
||||
MONEY,
|
||||
READY_CHECK, //start, end and update a ready check
|
||||
UNLOCKRECIPE, //unlocking a fabrication recipe
|
||||
|
||||
SEND_BACKUP_INDICES // the server sends a list of available backups for a save file
|
||||
}
|
||||
|
||||
+6
-8
@@ -1,25 +1,23 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using RestSharp;
|
||||
using System;
|
||||
using System.Text.Json;
|
||||
using System.Threading.Tasks;
|
||||
using RestSharp;
|
||||
|
||||
namespace Barotrauma.Networking;
|
||||
|
||||
sealed class SteamAuthTicketForEosHostAuthenticator : Authenticator
|
||||
{
|
||||
#warning FIXME change URL back to the non-experimental one once this passes QA
|
||||
private const string consentServerUrl = "https://barotraumagame.com/baromaster/experimental/";
|
||||
private const string consentServerFile = "getOwnerSteamId.php";
|
||||
private const string ServerUrl = "https://barotraumagame.com/baromaster/";
|
||||
private const string ServerFile = "getOwnerSteamId.php";
|
||||
private const int RemoteRequestVersion = 1;
|
||||
|
||||
public override async Task<AccountInfo> VerifyTicket(AuthenticationTicket ticket)
|
||||
{
|
||||
string ticketData = ToolBoxCore.ByteArrayToHexString(ticket.Data);
|
||||
|
||||
var client = new RestClient(consentServerUrl);
|
||||
var client = new RestClient(ServerUrl);
|
||||
|
||||
var request = new RestRequest(consentServerFile, Method.GET);
|
||||
var request = new RestRequest(ServerFile, Method.GET);
|
||||
request.AddParameter("authticket", ticketData);
|
||||
request.AddParameter("request_version", RemoteRequestVersion);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user