diff --git a/Content.Client/SurveillanceCamera/UI/SurveillanceCameraSetupWindow.xaml.cs b/Content.Client/SurveillanceCamera/UI/SurveillanceCameraSetupWindow.xaml.cs index a7feb9db54..1c8568b2bd 100644 --- a/Content.Client/SurveillanceCamera/UI/SurveillanceCameraSetupWindow.xaml.cs +++ b/Content.Client/SurveillanceCamera/UI/SurveillanceCameraSetupWindow.xaml.cs @@ -38,7 +38,7 @@ public sealed partial class SurveillanceCameraSetupWindow : DefaultWindow } // Pass in a list of frequency prototype IDs. - public void LoadAvailableNetworks(uint currentNetwork, List networks) + public void LoadAvailableNetworks(uint currentNetwork, List> networks) { NetworkSelector.Clear(); diff --git a/Content.Server/Arcade/SpaceVillainGame/SpaceVillainArcadeComponent.cs b/Content.Server/Arcade/SpaceVillainGame/SpaceVillainArcadeComponent.cs index e93fcc6e8f..3c8a4de2df 100644 --- a/Content.Server/Arcade/SpaceVillainGame/SpaceVillainArcadeComponent.cs +++ b/Content.Server/Arcade/SpaceVillainGame/SpaceVillainArcadeComponent.cs @@ -1,7 +1,6 @@ using Content.Shared.Arcade; using Robust.Shared.Audio; using Robust.Shared.Prototypes; -using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.List; namespace Content.Server.Arcade.SpaceVillain; @@ -90,8 +89,8 @@ public sealed partial class SpaceVillainArcadeComponent : SharedSpaceVillainArca /// The prototypes that can be dispensed as a reward for winning the game. /// [ViewVariables(VVAccess.ReadWrite)] - [DataField("possibleRewards", customTypeSerializer: typeof(PrototypeIdListSerializer))] - public List PossibleRewards = new(); + [DataField] + public List PossibleRewards = new(); /// /// The minimum number of prizes the arcade machine can have. diff --git a/Content.Server/Botany/SeedPrototype.cs b/Content.Server/Botany/SeedPrototype.cs index ae182cbe7e..ee7ca4f584 100644 --- a/Content.Server/Botany/SeedPrototype.cs +++ b/Content.Server/Botany/SeedPrototype.cs @@ -1,17 +1,14 @@ using Content.Server.Botany.Components; using Content.Server.Botany.Systems; +using Content.Server.EntityEffects; using Content.Shared.Atmos; using Content.Shared.Database; -using Content.Shared.EntityEffects; using Content.Shared.Random; using Robust.Shared.Audio; using Robust.Shared.Prototypes; using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype; -using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.List; using Robust.Shared.Utility; -using Content.Server.EntityEffects; - namespace Content.Server.Botany; [Prototype] @@ -133,8 +130,8 @@ public partial class SeedData /// /// The entity prototype this seed spawns when it gets harvested. /// - [DataField("productPrototypes", customTypeSerializer: typeof(PrototypeIdListSerializer))] - public List ProductPrototypes = new(); + [DataField] + public List ProductPrototypes = new(); [DataField] public Dictionary Chemicals = new(); @@ -243,8 +240,8 @@ public partial class SeedData /// /// The seed prototypes this seed may mutate into when prompted to. /// - [DataField(customTypeSerializer: typeof(PrototypeIdListSerializer))] - public List MutationPrototypes = new(); + [DataField] + public List> MutationPrototypes = new(); /// /// Log impact for when the seed is planted. @@ -270,8 +267,8 @@ public partial class SeedData Mysterious = Mysterious, PacketPrototype = PacketPrototype, - ProductPrototypes = new List(ProductPrototypes), - MutationPrototypes = new List(MutationPrototypes), + ProductPrototypes = new List(ProductPrototypes), + MutationPrototypes = new List>(MutationPrototypes), Chemicals = new Dictionary(Chemicals), ConsumeGasses = new Dictionary(ConsumeGasses), ExudeGasses = new Dictionary(ExudeGasses), @@ -330,8 +327,8 @@ public partial class SeedData Mysterious = other.Mysterious, PacketPrototype = other.PacketPrototype, - ProductPrototypes = new List(other.ProductPrototypes), - MutationPrototypes = new List(other.MutationPrototypes), + ProductPrototypes = new List(other.ProductPrototypes), + MutationPrototypes = new List>(other.MutationPrototypes), Chemicals = new Dictionary(Chemicals), ConsumeGasses = new Dictionary(ConsumeGasses), diff --git a/Content.Server/EntityList/SpawnEntityListCommand.cs b/Content.Server/EntityList/SpawnEntityListCommand.cs index 07bc26996e..f70b0ccb07 100644 --- a/Content.Server/EntityList/SpawnEntityListCommand.cs +++ b/Content.Server/EntityList/SpawnEntityListCommand.cs @@ -43,7 +43,7 @@ namespace Content.Server.EntityList var i = 0; - foreach (var entity in prototype.Entities(_prototypeManager)) + foreach (var entity in prototype.GetEntities(_prototypeManager)) { EntityManager.SpawnEntity(entity.ID, EntityManager.GetComponent(attached).Coordinates); i++; diff --git a/Content.Server/GameTicking/Presets/GamePresetPrototype.cs b/Content.Server/GameTicking/Presets/GamePresetPrototype.cs index 87be962602..a40ac4d78a 100644 --- a/Content.Server/GameTicking/Presets/GamePresetPrototype.cs +++ b/Content.Server/GameTicking/Presets/GamePresetPrototype.cs @@ -1,8 +1,6 @@ - using Content.Server.Maps; using Robust.Shared.Prototypes; using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype; -using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.List; namespace Content.Server.GameTicking.Presets { @@ -33,8 +31,8 @@ namespace Content.Server.GameTicking.Presets [DataField("maxPlayers")] public int? MaxPlayers; - [DataField("rules", customTypeSerializer: typeof(PrototypeIdListSerializer))] - public IReadOnlyList Rules { get; private set; } = Array.Empty(); + [DataField] + public IReadOnlyList Rules { get; private set; } = Array.Empty(); /// /// If specified, the gamemode will only be run with these maps. diff --git a/Content.Server/Implants/Components/AutoImplantComponent.cs b/Content.Server/Implants/Components/AutoImplantComponent.cs index e082354d8b..48cfabf58f 100644 --- a/Content.Server/Implants/Components/AutoImplantComponent.cs +++ b/Content.Server/Implants/Components/AutoImplantComponent.cs @@ -1,5 +1,4 @@ using Robust.Shared.Prototypes; -using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.List; namespace Content.Server.Implants.Components; @@ -12,6 +11,6 @@ public sealed partial class AutoImplantComponent : Component /// /// List of implants to inject. /// - [DataField("implants", required: true, customTypeSerializer: typeof(PrototypeIdListSerializer))] - public List Implants = new(); + [DataField(required: true)] + public List Implants = new(); } diff --git a/Content.Server/Jobs/AddImplantSpecial.cs b/Content.Server/Jobs/AddImplantSpecial.cs index 83193e7056..3967a08d9e 100644 --- a/Content.Server/Jobs/AddImplantSpecial.cs +++ b/Content.Server/Jobs/AddImplantSpecial.cs @@ -2,7 +2,6 @@ using Content.Shared.Roles; using JetBrains.Annotations; using Robust.Shared.Prototypes; -using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.Set; namespace Content.Server.Jobs; @@ -12,8 +11,8 @@ namespace Content.Server.Jobs; [UsedImplicitly] public sealed partial class AddImplantSpecial : JobSpecial { - [DataField("implants", customTypeSerializer: typeof(PrototypeIdHashSetSerializer))] - public HashSet Implants { get; private set; } = new(); + [DataField] + public HashSet Implants { get; private set; } = new(); public override void AfterEquip(EntityUid mob) { diff --git a/Content.Server/Research/Systems/ResearchSystem.Technology.cs b/Content.Server/Research/Systems/ResearchSystem.Technology.cs index 0237c8712a..3e8888276f 100644 --- a/Content.Server/Research/Systems/ResearchSystem.Technology.cs +++ b/Content.Server/Research/Systems/ResearchSystem.Technology.cs @@ -2,6 +2,7 @@ using Content.Shared.Database; using Content.Shared.Research.Components; using Content.Shared.Research.Prototypes; using JetBrains.Annotations; +using Robust.Shared.Prototypes; namespace Content.Server.Research.Systems; @@ -165,9 +166,9 @@ public sealed partial class ResearchSystem return; component.MainDiscipline = null; component.CurrentTechnologyCards = new List(); - component.SupportedDisciplines = new List(); - component.UnlockedTechnologies = new List(); - component.UnlockedRecipes = new List(); + component.SupportedDisciplines = new List>(); + component.UnlockedTechnologies = new List>(); + component.UnlockedRecipes = new List>(); Dirty(uid, component); } } diff --git a/Content.Server/Silicons/Borgs/BorgSystem.Modules.cs b/Content.Server/Silicons/Borgs/BorgSystem.Modules.cs index 1b6040773c..07fb1cb30b 100644 --- a/Content.Server/Silicons/Borgs/BorgSystem.Modules.cs +++ b/Content.Server/Silicons/Borgs/BorgSystem.Modules.cs @@ -199,7 +199,7 @@ public sealed partial class BorgSystem else { item = component.ProvidedContainer.ContainedEntities - .FirstOrDefault(ent => Prototype(ent)?.ID == itemProto); + .FirstOrDefault(ent => Prototype(ent)?.ID == itemProto.Id); if (!item.IsValid()) { Log.Debug($"no items found: {component.ProvidedContainer.ContainedEntities.Count}"); diff --git a/Content.Server/StationEvents/Components/SolarFlareRuleComponent.cs b/Content.Server/StationEvents/Components/SolarFlareRuleComponent.cs index 577d7777d7..a47c1925e2 100644 --- a/Content.Server/StationEvents/Components/SolarFlareRuleComponent.cs +++ b/Content.Server/StationEvents/Components/SolarFlareRuleComponent.cs @@ -1,6 +1,6 @@ using Content.Server.StationEvents.Events; using Content.Shared.Radio; -using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.List; +using Robust.Shared.Prototypes; using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.Set; namespace Content.Server.StationEvents.Components; @@ -29,8 +29,8 @@ public sealed partial class SolarFlareRuleComponent : Component /// /// Channels are not removed from this, so its possible to roll the same channel multiple times. /// - [DataField("extraChannels", customTypeSerializer: typeof(PrototypeIdListSerializer))] - public List ExtraChannels = new(); + [DataField] + public List> ExtraChannels = new(); /// /// Number of times to roll a channel from ExtraChannels. diff --git a/Content.Server/StationEvents/Components/VentClogRuleComponent.cs b/Content.Server/StationEvents/Components/VentClogRuleComponent.cs index afb3a36326..d51c48b4ae 100644 --- a/Content.Server/StationEvents/Components/VentClogRuleComponent.cs +++ b/Content.Server/StationEvents/Components/VentClogRuleComponent.cs @@ -1,7 +1,7 @@ using Content.Server.StationEvents.Events; using Content.Shared.Chemistry.Reagent; using Robust.Shared.Audio; -using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.List; +using Robust.Shared.Prototypes; namespace Content.Server.StationEvents.Components; @@ -12,8 +12,8 @@ public sealed partial class VentClogRuleComponent : Component /// Somewhat safe chemicals to put in foam that probably won't instantly kill you. /// There is a small chance of using any reagent, ignoring this. /// - [DataField(customTypeSerializer: typeof(PrototypeIdListSerializer))] - public IReadOnlyList SafeishVentChemicals = new[] + [DataField] + public IReadOnlyList> SafeishVentChemicals = new ProtoId[] { "Water", "Blood", "Slime", "SpaceDrugs", "SpaceCleaner", "Nutriment", "Sugar", "SpaceLube", "Ephedrine", "Ale", "Beer", "SpaceGlue" }; @@ -45,8 +45,8 @@ public sealed partial class VentClogRuleComponent : Component /// /// Reagents that gets the weak numbers used instead of regular ones. /// - [DataField(customTypeSerializer: typeof(PrototypeIdListSerializer))] - public IReadOnlyList WeakReagents = new[] + [DataField] + public IReadOnlyList> WeakReagents = new ProtoId[] { "SpaceLube", "SpaceGlue" }; diff --git a/Content.Server/StationEvents/Events/VentClogRule.cs b/Content.Server/StationEvents/Events/VentClogRule.cs index ad8e4b5a42..d93c67ef92 100644 --- a/Content.Server/StationEvents/Events/VentClogRule.cs +++ b/Content.Server/StationEvents/Events/VentClogRule.cs @@ -1,14 +1,15 @@ +using System.Linq; using Content.Server.Atmos.Piping.Unary.Components; using Content.Server.Fluids.EntitySystems; using Content.Server.StationEvents.Components; using Content.Shared.Chemistry.Components; +using Content.Shared.Chemistry.Reaction; using Content.Shared.Chemistry.Reagent; using Content.Shared.GameTicking.Components; using Content.Shared.Station.Components; using JetBrains.Annotations; +using Robust.Shared.Prototypes; using Robust.Shared.Random; -using System.Linq; -using Content.Shared.Chemistry.Reaction; namespace Content.Server.StationEvents.Events; @@ -27,7 +28,7 @@ public sealed class VentClogRule : StationEventSystem // TODO: "safe random" for chems. Right now this includes admin chemicals. var allReagents = PrototypeManager.EnumeratePrototypes() .Where(x => !x.Abstract) - .Select(x => x.ID).ToList(); + .Select(x => new ProtoId(x.ID)).ToList(); foreach (var (_, transform) in EntityQuery()) { diff --git a/Content.Server/SurveillanceCamera/Components/SurveillanceCameraComponent.cs b/Content.Server/SurveillanceCamera/Components/SurveillanceCameraComponent.cs index 8473462f80..b0d41e52c7 100644 --- a/Content.Server/SurveillanceCamera/Components/SurveillanceCameraComponent.cs +++ b/Content.Server/SurveillanceCamera/Components/SurveillanceCameraComponent.cs @@ -1,5 +1,5 @@ using Content.Shared.DeviceNetwork; -using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.List; +using Robust.Shared.Prototypes; namespace Content.Server.SurveillanceCamera; @@ -43,6 +43,6 @@ public sealed partial class SurveillanceCameraComponent : Component public bool NetworkSet { get; set; } // This has to be device network frequency prototypes. - [DataField("setupAvailableNetworks", customTypeSerializer:typeof(PrototypeIdListSerializer))] - public List AvailableNetworks { get; private set; } = new(); + [DataField("setupAvailableNetworks")] + public List> AvailableNetworks { get; private set; } = new(); } diff --git a/Content.Server/SurveillanceCamera/Components/SurveillanceCameraRouterComponent.cs b/Content.Server/SurveillanceCamera/Components/SurveillanceCameraRouterComponent.cs index d15d5e7d39..0967d0b043 100644 --- a/Content.Server/SurveillanceCamera/Components/SurveillanceCameraRouterComponent.cs +++ b/Content.Server/SurveillanceCamera/Components/SurveillanceCameraRouterComponent.cs @@ -1,6 +1,6 @@ using Content.Shared.DeviceNetwork; +using Robust.Shared.Prototypes; using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype; -using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.List; namespace Content.Server.SurveillanceCamera; @@ -26,6 +26,6 @@ public sealed partial class SurveillanceCameraRouterComponent : Component [DataField("subnetFrequency", customTypeSerializer:typeof(PrototypeIdSerializer))] public string? SubnetFrequencyId { get; set; } - [DataField("setupAvailableNetworks", customTypeSerializer:typeof(PrototypeIdListSerializer))] - public List AvailableNetworks { get; private set; } = new(); + [DataField("setupAvailableNetworks")] + public List> AvailableNetworks { get; private set; } = new(); } diff --git a/Content.Server/Worldgen/Components/BiomeSelectionComponent.cs b/Content.Server/Worldgen/Components/BiomeSelectionComponent.cs index f6b4c82ebb..08571cd588 100644 --- a/Content.Server/Worldgen/Components/BiomeSelectionComponent.cs +++ b/Content.Server/Worldgen/Components/BiomeSelectionComponent.cs @@ -1,6 +1,6 @@ -using Content.Server.Worldgen.Systems.Biomes; -using Content.Server.Worldgen.Prototypes; -using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.List; +using Content.Server.Worldgen.Prototypes; +using Content.Server.Worldgen.Systems.Biomes; +using Robust.Shared.Prototypes; namespace Content.Server.Worldgen.Components; @@ -15,7 +15,7 @@ public sealed partial class BiomeSelectionComponent : Component /// The list of biomes available to this selector. /// /// This is always sorted by priority after ComponentStartup. - [DataField("biomes", required: true, - customTypeSerializer: typeof(PrototypeIdListSerializer))] public List Biomes = new(); + [DataField(required: true)] + public List> Biomes = new(); } diff --git a/Content.Server/Worldgen/Components/Debris/BlobFloorPlanBuilderComponent.cs b/Content.Server/Worldgen/Components/Debris/BlobFloorPlanBuilderComponent.cs index 6d1fa5d957..a1317ae2ed 100644 --- a/Content.Server/Worldgen/Components/Debris/BlobFloorPlanBuilderComponent.cs +++ b/Content.Server/Worldgen/Components/Debris/BlobFloorPlanBuilderComponent.cs @@ -1,6 +1,6 @@ using Content.Server.Worldgen.Systems.Debris; using Content.Shared.Maps; -using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.List; +using Robust.Shared.Prototypes; namespace Content.Server.Worldgen.Components.Debris; @@ -24,9 +24,8 @@ public sealed partial class BlobFloorPlanBuilderComponent : Component /// /// The tiles to be used for the floor plan. /// - [DataField("floorTileset", required: true, - customTypeSerializer: typeof(PrototypeIdListSerializer))] - public List FloorTileset { get; private set; } = default!; + [DataField(required: true)] + public List> FloorTileset { get; private set; } = default!; /// /// The number of floor tiles to place when drawing the asteroid layout. diff --git a/Content.Shared/Chemistry/Components/Solution.cs b/Content.Shared/Chemistry/Components/Solution.cs index 9622ccae30..38be03226d 100644 --- a/Content.Shared/Chemistry/Components/Solution.cs +++ b/Content.Shared/Chemistry/Components/Solution.cs @@ -1,12 +1,12 @@ +using System.Collections; +using System.Linq; +using Content.Shared.Chemistry.Components.SolutionManager; using Content.Shared.Chemistry.Reagent; using Content.Shared.FixedPoint; using JetBrains.Annotations; using Robust.Shared.Prototypes; using Robust.Shared.Serialization; using Robust.Shared.Utility; -using System.Collections; -using System.Linq; -using Content.Shared.Chemistry.Components.SolutionManager; namespace Content.Shared.Chemistry.Components { @@ -583,6 +583,7 @@ namespace Content.Shared.Chemistry.Components /// /// Splits a solution without the specified reagent prototypes. /// + [Obsolete("Use SplitSolutionWithout with params ProtoId")] public Solution SplitSolutionWithout(FixedPoint2 toTake, params string[] excludedPrototypes) { // First remove the blacklisted prototypes @@ -612,6 +613,38 @@ namespace Content.Shared.Chemistry.Components return sol; } + /// + /// Splits a solution without the specified reagent prototypes. + /// + public Solution SplitSolutionWithout(FixedPoint2 toTake, params ProtoId[] excludedPrototypes) + { + // First remove the blacklisted prototypes + List excluded = new(); + foreach (var id in excludedPrototypes) + { + foreach (var tuple in Contents) + { + if (tuple.Reagent.Prototype != id) + continue; + + excluded.Add(tuple); + RemoveReagent(tuple); + break; + } + } + + // Then split the solution + var sol = SplitSolution(toTake); + + // Then re-add the excluded reagents to the original solution. + foreach (var reagent in excluded) + { + AddReagent(reagent); + } + + return sol; + } + /// /// Splits a solution with only the specified reagent prototypes. /// diff --git a/Content.Shared/Chemistry/EntitySystems/SharedSolutionContainerSystem.cs b/Content.Shared/Chemistry/EntitySystems/SharedSolutionContainerSystem.cs index fe4d102536..83de0970ec 100644 --- a/Content.Shared/Chemistry/EntitySystems/SharedSolutionContainerSystem.cs +++ b/Content.Shared/Chemistry/EntitySystems/SharedSolutionContainerSystem.cs @@ -1,24 +1,24 @@ -using Content.Shared.Chemistry.Components; -using Content.Shared.Chemistry.Components.SolutionManager; -using Content.Shared.Chemistry.Reaction; -using Content.Shared.Chemistry.Reagent; -using Content.Shared.Examine; -using Content.Shared.FixedPoint; -using Content.Shared.Verbs; -using JetBrains.Annotations; -using Robust.Shared.Containers; -using Robust.Shared.Prototypes; -using Robust.Shared.Utility; using System.Diagnostics.CodeAnalysis; using System.Linq; using System.Numerics; using System.Runtime.CompilerServices; using System.Text; +using Content.Shared.Chemistry.Components; +using Content.Shared.Chemistry.Components.SolutionManager; +using Content.Shared.Chemistry.Reaction; +using Content.Shared.Chemistry.Reagent; using Content.Shared.Containers; +using Content.Shared.Examine; +using Content.Shared.FixedPoint; using Content.Shared.Hands.Components; using Content.Shared.Hands.EntitySystems; +using Content.Shared.Verbs; +using JetBrains.Annotations; +using Robust.Shared.Containers; using Robust.Shared.Map; using Robust.Shared.Network; +using Robust.Shared.Prototypes; +using Robust.Shared.Utility; using Dependency = Robust.Shared.IoC.DependencyAttribute; namespace Content.Shared.Chemistry.EntitySystems; @@ -61,14 +61,14 @@ public partial record struct SolutionAccessAttemptEvent(string SolutionName) [UsedImplicitly] public abstract partial class SharedSolutionContainerSystem : EntitySystem { - [Dependency] protected readonly IPrototypeManager PrototypeManager = default!; - [Dependency] protected readonly ChemicalReactionSystem ChemicalReactionSystem = default!; - [Dependency] protected readonly ExamineSystemShared ExamineSystem = default!; - [Dependency] protected readonly SharedAppearanceSystem AppearanceSystem = default!; - [Dependency] protected readonly SharedHandsSystem Hands = default!; - [Dependency] protected readonly SharedContainerSystem ContainerSystem = default!; - [Dependency] protected readonly MetaDataSystem MetaDataSys = default!; - [Dependency] protected readonly INetManager NetManager = default!; + [Robust.Shared.IoC.Dependency] protected readonly IPrototypeManager PrototypeManager = default!; + [Robust.Shared.IoC.Dependency] protected readonly ChemicalReactionSystem ChemicalReactionSystem = default!; + [Robust.Shared.IoC.Dependency] protected readonly ExamineSystemShared ExamineSystem = default!; + [Robust.Shared.IoC.Dependency] protected readonly SharedAppearanceSystem AppearanceSystem = default!; + [Robust.Shared.IoC.Dependency] protected readonly SharedHandsSystem Hands = default!; + [Robust.Shared.IoC.Dependency] protected readonly SharedContainerSystem ContainerSystem = default!; + [Robust.Shared.IoC.Dependency] protected readonly MetaDataSystem MetaDataSys = default!; + [Robust.Shared.IoC.Dependency] protected readonly INetManager NetManager = default!; public override void Initialize() { @@ -376,6 +376,7 @@ public abstract partial class SharedSolutionContainerSystem : EntitySystem /// /// Splits a solution without the specified reagent(s). /// + [Obsolete("Use SplitSolutionWithout with params ProtoId")] public Solution SplitSolutionWithout(Entity soln, FixedPoint2 quantity, params string[] reagents) { var (uid, comp) = soln; @@ -386,6 +387,19 @@ public abstract partial class SharedSolutionContainerSystem : EntitySystem return splitSol; } + /// + /// Splits a solution without the specified reagent(s). + /// + public Solution SplitSolutionWithout(Entity soln, FixedPoint2 quantity, params ProtoId[] reagents) + { + var (uid, comp) = soln; + var solution = comp.Solution; + + var splitSol = solution.SplitSolutionWithout(quantity, reagents); + UpdateChemicals(soln); + return splitSol; + } + public void RemoveAllSolution(Entity soln) { var (uid, comp) = soln; diff --git a/Content.Shared/Damage/Prototypes/DamageContainerPrototype.cs b/Content.Shared/Damage/Prototypes/DamageContainerPrototype.cs index 95de0fb29d..00322f0884 100644 --- a/Content.Shared/Damage/Prototypes/DamageContainerPrototype.cs +++ b/Content.Shared/Damage/Prototypes/DamageContainerPrototype.cs @@ -1,6 +1,5 @@ using Robust.Shared.Prototypes; using Robust.Shared.Serialization; -using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.List; namespace Content.Shared.Damage.Prototypes { @@ -22,14 +21,14 @@ namespace Content.Shared.Damage.Prototypes /// /// List of damage groups that are supported by this container. /// - [DataField("supportedGroups", customTypeSerializer: typeof(PrototypeIdListSerializer))] - public List SupportedGroups = new(); + [DataField] + public List> SupportedGroups = new(); /// /// Partial List of damage types supported by this container. Note that members of the damage groups listed /// in are also supported, but they are not included in this list. /// - [DataField("supportedTypes", customTypeSerializer: typeof(PrototypeIdListSerializer))] - public List SupportedTypes = new(); + [DataField] + public List> SupportedTypes = new(); } } diff --git a/Content.Shared/Damage/Prototypes/DamageGroupPrototype.cs b/Content.Shared/Damage/Prototypes/DamageGroupPrototype.cs index 7615724467..a33064f934 100644 --- a/Content.Shared/Damage/Prototypes/DamageGroupPrototype.cs +++ b/Content.Shared/Damage/Prototypes/DamageGroupPrototype.cs @@ -1,6 +1,5 @@ using Robust.Shared.Prototypes; using Robust.Shared.Serialization; -using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.List; namespace Content.Shared.Damage.Prototypes { @@ -22,7 +21,7 @@ namespace Content.Shared.Damage.Prototypes [ViewVariables(VVAccess.ReadOnly)] public string LocalizedName => Loc.GetString(Name); - [DataField("damageTypes", required: true, customTypeSerializer: typeof(PrototypeIdListSerializer))] - public List DamageTypes { get; private set; } = default!; + [DataField(required: true)] + public List> DamageTypes { get; private set; } = default!; } } diff --git a/Content.Shared/EntityList/EntityListPrototype.cs b/Content.Shared/EntityList/EntityListPrototype.cs index 0248e2100c..76646d00f7 100644 --- a/Content.Shared/EntityList/EntityListPrototype.cs +++ b/Content.Shared/EntityList/EntityListPrototype.cs @@ -1,6 +1,5 @@ using System.Collections.Immutable; using Robust.Shared.Prototypes; -using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.List; namespace Content.Shared.EntityList { @@ -11,14 +10,14 @@ namespace Content.Shared.EntityList [IdDataField] public string ID { get; private set; } = default!; - [DataField("entities", customTypeSerializer: typeof(PrototypeIdListSerializer))] - public ImmutableList EntityIds { get; private set; } = ImmutableList.Empty; + [DataField] + public ImmutableList Entities { get; private set; } = ImmutableList.Empty; - public IEnumerable Entities(IPrototypeManager? prototypeManager = null) + public IEnumerable GetEntities(IPrototypeManager? prototypeManager = null) { prototypeManager ??= IoCManager.Resolve(); - foreach (var entityId in EntityIds) + foreach (var entityId in Entities) { yield return prototypeManager.Index(entityId); } diff --git a/Content.Shared/Implants/SharedSubdermalImplantSystem.cs b/Content.Shared/Implants/SharedSubdermalImplantSystem.cs index 5bbd285a99..95c3f8664f 100644 --- a/Content.Shared/Implants/SharedSubdermalImplantSystem.cs +++ b/Content.Shared/Implants/SharedSubdermalImplantSystem.cs @@ -1,3 +1,4 @@ +using System.Linq; using Content.Shared.Actions; using Content.Shared.Implants.Components; using Content.Shared.Interaction; @@ -6,9 +7,7 @@ using Content.Shared.Mobs; using Content.Shared.Tag; using JetBrains.Annotations; using Robust.Shared.Containers; -using Robust.Shared.Network; using Robust.Shared.Prototypes; -using System.Linq; namespace Content.Shared.Implants; @@ -91,7 +90,7 @@ public abstract class SharedSubdermalImplantSystem : EntitySystem /// Add a list of implants to a person. /// Logs any implant ids that don't have . /// - public void AddImplants(EntityUid uid, IEnumerable implants) + public void AddImplants(EntityUid uid, IEnumerable implants) { foreach (var id in implants) { diff --git a/Content.Shared/Parallax/Biomes/Layers/BiomeDecalLayer.cs b/Content.Shared/Parallax/Biomes/Layers/BiomeDecalLayer.cs index 5e31e513a9..f95848e42b 100644 --- a/Content.Shared/Parallax/Biomes/Layers/BiomeDecalLayer.cs +++ b/Content.Shared/Parallax/Biomes/Layers/BiomeDecalLayer.cs @@ -1,8 +1,8 @@ using Content.Shared.Decals; using Content.Shared.Maps; using Robust.Shared.Noise; +using Robust.Shared.Prototypes; using Robust.Shared.Serialization; -using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.List; namespace Content.Shared.Parallax.Biomes.Layers; @@ -10,8 +10,8 @@ namespace Content.Shared.Parallax.Biomes.Layers; public sealed partial class BiomeDecalLayer : IBiomeWorldLayer { /// - [DataField("allowedTiles", customTypeSerializer:typeof(PrototypeIdListSerializer))] - public List AllowedTiles { get; private set; } = new(); + [DataField] + public List> AllowedTiles { get; private set; } = new(); /// /// Divide each tile up by this amount. @@ -29,6 +29,6 @@ public sealed partial class BiomeDecalLayer : IBiomeWorldLayer /// [DataField("invert")] public bool Invert { get; private set; } = false; - [DataField("decals", required: true, customTypeSerializer:typeof(PrototypeIdListSerializer))] - public List Decals = new(); + [DataField(required: true)] + public List> Decals = new(); } diff --git a/Content.Shared/Parallax/Biomes/Layers/BiomeEntityLayer.cs b/Content.Shared/Parallax/Biomes/Layers/BiomeEntityLayer.cs index 21ffdd96e5..c09980aaad 100644 --- a/Content.Shared/Parallax/Biomes/Layers/BiomeEntityLayer.cs +++ b/Content.Shared/Parallax/Biomes/Layers/BiomeEntityLayer.cs @@ -2,7 +2,6 @@ using Content.Shared.Maps; using Robust.Shared.Noise; using Robust.Shared.Prototypes; using Robust.Shared.Serialization; -using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.List; namespace Content.Shared.Parallax.Biomes.Layers; @@ -10,8 +9,8 @@ namespace Content.Shared.Parallax.Biomes.Layers; public sealed partial class BiomeEntityLayer : IBiomeWorldLayer { /// - [DataField("allowedTiles", customTypeSerializer:typeof(PrototypeIdListSerializer))] - public List AllowedTiles { get; private set; } = new(); + [DataField] + public List> AllowedTiles { get; private set; } = new(); [DataField("noise")] public FastNoiseLite Noise { get; private set; } = new(0); @@ -22,6 +21,6 @@ public sealed partial class BiomeEntityLayer : IBiomeWorldLayer /// [DataField("invert")] public bool Invert { get; private set; } = false; - [DataField("entities", required: true, customTypeSerializer: typeof(PrototypeIdListSerializer))] - public List Entities = new(); + [DataField(required: true)] + public List Entities = new(); } diff --git a/Content.Shared/Parallax/Biomes/Layers/IBiomeWorldLayer.cs b/Content.Shared/Parallax/Biomes/Layers/IBiomeWorldLayer.cs index e04db913b7..92779b6f8e 100644 --- a/Content.Shared/Parallax/Biomes/Layers/IBiomeWorldLayer.cs +++ b/Content.Shared/Parallax/Biomes/Layers/IBiomeWorldLayer.cs @@ -1,3 +1,6 @@ +using Content.Shared.Maps; +using Robust.Shared.Prototypes; + namespace Content.Shared.Parallax.Biomes.Layers; /// @@ -8,5 +11,5 @@ public partial interface IBiomeWorldLayer : IBiomeLayer /// /// What tiles we're allowed to spawn on, real or biome. /// - List AllowedTiles { get; } + List> AllowedTiles { get; } } diff --git a/Content.Shared/Random/RandomFillSolution.cs b/Content.Shared/Random/RandomFillSolution.cs index e3b9b7c862..00453102f3 100644 --- a/Content.Shared/Random/RandomFillSolution.cs +++ b/Content.Shared/Random/RandomFillSolution.cs @@ -1,8 +1,7 @@ using Content.Shared.Chemistry.Reagent; using Content.Shared.FixedPoint; +using Robust.Shared.Prototypes; using Robust.Shared.Serialization; -using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype; -using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.List; namespace Content.Shared.Random; @@ -28,6 +27,6 @@ public sealed partial class RandomFillSolution /// /// Listed reagents that the weight and quantity apply to. /// - [DataField("reagents", required: true, customTypeSerializer: typeof(PrototypeIdListSerializer))] - public List Reagents = new(); + [DataField(required: true)] + public List> Reagents = new(); } diff --git a/Content.Shared/Research/Components/TechnologyDatabaseComponent.cs b/Content.Shared/Research/Components/TechnologyDatabaseComponent.cs index a69e4ee9dd..f00338aac7 100644 --- a/Content.Shared/Research/Components/TechnologyDatabaseComponent.cs +++ b/Content.Shared/Research/Components/TechnologyDatabaseComponent.cs @@ -2,8 +2,8 @@ using Content.Shared.Lathe; using Content.Shared.Research.Prototypes; using Content.Shared.Research.Systems; using Robust.Shared.GameStates; +using Robust.Shared.Prototypes; using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype; -using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.List; namespace Content.Shared.Research.Components; @@ -25,15 +25,15 @@ public sealed partial class TechnologyDatabaseComponent : Component /// Which research disciplines are able to be unlocked /// [AutoNetworkedField] - [DataField("supportedDisciplines", customTypeSerializer: typeof(PrototypeIdListSerializer))] - public List SupportedDisciplines = new(); + [DataField] + public List> SupportedDisciplines = new(); /// /// The ids of all the technologies which have been unlocked. /// [AutoNetworkedField] - [DataField("unlockedTechnologies", customTypeSerializer: typeof(PrototypeIdListSerializer))] - public List UnlockedTechnologies = new(); + [DataField] + public List> UnlockedTechnologies = new(); /// /// The ids of all the lathe recipes which have been unlocked. @@ -41,8 +41,8 @@ public sealed partial class TechnologyDatabaseComponent : Component /// /// todo: if you unlock all the recipes in a tech, it doesn't count as unlocking the tech. sadge [AutoNetworkedField] - [DataField("unlockedRecipes", customTypeSerializer: typeof(PrototypeIdListSerializer))] - public List UnlockedRecipes = new(); + [DataField] + public List> UnlockedRecipes = new(); } /// diff --git a/Content.Shared/Salvage/Expeditions/Modifiers/IBiomeSpecificMod.cs b/Content.Shared/Salvage/Expeditions/Modifiers/IBiomeSpecificMod.cs index f379df9a4c..d0c4916265 100644 --- a/Content.Shared/Salvage/Expeditions/Modifiers/IBiomeSpecificMod.cs +++ b/Content.Shared/Salvage/Expeditions/Modifiers/IBiomeSpecificMod.cs @@ -1,3 +1,5 @@ +using Robust.Shared.Prototypes; + namespace Content.Shared.Salvage.Expeditions.Modifiers; public interface IBiomeSpecificMod : ISalvageMod @@ -5,5 +7,5 @@ public interface IBiomeSpecificMod : ISalvageMod /// /// Whitelist for biomes. If null then any biome is allowed. /// - List? Biomes { get; } + List>? Biomes { get; } } diff --git a/Content.Shared/Salvage/Expeditions/Modifiers/SalvageAirMod.cs b/Content.Shared/Salvage/Expeditions/Modifiers/SalvageAirMod.cs index fda08281b0..b1a72a3110 100644 --- a/Content.Shared/Salvage/Expeditions/Modifiers/SalvageAirMod.cs +++ b/Content.Shared/Salvage/Expeditions/Modifiers/SalvageAirMod.cs @@ -1,6 +1,5 @@ using Content.Shared.Atmos; using Robust.Shared.Prototypes; -using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.List; namespace Content.Shared.Salvage.Expeditions.Modifiers; @@ -24,8 +23,8 @@ public sealed partial class SalvageAirMod : IPrototype, IBiomeSpecificMod public float Cost { get; private set; } = 0f; /// - [DataField("biomes", customTypeSerializer: typeof(PrototypeIdListSerializer))] - public List? Biomes { get; private set; } = null; + [DataField] + public List>? Biomes { get; private set; } = null; /// /// Set to true if this planet will have no atmosphere. diff --git a/Content.Shared/Salvage/Expeditions/Modifiers/SalvageDungeonModPrototype.cs b/Content.Shared/Salvage/Expeditions/Modifiers/SalvageDungeonModPrototype.cs index c8fc22c2af..69c0e3af88 100644 --- a/Content.Shared/Salvage/Expeditions/Modifiers/SalvageDungeonModPrototype.cs +++ b/Content.Shared/Salvage/Expeditions/Modifiers/SalvageDungeonModPrototype.cs @@ -1,7 +1,5 @@ using Content.Shared.Procedural; using Robust.Shared.Prototypes; -using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype; -using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.List; namespace Content.Shared.Salvage.Expeditions.Modifiers; @@ -17,8 +15,8 @@ public sealed partial class SalvageDungeonModPrototype : IPrototype, IBiomeSpeci public float Cost { get; private set; } = 0f; /// - [DataField("biomes", customTypeSerializer: typeof(PrototypeIdListSerializer))] - public List? Biomes { get; private set; } = null; + [DataField] + public List>? Biomes { get; private set; } = null; /// /// The config to use for spawning the dungeon. diff --git a/Content.Shared/Salvage/Expeditions/Modifiers/SalvageLightMod.cs b/Content.Shared/Salvage/Expeditions/Modifiers/SalvageLightMod.cs index 8acfd8b7c4..9556899353 100644 --- a/Content.Shared/Salvage/Expeditions/Modifiers/SalvageLightMod.cs +++ b/Content.Shared/Salvage/Expeditions/Modifiers/SalvageLightMod.cs @@ -1,5 +1,4 @@ using Robust.Shared.Prototypes; -using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.List; namespace Content.Shared.Salvage.Expeditions.Modifiers; @@ -15,8 +14,8 @@ public sealed partial class SalvageLightMod : IPrototype, IBiomeSpecificMod public float Cost { get; private set; } = 0f; /// - [DataField("biomes", customTypeSerializer: typeof(PrototypeIdListSerializer))] - public List? Biomes { get; private set; } = null; + [DataField] + public List>? Biomes { get; private set; } = null; [DataField("color", required: true)] public Color? Color; } diff --git a/Content.Shared/Salvage/Expeditions/Modifiers/SalvageTemperatureMod.cs b/Content.Shared/Salvage/Expeditions/Modifiers/SalvageTemperatureMod.cs index 8871c14572..d48ea7bd3a 100644 --- a/Content.Shared/Salvage/Expeditions/Modifiers/SalvageTemperatureMod.cs +++ b/Content.Shared/Salvage/Expeditions/Modifiers/SalvageTemperatureMod.cs @@ -1,5 +1,4 @@ using Robust.Shared.Prototypes; -using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.List; namespace Content.Shared.Salvage.Expeditions.Modifiers; @@ -15,8 +14,8 @@ public sealed partial class SalvageTemperatureMod : IPrototype, IBiomeSpecificMo public float Cost { get; private set; } = 0f; /// - [DataField("biomes", customTypeSerializer: typeof(PrototypeIdListSerializer))] - public List? Biomes { get; private set; } = null; + [DataField] + public List>? Biomes { get; private set; } = null; /// /// Temperature in the planets air mix. diff --git a/Content.Shared/Salvage/Expeditions/Modifiers/SalvageWeatherMod.cs b/Content.Shared/Salvage/Expeditions/Modifiers/SalvageWeatherMod.cs index 1f3b13daee..8bf0614b46 100644 --- a/Content.Shared/Salvage/Expeditions/Modifiers/SalvageWeatherMod.cs +++ b/Content.Shared/Salvage/Expeditions/Modifiers/SalvageWeatherMod.cs @@ -1,7 +1,6 @@ using Content.Shared.Weather; using Robust.Shared.Prototypes; using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype; -using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.List; namespace Content.Shared.Salvage.Expeditions.Modifiers; @@ -17,8 +16,8 @@ public sealed partial class SalvageWeatherMod : IPrototype, IBiomeSpecificMod public float Cost { get; private set; } = 0f; /// - [DataField("biomes", customTypeSerializer: typeof(PrototypeIdListSerializer))] - public List? Biomes { get; private set; } = null; + [DataField] + public List>? Biomes { get; private set; } = null; /// /// Weather prototype to use on the planet. diff --git a/Content.Shared/Silicons/Borgs/Components/ItemBorgModuleComponent.cs b/Content.Shared/Silicons/Borgs/Components/ItemBorgModuleComponent.cs index 75835d0cf0..e86edb3476 100644 --- a/Content.Shared/Silicons/Borgs/Components/ItemBorgModuleComponent.cs +++ b/Content.Shared/Silicons/Borgs/Components/ItemBorgModuleComponent.cs @@ -1,7 +1,6 @@ using Robust.Shared.Containers; using Robust.Shared.GameStates; using Robust.Shared.Prototypes; -using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.List; namespace Content.Shared.Silicons.Borgs.Components; @@ -14,8 +13,8 @@ public sealed partial class ItemBorgModuleComponent : Component /// /// The items that are provided. /// - [DataField("items", customTypeSerializer: typeof(PrototypeIdListSerializer), required: true)] - public List Items = new(); + [DataField(required: true)] + public List Items = new(); /// /// The entities from that were spawned. diff --git a/Content.Shared/Silicons/Laws/SiliconLawsetPrototype.cs b/Content.Shared/Silicons/Laws/SiliconLawsetPrototype.cs index a3861504e9..9f33521d8f 100644 --- a/Content.Shared/Silicons/Laws/SiliconLawsetPrototype.cs +++ b/Content.Shared/Silicons/Laws/SiliconLawsetPrototype.cs @@ -1,7 +1,5 @@ -using Content.Shared.FixedPoint; -using Robust.Shared.Prototypes; +using Robust.Shared.Prototypes; using Robust.Shared.Serialization; -using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.List; namespace Content.Shared.Silicons.Laws; @@ -71,8 +69,8 @@ public sealed partial class SiliconLawsetPrototype : IPrototype /// /// List of law prototype ids in this lawset. /// - [DataField(required: true, customTypeSerializer: typeof(PrototypeIdListSerializer))] - public List Laws = new(); + [DataField(required: true)] + public List> Laws = new(); /// /// What entity the lawset considers as a figure of authority. diff --git a/Content.Shared/Singularity/Components/SharedEmitterComponent.cs b/Content.Shared/Singularity/Components/SharedEmitterComponent.cs index c2e7af717b..dce2f92d0c 100644 --- a/Content.Shared/Singularity/Components/SharedEmitterComponent.cs +++ b/Content.Shared/Singularity/Components/SharedEmitterComponent.cs @@ -4,7 +4,6 @@ using Robust.Shared.GameStates; using Robust.Shared.Prototypes; using Robust.Shared.Serialization; using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype; -using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.List; using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.Dictionary; namespace Content.Shared.Singularity.Components; @@ -31,8 +30,8 @@ public sealed partial class EmitterComponent : Component [DataField("boltType", customTypeSerializer: typeof(PrototypeIdSerializer))] public string BoltType = "EmitterBolt"; - [DataField("selectableTypes", customTypeSerializer: typeof(PrototypeIdListSerializer))] - public List SelectableTypes = new(); + [DataField] + public List SelectableTypes = new(); /// /// The current amount of power being used. diff --git a/Content.Shared/SurveillanceCamera/SharedSurveillanceCameraMonitorSystem.cs b/Content.Shared/SurveillanceCamera/SharedSurveillanceCameraMonitorSystem.cs index cc6193a090..aa03e7aee9 100644 --- a/Content.Shared/SurveillanceCamera/SharedSurveillanceCameraMonitorSystem.cs +++ b/Content.Shared/SurveillanceCamera/SharedSurveillanceCameraMonitorSystem.cs @@ -1,3 +1,5 @@ +using Content.Shared.DeviceNetwork; +using Robust.Shared.Prototypes; using Robust.Shared.Serialization; namespace Content.Shared.SurveillanceCamera; @@ -83,11 +85,11 @@ public sealed class SurveillanceCameraSetupBoundUiState : BoundUserInterfaceStat { public string Name { get; } public uint Network { get; } - public List Networks { get; } + public List> Networks { get; } public bool NameDisabled { get; } public bool NetworkDisabled { get; } - public SurveillanceCameraSetupBoundUiState(string name, uint network, List networks, bool nameDisabled, bool networkDisabled) + public SurveillanceCameraSetupBoundUiState(string name, uint network, List> networks, bool nameDisabled, bool networkDisabled) { Name = name; Network = network; diff --git a/Content.Shared/Tiles/FloorTileComponent.cs b/Content.Shared/Tiles/FloorTileComponent.cs index 92208a76d4..5b9c48ca8b 100644 --- a/Content.Shared/Tiles/FloorTileComponent.cs +++ b/Content.Shared/Tiles/FloorTileComponent.cs @@ -1,7 +1,7 @@ using Content.Shared.Maps; using Robust.Shared.Audio; using Robust.Shared.GameStates; -using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.List; +using Robust.Shared.Prototypes; namespace Content.Shared.Tiles { @@ -12,8 +12,8 @@ namespace Content.Shared.Tiles [RegisterComponent, NetworkedComponent] public sealed partial class FloorTileComponent : Component { - [DataField("outputs", customTypeSerializer: typeof(PrototypeIdListSerializer))] - public List? OutputTiles; + [DataField] + public List>? Outputs; [DataField("placeTileSound")] public SoundSpecifier PlaceTileSound = new SoundPathSpecifier("/Audio/Items/genhit.ogg") diff --git a/Content.Shared/Tiles/FloorTileSystem.cs b/Content.Shared/Tiles/FloorTileSystem.cs index 67283eeea0..298c0390ba 100644 --- a/Content.Shared/Tiles/FloorTileSystem.cs +++ b/Content.Shared/Tiles/FloorTileSystem.cs @@ -2,7 +2,6 @@ using System.Diagnostics.CodeAnalysis; using System.Linq; using System.Numerics; using Content.Shared.Administration.Logs; -using Content.Shared.Audio; using Content.Shared.Database; using Content.Shared.Interaction; using Content.Shared.Maps; @@ -17,7 +16,6 @@ using Robust.Shared.Network; using Robust.Shared.Physics; using Robust.Shared.Physics.Components; using Robust.Shared.Physics.Systems; -using Robust.Shared.Random; using Robust.Shared.Timing; namespace Content.Shared.Tiles; @@ -60,7 +58,7 @@ public sealed class FloorTileSystem : EntitySystem if (!TryComp(uid, out var stack)) return; - if (component.OutputTiles == null) + if (component.Outputs == null) return; // this looks a bit sussy but it might be because it needs to be able to place off of grids and expand them @@ -127,7 +125,7 @@ public sealed class FloorTileSystem : EntitySystem } TryComp(location.EntityId, out var mapGrid); - foreach (var currentTile in component.OutputTiles) + foreach (var currentTile in component.Outputs) { var currentTileDefinition = (ContentTileDefinition) _tileDefinitionManager[currentTile]; @@ -167,7 +165,7 @@ public sealed class FloorTileSystem : EntitySystem var gridXform = Transform(grid); _transform.SetWorldPosition((grid, gridXform), locationMap.Position); location = new EntityCoordinates(grid, Vector2.Zero); - PlaceAt(args.User, grid, grid.Comp, location, _tileDefinitionManager[component.OutputTiles[0]].TileId, component.PlaceTileSound, grid.Comp.TileSize / 2f); + PlaceAt(args.User, grid, grid.Comp, location, _tileDefinitionManager[component.Outputs[0]].TileId, component.PlaceTileSound, grid.Comp.TileSize / 2f); return; } }