diff --git a/Content.Server/_CP14/Trading/CP14TradingPlatformSystem.cs b/Content.Server/_CP14/Trading/CP14TradingPlatformSystem.cs index 37a76c1f6d..f87d6e23fd 100644 --- a/Content.Server/_CP14/Trading/CP14TradingPlatformSystem.cs +++ b/Content.Server/_CP14/Trading/CP14TradingPlatformSystem.cs @@ -1,6 +1,7 @@ using Content.Server._CP14.Currency; using Content.Server._CP14.MagicEnergy; using Content.Server.Cargo.Systems; +using Content.Server.Storage.Components; using Content.Shared._CP14.MagicEnergy; using Content.Shared._CP14.Trading.Components; using Content.Shared._CP14.Trading.Prototypes; @@ -9,8 +10,10 @@ using Content.Shared.Mobs.Components; using Content.Shared.Mobs.Systems; using Content.Shared.Placeable; using Content.Shared.Popups; +using Content.Shared.Storage; using Content.Shared.Tag; using Robust.Shared.Audio.Systems; +using Robust.Shared.Containers; using Robust.Shared.Prototypes; namespace Content.Server._CP14.Trading; @@ -49,6 +52,14 @@ public sealed partial class CP14TradingPlatformSystem : CP14SharedTradingPlatfor { if (HasComp(placed)) continue; + if (HasComp(placed)) + continue; + if (HasComp(placed)) + continue; + + var proto = MetaData(placed).EntityPrototype; + if (proto != null && !proto.ID.StartsWith("CP14")) //Shitfix, we dont wanna sell anything vanilla (like mob organs) + continue; var placedPrice = _price.GetPrice(placed); diff --git a/Content.Shared/_CP14/MagicEnergy/SharedCP14MagicEnergySystem.cs b/Content.Shared/_CP14/MagicEnergy/SharedCP14MagicEnergySystem.cs index a8abb247a9..4a729cb832 100644 --- a/Content.Shared/_CP14/MagicEnergy/SharedCP14MagicEnergySystem.cs +++ b/Content.Shared/_CP14/MagicEnergy/SharedCP14MagicEnergySystem.cs @@ -105,6 +105,7 @@ public abstract class SharedCP14MagicEnergySystem : EntitySystem deltaEnergy = newEnergy - oldEnergy; ent.Comp.Energy = newEnergy; + Dirty(ent); if (oldEnergy != newEnergy) RaiseLocalEvent(ent, new CP14MagicEnergyLevelChangeEvent(oldEnergy, newEnergy, ent.Comp.MaxEnergy)); @@ -120,14 +121,7 @@ public abstract class SharedCP14MagicEnergySystem : EntitySystem if (!Resolve(ent, ref ent.Comp, false)) return; - var oldEnergy = ent.Comp.Energy; - - ent.Comp.Energy = 0; - - if (oldEnergy != 0) - RaiseLocalEvent(ent, new CP14MagicEnergyLevelChangeEvent(oldEnergy, 0, ent.Comp.MaxEnergy)); - - UpdateMagicAlert((ent, ent.Comp)); + ChangeEnergy(ent, -ent.Comp.Energy, out _, out _); } public void TransferEnergy(Entity sender, diff --git a/Resources/Prototypes/_CP14/Entities/Structures/Specific/Economy/trade_platform.yml b/Resources/Prototypes/_CP14/Entities/Structures/Specific/Economy/trade_platform.yml index 552f6aaaf2..625fb1f10f 100644 --- a/Resources/Prototypes/_CP14/Entities/Structures/Specific/Economy/trade_platform.yml +++ b/Resources/Prototypes/_CP14/Entities/Structures/Specific/Economy/trade_platform.yml @@ -6,6 +6,7 @@ categories: [ ForkFiltered ] components: - type: Sprite + drawdepth: FloorTiles snapCardinals: true sprite: _CP14/Structures/Specific/Economy/buy_platform.rsi layers: @@ -55,6 +56,7 @@ categories: [ ForkFiltered ] components: - type: Sprite + drawdepth: FloorTiles snapCardinals: true sprite: _CP14/Structures/Specific/Economy/buy_platform.rsi layers: