Merge branch 'master' into buckle-locker-fix-1262

This commit is contained in:
DrSmugleaf
2020-07-08 15:35:20 +02:00
121 changed files with 1116 additions and 772 deletions

View File

@@ -51,9 +51,14 @@ namespace Content.Shared.Chat
/// </summary>
Dead = 128,
/// <summary>
/// Admin chat
/// </summary>
AdminChat = 256,
/// <summary>
/// Unspecified.
/// </summary>
Unspecified = 256,
Unspecified = 512,
}
}

View File

@@ -41,7 +41,7 @@ namespace Content.Shared.Chat
public override void ReadFromBuffer(NetIncomingMessage buffer)
{
Channel = (ChatChannel) buffer.ReadByte();
Channel = (ChatChannel) buffer.ReadInt16();
Message = buffer.ReadString();
MessageWrap = buffer.ReadString();
@@ -49,6 +49,7 @@ namespace Content.Shared.Chat
{
case ChatChannel.Local:
case ChatChannel.Dead:
case ChatChannel.AdminChat:
case ChatChannel.Emotes:
SenderEntity = buffer.ReadEntityUid();
break;
@@ -57,7 +58,7 @@ namespace Content.Shared.Chat
public override void WriteToBuffer(NetOutgoingMessage buffer)
{
buffer.Write((byte)Channel);
buffer.Write((short)Channel);
buffer.Write(Message);
buffer.Write(MessageWrap);
@@ -65,6 +66,7 @@ namespace Content.Shared.Chat
{
case ChatChannel.Local:
case ChatChannel.Dead:
case ChatChannel.AdminChat:
case ChatChannel.Emotes:
buffer.Write(SenderEntity);
break;

View File

@@ -1,4 +1,5 @@
using System;
#nullable enable
using System;
using Content.Shared.GameObjects.Components.Mobs;
using Robust.Shared.GameObjects;
using Robust.Shared.GameObjects.Components;
@@ -13,8 +14,6 @@ using Robust.Shared.Serialization;
using Robust.Shared.Timing;
using Robust.Shared.ViewVariables;
#nullable enable
namespace Content.Shared.GameObjects.Components.Movement
{
public abstract class SharedPlayerInputMoverComponent : Component, IMoverComponent, ICollideSpecial
@@ -189,11 +188,16 @@ namespace Content.Shared.GameObjects.Components.Movement
_lastInputSubTick = 0;
}
var fraction = (subTick - _lastInputSubTick) / (float) ushort.MaxValue;
if (subTick >= _lastInputSubTick)
{
var fraction = (subTick - _lastInputSubTick) / (float) ushort.MaxValue;
ref var lastMoveAmount = ref Sprinting ? ref _curTickSprintMovement : ref _curTickWalkMovement;
ref var lastMoveAmount = ref Sprinting ? ref _curTickSprintMovement : ref _curTickWalkMovement;
lastMoveAmount += DirVecForButtons(_heldMoveButtons) * fraction;
lastMoveAmount += DirVecForButtons(_heldMoveButtons) * fraction;
_lastInputSubTick = subTick;
}
if (enabled)
{
@@ -204,8 +208,6 @@ namespace Content.Shared.GameObjects.Components.Movement
_heldMoveButtons &= ~bit;
}
_lastInputSubTick = subTick;
Dirty();
}

View File

@@ -1,4 +1,5 @@
using System.Diagnostics.CodeAnalysis;
#nullable enable
using System.Diagnostics.CodeAnalysis;
using Content.Shared.GameObjects.Components.Movement;
using Content.Shared.Physics;
using Robust.Shared.Configuration;
@@ -15,8 +16,6 @@ using Robust.Shared.IoC;
using Robust.Shared.Maths;
using Robust.Shared.Players;
#nullable enable
namespace Content.Shared.GameObjects.EntitySystems
{
public abstract class SharedMoverSystem : EntitySystem

View File

@@ -12,6 +12,7 @@ namespace Content.Shared.Input
public static readonly BoundKeyFunction ExamineEntity = "ExamineEntity";
public static readonly BoundKeyFunction FocusChat = "FocusChatWindow";
public static readonly BoundKeyFunction FocusOOC = "FocusOOCWindow";
public static readonly BoundKeyFunction FocusAdminChat = "FocusAdminChatWindow";
public static readonly BoundKeyFunction OpenCharacterMenu = "OpenCharacterMenu";
public static readonly BoundKeyFunction OpenContextMenu = "OpenContextMenu";
public static readonly BoundKeyFunction OpenCraftingMenu = "OpenCraftingMenu";