Content update for NetEntities (#18935)
This commit is contained in:
@@ -5,10 +5,10 @@ namespace Content.Shared.Body.Organ;
|
||||
[Serializable, NetSerializable]
|
||||
public sealed class OrganComponentState : ComponentState
|
||||
{
|
||||
public readonly EntityUid? Body;
|
||||
public readonly NetEntity? Body;
|
||||
public readonly OrganSlot? Parent;
|
||||
|
||||
public OrganComponentState(EntityUid? body, OrganSlot? parent)
|
||||
public OrganComponentState(NetEntity? body, OrganSlot? parent)
|
||||
{
|
||||
Body = body;
|
||||
Parent = parent;
|
||||
|
||||
@@ -5,10 +5,23 @@ namespace Content.Shared.Body.Organ;
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
[Access(typeof(SharedBodySystem))]
|
||||
[DataRecord]
|
||||
public sealed record OrganSlot(string Id, EntityUid Parent)
|
||||
[DataDefinition]
|
||||
public sealed partial record OrganSlot
|
||||
{
|
||||
public EntityUid? Child { get; set; }
|
||||
[DataField("id")]
|
||||
public string Id = string.Empty;
|
||||
|
||||
[NonSerialized]
|
||||
[DataField("parent")]
|
||||
public EntityUid Parent;
|
||||
|
||||
public NetEntity NetParent;
|
||||
|
||||
[NonSerialized]
|
||||
[DataField("child")]
|
||||
public EntityUid? Child;
|
||||
|
||||
public NetEntity? NetChild;
|
||||
|
||||
// Rider doesn't suggest explicit properties during deconstruction without this
|
||||
public void Deconstruct(out EntityUid? child, out string id, out EntityUid parent)
|
||||
|
||||
Reference in New Issue
Block a user