Unstable 1.2.1.0
This commit is contained in:
@@ -14,6 +14,16 @@ namespace Barotrauma.Networking
|
||||
public readonly string Reason;
|
||||
public Option<SerializableDateTime> ExpirationTime;
|
||||
public readonly UInt32 UniqueIdentifier;
|
||||
|
||||
public bool MatchesClient(Client client)
|
||||
{
|
||||
if (client == null) { return false; }
|
||||
if (AddressOrAccountId.TryGet(out AccountId bannedAccountId) && client.AccountId.TryUnwrap(out AccountId? accountId))
|
||||
{
|
||||
return bannedAccountId.Equals(accountId);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
partial class BanList
|
||||
|
||||
@@ -218,7 +218,7 @@ namespace Barotrauma.Networking
|
||||
msg.WriteUInt16((UInt16)PermittedConsoleCommands.Count);
|
||||
foreach (DebugConsole.Command command in PermittedConsoleCommands)
|
||||
{
|
||||
msg.WriteString(command.names[0]);
|
||||
msg.WriteIdentifier(command.Names[0]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -240,8 +240,8 @@ namespace Barotrauma.Networking
|
||||
UInt16 commandCount = inc.ReadUInt16();
|
||||
for (int i = 0; i < commandCount; i++)
|
||||
{
|
||||
string commandName = inc.ReadString();
|
||||
var consoleCommand = DebugConsole.Commands.Find(c => c.names.Contains(commandName));
|
||||
Identifier commandName = inc.ReadIdentifier();
|
||||
var consoleCommand = DebugConsole.Commands.Find(c => c.Names.Contains(commandName));
|
||||
if (consoleCommand != null)
|
||||
{
|
||||
permittedCommands.Add(consoleCommand);
|
||||
|
||||
@@ -644,6 +644,13 @@ namespace Barotrauma.Networking
|
||||
set;
|
||||
}
|
||||
|
||||
[Serialize(true, IsPropertySaveable.Yes)]
|
||||
public bool AllowImmediateItemDelivery
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
[Serialize(false, IsPropertySaveable.Yes)]
|
||||
public bool LockAllDefaultWires
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user