feat(oecs): add support for reordering relationship sources

Introduces `RelationshipReordered` change kind and `ReorderSources`
method to allow reordering the source set of a relationship without
removing and re-adding components. This optimizes shuffling operations
like deck setup in Blackjack.
This commit is contained in:
2026-07-21 22:46:32 +08:00
parent b0bf10f286
commit 68eeeeb7a6
7 changed files with 68 additions and 20 deletions
+1
View File
@@ -74,6 +74,7 @@ public sealed class ObservableCapture : IDisposable
if (change.ComponentType != null
&& change.Kind != ChangeKind.ComponentRemoved
&& change.Kind != ChangeKind.EntityRemoved
&& change.Kind != ChangeKind.RelationshipReordered
&& _formatters.TryGetValue(change.ComponentType, out var formatter))
{
formattedValue = formatter(_world, change.Entity);