Remove Static Component NetIds (#4247)
* Remove the unnecessary NetID property from ComponentState. * Remove Component.NetworkSynchronizeExistence. * Removed Component.NetID. * Adds component netID automatic generation. * Removed NetIdAttribute from serverside components with no corresponding clientside registration. * Completely remove static NetIds. * Renamed NetIDAttribute to NetworkedComponentAttribute. * Add GenerateNetIds calls to client and server entry points. Add test to make sure auto generated NetIds are identical. * Component changes when rebasing that I am too lazy to rewrite into the branch. Co-authored-by: Vera Aguilera Puerto <6766154+Zumorica@users.noreply.github.com>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
#nullable enable
|
||||
#nullable enable
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
@@ -8,8 +8,8 @@ using Content.Shared.Body.Components;
|
||||
using Content.Shared.Body.Mechanism;
|
||||
using Content.Shared.Body.Part.Property;
|
||||
using Content.Shared.Body.Surgery;
|
||||
using Content.Shared.NetIDs;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.GameStates;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Map;
|
||||
using Robust.Shared.Players;
|
||||
@@ -20,12 +20,11 @@ using Robust.Shared.ViewVariables;
|
||||
|
||||
namespace Content.Shared.Body.Part
|
||||
{
|
||||
[NetworkedComponent()]
|
||||
public abstract class SharedBodyPartComponent : Component, IBodyPartContainer
|
||||
{
|
||||
public override string Name => "BodyPart";
|
||||
|
||||
public override uint? NetID => ContentNetIDs.BODY_PART;
|
||||
|
||||
private SharedBodyComponent? _body;
|
||||
|
||||
// TODO BODY Remove
|
||||
@@ -384,7 +383,7 @@ namespace Content.Shared.Body.Part
|
||||
|
||||
public readonly EntityUid[] MechanismIds;
|
||||
|
||||
public BodyPartComponentState(EntityUid[] mechanismIds) : base(ContentNetIDs.BODY_PART)
|
||||
public BodyPartComponentState(EntityUid[] mechanismIds)
|
||||
{
|
||||
MechanismIds = mechanismIds;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user