Skip to content

Commit 68e5b69

Browse files
authored
Add ComponentRegistry overrides to more entity spawn methods (#5051)
1 parent 9f913cd commit 68e5b69

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

‎Robust.Shared/GameObjects/EntityManager.Spawn.cs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ namespace Robust.Shared.GameObjects;
1111

1212
public partial class EntityManager
1313
{
14-
// This method will soon be marked as obsolete.
14+
// This method will soon(TM) be marked as obsolete.
1515
public EntityUid SpawnEntity(string? protoName, EntityCoordinates coordinates, ComponentRegistry? overrides = null)
1616
=> SpawnAttachedTo(protoName, coordinates, overrides);
1717

18-
// This method will soon be marked as obsolete.
18+
// This method will soon(TM) be marked as obsolete.
1919
public EntityUid SpawnEntity(string? protoName, MapCoordinates coordinates, ComponentRegistry? overrides = null)
2020
=> Spawn(protoName, coordinates, overrides);
2121

‎Robust.Shared/GameObjects/EntitySystem.Proxy.cs‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -701,32 +701,32 @@ protected void QueueDel(EntityUid? uid)
701701

702702
#region Entity Spawning
703703

704-
// This method will be obsoleted soon.
704+
// This method will be obsoleted soon(TM).
705705
[MethodImpl(MethodImplOptions.AggressiveInlining)]
706706
protected EntityUid Spawn(string? prototype, EntityCoordinates coordinates)
707707
{
708708
return ((IEntityManager)EntityManager).SpawnEntity(prototype, coordinates);
709709
}
710710

711-
/// <inheritdoc cref="IEntityManager.Spawn(string?, MapCoordinates, ComponentRegistry?)" />
711+
/// <inheritdoc cref="IEntityManager.Spawn(string?, MapCoordinates, ComponentRegistry?, Angle)" />
712712
[MethodImpl(MethodImplOptions.AggressiveInlining)]
713-
protected EntityUid Spawn(string? prototype, MapCoordinates coordinates, Angle rotation = default!)
714-
=> EntityManager.Spawn(prototype, coordinates, rotation: rotation);
713+
protected EntityUid Spawn(string? prototype, MapCoordinates coordinates, ComponentRegistry? overrides = null, Angle rotation = default)
714+
=> EntityManager.Spawn(prototype, coordinates, overrides, rotation);
715715

716-
/// <inheritdoc cref="IEntityManager.Spawn(string?, ComponentRegistry?)" />
716+
/// <inheritdoc cref="IEntityManager.Spawn(string?, ComponentRegistry?, bool)" />
717717
[MethodImpl(MethodImplOptions.AggressiveInlining)]
718718
protected EntityUid Spawn(string? prototype = null, ComponentRegistry? overrides = null, bool doMapInit = true)
719719
=> EntityManager.Spawn(prototype, overrides, doMapInit);
720720

721721
/// <inheritdoc cref="IEntityManager.SpawnAttachedTo" />
722722
[MethodImpl(MethodImplOptions.AggressiveInlining)]
723-
protected EntityUid SpawnAttachedTo(string? prototype, EntityCoordinates coordinates)
724-
=> EntityManager.SpawnAttachedTo(prototype, coordinates);
723+
protected EntityUid SpawnAttachedTo(string? prototype, EntityCoordinates coordinates, ComponentRegistry? overrides = null)
724+
=> EntityManager.SpawnAttachedTo(prototype, coordinates, overrides);
725725

726726
/// <inheritdoc cref="IEntityManager.SpawnAtPosition" />
727727
[MethodImpl(MethodImplOptions.AggressiveInlining)]
728-
protected EntityUid SpawnAtPosition(string? prototype, EntityCoordinates coordinates)
729-
=> EntityManager.SpawnAtPosition(prototype, coordinates);
728+
protected EntityUid SpawnAtPosition(string? prototype, EntityCoordinates coordinates, ComponentRegistry? overrides = null)
729+
=> EntityManager.SpawnAtPosition(prototype, coordinates, overrides);
730730

731731
/// <inheritdoc cref="IEntityManager.TrySpawnInContainer" />
732732
[MethodImpl(MethodImplOptions.AggressiveInlining)]

0 commit comments

Comments
 (0)