Remove cloneData parameter from AutoNetworkedField (#20596)

This commit is contained in:
DrSmugleaf
2023-09-29 22:14:16 -07:00
committed by GitHub
parent 379de4b22a
commit 2f11a749f6
11 changed files with 21 additions and 21 deletions

View File

@@ -22,14 +22,14 @@ namespace Content.Shared.Access.Components
[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();
}

View File

@@ -33,7 +33,7 @@ public sealed partial class AccessOverriderComponent : Component
}
}
[DataField, AutoNetworkedField(true)]
[DataField, AutoNetworkedField]
public List<ProtoId<AccessLevelPrototype>> AccessLevels = new();
[ViewVariables(VVAccess.ReadWrite)]

View File

@@ -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>

View File

@@ -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();

View File

@@ -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?
@@ -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>
@@ -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]

View File

@@ -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 },
@@ -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 },
@@ -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 },

View File

@@ -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},

View File

@@ -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>

View File

@@ -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();
@@ -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();
}

View File

@@ -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.
/// </summary>
[DataField, AutoNetworkedField(true)]
[DataField, AutoNetworkedField]
public List<string> ChangedFixtures = new();
}
}

View File

@@ -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>