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()
|
||||
{
|
||||
base.Initialize();
|
||||
Mover = EntitySystem.Get<SharedPhysicsSystem>().GetController<MoverController>();
|
||||
Mover = Get<MoverController>();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace Content.Server.Friction
|
||||
public override void 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
|
||||
{
|
||||
private ConveyorSystem _conveyor = default!;
|
||||
|
||||
public override List<Type> UpdatesAfter => new() {typeof(MoverController)};
|
||||
[Dependency] private readonly ConveyorSystem _conveyor = default!;
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
UpdatesAfter.Add(typeof(MoverController));
|
||||
|
||||
base.Initialize();
|
||||
_conveyor = EntitySystem.Get<ConveyorSystem>();
|
||||
}
|
||||
|
||||
public override void UpdateBeforeSolve(bool prediction, float frameTime)
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
using System.Collections.Generic;
|
||||
using Content.Shared.Pulling;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Maths;
|
||||
using Robust.Shared.Physics;
|
||||
using Robust.Shared.Physics.Controllers;
|
||||
@@ -33,15 +34,13 @@ namespace Content.Server.Physics.Controllers
|
||||
// Velocity change of -LinearVelocity * frameTime * this
|
||||
private const float SettleShutdownMultiplier = 20.0f;
|
||||
|
||||
private SharedPullingSystem _pullableSystem = default!;
|
||||
|
||||
public override List<Type> UpdatesAfter => new() {typeof(MoverController)};
|
||||
[Dependency] private readonly SharedPullingSystem _pullableSystem = default!;
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
UpdatesAfter.Add(typeof(MoverController));
|
||||
|
||||
_pullableSystem = EntitySystem.Get<SharedPullingSystem>();
|
||||
base.Initialize();
|
||||
}
|
||||
|
||||
public override void UpdateBeforeSolve(bool prediction, float frameTime)
|
||||
|
||||
Reference in New Issue
Block a user