mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-02-14 19:29:36 +01:00
entitysystemupdateorder debug command
This commit is contained in:
@@ -161,3 +161,9 @@ command-description-EqualCommand =
|
||||
Performs an equality comparison, returning true if the inputs are equal.
|
||||
command-description-NotEqualCommand =
|
||||
Performs an equality comparison, returning true if the inputs are not equal.
|
||||
|
||||
command-description-entitysystemupdateorder-tick =
|
||||
Lists the tick update order of entity systems.
|
||||
|
||||
command-description-entitysystemupdateorder-frame =
|
||||
Lists the frame update order of entity systems.
|
||||
|
||||
@@ -393,6 +393,9 @@ namespace Robust.Shared.GameObjects
|
||||
return mFrameUpdate!.DeclaringType != typeof(EntitySystem);
|
||||
}
|
||||
|
||||
internal IEnumerable<Type> FrameUpdateOrder => _frameUpdateOrder.Select(c => c.GetType());
|
||||
internal IEnumerable<Type> TickUpdateOrder => _updateOrder.Select(c => c.System.GetType());
|
||||
|
||||
private struct UpdateReg
|
||||
{
|
||||
[ViewVariables] public IEntitySystem System;
|
||||
|
||||
28
Robust.Shared/GameObjects/EntitySystemUpdateOrderCommand.cs
Normal file
28
Robust.Shared/GameObjects/EntitySystemUpdateOrderCommand.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Toolshed;
|
||||
|
||||
namespace Robust.Shared.GameObjects;
|
||||
|
||||
[ToolshedCommand]
|
||||
internal sealed class EntitySystemUpdateOrderCommand : ToolshedCommand
|
||||
{
|
||||
[Dependency] private readonly IEntitySystemManager _entitySystemManager = default!;
|
||||
|
||||
[CommandImplementation("tick")]
|
||||
public IEnumerable<Type> Tick()
|
||||
{
|
||||
var mgr = (EntitySystemManager)_entitySystemManager;
|
||||
|
||||
return mgr.TickUpdateOrder;
|
||||
}
|
||||
|
||||
[CommandImplementation("frame")]
|
||||
public IEnumerable<Type> Frame()
|
||||
{
|
||||
var mgr = (EntitySystemManager)_entitySystemManager;
|
||||
|
||||
return mgr.FrameUpdateOrder;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user