diff --git a/Content.Client/CartridgeLoader/CartridgeUISerializer.cs b/Content.Client/CartridgeLoader/CartridgeUISerializer.cs deleted file mode 100644 index a107177918..0000000000 --- a/Content.Client/CartridgeLoader/CartridgeUISerializer.cs +++ /dev/null @@ -1,44 +0,0 @@ -using Robust.Shared.Serialization.Manager; -using Robust.Shared.Serialization.Markdown; -using Robust.Shared.Serialization.Markdown.Validation; -using Robust.Shared.Serialization.Markdown.Value; -using Robust.Shared.Serialization.TypeSerializers.Interfaces; - -namespace Content.Client.CartridgeLoader; - -/// -/// Boilerplate serializer for defining the ui fragment used for a cartridge in yaml -/// -/// -/// This is an example from the yaml definition from the notekeeper ui -/// -/// - type: CartridgeUi -/// ui: !type:NotekeeperUi -/// -/// -public sealed class CartridgeUISerializer : ITypeSerializer -{ - public ValidationNode Validate(ISerializationManager serializationManager, ValueDataNode node, - IDependencyCollection dependencies, ISerializationContext? context = null) - { - return serializationManager.ValidateNode(node, context); - } - - public CartridgeUI Read(ISerializationManager serializationManager, ValueDataNode node, IDependencyCollection dependencies, - bool skipHook, ISerializationContext? context = null, CartridgeUI? value = default) - { - return serializationManager.Read(node, context, skipHook, value); - } - - public CartridgeUI Copy(ISerializationManager serializationManager, CartridgeUI source, CartridgeUI target, bool skipHook, - ISerializationContext? context = null) - { - return serializationManager.Copy(source, context, skipHook); - } - - public DataNode Write(ISerializationManager serializationManager, CartridgeUI value, IDependencyCollection dependencies, - bool alwaysWrite = false, ISerializationContext? context = null) - { - return serializationManager.WriteValue(value, alwaysWrite, context); - } -} diff --git a/Content.Client/CartridgeLoader/CartridgeUiComponent.cs b/Content.Client/CartridgeLoader/CartridgeUiComponent.cs index a4b8443ccc..c0e62cdaae 100644 --- a/Content.Client/CartridgeLoader/CartridgeUiComponent.cs +++ b/Content.Client/CartridgeLoader/CartridgeUiComponent.cs @@ -9,6 +9,6 @@ namespace Content.Client.CartridgeLoader; [RegisterComponent] public sealed class CartridgeUiComponent : Component { - [DataField("ui", true, customTypeSerializer: typeof(CartridgeUISerializer))] + [DataField("ui", true)] public CartridgeUI? Ui = default; } diff --git a/Content.Client/Gravity/GravityGeneratorVisualizer.cs b/Content.Client/Gravity/GravityGeneratorVisualizer.cs index 6b962b9683..f3f90fe1de 100644 --- a/Content.Client/Gravity/GravityGeneratorVisualizer.cs +++ b/Content.Client/Gravity/GravityGeneratorVisualizer.cs @@ -11,9 +11,10 @@ namespace Content.Client.Gravity [DataField("spritemap")] private Dictionary _rawSpriteMap { - get => _spriteMap.ToDictionary(x => x.Value.ToString().ToLower(), x => x.Value); + get => _spriteMap.ToDictionary(x => x.Key.ToString().ToLower(), x => x.Value); set { + _spriteMap.Clear(); // Get Sprites for each status foreach (var status in (GravityGeneratorStatus[]) Enum.GetValues(typeof(GravityGeneratorStatus))) { diff --git a/Content.Client/ParticleAccelerator/ParticleAcceleratorPartVisualizer.cs b/Content.Client/ParticleAccelerator/ParticleAcceleratorPartVisualizer.cs index 2f6b448602..d62c7c05c5 100644 --- a/Content.Client/ParticleAccelerator/ParticleAcceleratorPartVisualizer.cs +++ b/Content.Client/ParticleAccelerator/ParticleAcceleratorPartVisualizer.cs @@ -1,37 +1,25 @@ -using System.Collections.Generic; using System.Linq; using Content.Shared.Singularity.Components; using JetBrains.Annotations; using Robust.Client.GameObjects; -using Robust.Shared.GameObjects; -using Robust.Shared.IoC; -using Robust.Shared.Serialization; -using Robust.Shared.Serialization.Manager.Attributes; namespace Content.Client.ParticleAccelerator { [UsedImplicitly] [DataDefinition] - public sealed class ParticleAcceleratorPartVisualizer : AppearanceVisualizer, ISerializationHooks + public sealed class ParticleAcceleratorPartVisualizer : AppearanceVisualizer { [DataField("baseState", required: true)] - private string? _baseState; + private string _baseState = default!; - private Dictionary _states = new(); - - void ISerializationHooks.AfterDeserialization() + private static readonly Dictionary StatesSuffixes = new() { - if (_baseState == null) - { - return; - } - - _states.Add(ParticleAcceleratorVisualState.Powered, _baseState + "p"); - _states.Add(ParticleAcceleratorVisualState.Level0, _baseState + "p0"); - _states.Add(ParticleAcceleratorVisualState.Level1, _baseState + "p1"); - _states.Add(ParticleAcceleratorVisualState.Level2, _baseState + "p2"); - _states.Add(ParticleAcceleratorVisualState.Level3, _baseState + "p3"); - } + {ParticleAcceleratorVisualState.Powered, "p"}, + {ParticleAcceleratorVisualState.Level0, "p0"}, + {ParticleAcceleratorVisualState.Level1, "p1"}, + {ParticleAcceleratorVisualState.Level2, "p2"}, + {ParticleAcceleratorVisualState.Level3, "p3"}, + }; [Obsolete("Subscribe to your component being initialised instead.")] public override void InitializeEntity(EntityUid entity) @@ -63,7 +51,7 @@ namespace Content.Client.ParticleAccelerator if (state != ParticleAcceleratorVisualState.Unpowered) { sprite.LayerSetVisible(ParticleAcceleratorVisualLayers.Unlit, true); - sprite.LayerSetState(ParticleAcceleratorVisualLayers.Unlit, _states[state]); + sprite.LayerSetState(ParticleAcceleratorVisualLayers.Unlit, _baseState + StatesSuffixes[state]); } else { diff --git a/Content.Client/Trigger/TimerTriggerVisualizer.cs b/Content.Client/Trigger/TimerTriggerVisualizer.cs index 961f38a6a3..6686e035bf 100644 --- a/Content.Client/Trigger/TimerTriggerVisualizer.cs +++ b/Content.Client/Trigger/TimerTriggerVisualizer.cs @@ -12,8 +12,8 @@ namespace Content.Client.Trigger { private const string AnimationKey = "priming_animation"; - [DataField("countdown_sound", required: false)] - private SoundSpecifier _countdownSound = default!; + [DataField("countdown_sound")] + private SoundSpecifier? _countdownSound; private Animation PrimingAnimation = default!; diff --git a/Content.IntegrationTests/Tests/Chemistry/FixedPoint2SerializationTest.cs b/Content.IntegrationTests/Tests/Chemistry/FixedPoint2SerializationTest.cs index a98f56b57b..beff69eddf 100644 --- a/Content.IntegrationTests/Tests/Chemistry/FixedPoint2SerializationTest.cs +++ b/Content.IntegrationTests/Tests/Chemistry/FixedPoint2SerializationTest.cs @@ -18,16 +18,31 @@ namespace Content.IntegrationTests.Tests.Chemistry [Test] public void DeserializeNullTest() { - var node = new ValueDataNode("null"); + var node = ValueDataNode.Null(); var unit = Serialization.Read(node); Assert.That(unit, Is.Null); } + [Test] + public void SerializeNullTest() + { + var node = Serialization.WriteValue(null); + Assert.That(node.IsNull); + } + + [Test] + public void SerializeNullableValueTest() + { + var node = Serialization.WriteValue(FixedPoint2.New(2.5f)); + Assert.That(node is ValueDataNode); + Assert.That(((ValueDataNode)node).Value, Is.EqualTo("2.5")); + } + [Test] public void DeserializeNullDefinitionTest() { - var node = new MappingDataNode().Add("unit", "null"); + var node = new MappingDataNode().Add("unit", ValueDataNode.Null()); var definition = Serialization.Read(node); Assert.That(definition.Unit, Is.Null); diff --git a/Content.IntegrationTests/Tests/PrototypeSaveTest.cs b/Content.IntegrationTests/Tests/PrototypeSaveTest.cs index 50148a54db..d310ca3c47 100644 --- a/Content.IntegrationTests/Tests/PrototypeSaveTest.cs +++ b/Content.IntegrationTests/Tests/PrototypeSaveTest.cs @@ -213,18 +213,14 @@ public sealed class PrototypeSaveTest } private sealed class TestEntityUidContext : ISerializationContext, - ITypeSerializer, - ITypeReaderWriter + ITypeSerializer { - public Dictionary<(Type, Type), object> TypeReaders { get; } - public Dictionary TypeWriters { get; } - public Dictionary TypeCopiers => TypeWriters; - public Dictionary<(Type, Type), object> TypeValidators => TypeReaders; + public SerializationManager.SerializerProvider SerializerProvider { get; } public TestEntityUidContext() { - TypeReaders = new() { { (typeof(EntityUid), typeof(ValueDataNode)), this } }; - TypeWriters = new() { { typeof(EntityUid), this } }; + SerializerProvider = new(); + SerializerProvider.RegisterSerializer(this); } ValidationNode ITypeValidator.Validate(ISerializationManager serializationManager, @@ -245,16 +241,9 @@ public sealed class PrototypeSaveTest ValueDataNode node, IDependencyCollection dependencies, bool skipHook, - ISerializationContext? context, EntityUid _) + ISerializationContext? context, ISerializationManager.InstantiationDelegate? instanceProvider = null) { return EntityUid.Invalid; } - - public EntityUid Copy(ISerializationManager serializationManager, EntityUid source, EntityUid target, - bool skipHook, - ISerializationContext? context = null) - { - return new((int) source); - } } } diff --git a/Content.Server/Atmos/Serialization/TileAtmosCollectionSerializer.cs b/Content.Server/Atmos/Serialization/TileAtmosCollectionSerializer.cs index f85bb03ebc..b35c86d215 100644 --- a/Content.Server/Atmos/Serialization/TileAtmosCollectionSerializer.cs +++ b/Content.Server/Atmos/Serialization/TileAtmosCollectionSerializer.cs @@ -6,7 +6,7 @@ using Robust.Shared.Serialization.TypeSerializers.Interfaces; namespace Content.Server.Atmos.Serialization; -public sealed class TileAtmosCollectionSerializer : ITypeSerializer, MappingDataNode> +public sealed class TileAtmosCollectionSerializer : ITypeSerializer, MappingDataNode>, ITypeCopier> { public ValidationNode Validate(ISerializationManager serializationManager, MappingDataNode node, IDependencyCollection dependencies, ISerializationContext? context = null) @@ -14,8 +14,10 @@ public sealed class TileAtmosCollectionSerializer : ITypeSerializer(node, context); } - public Dictionary Read(ISerializationManager serializationManager, MappingDataNode node, IDependencyCollection dependencies, - bool skipHook, ISerializationContext? context = null, Dictionary? value = default) + public Dictionary Read(ISerializationManager serializationManager, MappingDataNode node, + IDependencyCollection dependencies, + bool skipHook, ISerializationContext? context = null, + ISerializationManager.InstantiationDelegate>? instanceProvider = null) { var data = serializationManager.Read(node, context, skipHook); var tiles = new Dictionary(); @@ -72,13 +74,6 @@ public sealed class TileAtmosCollectionSerializer : ITypeSerializer Copy(ISerializationManager serializationManager, Dictionary source, Dictionary target, bool skipHook, - ISerializationContext? context = null) - { - serializationManager.Copy(source, ref target, context, skipHook); - return target; - } - [DataDefinition] private struct TileAtmosData { @@ -86,4 +81,20 @@ public sealed class TileAtmosCollectionSerializer : ITypeSerializer? TilesUniqueMixes; } + + public void CopyTo(ISerializationManager serializationManager, Dictionary source, ref Dictionary target, bool skipHook, + ISerializationContext? context = null) + { + target.Clear(); + foreach (var (key, val) in source) + { + target.Add(key, + new TileAtmosphere( + val.GridIndex, + val.GridIndices, + val.Air?.Clone(), + val.Air?.Immutable ?? false, + val.Space)); + } + } } diff --git a/Content.Server/Containers/ContainerFillComponent.cs b/Content.Server/Containers/ContainerFillComponent.cs index fc69a89727..40eab5e026 100644 --- a/Content.Server/Containers/ContainerFillComponent.cs +++ b/Content.Server/Containers/ContainerFillComponent.cs @@ -2,7 +2,6 @@ using Content.Server.Storage.Components; using Content.Shared.Storage; using Robust.Shared.Prototypes; using Robust.Shared.Serialization.Manager; -using Robust.Shared.Serialization.Markdown; using Robust.Shared.Serialization.Markdown.Mapping; using Robust.Shared.Serialization.Markdown.Sequence; using Robust.Shared.Serialization.Markdown.Validation; @@ -36,7 +35,7 @@ public sealed class ContainerFillComponent : Component // all of this exists just to validate prototype ids. // it would be nice if you could specify only a type validator and not have to re-implement everything else. // or a dictionary serializer that accepts a custom type serializer for the dictionary values -public sealed class ContainerFillSerializer : ITypeSerializer>, MappingDataNode> +public sealed class ContainerFillSerializer : ITypeValidator>, MappingDataNode> { private static PrototypeIdListSerializer ListSerializer => new(); @@ -61,35 +60,4 @@ public sealed class ContainerFillSerializer : ITypeSerializer> Copy( - ISerializationManager serializationManager, - Dictionary> source, - Dictionary> target, - bool skipHook, - ISerializationContext? context = null) - { - serializationManager.Copy(source, ref target, context, skipHook); - return target; - } - - public Dictionary> Read( - ISerializationManager serializationManager, - MappingDataNode node, - IDependencyCollection dependencies, - bool skipHook, - ISerializationContext? context = null, - Dictionary>? value = null) - { - return serializationManager.Read(node, context, skipHook, value); - } - - public DataNode Write(ISerializationManager serializationManager, - Dictionary> value, - IDependencyCollection dependencies, - bool alwaysWrite = false, - ISerializationContext? context = null) - { - return serializationManager.WriteValue(value, alwaysWrite, context); - } } diff --git a/Content.Server/Disease/DiseaseSystem.cs b/Content.Server/Disease/DiseaseSystem.cs index 8d6f1b37fb..36c9d90c45 100644 --- a/Content.Server/Disease/DiseaseSystem.cs +++ b/Content.Server/Disease/DiseaseSystem.cs @@ -1,3 +1,4 @@ +using System.Threading; using Content.Server.Body.Systems; using Content.Server.Chat.Systems; using Content.Server.Disease.Components; @@ -21,7 +22,6 @@ using Robust.Shared.Prototypes; using Robust.Shared.Random; using Robust.Shared.Serialization.Manager; using Robust.Shared.Utility; -using System.Threading; namespace Content.Server.Disease { @@ -384,7 +384,7 @@ namespace Content.Server.Disease return; } - var freshDisease = _serializationManager.Copy(addedDisease); + var freshDisease = _serializationManager.CreateCopy(addedDisease); if (freshDisease == null) return; diff --git a/Content.Server/Electrocution/ElectrocutionNode.cs b/Content.Server/Electrocution/ElectrocutionNode.cs index bb4cc5f7fc..089f9f5ad3 100644 --- a/Content.Server/Electrocution/ElectrocutionNode.cs +++ b/Content.Server/Electrocution/ElectrocutionNode.cs @@ -1,6 +1,5 @@ using Content.Server.NodeContainer; using Content.Server.NodeContainer.Nodes; -using Robust.Shared.Map; using Robust.Shared.Map.Components; namespace Content.Server.Electrocution @@ -11,7 +10,7 @@ namespace Content.Server.Electrocution [DataField("cable")] public EntityUid CableEntity; [DataField("node")] - public string NodeName = default!; + public string? NodeName; public override IEnumerable GetReachableNodes(TransformComponent xform, EntityQuery nodeQuery, diff --git a/Content.Server/Ensnaring/Components/EnsnareableComponent.cs b/Content.Server/Ensnaring/Components/EnsnareableComponent.cs index 555e7827ad..c5af4f58f5 100644 --- a/Content.Server/Ensnaring/Components/EnsnareableComponent.cs +++ b/Content.Server/Ensnaring/Components/EnsnareableComponent.cs @@ -9,6 +9,5 @@ public sealed class EnsnareableComponent : SharedEnsnareableComponent /// /// The container where the entity will be stored /// - [DataField("container")] public Container Container = default!; } diff --git a/Content.Server/GameTicking/Rules/NukeopsRuleSystem.cs b/Content.Server/GameTicking/Rules/NukeopsRuleSystem.cs index ffddd9c9b1..209e26e308 100644 --- a/Content.Server/GameTicking/Rules/NukeopsRuleSystem.cs +++ b/Content.Server/GameTicking/Rules/NukeopsRuleSystem.cs @@ -1,43 +1,38 @@ using System.Linq; +using Content.Server.Administration.Commands; using Content.Server.CharacterAppearance.Components; using Content.Server.Chat.Managers; +using Content.Server.GameTicking.Rules.Components; using Content.Server.GameTicking.Rules.Configurations; using Content.Server.Ghost.Roles.Components; using Content.Server.Ghost.Roles.Events; +using Content.Server.Humanoid.Systems; using Content.Server.Mind.Components; +using Content.Server.NPC.Systems; using Content.Server.Nuke; +using Content.Server.Preferences.Managers; using Content.Server.RoundEnd; using Content.Server.Shuttles.Components; using Content.Server.Shuttles.Systems; using Content.Server.Spawners.Components; +using Content.Server.Station.Components; using Content.Server.Station.Systems; -using Content.Shared.MobState; +using Content.Server.Traitor; using Content.Shared.Dataset; +using Content.Shared.MobState; +using Content.Shared.MobState.Components; +using Content.Shared.Nuke; +using Content.Shared.Preferences; using Content.Shared.Roles; +using Robust.Server.GameObjects; using Robust.Server.Maps; using Robust.Server.Player; +using Robust.Shared.Configuration; using Robust.Shared.Map; +using Robust.Shared.Player; using Robust.Shared.Prototypes; using Robust.Shared.Random; using Robust.Shared.Utility; -using Content.Server.Traitor; -using Content.Shared.MobState.Components; -using System.Data; -using Content.Server.GameTicking.Rules.Components; -using Content.Server.Station.Components; -using Content.Shared.Chat; -using Content.Shared.Nuke; -using Robust.Server.GameObjects; -using Content.Server.NPC.Components; -using Content.Server.NPC.Systems; -using Content.Server.Traitor.Uplink; -using Robust.Shared.Audio; -using Robust.Shared.Configuration; -using Robust.Shared.Player; -using Content.Server.Administration.Commands; -using Content.Server.Humanoid.Systems; -using Content.Shared.Preferences; -using Content.Server.Preferences.Managers; namespace Content.Server.GameTicking.Rules; @@ -846,7 +841,7 @@ public sealed class NukeopsRuleSystem : GameRuleSystem var query = EntityQuery(true); foreach (var (_, mindComp) in query) { - if (mindComp.Mind?.TryGetSession(out var session) == true) + if (mindComp.Mind != null && mindComp.Mind.TryGetSession(out var session) == true) _operativePlayers.Add(session); } diff --git a/Content.Server/Humanoid/Systems/RandomHumanoidSystem.cs b/Content.Server/Humanoid/Systems/RandomHumanoidSystem.cs index 8c148bf430..7719e5e136 100644 --- a/Content.Server/Humanoid/Systems/RandomHumanoidSystem.cs +++ b/Content.Server/Humanoid/Systems/RandomHumanoidSystem.cs @@ -56,7 +56,7 @@ public sealed class RandomHumanoidSystem : EntitySystem foreach (var entry in prototype.Components.Values) { - var comp = (Component) _serialization.Copy(entry.Component); + var comp = (Component) _serialization.CreateCopy(entry.Component); comp.Owner = humanoid; EntityManager.AddComponent(humanoid, comp, true); } diff --git a/Content.Server/Jobs/AddComponentSpecial.cs b/Content.Server/Jobs/AddComponentSpecial.cs index 06b5b9ce8f..f91cf43bf0 100644 --- a/Content.Server/Jobs/AddComponentSpecial.cs +++ b/Content.Server/Jobs/AddComponentSpecial.cs @@ -27,7 +27,7 @@ namespace Content.Server.Jobs component.Owner = mob; var temp = (object) component; - serializationManager.Copy(data.Component, ref temp); + serializationManager.CopyTo(data.Component, ref temp); entityManager.AddComponent(mob, (Component)temp!); } } diff --git a/Content.Server/NPC/HTN/HTNTaskListSerializer.cs b/Content.Server/NPC/HTN/HTNTaskListSerializer.cs index 7e1600ebd2..85098761a9 100644 --- a/Content.Server/NPC/HTN/HTNTaskListSerializer.cs +++ b/Content.Server/NPC/HTN/HTNTaskListSerializer.cs @@ -39,10 +39,12 @@ public sealed class HTNTaskListSerializer : ITypeSerializer, Sequen return new ValidatedSequenceNode(list); } - public List Read(ISerializationManager serializationManager, SequenceDataNode node, IDependencyCollection dependencies, - bool skipHook, ISerializationContext? context = null, List? value = default) + public List Read(ISerializationManager serializationManager, SequenceDataNode node, + IDependencyCollection dependencies, + bool skipHook, ISerializationContext? context = null, + ISerializationManager.InstantiationDelegate>? instanceProvider = null) { - value ??= new List(); + var value = instanceProvider != null ? instanceProvider() : new List(); foreach (var data in node.Sequence) { var mapping = (MappingDataNode) data; @@ -72,15 +74,4 @@ public sealed class HTNTaskListSerializer : ITypeSerializer, Sequen return sequence; } - - public List Copy(ISerializationManager serializationManager, List source, List target, bool skipHook, - ISerializationContext? context = null) - { - target.Clear(); - target.EnsureCapacity(source.Capacity); - - // Tasks are just prototypes soooo? - target.AddRange(source); - return target; - } } diff --git a/Content.Server/NPC/NPCBlackboardSerializer.cs b/Content.Server/NPC/NPCBlackboardSerializer.cs index a2fb891385..e2335d5aad 100644 --- a/Content.Server/NPC/NPCBlackboardSerializer.cs +++ b/Content.Server/NPC/NPCBlackboardSerializer.cs @@ -45,10 +45,12 @@ public sealed class NPCBlackboardSerializer : ITypeReader? instanceProvider = null) { - value ??= new NPCBlackboard(); + var value = instanceProvider != null ? instanceProvider() : new NPCBlackboard(); if (node.Count > 0) { diff --git a/Content.Server/NodeContainer/NodeContainerComponent.cs b/Content.Server/NodeContainer/NodeContainerComponent.cs index 216770109d..9dd968c2c8 100644 --- a/Content.Server/NodeContainer/NodeContainerComponent.cs +++ b/Content.Server/NodeContainer/NodeContainerComponent.cs @@ -19,8 +19,14 @@ namespace Content.Server.NodeContainer return (T) Nodes[identifier]; } - public bool TryGetNode(string identifier, [NotNullWhen(true)] out T? node) where T : Node + public bool TryGetNode(string? identifier, [NotNullWhen(true)] out T? node) where T : Node { + if (identifier == null) + { + node = null; + return false; + } + if (Nodes.TryGetValue(identifier, out var n) && n is T t) { node = t; diff --git a/Content.Server/Payload/EntitySystems/PayloadSystem.cs b/Content.Server/Payload/EntitySystems/PayloadSystem.cs index 4c5b8681b0..567edb7711 100644 --- a/Content.Server/Payload/EntitySystems/PayloadSystem.cs +++ b/Content.Server/Payload/EntitySystems/PayloadSystem.cs @@ -9,7 +9,6 @@ using Content.Shared.Payload.Components; using Content.Shared.Tag; using Robust.Shared.Containers; using Robust.Shared.Serialization.Manager; -using Robust.Shared.Serialization.Markdown.Validation; using Robust.Shared.Utility; namespace Content.Server.Payload.EntitySystems; @@ -100,7 +99,7 @@ public sealed class PayloadSystem : EntitySystem component.Owner = uid; var temp = (object) component; - _serializationManager.Copy(data.Component, ref temp); + _serializationManager.CopyTo(data.Component, ref temp); EntityManager.AddComponent(uid, (Component)temp!); trigger.GrantedComponents.Add(registration.Type); diff --git a/Content.Server/Salvage/SalvageMagnetComponent.cs b/Content.Server/Salvage/SalvageMagnetComponent.cs index 2c5949f6e7..af2d354fd4 100644 --- a/Content.Server/Salvage/SalvageMagnetComponent.cs +++ b/Content.Server/Salvage/SalvageMagnetComponent.cs @@ -1,7 +1,7 @@ using Content.Shared.Radio; -using Content.Shared.Salvage; using Robust.Shared.GameStates; using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype; +using Content.Shared.Salvage; namespace Content.Server.Salvage { @@ -66,6 +66,7 @@ namespace Content.Server.Salvage public int PreviousCharge = 5; } + [CopyByRef] public record struct MagnetState(MagnetStateType StateType, TimeSpan Until) { public static readonly MagnetState Inactive = new (MagnetStateType.Inactive, TimeSpan.Zero); diff --git a/Content.Server/Traits/TraitSystem.cs b/Content.Server/Traits/TraitSystem.cs index ceec4c9280..760c0bdcb5 100644 --- a/Content.Server/Traits/TraitSystem.cs +++ b/Content.Server/Traits/TraitSystem.cs @@ -38,7 +38,7 @@ public sealed class TraitSystem : EntitySystem // Add all components required by the prototype foreach (var entry in traitPrototype.Components.Values) { - var comp = (Component) _serializationManager.Copy(entry.Component); + var comp = (Component) _serializationManager.CreateCopy(entry.Component); comp.Owner = args.Mob; EntityManager.AddComponent(args.Mob, comp); } diff --git a/Content.Server/Xenoarchaeology/XenoArtifacts/ArtifactSystem.Nodes.cs b/Content.Server/Xenoarchaeology/XenoArtifacts/ArtifactSystem.Nodes.cs index 52c2bcd9a9..5b7664313e 100644 --- a/Content.Server/Xenoarchaeology/XenoArtifacts/ArtifactSystem.Nodes.cs +++ b/Content.Server/Xenoarchaeology/XenoArtifacts/ArtifactSystem.Nodes.cs @@ -180,7 +180,7 @@ public sealed partial class ArtifactSystem comp.Owner = uid; var temp = (object) comp; - _serialization.Copy(entry.Component, ref temp); + _serialization.CopyTo(entry.Component, ref temp); EntityManager.AddComponent(uid, (Component) temp!, true); } diff --git a/Content.Shared/Body/Components/BodyComponent.cs b/Content.Shared/Body/Components/BodyComponent.cs index f87d9c544d..113dbb3592 100644 --- a/Content.Shared/Body/Components/BodyComponent.cs +++ b/Content.Shared/Body/Components/BodyComponent.cs @@ -16,7 +16,7 @@ public sealed class BodyComponent : Component, IDraggable public readonly string? Prototype; [DataField("root")] - public BodyPartSlot Root = default!; + public BodyPartSlot? Root; [DataField("gibSound")] public SoundSpecifier GibSound = new SoundCollectionSpecifier("gib"); diff --git a/Content.Shared/Body/Components/BodyComponentState.cs b/Content.Shared/Body/Components/BodyComponentState.cs index 32ea98e936..615b76fdbc 100644 --- a/Content.Shared/Body/Components/BodyComponentState.cs +++ b/Content.Shared/Body/Components/BodyComponentState.cs @@ -7,10 +7,10 @@ namespace Content.Shared.Body.Components; [Serializable, NetSerializable] public sealed class BodyComponentState : ComponentState { - public readonly BodyPartSlot Root; + public readonly BodyPartSlot? Root; public readonly SoundSpecifier GibSound; - public BodyComponentState(BodyPartSlot root, SoundSpecifier gibSound) + public BodyComponentState(BodyPartSlot? root, SoundSpecifier gibSound) { Root = root; GibSound = gibSound; diff --git a/Content.Shared/Body/Prototypes/BodyPrototypeSerializer.cs b/Content.Shared/Body/Prototypes/BodyPrototypeSerializer.cs index c7b4981632..4bf7ffa714 100644 --- a/Content.Shared/Body/Prototypes/BodyPrototypeSerializer.cs +++ b/Content.Shared/Body/Prototypes/BodyPrototypeSerializer.cs @@ -125,8 +125,10 @@ public sealed class BodyPrototypeSerializer : ITypeReader? instanceProvider = null) { var id = node.Get("id").Value; var name = node.Get("name").Value; diff --git a/Content.Shared/Body/Systems/SharedBodySystem.Body.cs b/Content.Shared/Body/Systems/SharedBodySystem.Body.cs index 80d8d40dc4..e9b195ee1e 100644 --- a/Content.Shared/Body/Systems/SharedBodySystem.Body.cs +++ b/Content.Shared/Body/Systems/SharedBodySystem.Body.cs @@ -125,7 +125,7 @@ public partial class SharedBodySystem { if (id == null || !Resolve(id.Value, ref body, false) || - !TryComp(body.Root.Child, out BodyPartComponent? part)) + !TryComp(body.Root?.Child, out BodyPartComponent? part)) yield break; yield return (body.Root.Child.Value, part); @@ -155,7 +155,7 @@ public partial class SharedBodySystem if (bodyId == null || !Resolve(bodyId.Value, ref body, false)) yield break; - foreach (var slot in GetPartAllSlots(body.Root.Child)) + foreach (var slot in GetPartAllSlots(body.Root?.Child)) { yield return slot; } diff --git a/Content.Shared/Chemistry/Reaction/ReactiveComponent.cs b/Content.Shared/Chemistry/Reaction/ReactiveComponent.cs index 9bff7538cf..45df9a7d06 100644 --- a/Content.Shared/Chemistry/Reaction/ReactiveComponent.cs +++ b/Content.Shared/Chemistry/Reaction/ReactiveComponent.cs @@ -37,5 +37,5 @@ public sealed class ReactiveReagentEffectEntry [DataField("groups", readOnly: true, serverOnly: true, customTypeSerializer:typeof(PrototypeIdDictionarySerializer, ReactiveGroupPrototype>))] - public Dictionary> ReactiveGroups { get; } = default!; + public Dictionary>? ReactiveGroups { get; } } diff --git a/Content.Shared/Construction/Steps/ConstructionGraphStepTypeSerializer.cs b/Content.Shared/Construction/Steps/ConstructionGraphStepTypeSerializer.cs index b113afe384..b1dfed6b64 100644 --- a/Content.Shared/Construction/Steps/ConstructionGraphStepTypeSerializer.cs +++ b/Content.Shared/Construction/Steps/ConstructionGraphStepTypeSerializer.cs @@ -42,7 +42,8 @@ namespace Content.Shared.Construction.Steps MappingDataNode node, IDependencyCollection dependencies, bool skipHook, - ISerializationContext? context = null, ConstructionGraphStep? _ = null) + ISerializationContext? context = null, + ISerializationManager.InstantiationDelegate? instanceProvider = null) { var type = GetType(node) ?? throw new ArgumentException( diff --git a/Content.Shared/Damage/Components/DamageableComponent.cs b/Content.Shared/Damage/Components/DamageableComponent.cs index cd85981c05..b9a55e70a6 100644 --- a/Content.Shared/Damage/Components/DamageableComponent.cs +++ b/Content.Shared/Damage/Components/DamageableComponent.cs @@ -43,7 +43,7 @@ namespace Content.Shared.Damage /// /// If this data-field is specified, this allows damageable components to be initialized with non-zero damage. /// - [DataField("damage")] + [DataField("damage", readOnly: true)] //todo remove this readonly when implementing writing to damagespecifier public DamageSpecifier Damage = new(); /// diff --git a/Content.Shared/Damage/DamageSpecifier.cs b/Content.Shared/Damage/DamageSpecifier.cs index 04aea9066e..33d18e1b06 100644 --- a/Content.Shared/Damage/DamageSpecifier.cs +++ b/Content.Shared/Damage/DamageSpecifier.cs @@ -1,10 +1,8 @@ -using Content.Shared.Damage.Prototypes; -using Robust.Shared.Prototypes; -using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.Dictionary; -using Robust.Shared.Utility; -using System.Linq; using System.Text.Json.Serialization; +using Content.Shared.Damage.Prototypes; using Content.Shared.FixedPoint; +using Robust.Shared.Prototypes; +using Robust.Shared.Utility; namespace Content.Shared.Damage { @@ -18,31 +16,13 @@ namespace Content.Shared.Damage [DataDefinition] public sealed class DamageSpecifier : IEquatable { - [JsonPropertyName("types")] - [DataField("types", customTypeSerializer: typeof(PrototypeIdDictionarySerializer))] - private readonly Dictionary? _damageTypeDictionary; - - [JsonPropertyName("groups")] - [DataField("groups", customTypeSerializer: typeof(PrototypeIdDictionarySerializer))] - private readonly Dictionary? _damageGroupDictionary; - /// /// Main DamageSpecifier dictionary. Most DamageSpecifier functions exist to somehow modifying this. /// [JsonIgnore] [ViewVariables(VVAccess.ReadWrite)] - public Dictionary DamageDict - { - get - { - if (_damageDict == null) - DeserializeDamage(); - return _damageDict!; - } - set => _damageDict = value; - } - [JsonIgnore] - private Dictionary? _damageDict; + [IncludeDataField(customTypeSerializer: typeof(DamageSpecifierDictionarySerializer), readOnly: true)] + public Dictionary DamageDict { get; set; } = new(); /// /// Sum of the damage values. @@ -88,57 +68,20 @@ namespace Content.Shared.Damage /// public DamageSpecifier(DamageGroupPrototype group, FixedPoint2 value) { - _damageGroupDictionary = new() { { group.ID, value } }; + // Simply distribute evenly (except for rounding). + // We do this by reducing remaining the # of types and damage every loop. + var remainingTypes = group.DamageTypes.Count; + var remainingDamage = value; + foreach (var damageType in group.DamageTypes) + { + var damage = remainingDamage / FixedPoint2.New(remainingTypes); + DamageDict.Add(damageType, damage); + remainingDamage -= damage; + remainingTypes -= 1; + } } #endregion constructors - /// - /// Combines the damage group and type datafield dictionaries FixedPoint2o a single damage dictionary. - /// - public void DeserializeDamage() - { - // Add all the damage types by just copying the type dictionary (if it is not null). - if (_damageTypeDictionary != null) - { - _damageDict = new(_damageTypeDictionary); - } - else - { - _damageDict = new(); - } - - if (_damageGroupDictionary == null) - return; - - // Then resolve damage groups and add them - var prototypeManager = IoCManager.Resolve(); - foreach (var entry in _damageGroupDictionary) - { - if (!prototypeManager.TryIndex(entry.Key, out var group)) - { - // This can happen if deserialized before prototypes are loaded. - Logger.Error($"Unknown damage group given to DamageSpecifier: {entry.Key}"); - continue; - } - - // Simply distribute evenly (except for rounding). - // We do this by reducing remaining the # of types and damage every loop. - var remainingTypes = group.DamageTypes.Count; - var remainingDamage = entry.Value; - foreach (var damageType in group.DamageTypes) - { - var damage = remainingDamage / FixedPoint2.New(remainingTypes); - if (!_damageDict.TryAdd(damageType, damage)) - { - // Key already exists, add values - _damageDict[damageType] += damage; - } - remainingDamage -= damage; - remainingTypes -= 1; - } - } - } - /// /// Reduce (or increase) damages by applying a damage modifier set. /// diff --git a/Content.Shared/Damage/DamageSpecifierDictionarySerializer.cs b/Content.Shared/Damage/DamageSpecifierDictionarySerializer.cs new file mode 100644 index 0000000000..48e6f174ee --- /dev/null +++ b/Content.Shared/Damage/DamageSpecifierDictionarySerializer.cs @@ -0,0 +1,80 @@ +using Content.Shared.Damage.Prototypes; +using Content.Shared.FixedPoint; +using Robust.Shared.Prototypes; +using Robust.Shared.Serialization.Manager; +using Robust.Shared.Serialization.Markdown.Mapping; +using Robust.Shared.Serialization.Markdown.Validation; +using Robust.Shared.Serialization.Markdown.Value; +using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.Dictionary; +using Robust.Shared.Serialization.TypeSerializers.Interfaces; + +namespace Content.Shared.Damage; + +//todo writing +public sealed class DamageSpecifierDictionarySerializer : ITypeReader, MappingDataNode> +{ + private ITypeValidator, MappingDataNode> _damageTypeSerializer = new PrototypeIdDictionarySerializer(); + private ITypeValidator, MappingDataNode> _damageGroupSerializer = new PrototypeIdDictionarySerializer(); + + public ValidationNode Validate(ISerializationManager serializationManager, MappingDataNode node, + IDependencyCollection dependencies, ISerializationContext? context = null) + { + var vals = new Dictionary(); + if (node.TryGet("types", out var typesNode)) + { + vals.Add(new ValidatedValueNode(new ValueDataNode("types")), _damageTypeSerializer.Validate(serializationManager, typesNode, dependencies, context)); + } + + if (node.TryGet("groups", out var groupsNode)) + { + vals.Add(new ValidatedValueNode(new ValueDataNode("groups")), _damageGroupSerializer.Validate(serializationManager, groupsNode, dependencies, context)); + } + + return new ValidatedMappingNode(vals); + } + + public Dictionary Read(ISerializationManager serializationManager, MappingDataNode node, IDependencyCollection dependencies, + bool skipHook, ISerializationContext? context = null, ISerializationManager.InstantiationDelegate>? instanceProvider = null) + { + var dict = instanceProvider != null ? instanceProvider() : new(); + // Add all the damage types by just copying the type dictionary (if it is not null). + if (node.TryGet("types", out var typesNode)) + { + serializationManager.Read(typesNode, instanceProvider: () => dict); + } + + if (!node.TryGet("groups", out var groupsNode)) + return dict; + + // Then resolve damage groups and add them + var prototypeManager = dependencies.Resolve(); + foreach (var entry in serializationManager.Read>(groupsNode)) + { + if (!prototypeManager.TryIndex(entry.Key, out var group)) + { + // This can happen if deserialized before prototypes are loaded. + // i made this a warning bc it was failing tests -paul + dependencies.Resolve().RootSawmill.Error($"Unknown damage group given to DamageSpecifier: {entry.Key}"); + continue; + } + + // Simply distribute evenly (except for rounding). + // We do this by reducing remaining the # of types and damage every loop. + var remainingTypes = group.DamageTypes.Count; + var remainingDamage = entry.Value; + foreach (var damageType in group.DamageTypes) + { + var damage = remainingDamage / FixedPoint2.New(remainingTypes); + if (!dict.TryAdd(damageType, damage)) + { + // Key already exists, add values + dict[damageType] += damage; + } + remainingDamage -= damage; + remainingTypes -= 1; + } + } + + return dict; + } +} diff --git a/Content.Shared/Damage/Prototypes/DamageGroupPrototype.cs b/Content.Shared/Damage/Prototypes/DamageGroupPrototype.cs index 1e3430ecae..604b90f41b 100644 --- a/Content.Shared/Damage/Prototypes/DamageGroupPrototype.cs +++ b/Content.Shared/Damage/Prototypes/DamageGroupPrototype.cs @@ -11,7 +11,7 @@ namespace Content.Shared.Damage.Prototypes /// These groups can be used to specify supported damage types of a , or /// to change/get/set damage in a . /// - [Prototype("damageGroup")] + [Prototype("damageGroup", 2)] [Serializable, NetSerializable] public sealed class DamageGroupPrototype : IPrototype { diff --git a/Content.Shared/Decals/DecalGridChunkCollectionTypeSerializer.cs b/Content.Shared/Decals/DecalGridChunkCollectionTypeSerializer.cs index 151d72c0e2..5c072af036 100644 --- a/Content.Shared/Decals/DecalGridChunkCollectionTypeSerializer.cs +++ b/Content.Shared/Decals/DecalGridChunkCollectionTypeSerializer.cs @@ -15,10 +15,12 @@ namespace Content.Shared.Decals return serializationManager.ValidateNode>>(node, context); } - public DecalGridComponent.DecalGridChunkCollection Read(ISerializationManager serializationManager, MappingDataNode node, - IDependencyCollection dependencies, bool skipHook, ISerializationContext? context = null, DecalGridComponent.DecalGridChunkCollection? _ = null) + public DecalGridComponent.DecalGridChunkCollection Read(ISerializationManager serializationManager, + MappingDataNode node, + IDependencyCollection dependencies, bool skipHook, ISerializationContext? context = null, + ISerializationManager.InstantiationDelegate? _ = default) { - var dictionary = serializationManager.Read>>(node, context, skipHook: skipHook); + var dictionary = serializationManager.Read>>(node, context, skipHook); var uids = new SortedSet(); var uidChunkMap = new Dictionary(); @@ -57,13 +59,5 @@ namespace Content.Shared.Decals { return serializationManager.WriteValue(value.ChunkCollection, alwaysWrite, context); } - - public DecalGridComponent.DecalGridChunkCollection Copy(ISerializationManager serializationManager, DecalGridComponent.DecalGridChunkCollection source, - DecalGridComponent.DecalGridChunkCollection target, bool skipHook, ISerializationContext? context = null) - { - var dict = target.ChunkCollection; - serializationManager.Copy(source.ChunkCollection, ref dict, context, skipHook); - return new DecalGridComponent.DecalGridChunkCollection(dict) {NextUid = source.NextUid}; - } } } diff --git a/Content.Shared/Decals/DecalGridComponent.cs b/Content.Shared/Decals/DecalGridComponent.cs index f053dc5750..5bb0a51109 100644 --- a/Content.Shared/Decals/DecalGridComponent.cs +++ b/Content.Shared/Decals/DecalGridComponent.cs @@ -7,6 +7,7 @@ namespace Content.Shared.Decals [DataField("chunkCollection", serverOnly: true)] public DecalGridChunkCollection ChunkCollection = new(new ()); + [DataRecord] public record DecalGridChunkCollection(Dictionary> ChunkCollection) { public uint NextUid; diff --git a/Content.Shared/FixedPoint/FixedPoint2.cs b/Content.Shared/FixedPoint/FixedPoint2.cs index 45ebb54be6..bb48f911be 100644 --- a/Content.Shared/FixedPoint/FixedPoint2.cs +++ b/Content.Shared/FixedPoint/FixedPoint2.cs @@ -8,7 +8,7 @@ namespace Content.Shared.FixedPoint /// Represents a quantity of something, to a precision of 0.01. /// To enforce this level of precision, floats are shifted by 2 decimal points, rounded, and converted to an int. /// - [Serializable] + [Serializable, CopyByRef] public struct FixedPoint2 : ISelfSerialize, IComparable, IEquatable, IFormattable { private int _value; diff --git a/Content.Shared/Humanoid/SharedHumanoidComponent.cs b/Content.Shared/Humanoid/SharedHumanoidComponent.cs index ba878a334b..452f958c7c 100644 --- a/Content.Shared/Humanoid/SharedHumanoidComponent.cs +++ b/Content.Shared/Humanoid/SharedHumanoidComponent.cs @@ -1,8 +1,4 @@ -using System.Linq; using Content.Shared.Humanoid.Prototypes; -using Content.Shared.Preferences; -using Robust.Shared.Enums; -using Robust.Shared.Prototypes; using Robust.Shared.Serialization; using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype; @@ -15,13 +11,13 @@ public abstract class SharedHumanoidComponent : Component /// base humanoid to spawn, etc. /// [DataField("species", customTypeSerializer: typeof(PrototypeIdSerializer))] - public string Species { get; set; } = default!; + public string Species { get; set; } = string.Empty; /// /// The initial profile and base layers to apply to this humanoid. /// [DataField("initial", customTypeSerializer: typeof(PrototypeIdSerializer))] - public string Initial { get; } = default!; + public string? Initial { get; } /// /// Skin color of this humanoid. diff --git a/Resources/Prototypes/Datasets/Names/ninja.yml b/Resources/Prototypes/Datasets/Names/ninja.yml index 00c7b15cf4..78118bffd0 100644 --- a/Resources/Prototypes/Datasets/Names/ninja.yml +++ b/Resources/Prototypes/Datasets/Names/ninja.yml @@ -36,7 +36,6 @@ - Aria - Bro - Fox - - Null - Samurai - Eater - Ryu diff --git a/Resources/Prototypes/Entities/Markers/Spawners/Random/Food_Drinks/food_snacks.yml b/Resources/Prototypes/Entities/Markers/Spawners/Random/Food_Drinks/food_snacks.yml index 3dfcfb275d..2e943a8a36 100644 --- a/Resources/Prototypes/Entities/Markers/Spawners/Random/Food_Drinks/food_snacks.yml +++ b/Resources/Prototypes/Entities/Markers/Spawners/Random/Food_Drinks/food_snacks.yml @@ -1,7 +1,7 @@ - type: entity id: RandomSnacks name: random snack spawner - #suffix: + #suffix: "" parent: MarkerBase placement: mode: AlignTileAny @@ -9,7 +9,7 @@ - type: Sprite layers: - state: red - - texture: Objects/Consumable/Food/snacks.rsi/cheesiehonkers.png + - texture: Objects/Consumable/Food/snacks.rsi/cheesiehonkers.png - type: RandomSpawner #small item prototypes: @@ -52,4 +52,4 @@ - FoodSnackNutribrick - FoodSnackMREBrownie chance: 0.8 - offset: 0.0 \ No newline at end of file + offset: 0.0 diff --git a/Resources/Prototypes/Entities/Mobs/Player/dragon.yml b/Resources/Prototypes/Entities/Mobs/Player/dragon.yml index 7f5dbf0588..9083c18a18 100644 --- a/Resources/Prototypes/Entities/Mobs/Player/dragon.yml +++ b/Resources/Prototypes/Entities/Mobs/Player/dragon.yml @@ -2,7 +2,7 @@ name: space dragon parent: SimpleSpaceMobBase id: MobDragon - suffix: + suffix: "" description: A flying leviathan, loosely related to space carps. components: - type: GhostTakeoverAvailable diff --git a/Resources/Prototypes/Entities/Structures/Lighting/base_lighting.yml b/Resources/Prototypes/Entities/Structures/Lighting/base_lighting.yml index d6a269855e..e58a742c77 100644 --- a/Resources/Prototypes/Entities/Structures/Lighting/base_lighting.yml +++ b/Resources/Prototypes/Entities/Structures/Lighting/base_lighting.yml @@ -103,7 +103,7 @@ - type: entity id: Poweredlight description: "A light fixture. Draws power and produces light when equipped with a light tube." - suffix: + suffix: "" parent: PoweredlightEmpty components: - type: Sprite @@ -273,7 +273,7 @@ - type: entity id: PoweredSmallLight - suffix: + suffix: "" parent: PoweredSmallLightEmpty components: - type: Sprite @@ -290,7 +290,7 @@ name: emergency light description: A small light with an internal battery that turns on as soon as it stops receiving any power. Nanotrasen technology allows it to adapt its color to alert crew to the conditions of the station. parent: AlwaysPoweredWallLight - suffix: + suffix: "" components: - type: PointLight enabled: false diff --git a/Resources/Prototypes/Entities/Structures/Lighting/ground_lighting.yml b/Resources/Prototypes/Entities/Structures/Lighting/ground_lighting.yml index ff9a932bb9..7b3eafa35c 100644 --- a/Resources/Prototypes/Entities/Structures/Lighting/ground_lighting.yml +++ b/Resources/Prototypes/Entities/Structures/Lighting/ground_lighting.yml @@ -105,7 +105,7 @@ id: PoweredLightPostSmall name: post light description: "A light fixture. Draws power and produces light when equipped with a light tube." - suffix: + suffix: "" parent: PoweredLightPostSmallEmpty components: - type: Sprite diff --git a/Resources/Prototypes/Entities/Structures/Piping/Disposal/units.yml b/Resources/Prototypes/Entities/Structures/Piping/Disposal/units.yml index 0062b2223e..76eaa94707 100644 --- a/Resources/Prototypes/Entities/Structures/Piping/Disposal/units.yml +++ b/Resources/Prototypes/Entities/Structures/Piping/Disposal/units.yml @@ -123,8 +123,6 @@ transmitFrequencyId: MailingUnit - type: WiredNetworkConnection - type: Configuration - config: - tag: - type: Appearance visuals: - type: DisposalUnitVisualizer diff --git a/Resources/Prototypes/Entities/Structures/Storage/Closets/big_boxes.yml b/Resources/Prototypes/Entities/Structures/Storage/Closets/big_boxes.yml index 6ca9f23927..715393e7a9 100644 --- a/Resources/Prototypes/Entities/Structures/Storage/Closets/big_boxes.yml +++ b/Resources/Prototypes/Entities/Structures/Storage/Closets/big_boxes.yml @@ -84,7 +84,7 @@ - type: entity id: GhostBox parent: StealthBox - suffix: + suffix: "" name: ghost box description: Beware! components: diff --git a/Resources/Prototypes/Roles/Jobs/Engineering/atmospheric_technician.yml b/Resources/Prototypes/Roles/Jobs/Engineering/atmospheric_technician.yml index 297fd1f390..fba22c6b24 100644 --- a/Resources/Prototypes/Roles/Jobs/Engineering/atmospheric_technician.yml +++ b/Resources/Prototypes/Roles/Jobs/Engineering/atmospheric_technician.yml @@ -19,7 +19,6 @@ - type: startingGear id: AtmosphericTechnicianGear equipment: - head: jumpsuit: ClothingUniformJumpsuitAtmos back: ClothingBackpackEngineeringFilled shoes: ClothingShoesColorWhite diff --git a/Resources/Prototypes/Roles/Jobs/Fun/emergencyresponseteam.yml b/Resources/Prototypes/Roles/Jobs/Fun/emergencyresponseteam.yml index 953e54a977..dad35f3d0a 100644 --- a/Resources/Prototypes/Roles/Jobs/Fun/emergencyresponseteam.yml +++ b/Resources/Prototypes/Roles/Jobs/Fun/emergencyresponseteam.yml @@ -25,7 +25,6 @@ ears: ClothingHeadsetAltCommand belt: ClothingBeltSecurityWebbing pocket1: Flare - pocket2: - type: startingGear id: ERTLeaderGearEVA @@ -42,7 +41,6 @@ ears: ClothingHeadsetAltCommand belt: ClothingBeltSecurityFilled pocket1: Flare - pocket2: # Engineer - type: job @@ -71,7 +69,6 @@ ears: ClothingHeadsetAltCommand belt: ClothingBeltChiefEngineerFilled pocket1: Flare - pocket2: - type: startingGear id: ERTEngineerGearEVA @@ -116,7 +113,6 @@ ears: ClothingHeadsetAltCommand belt: ClothingBeltSecurityWebbing pocket1: Flare - pocket2: - type: startingGear id: ERTSecurityGearEVA @@ -206,7 +202,6 @@ ears: ClothingHeadsetAltCommand belt: ClothingBeltJanitorFilled pocket1: Flare - pocket2: - type: startingGear id: ERTJanitorGearEVA diff --git a/RobustToolbox b/RobustToolbox index e418ab96b9..b791a5e815 160000 --- a/RobustToolbox +++ b/RobustToolbox @@ -1 +1 @@ -Subproject commit e418ab96b9ecade05eb562f6c0cfcd821efab575 +Subproject commit b791a5e8159213c9497f8c0fb44b01ba15ce2d30