diff --git a/src/en/space-station-14/destructible.md b/src/en/space-station-14/destructible.md index e637a33a5..96efe3def 100644 --- a/src/en/space-station-14/destructible.md +++ b/src/en/space-station-14/destructible.md @@ -39,7 +39,7 @@ public partial class DamageTrigger : IThresholdTrigger /// /// The amount of damage at which this threshold will trigger. /// - [DataField("damage")] + [DataField] public int Damage { get; set; } public bool Reached(IDamageableComponent damageable, DestructibleSystem system) @@ -60,7 +60,7 @@ public partial class PlaySoundBehavior : IThresholdBehavior /// /// Sound played upon destruction. /// - [DataField("sound")] + [DataField] public string Sound { get; set; } = string.Empty; public void Execute(IEntity owner, DestructibleSystem system) diff --git a/src/en/ss14-by-example/adding-a-simple-bikehorn.md b/src/en/ss14-by-example/adding-a-simple-bikehorn.md index cfdb2a398..cca2e575a 100644 --- a/src/en/ss14-by-example/adding-a-simple-bikehorn.md +++ b/src/en/ss14-by-example/adding-a-simple-bikehorn.md @@ -194,7 +194,7 @@ namespace Content.Server.Sound [RegisterComponent] public sealed partial class PlaySoundOnUseComponent : Component { - [DataField("sound")] + [DataField] public string Sound = string.Empty; } } diff --git a/src/en/ss14-by-example/basic-networking-and-you.md b/src/en/ss14-by-example/basic-networking-and-you.md index ed5b0a497..430e84b91 100644 --- a/src/en/ss14-by-example/basic-networking-and-you.md +++ b/src/en/ss14-by-example/basic-networking-and-you.md @@ -34,13 +34,13 @@ An example of all of the networking code required for IDCardComponent now, from [Access(typeof(SharedIdCardSystem), typeof(SharedPDASystem), typeof(SharedAgentIdCardSystem))] public sealed partial class IdCardComponent : Component { - [DataField("fullName")] + [DataField] [AutoNetworkedField] [Access(typeof(SharedIdCardSystem), typeof(SharedPDASystem), typeof(SharedAgentIdCardSystem), Other = AccessPermissions.ReadWrite)] // FIXME Friends public string? FullName; - [DataField("jobTitle")] + [DataField] [AutoNetworkedField] public string? JobTitle; } @@ -323,4 +323,4 @@ This isn't going to be a super low-level overview of it or anything, but basical It's quite slow, but it's multithreaded and miles faster than the BYOND equivalent--fast enough to get us >250 players on 20 ticks-per-second, so it's good enough. -As for what this means to you and your code, note that in testing you won't receive states for entities that are too far away, and you may need to think about the special case of what happens when entities go in and out of range, though you don't usually need to worry about it. \ No newline at end of file +As for what this means to you and your code, note that in testing you won't receive states for entities that are too far away, and you may need to think about the special case of what happens when entities go in and out of range, though you don't usually need to worry about it. diff --git a/src/en/ss14-by-example/making-a-sprite-dynamic/porting-appearance-visualizers.md b/src/en/ss14-by-example/making-a-sprite-dynamic/porting-appearance-visualizers.md index 0b3fc8638..0adb3c8d8 100644 --- a/src/en/ss14-by-example/making-a-sprite-dynamic/porting-appearance-visualizers.md +++ b/src/en/ss14-by-example/making-a-sprite-dynamic/porting-appearance-visualizers.md @@ -12,10 +12,10 @@ Here's the full visualizer we're porting: [UsedImplicitly] public class ItemCabinetVisualizer : AppearanceVisualizer { - [DataField("openState", required: true)] + [DataField(required: true)] private string _openState = default!; - [DataField("closedState", required: true)] + [DataField(required: true)] private string _closedState = default!; public override void OnChangeData(AppearanceComponent component) @@ -45,10 +45,10 @@ Component: [RegisterComponent] public sealed class ItemCabinetVisualsComponent : Component { - [DataField("openState", required: true)] + [DataField(required: true)] private string _openState = default!; - [DataField("closedState", required: true)] + [DataField(required: true)] private string _closedState = default!; } ``` @@ -91,10 +91,10 @@ So it'll look like this now: [RegisterComponent] public sealed class ItemCabinetVisualsComponent : Component { - [DataField("openState", required: true)] + [DataField(required: true)] public string OpenState = default!; - [DataField("closedState", required: true)] + [DataField(required: true)] public string ClosedState = default!; } ```