Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove cloneData parameter from AutoNetworkedField #20596

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Content.Shared/Access/Components/AccessComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ public sealed partial class AccessComponent : Component

[DataField("tags", customTypeSerializer: typeof(PrototypeIdHashSetSerializer<AccessLevelPrototype>))]
[Access(typeof(SharedAccessSystem), Other = AccessPermissions.ReadExecute)] // FIXME Friends
[AutoNetworkedField(true)]
[AutoNetworkedField]
public HashSet<string> Tags = new();

/// <summary>
/// Access Groups. These are added to the tags during map init. After map init this will have no effect.
/// </summary>
[DataField("groups", readOnly: true, customTypeSerializer: typeof(PrototypeIdHashSetSerializer<AccessGroupPrototype>))]
[AutoNetworkedField(true)]
[AutoNetworkedField]
public HashSet<string> Groups = new();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public WriteToTargetAccessReaderIdMessage(List<string> accessList)
}
}

[DataField, AutoNetworkedField(true)]
[DataField, AutoNetworkedField]
public List<ProtoId<AccessLevelPrototype>> AccessLevels = new();

[ViewVariables(VVAccess.ReadWrite)]
Expand Down
4 changes: 2 additions & 2 deletions Content.Shared/Body/Part/BodyPartComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ public sealed partial class BodyPartComponent : Component
/// <summary>
/// Child body parts attached to this body part.
/// </summary>
[DataField, AutoNetworkedField(CloneData = true)]
[DataField, AutoNetworkedField]
public Dictionary<string, BodyPartSlot> Children = new();

/// <summary>
/// Organs attached to this body part.
/// </summary>
[DataField, AutoNetworkedField(CloneData = true)]
[DataField, AutoNetworkedField]
public Dictionary<string, OrganSlot> Organs = new();

/// <summary>
Expand Down
2 changes: 1 addition & 1 deletion Content.Shared/Buckle/Components/StrapComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public sealed partial class StrapComponent : Component
/// <summary>
/// The entities that are currently buckled
/// </summary>
[AutoNetworkedField(true)]
[AutoNetworkedField]
[ViewVariables] // TODO serialization
public HashSet<EntityUid> BuckledEntities = new();

Expand Down
6 changes: 3 additions & 3 deletions Content.Shared/Humanoid/HumanoidAppearanceComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public sealed partial class HumanoidAppearanceComponent : Component
[DataField]
public Dictionary<HumanoidVisualLayers, HumanoidSpeciesSpriteLayer> BaseLayers = new();

[DataField, AutoNetworkedField(true)]
[DataField, AutoNetworkedField]
public HashSet<HumanoidVisualLayers> PermanentlyHidden = new();

// Couldn't these be somewhere else?
Expand All @@ -36,7 +36,7 @@ public sealed partial class HumanoidAppearanceComponent : Component
/// Stored on the server, this is merged in the client into
/// all layer settings.
/// </summary>
[DataField, AutoNetworkedField(true)]
[DataField, AutoNetworkedField]
public Dictionary<HumanoidVisualLayers, CustomBaseLayerInfo> CustomBaseLayers = new();

/// <summary>
Expand All @@ -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.
/// </summary>
[DataField, AutoNetworkedField(true)]
[DataField, AutoNetworkedField]
public HashSet<HumanoidVisualLayers> HiddenLayers = new();

[DataField, AutoNetworkedField]
Expand Down
6 changes: 3 additions & 3 deletions Content.Shared/Nutrition/Components/HungerComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public sealed partial class HungerComponent : Component
/// A dictionary relating HungerThreshold to the amount of <see cref="CurrentHunger"/> needed for each one
/// </summary>
[DataField("thresholds", customTypeSerializer: typeof(DictionarySerializer<HungerThreshold, float>))]
[AutoNetworkedField(cloneData: true)]
[AutoNetworkedField]
public Dictionary<HungerThreshold, float> Thresholds = new()
{
{ HungerThreshold.Overfed, 200.0f },
Expand All @@ -66,7 +66,7 @@ public sealed partial class HungerComponent : Component
/// A dictionary relating hunger thresholds to corresponding alerts.
/// </summary>
[DataField("hungerThresholdAlerts", customTypeSerializer: typeof(DictionarySerializer<HungerThreshold, AlertType>))]
[AutoNetworkedField(cloneData: true)]
[AutoNetworkedField]
public Dictionary<HungerThreshold, AlertType> HungerThresholdAlerts = new()
{
{ HungerThreshold.Peckish, AlertType.Peckish },
Expand All @@ -78,7 +78,7 @@ public sealed partial class HungerComponent : Component
/// A dictionary relating HungerThreshold to how much they modify <see cref="BaseDecayRate"/>.
/// </summary>
[DataField("hungerThresholdDecayModifiers", customTypeSerializer: typeof(DictionarySerializer<HungerThreshold, float>))]
[AutoNetworkedField(cloneData: true)]
[AutoNetworkedField]
public Dictionary<HungerThreshold, float> HungerThresholdDecayModifiers = new()
{
{ HungerThreshold.Overfed, 1.2f },
Expand Down
2 changes: 1 addition & 1 deletion Content.Shared/Nutrition/Components/ThirstComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public sealed partial class ThirstComponent : Component
public TimeSpan UpdateRate = TimeSpan.FromSeconds(1);

[DataField("thresholds")]
[AutoNetworkedField(cloneData: true)]
[AutoNetworkedField]
public Dictionary<ThirstThreshold, float> ThirstThresholds = new()
{
{ThirstThreshold.OverHydrated, 600.0f},
Expand Down
2 changes: 1 addition & 1 deletion Content.Shared/Points/PointManagerComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public sealed partial class PointManagerComponent : Component
/// <summary>
/// A dictionary of a player's netuserID to the amount of points they have.
/// </summary>
[DataField, AutoNetworkedField(true)]
[DataField, AutoNetworkedField]
public Dictionary<NetUserId, FixedPoint2> Points = new();

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,21 @@ public sealed partial class TechnologyDatabaseComponent : Component
[DataField("mainDiscipline", customTypeSerializer: typeof(PrototypeIdSerializer<TechDisciplinePrototype>))]
public string? MainDiscipline;

[AutoNetworkedField(true)]
[AutoNetworkedField]
[DataField("currentTechnologyCards")]
public List<string> CurrentTechnologyCards = new();

/// <summary>
/// Which research disciplines are able to be unlocked
/// </summary>
[AutoNetworkedField(true)]
[AutoNetworkedField]
[DataField("supportedDisciplines", customTypeSerializer: typeof(PrototypeIdListSerializer<TechDisciplinePrototype>))]
public List<string> SupportedDisciplines = new();

/// <summary>
/// The ids of all the technologies which have been unlocked.
/// </summary>
[AutoNetworkedField(true)]
[AutoNetworkedField]
[DataField("unlockedTechnologies", customTypeSerializer: typeof(PrototypeIdListSerializer<TechnologyPrototype>))]
public List<string> UnlockedTechnologies = new();

Expand All @@ -40,7 +40,7 @@ public sealed partial class TechnologyDatabaseComponent : Component
/// This is maintained alongside the TechnologyIds
/// </summary>
/// 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<LatheRecipePrototype>))]
public List<string> UnlockedRecipes = new();
}
Expand Down
2 changes: 1 addition & 1 deletion Content.Shared/Standing/StandingStateComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public sealed partial class StandingStateComponent : Component
/// List of fixtures that had their collision mask changed when the entity was downed.
/// Required for re-adding the collision mask.
/// </summary>
[DataField, AutoNetworkedField(true)]
[DataField, AutoNetworkedField]
public List<string> ChangedFixtures = new();
}
}
4 changes: 2 additions & 2 deletions Content.Shared/StepTrigger/Components/StepTriggerComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ public sealed partial class StepTriggerComponent : Component
/// <summary>
/// List of entities that are currently colliding with the entity.
/// </summary>
[ViewVariables, AutoNetworkedField(true)]
[ViewVariables, AutoNetworkedField]
public HashSet<EntityUid> Colliding = new();

/// <summary>
/// The list of entities that are standing on this entity,
/// which shouldn't be able to trigger it again until stepping off.
/// </summary>
[ViewVariables, AutoNetworkedField(true)]
[ViewVariables, AutoNetworkedField]
public HashSet<EntityUid> CurrentlySteppedOn = new();

/// <summary>
Expand Down