From 2f11a749f617a7e397a06d2a2c236ef10da55aea Mon Sep 17 00:00:00 2001 From: DrSmugleaf Date: Fri, 29 Sep 2023 22:14:16 -0700 Subject: [PATCH] Remove cloneData parameter from AutoNetworkedField (#20596) --- Content.Shared/Access/Components/AccessComponent.cs | 4 ++-- .../Access/Components/AccessOverriderComponent.cs | 2 +- Content.Shared/Body/Part/BodyPartComponent.cs | 4 ++-- Content.Shared/Buckle/Components/StrapComponent.cs | 2 +- Content.Shared/Humanoid/HumanoidAppearanceComponent.cs | 6 +++--- Content.Shared/Nutrition/Components/HungerComponent.cs | 6 +++--- Content.Shared/Nutrition/Components/ThirstComponent.cs | 2 +- Content.Shared/Points/PointManagerComponent.cs | 2 +- .../Research/Components/TechnologyDatabaseComponent.cs | 8 ++++---- Content.Shared/Standing/StandingStateComponent.cs | 2 +- .../StepTrigger/Components/StepTriggerComponent.cs | 4 ++-- 11 files changed, 21 insertions(+), 21 deletions(-) diff --git a/Content.Shared/Access/Components/AccessComponent.cs b/Content.Shared/Access/Components/AccessComponent.cs index 35521d23db..6930f2dfd6 100644 --- a/Content.Shared/Access/Components/AccessComponent.cs +++ b/Content.Shared/Access/Components/AccessComponent.cs @@ -22,14 +22,14 @@ namespace Content.Shared.Access.Components [DataField("tags", customTypeSerializer: typeof(PrototypeIdHashSetSerializer))] [Access(typeof(SharedAccessSystem), Other = AccessPermissions.ReadExecute)] // FIXME Friends - [AutoNetworkedField(true)] + [AutoNetworkedField] public HashSet Tags = new(); /// /// Access Groups. These are added to the tags during map init. After map init this will have no effect. /// [DataField("groups", readOnly: true, customTypeSerializer: typeof(PrototypeIdHashSetSerializer))] - [AutoNetworkedField(true)] + [AutoNetworkedField] public HashSet Groups = new(); } diff --git a/Content.Shared/Access/Components/AccessOverriderComponent.cs b/Content.Shared/Access/Components/AccessOverriderComponent.cs index 4e1a376ab6..92c09f1ab7 100644 --- a/Content.Shared/Access/Components/AccessOverriderComponent.cs +++ b/Content.Shared/Access/Components/AccessOverriderComponent.cs @@ -33,7 +33,7 @@ public sealed partial class AccessOverriderComponent : Component } } - [DataField, AutoNetworkedField(true)] + [DataField, AutoNetworkedField] public List> AccessLevels = new(); [ViewVariables(VVAccess.ReadWrite)] diff --git a/Content.Shared/Body/Part/BodyPartComponent.cs b/Content.Shared/Body/Part/BodyPartComponent.cs index cbbfef4d73..4f838d9898 100644 --- a/Content.Shared/Body/Part/BodyPartComponent.cs +++ b/Content.Shared/Body/Part/BodyPartComponent.cs @@ -34,13 +34,13 @@ public sealed partial class BodyPartComponent : Component /// /// Child body parts attached to this body part. /// - [DataField, AutoNetworkedField(CloneData = true)] + [DataField, AutoNetworkedField] public Dictionary Children = new(); /// /// Organs attached to this body part. /// - [DataField, AutoNetworkedField(CloneData = true)] + [DataField, AutoNetworkedField] public Dictionary Organs = new(); /// diff --git a/Content.Shared/Buckle/Components/StrapComponent.cs b/Content.Shared/Buckle/Components/StrapComponent.cs index 4efe154797..46f260741a 100644 --- a/Content.Shared/Buckle/Components/StrapComponent.cs +++ b/Content.Shared/Buckle/Components/StrapComponent.cs @@ -15,7 +15,7 @@ public sealed partial class StrapComponent : Component /// /// The entities that are currently buckled /// - [AutoNetworkedField(true)] + [AutoNetworkedField] [ViewVariables] // TODO serialization public HashSet BuckledEntities = new(); diff --git a/Content.Shared/Humanoid/HumanoidAppearanceComponent.cs b/Content.Shared/Humanoid/HumanoidAppearanceComponent.cs index bd7eef34bc..82d6964522 100644 --- a/Content.Shared/Humanoid/HumanoidAppearanceComponent.cs +++ b/Content.Shared/Humanoid/HumanoidAppearanceComponent.cs @@ -19,7 +19,7 @@ public sealed partial class HumanoidAppearanceComponent : Component [DataField] public Dictionary BaseLayers = new(); - [DataField, AutoNetworkedField(true)] + [DataField, AutoNetworkedField] public HashSet PermanentlyHidden = new(); // Couldn't these be somewhere else? @@ -36,7 +36,7 @@ public sealed partial class HumanoidAppearanceComponent : Component /// Stored on the server, this is merged in the client into /// all layer settings. /// - [DataField, AutoNetworkedField(true)] + [DataField, AutoNetworkedField] public Dictionary CustomBaseLayers = new(); /// @@ -62,7 +62,7 @@ public sealed partial class HumanoidAppearanceComponent : Component /// Visual layers currently hidden. This will affect the base sprite /// on this humanoid layer, and any markings that sit above it. /// - [DataField, AutoNetworkedField(true)] + [DataField, AutoNetworkedField] public HashSet HiddenLayers = new(); [DataField, AutoNetworkedField] diff --git a/Content.Shared/Nutrition/Components/HungerComponent.cs b/Content.Shared/Nutrition/Components/HungerComponent.cs index 037c069cf4..11197d8b42 100644 --- a/Content.Shared/Nutrition/Components/HungerComponent.cs +++ b/Content.Shared/Nutrition/Components/HungerComponent.cs @@ -52,7 +52,7 @@ public sealed partial class HungerComponent : Component /// A dictionary relating HungerThreshold to the amount of needed for each one /// [DataField("thresholds", customTypeSerializer: typeof(DictionarySerializer))] - [AutoNetworkedField(cloneData: true)] + [AutoNetworkedField] public Dictionary Thresholds = new() { { HungerThreshold.Overfed, 200.0f }, @@ -66,7 +66,7 @@ public sealed partial class HungerComponent : Component /// A dictionary relating hunger thresholds to corresponding alerts. /// [DataField("hungerThresholdAlerts", customTypeSerializer: typeof(DictionarySerializer))] - [AutoNetworkedField(cloneData: true)] + [AutoNetworkedField] public Dictionary HungerThresholdAlerts = new() { { HungerThreshold.Peckish, AlertType.Peckish }, @@ -78,7 +78,7 @@ public sealed partial class HungerComponent : Component /// A dictionary relating HungerThreshold to how much they modify . /// [DataField("hungerThresholdDecayModifiers", customTypeSerializer: typeof(DictionarySerializer))] - [AutoNetworkedField(cloneData: true)] + [AutoNetworkedField] public Dictionary HungerThresholdDecayModifiers = new() { { HungerThreshold.Overfed, 1.2f }, diff --git a/Content.Shared/Nutrition/Components/ThirstComponent.cs b/Content.Shared/Nutrition/Components/ThirstComponent.cs index 994361470a..1e3f139807 100644 --- a/Content.Shared/Nutrition/Components/ThirstComponent.cs +++ b/Content.Shared/Nutrition/Components/ThirstComponent.cs @@ -45,7 +45,7 @@ public sealed partial class ThirstComponent : Component public TimeSpan UpdateRate = TimeSpan.FromSeconds(1); [DataField("thresholds")] - [AutoNetworkedField(cloneData: true)] + [AutoNetworkedField] public Dictionary ThirstThresholds = new() { {ThirstThreshold.OverHydrated, 600.0f}, diff --git a/Content.Shared/Points/PointManagerComponent.cs b/Content.Shared/Points/PointManagerComponent.cs index 91dfef6a4e..6c5bf6b0fa 100644 --- a/Content.Shared/Points/PointManagerComponent.cs +++ b/Content.Shared/Points/PointManagerComponent.cs @@ -15,7 +15,7 @@ public sealed partial class PointManagerComponent : Component /// /// A dictionary of a player's netuserID to the amount of points they have. /// - [DataField, AutoNetworkedField(true)] + [DataField, AutoNetworkedField] public Dictionary Points = new(); /// diff --git a/Content.Shared/Research/Components/TechnologyDatabaseComponent.cs b/Content.Shared/Research/Components/TechnologyDatabaseComponent.cs index b9936956ad..fc317454c9 100644 --- a/Content.Shared/Research/Components/TechnologyDatabaseComponent.cs +++ b/Content.Shared/Research/Components/TechnologyDatabaseComponent.cs @@ -17,21 +17,21 @@ public sealed partial class TechnologyDatabaseComponent : Component [DataField("mainDiscipline", customTypeSerializer: typeof(PrototypeIdSerializer))] public string? MainDiscipline; - [AutoNetworkedField(true)] + [AutoNetworkedField] [DataField("currentTechnologyCards")] public List CurrentTechnologyCards = new(); /// /// Which research disciplines are able to be unlocked /// - [AutoNetworkedField(true)] + [AutoNetworkedField] [DataField("supportedDisciplines", customTypeSerializer: typeof(PrototypeIdListSerializer))] public List SupportedDisciplines = new(); /// /// The ids of all the technologies which have been unlocked. /// - [AutoNetworkedField(true)] + [AutoNetworkedField] [DataField("unlockedTechnologies", customTypeSerializer: typeof(PrototypeIdListSerializer))] public List UnlockedTechnologies = new(); @@ -40,7 +40,7 @@ public sealed partial class TechnologyDatabaseComponent : Component /// This is maintained alongside the TechnologyIds /// /// todo: if you unlock all the recipes in a tech, it doesn't count as unlocking the tech. sadge - [AutoNetworkedField(true)] + [AutoNetworkedField] [DataField("unlockedRecipes", customTypeSerializer: typeof(PrototypeIdListSerializer))] public List UnlockedRecipes = new(); } diff --git a/Content.Shared/Standing/StandingStateComponent.cs b/Content.Shared/Standing/StandingStateComponent.cs index b1ec6d8668..5d7bb0a59f 100644 --- a/Content.Shared/Standing/StandingStateComponent.cs +++ b/Content.Shared/Standing/StandingStateComponent.cs @@ -18,7 +18,7 @@ namespace Content.Shared.Standing /// List of fixtures that had their collision mask changed when the entity was downed. /// Required for re-adding the collision mask. /// - [DataField, AutoNetworkedField(true)] + [DataField, AutoNetworkedField] public List ChangedFixtures = new(); } } diff --git a/Content.Shared/StepTrigger/Components/StepTriggerComponent.cs b/Content.Shared/StepTrigger/Components/StepTriggerComponent.cs index c4457179a9..f4731bf46a 100644 --- a/Content.Shared/StepTrigger/Components/StepTriggerComponent.cs +++ b/Content.Shared/StepTrigger/Components/StepTriggerComponent.cs @@ -11,14 +11,14 @@ public sealed partial class StepTriggerComponent : Component /// /// List of entities that are currently colliding with the entity. /// - [ViewVariables, AutoNetworkedField(true)] + [ViewVariables, AutoNetworkedField] public HashSet Colliding = new(); /// /// The list of entities that are standing on this entity, /// which shouldn't be able to trigger it again until stepping off. /// - [ViewVariables, AutoNetworkedField(true)] + [ViewVariables, AutoNetworkedField] public HashSet CurrentlySteppedOn = new(); ///