Misc replay related changes (#13250)
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
using Robust.Shared.Serialization;
|
||||
using Robust.Shared.Utility;
|
||||
|
||||
namespace Content.Shared.Administration;
|
||||
|
||||
public interface IGamePrototypeLoadManager
|
||||
@@ -5,3 +8,12 @@ public interface IGamePrototypeLoadManager
|
||||
public void Initialize();
|
||||
public void SendGamePrototype(string prototype);
|
||||
}
|
||||
|
||||
// TODO REPLAYS
|
||||
// Figure out a way to just directly save NetMessage objects to replays. This just uses IRobustSerializer as a crutch.
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
public sealed class ReplayPrototypeUploadMsg
|
||||
{
|
||||
public string PrototypeData = default!;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using Robust.Shared.ContentPack;
|
||||
using Robust.Shared.Network;
|
||||
using Robust.Shared.Serialization;
|
||||
using Robust.Shared.Utility;
|
||||
|
||||
namespace Content.Shared.Administration;
|
||||
@@ -38,4 +39,14 @@ public abstract class SharedNetworkResourceManager : IDisposable
|
||||
// MemoryContentRoot uses a ReaderWriterLockSlim, which we need to dispose of.
|
||||
ContentRoot.Dispose();
|
||||
}
|
||||
|
||||
// TODO REPLAYS
|
||||
// Figure out a way to just directly save NetMessage objects to replays. This just uses IRobustSerializer as a crutch.
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
public sealed class ReplayResourceUploadMsg
|
||||
{
|
||||
public byte[] Data = default!;
|
||||
public ResourcePath RelativePath = default!;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -77,6 +77,9 @@ public abstract partial class SharedHandsSystem : EntitySystem
|
||||
if (!TryComp(session?.AttachedEntity, out SharedHandsComponent? component))
|
||||
return;
|
||||
|
||||
if (!_actionBlocker.CanInteract(session.AttachedEntity.Value, null))
|
||||
return;
|
||||
|
||||
if (component.ActiveHand == null || component.Hands.Count < 2)
|
||||
return;
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ namespace Content.Shared.Projectiles
|
||||
}
|
||||
|
||||
[NetSerializable, Serializable]
|
||||
protected sealed class ProjectileComponentState : ComponentState
|
||||
public sealed class ProjectileComponentState : ComponentState
|
||||
{
|
||||
public ProjectileComponentState(EntityUid shooter, bool ignoreShooter)
|
||||
{
|
||||
@@ -45,7 +45,7 @@ namespace Content.Shared.Projectiles
|
||||
}
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
protected sealed class ImpactEffectEvent : EntityEventArgs
|
||||
public sealed class ImpactEffectEvent : EntityEventArgs
|
||||
{
|
||||
public string Prototype;
|
||||
public EntityCoordinates Coordinates;
|
||||
|
||||
@@ -7,6 +7,12 @@ public abstract class SharedTimedDespawnSystem : EntitySystem
|
||||
{
|
||||
[Dependency] private readonly IGameTiming _timing = default!;
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
UpdatesOutsidePrediction = true;
|
||||
}
|
||||
|
||||
public override void Update(float frameTime)
|
||||
{
|
||||
base.Update(frameTime);
|
||||
|
||||
@@ -404,7 +404,7 @@ public abstract partial class SharedGunSystem : EntitySystem
|
||||
/// Used for animated effects on the client.
|
||||
/// </summary>
|
||||
[Serializable, NetSerializable]
|
||||
protected sealed class HitscanEvent : EntityEventArgs
|
||||
public sealed class HitscanEvent : EntityEventArgs
|
||||
{
|
||||
public List<(EntityCoordinates coordinates, Angle angle, SpriteSpecifier Sprite, float Distance)> Sprites = new();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user