mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-02-15 03:30:53 +01:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4f0f020f56 | ||
|
|
5ce8369fb9 | ||
|
|
2446e64033 |
@@ -1,4 +1,4 @@
|
||||
<Project>
|
||||
|
||||
<!-- This file automatically reset by Tools/version.py -->
|
||||
<!-- This file automatically reset by Tools/version.py -->
|
||||
|
||||
|
||||
@@ -54,6 +54,21 @@ END TEMPLATE-->
|
||||
*None yet*
|
||||
|
||||
|
||||
## 147.0.0
|
||||
|
||||
### Breaking changes
|
||||
|
||||
* Renamed one of the EntitySystem.Dirty() methods to `DirtyEntity()` to avoid confusion with the component-dirtying methods.
|
||||
|
||||
### New features
|
||||
|
||||
* Added debug commands that return the entity system update order.
|
||||
|
||||
### Bugfixes
|
||||
|
||||
* Fixed a bug in MetaDataSystem that was causing the metadata component to not be marked as dirty.
|
||||
|
||||
|
||||
## 146.0.0
|
||||
|
||||
### Breaking changes
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -186,7 +186,7 @@ public partial class EntitySystem
|
||||
/// Marks an entity as dirty.
|
||||
/// </summary>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
protected void Dirty(EntityUid uid, MetaDataComponent? meta = null)
|
||||
protected void DirtyEntity(EntityUid uid, MetaDataComponent? meta = null)
|
||||
{
|
||||
EntityManager.DirtyEntity(uid, meta);
|
||||
}
|
||||
@@ -296,7 +296,7 @@ public partial class EntitySystem
|
||||
if (!Exists(uid))
|
||||
return false;
|
||||
|
||||
Dirty(uid);
|
||||
DirtyEntity(uid);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -48,7 +48,7 @@ public abstract class MetaDataSystem : EntitySystem
|
||||
return;
|
||||
|
||||
metadata._entityName = value;
|
||||
Dirty(uid, metadata);
|
||||
Dirty(uid, metadata, metadata);
|
||||
}
|
||||
|
||||
public void SetEntityDescription(EntityUid uid, string value, MetaDataComponent? metadata = null)
|
||||
@@ -57,7 +57,7 @@ public abstract class MetaDataSystem : EntitySystem
|
||||
return;
|
||||
|
||||
metadata._entityDescription = value;
|
||||
Dirty(uid, metadata);
|
||||
Dirty(uid, metadata, metadata);
|
||||
}
|
||||
|
||||
internal void SetEntityPrototype(EntityUid uid, EntityPrototype? value, MetaDataComponent? metadata = null)
|
||||
@@ -100,7 +100,7 @@ public abstract class MetaDataSystem : EntitySystem
|
||||
RaiseLocalEvent(uid, ref ev);
|
||||
}
|
||||
|
||||
Dirty(uid, metadata);
|
||||
Dirty(uid, metadata, metadata);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user