Bump engine to 0.19.0.0 (#8417)
This commit is contained in:
committed by
GitHub
parent
5dbe77ecba
commit
cb95d2ae8d
@@ -38,16 +38,15 @@ namespace Content.Benchmarks
|
||||
IoCManager.Register<IEntitySystemManager, EntitySystemManager>();
|
||||
IoCManager.RegisterInstance<IReflectionManager>(new Mock<IReflectionManager>().Object);
|
||||
|
||||
var dummyReg = new Mock<IComponentRegistration>();
|
||||
dummyReg.SetupGet(p => p.Name).Returns("Dummy");
|
||||
dummyReg.SetupGet(p => p.Type).Returns(typeof(DummyComponent));
|
||||
dummyReg.SetupGet(p => p.NetID).Returns((ushort?) null);
|
||||
dummyReg.SetupGet(p => p.References).Returns(new [] {typeof(DummyComponent)});
|
||||
var dummyReg = new ComponentRegistration(
|
||||
"Dummy",
|
||||
typeof(DummyComponent),
|
||||
CompIdx.Index<DummyComponent>());
|
||||
|
||||
var componentFactory = new Mock<IComponentFactory>();
|
||||
componentFactory.Setup(p => p.GetComponent<DummyComponent>()).Returns(new DummyComponent());
|
||||
componentFactory.Setup(p => p.GetRegistration(It.IsAny<DummyComponent>())).Returns(dummyReg.Object);
|
||||
componentFactory.Setup(p => p.GetAllRefTypes()).Returns(new[] {typeof(DummyComponent)});
|
||||
componentFactory.Setup(p => p.GetRegistration(It.IsAny<DummyComponent>())).Returns(dummyReg);
|
||||
componentFactory.Setup(p => p.GetAllRefTypes()).Returns(new[] {CompIdx.Index<DummyComponent>()});
|
||||
|
||||
IoCManager.RegisterInstance<IComponentFactory>(componentFactory.Object);
|
||||
|
||||
|
||||
@@ -3,4 +3,5 @@ using Content.Shared.Access.Components;
|
||||
namespace Content.Client.Access.Components;
|
||||
|
||||
[RegisterComponent]
|
||||
[ComponentReference(typeof(SharedIdCardConsoleComponent))]
|
||||
public sealed class IdCardConsoleComponent : SharedIdCardConsoleComponent {}
|
||||
|
||||
@@ -6,6 +6,7 @@ using Robust.Shared.GameObjects;
|
||||
namespace Content.Client.Nutrition.Components
|
||||
{
|
||||
[RegisterComponent]
|
||||
[ComponentReference(typeof(SharedHungerComponent))]
|
||||
public sealed class HungerComponent : SharedHungerComponent
|
||||
{
|
||||
private HungerThreshold _currentHungerThreshold;
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
using System.Collections.Generic;
|
||||
using Content.Server.Destructible;
|
||||
using Content.Shared.GameTicking;
|
||||
using Content.Shared.Module;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.IoC;
|
||||
|
||||
namespace Content.IntegrationTests.Tests.Destructible
|
||||
{
|
||||
@@ -11,11 +13,17 @@ namespace Content.IntegrationTests.Tests.Destructible
|
||||
/// </summary>
|
||||
public sealed class TestDestructibleListenerSystem : EntitySystem
|
||||
{
|
||||
[Dependency] private readonly IModuleManager _modManager;
|
||||
|
||||
public readonly List<DamageThresholdReached> ThresholdsReached = new();
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
|
||||
if (_modManager.IsClientModule)
|
||||
return;
|
||||
|
||||
SubscribeLocalEvent<DestructibleComponent, DamageThresholdReached>(AddThresholdsToList);
|
||||
SubscribeLocalEvent<RoundRestartCleanupEvent>(OnRoundRestart);
|
||||
}
|
||||
|
||||
@@ -253,9 +253,9 @@ namespace Content.IntegrationTests.Tests
|
||||
mapManager.DoMapInitialize(mapId);
|
||||
});
|
||||
|
||||
var distinctComponents = new List<(List<Type> components, List<Type> references)>
|
||||
var distinctComponents = new List<(List<CompIdx> components, List<CompIdx> references)>
|
||||
{
|
||||
(new List<Type>(), new List<Type>())
|
||||
(new List<CompIdx>(), new List<CompIdx>())
|
||||
};
|
||||
|
||||
// Split components into groups, ensuring that their references don't conflict
|
||||
@@ -272,14 +272,14 @@ namespace Content.IntegrationTests.Tests
|
||||
// Ensure the next list if this one has conflicting references
|
||||
if (i + 1 >= distinctComponents.Count)
|
||||
{
|
||||
distinctComponents.Add((new List<Type>(), new List<Type>()));
|
||||
distinctComponents.Add((new List<CompIdx>(), new List<CompIdx>()));
|
||||
}
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
// Add the component and its references if no conflicting references were found
|
||||
distinct.components.Add(type);
|
||||
distinct.components.Add(registration.Idx);
|
||||
distinct.references.AddRange(registration.References);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ using Content.Shared.Climbing;
|
||||
namespace Content.Server.Climbing.Components;
|
||||
|
||||
[RegisterComponent]
|
||||
[ComponentReference(typeof(SharedClimbableComponent))]
|
||||
public sealed class ClimbableComponent : SharedClimbableComponent
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -4,6 +4,7 @@ namespace Content.Server.Disposal.Tube.Components
|
||||
{
|
||||
[RegisterComponent]
|
||||
[ComponentReference(typeof(IDisposalTubeComponent))]
|
||||
[ComponentReference(typeof(DisposalTubeComponent))]
|
||||
public sealed class DisposalBendComponent : DisposalTubeComponent
|
||||
{
|
||||
[DataField("sideDegrees")]
|
||||
|
||||
@@ -7,6 +7,7 @@ namespace Content.Server.Disposal.Tube.Components
|
||||
{
|
||||
[RegisterComponent]
|
||||
[ComponentReference(typeof(IDisposalTubeComponent))]
|
||||
[ComponentReference(typeof(DisposalTubeComponent))]
|
||||
public sealed class DisposalEntryComponent : DisposalTubeComponent
|
||||
{
|
||||
[Dependency] private readonly IEntityManager _entMan = default!;
|
||||
|
||||
@@ -7,6 +7,7 @@ namespace Content.Server.Disposal.Tube.Components
|
||||
[Virtual]
|
||||
[RegisterComponent]
|
||||
[ComponentReference(typeof(IDisposalTubeComponent))]
|
||||
[ComponentReference(typeof(DisposalTubeComponent))]
|
||||
public class DisposalJunctionComponent : DisposalTubeComponent
|
||||
{
|
||||
[Dependency] private readonly IEntityManager _entMan = default!;
|
||||
|
||||
@@ -12,6 +12,7 @@ namespace Content.Server.Disposal.Tube.Components
|
||||
{
|
||||
[RegisterComponent]
|
||||
[ComponentReference(typeof(IDisposalTubeComponent))]
|
||||
[ComponentReference(typeof(DisposalTubeComponent))]
|
||||
public sealed class DisposalRouterComponent : DisposalJunctionComponent
|
||||
{
|
||||
[Dependency] private readonly IEntityManager _entMan = default!;
|
||||
|
||||
@@ -11,6 +11,7 @@ namespace Content.Server.Disposal.Tube.Components
|
||||
{
|
||||
[RegisterComponent]
|
||||
[ComponentReference(typeof(IDisposalTubeComponent))]
|
||||
[ComponentReference(typeof(DisposalTubeComponent))]
|
||||
public sealed class DisposalTaggerComponent : DisposalTransitComponent
|
||||
{
|
||||
[Dependency] private readonly IEntityManager _entMan = default!;
|
||||
|
||||
@@ -6,6 +6,7 @@ namespace Content.Server.Disposal.Tube.Components
|
||||
[RegisterComponent]
|
||||
[ComponentReference(typeof(IDisposalTubeComponent))]
|
||||
[Virtual]
|
||||
[ComponentReference(typeof(DisposalTubeComponent))]
|
||||
public class DisposalTransitComponent : DisposalTubeComponent
|
||||
{
|
||||
protected override Direction[] ConnectableDirections()
|
||||
|
||||
@@ -11,6 +11,7 @@ using Robust.Shared.Random;
|
||||
namespace Content.Server.Nutrition.Components
|
||||
{
|
||||
[RegisterComponent]
|
||||
[ComponentReference(typeof(SharedHungerComponent))]
|
||||
public sealed class HungerComponent : SharedHungerComponent
|
||||
{
|
||||
[Dependency] private readonly IEntityManager _entMan = default!;
|
||||
|
||||
@@ -28,7 +28,7 @@ namespace Content.Shared.Whitelist
|
||||
[DataField("components")] public string[]? Components = null;
|
||||
|
||||
[NonSerialized]
|
||||
private List<IComponentRegistration>? _registrations = null;
|
||||
private List<ComponentRegistration>? _registrations = null;
|
||||
|
||||
/// <summary>
|
||||
/// Tags that are allowed in the whitelist.
|
||||
@@ -48,7 +48,7 @@ namespace Content.Shared.Whitelist
|
||||
if (Components == null) return;
|
||||
|
||||
var compfact = IoCManager.Resolve<IComponentFactory>();
|
||||
_registrations = new List<IComponentRegistration>();
|
||||
_registrations = new List<ComponentRegistration>();
|
||||
foreach (var name in Components)
|
||||
{
|
||||
var availability = compfact.GetComponentAvailability(name);
|
||||
|
||||
Submodule RobustToolbox updated: 284e08ffd9...6c4dc7fc72
Reference in New Issue
Block a user