Changes required for VirtualController EntitySystems (#6161)
This commit is contained in:
committed by
GitHub
parent
e3be84b5f8
commit
748dfb2ecb
@@ -9,7 +9,7 @@ namespace Content.Client.Friction
|
|||||||
public override void Initialize()
|
public override void Initialize()
|
||||||
{
|
{
|
||||||
base.Initialize();
|
base.Initialize();
|
||||||
Mover = EntitySystem.Get<SharedPhysicsSystem>().GetController<MoverController>();
|
Mover = Get<MoverController>();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ namespace Content.Server.Friction
|
|||||||
public override void Initialize()
|
public override void Initialize()
|
||||||
{
|
{
|
||||||
base.Initialize();
|
base.Initialize();
|
||||||
Mover = EntitySystem.Get<SharedPhysicsSystem>().GetController<MoverController>();
|
Mover = Get<MoverController>();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,14 +13,13 @@ namespace Content.Server.Physics.Controllers
|
|||||||
{
|
{
|
||||||
internal sealed class ConveyorController : VirtualController
|
internal sealed class ConveyorController : VirtualController
|
||||||
{
|
{
|
||||||
private ConveyorSystem _conveyor = default!;
|
[Dependency] private readonly ConveyorSystem _conveyor = default!;
|
||||||
|
|
||||||
public override List<Type> UpdatesAfter => new() {typeof(MoverController)};
|
|
||||||
|
|
||||||
public override void Initialize()
|
public override void Initialize()
|
||||||
{
|
{
|
||||||
|
UpdatesAfter.Add(typeof(MoverController));
|
||||||
|
|
||||||
base.Initialize();
|
base.Initialize();
|
||||||
_conveyor = EntitySystem.Get<ConveyorSystem>();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void UpdateBeforeSolve(bool prediction, float frameTime)
|
public override void UpdateBeforeSolve(bool prediction, float frameTime)
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Content.Shared.Pulling;
|
using Content.Shared.Pulling;
|
||||||
using Robust.Shared.GameObjects;
|
using Robust.Shared.GameObjects;
|
||||||
|
using Robust.Shared.IoC;
|
||||||
using Robust.Shared.Maths;
|
using Robust.Shared.Maths;
|
||||||
using Robust.Shared.Physics;
|
using Robust.Shared.Physics;
|
||||||
using Robust.Shared.Physics.Controllers;
|
using Robust.Shared.Physics.Controllers;
|
||||||
@@ -33,15 +34,13 @@ namespace Content.Server.Physics.Controllers
|
|||||||
// Velocity change of -LinearVelocity * frameTime * this
|
// Velocity change of -LinearVelocity * frameTime * this
|
||||||
private const float SettleShutdownMultiplier = 20.0f;
|
private const float SettleShutdownMultiplier = 20.0f;
|
||||||
|
|
||||||
private SharedPullingSystem _pullableSystem = default!;
|
[Dependency] private readonly SharedPullingSystem _pullableSystem = default!;
|
||||||
|
|
||||||
public override List<Type> UpdatesAfter => new() {typeof(MoverController)};
|
|
||||||
|
|
||||||
public override void Initialize()
|
public override void Initialize()
|
||||||
{
|
{
|
||||||
base.Initialize();
|
UpdatesAfter.Add(typeof(MoverController));
|
||||||
|
|
||||||
_pullableSystem = EntitySystem.Get<SharedPullingSystem>();
|
base.Initialize();
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void UpdateBeforeSolve(bool prediction, float frameTime)
|
public override void UpdateBeforeSolve(bool prediction, float frameTime)
|
||||||
|
|||||||
Reference in New Issue
Block a user