diff --git a/Content.Server/Anomaly/Effects/AnomalyCoreSystem.cs b/Content.Server/Anomaly/Effects/AnomalyCoreSystem.cs index dea116a65e..bb19216cb1 100644 --- a/Content.Server/Anomaly/Effects/AnomalyCoreSystem.cs +++ b/Content.Server/Anomaly/Effects/AnomalyCoreSystem.cs @@ -1,5 +1,5 @@ -using Content.Server.Cargo.Systems; using Content.Shared.Anomaly.Components; +using Content.Shared.Cargo; using Robust.Shared.Timing; namespace Content.Server.Anomaly.Effects; diff --git a/Content.Server/Armor/ArmorSystem.cs b/Content.Server/Armor/ArmorSystem.cs index 915210419b..4ec71f217e 100644 --- a/Content.Server/Armor/ArmorSystem.cs +++ b/Content.Server/Armor/ArmorSystem.cs @@ -1,5 +1,5 @@ -using Content.Server.Cargo.Systems; using Content.Shared.Armor; +using Content.Shared.Cargo; using Robust.Shared.Prototypes; using Content.Shared.Damage.Prototypes; diff --git a/Content.Server/Atmos/EntitySystems/GasTankSystem.cs b/Content.Server/Atmos/EntitySystems/GasTankSystem.cs index 08177a7d95..420db3f732 100644 --- a/Content.Server/Atmos/EntitySystems/GasTankSystem.cs +++ b/Content.Server/Atmos/EntitySystems/GasTankSystem.cs @@ -1,8 +1,8 @@ -using Content.Server.Cargo.Systems; using Content.Server.Explosion.EntitySystems; using Content.Shared.Atmos; using Content.Shared.Atmos.Components; using Content.Shared.Atmos.EntitySystems; +using Content.Shared.Cargo; using Content.Shared.Throwing; using JetBrains.Annotations; using Robust.Server.GameObjects; diff --git a/Content.Server/Atmos/Piping/Unary/EntitySystems/GasCanisterSystem.cs b/Content.Server/Atmos/Piping/Unary/EntitySystems/GasCanisterSystem.cs index a8f505ca5d..14c85620b1 100644 --- a/Content.Server/Atmos/Piping/Unary/EntitySystems/GasCanisterSystem.cs +++ b/Content.Server/Atmos/Piping/Unary/EntitySystems/GasCanisterSystem.cs @@ -1,6 +1,5 @@ using Content.Server.Atmos.EntitySystems; using Content.Server.Atmos.Piping.Components; -using Content.Server.Cargo.Systems; using Content.Server.NodeContainer.EntitySystems; using Content.Server.NodeContainer.NodeGroups; using Content.Server.NodeContainer.Nodes; @@ -8,6 +7,7 @@ using Content.Shared.Atmos; using Content.Shared.Atmos.Components; using Content.Shared.Atmos.Piping.Binary.Components; using Content.Shared.Atmos.Piping.Unary.Systems; +using Content.Shared.Cargo; using Content.Shared.Database; using Content.Shared.NodeContainer; using GasCanisterComponent = Content.Shared.Atmos.Piping.Unary.Components.GasCanisterComponent; diff --git a/Content.Server/Cargo/Systems/PricingSystem.cs b/Content.Server/Cargo/Systems/PricingSystem.cs index 3d8a8075f5..5e449eb8da 100644 --- a/Content.Server/Cargo/Systems/PricingSystem.cs +++ b/Content.Server/Cargo/Systems/PricingSystem.cs @@ -4,6 +4,7 @@ using Content.Server.Cargo.Components; using Content.Shared.Chemistry.EntitySystems; using Content.Shared.Administration; using Content.Shared.Body.Components; +using Content.Shared.Cargo; using Content.Shared.Chemistry.Components.SolutionManager; using Content.Shared.Chemistry.Reagent; using Content.Shared.Materials; @@ -183,10 +184,7 @@ public sealed class PricingSystem : EntitySystem /// public double GetEstimatedPrice(EntityPrototype prototype) { - var ev = new EstimatedPriceCalculationEvent() - { - Prototype = prototype, - }; + var ev = new EstimatedPriceCalculationEvent(prototype); RaiseLocalEvent(ref ev); @@ -399,39 +397,3 @@ public sealed class PricingSystem : EntitySystem return price; } } - -/// -/// A directed by-ref event fired on an entity when something needs to know it's price. This value is not cached. -/// -[ByRefEvent] -public record struct PriceCalculationEvent() -{ - /// - /// The total price of the entity. - /// - public double Price = 0; - - /// - /// Whether this event was already handled. - /// - public bool Handled = false; -} - -/// -/// Raised broadcast for an entity prototype to determine its estimated price. -/// -[ByRefEvent] -public record struct EstimatedPriceCalculationEvent() -{ - public required EntityPrototype Prototype; - - /// - /// The total price of the entity. - /// - public double Price = 0; - - /// - /// Whether this event was already handled. - /// - public bool Handled = false; -} diff --git a/Content.Server/Power/EntitySystems/BatterySystem.cs b/Content.Server/Power/EntitySystems/BatterySystem.cs index a0ce3ddaad..f4e48f4a3d 100644 --- a/Content.Server/Power/EntitySystems/BatterySystem.cs +++ b/Content.Server/Power/EntitySystems/BatterySystem.cs @@ -1,9 +1,8 @@ -using Content.Server.Cargo.Systems; using Content.Server.Emp; using Content.Server.Power.Components; +using Content.Shared.Cargo; using Content.Shared.Examine; using Content.Shared.Rejuvenate; -using Content.Shared.Timing; using JetBrains.Annotations; using Robust.Shared.Utility; using Robust.Shared.Timing; diff --git a/Content.Server/Storage/EntitySystems/SpawnItemsOnUseSystem.cs b/Content.Server/Storage/EntitySystems/SpawnItemsOnUseSystem.cs index 1fd617c539..548fa7bfda 100644 --- a/Content.Server/Storage/EntitySystems/SpawnItemsOnUseSystem.cs +++ b/Content.Server/Storage/EntitySystems/SpawnItemsOnUseSystem.cs @@ -1,6 +1,7 @@ using Content.Server.Administration.Logs; using Content.Server.Cargo.Systems; using Content.Server.Storage.Components; +using Content.Shared.Cargo; using Content.Shared.Database; using Content.Shared.Hands.EntitySystems; using Content.Shared.Interaction.Events; diff --git a/Content.Server/VendingMachines/VendingMachineSystem.cs b/Content.Server/VendingMachines/VendingMachineSystem.cs index bd95c92327..954c5d6ca1 100644 --- a/Content.Server/VendingMachines/VendingMachineSystem.cs +++ b/Content.Server/VendingMachines/VendingMachineSystem.cs @@ -4,6 +4,7 @@ using Content.Server.Cargo.Systems; using Content.Server.Emp; using Content.Server.Power.Components; using Content.Server.Power.EntitySystems; +using Content.Shared.Cargo; using Content.Shared.Damage; using Content.Shared.Destructible; using Content.Shared.DoAfter; diff --git a/Content.Server/Weapons/Ranged/Systems/GunSystem.cs b/Content.Server/Weapons/Ranged/Systems/GunSystem.cs index 6ee3baae65..e04fa9b64c 100644 --- a/Content.Server/Weapons/Ranged/Systems/GunSystem.cs +++ b/Content.Server/Weapons/Ranged/Systems/GunSystem.cs @@ -1,8 +1,8 @@ using System.Linq; using System.Numerics; using Content.Server.Cargo.Systems; -using Content.Server.Power.EntitySystems; using Content.Server.Weapons.Ranged.Components; +using Content.Shared.Cargo; using Content.Shared.Damage; using Content.Shared.Damage.Systems; using Content.Shared.Database; @@ -22,7 +22,6 @@ using Robust.Shared.Player; using Robust.Shared.Prototypes; using Robust.Shared.Utility; using Robust.Shared.Containers; -using Content.Server.PowerCell; namespace Content.Server.Weapons.Ranged.Systems; diff --git a/Content.Server/Xenoarchaeology/Artifact/XenoArtifactSystem.cs b/Content.Server/Xenoarchaeology/Artifact/XenoArtifactSystem.cs index fbea515dc3..312090c9d0 100644 --- a/Content.Server/Xenoarchaeology/Artifact/XenoArtifactSystem.cs +++ b/Content.Server/Xenoarchaeology/Artifact/XenoArtifactSystem.cs @@ -1,4 +1,4 @@ -using Content.Server.Cargo.Systems; +using Content.Shared.Cargo; using Content.Shared.Xenoarchaeology.Artifact; using Content.Shared.Xenoarchaeology.Artifact.Components; diff --git a/Content.Shared/Cargo/PriceCalculationEvent.cs b/Content.Shared/Cargo/PriceCalculationEvent.cs new file mode 100644 index 0000000000..5d1049570d --- /dev/null +++ b/Content.Shared/Cargo/PriceCalculationEvent.cs @@ -0,0 +1,38 @@ +using Robust.Shared.Prototypes; + +namespace Content.Shared.Cargo; + +/// +/// A directed by-ref event fired on an entity when something needs to know its price. This value is not cached. +/// +[ByRefEvent] +public record struct PriceCalculationEvent() +{ + /// + /// The total price of the entity. + /// + public double Price = 0; + + /// + /// Whether this event was already handled. + /// + public bool Handled = false; +} + +/// +/// Raised broadcast for an entity prototype to determine its estimated price. +/// +/// The prototype to estimate the price for. +[ByRefEvent] +public record struct EstimatedPriceCalculationEvent(EntityPrototype Prototype) +{ + /// + /// The total price of the entity. + /// + public double Price = 0; + + /// + /// Whether this event was already handled. + /// + public bool Handled = false; +}