From 322a3f11c1a916d2de0c0963fae4cf6c91756ded Mon Sep 17 00:00:00 2001 From: Red <96445749+TheShuEd@users.noreply.github.com> Date: Wed, 18 Jun 2025 12:37:18 +0300 Subject: [PATCH] Mini fix pack (#1440) * Update CP14PriceScannerSystem.cs * Update CP14PriceScannerSystem.cs * fix #1435 * fix #1393 --- .../_CP14/Trading/CP14PriceScannerSystem.cs | 25 ++++++------------- .../WeatherEffect/Effects/RefillSolutions.cs | 4 +++ .../Structures/Specific/Alchemy/heater.yml | 1 + 3 files changed, 12 insertions(+), 18 deletions(-) diff --git a/Content.Server/_CP14/Trading/CP14PriceScannerSystem.cs b/Content.Server/_CP14/Trading/CP14PriceScannerSystem.cs index 90baf91166..94f191774b 100644 --- a/Content.Server/_CP14/Trading/CP14PriceScannerSystem.cs +++ b/Content.Server/_CP14/Trading/CP14PriceScannerSystem.cs @@ -1,12 +1,10 @@ -using System.Text; using Content.Server.Cargo.Systems; using Content.Shared._CP14.Currency; using Content.Shared.Examine; -using Content.Shared.Interaction; using Content.Shared.Inventory; using Content.Shared.Tag; using Content.Shared._CP14.Trading.Components; - +using Content.Shared.Mobs.Components; namespace Content.Server._CP14.Trading; @@ -17,7 +15,6 @@ public sealed class CP14PriceScannerSystem : EntitySystem [Dependency] private readonly InventorySystem _invSystem = default!; [Dependency] private readonly CP14SharedCurrencySystem _currency = default!; - public override void Initialize() { SubscribeLocalEvent(OnExamined); @@ -25,29 +22,22 @@ public sealed class CP14PriceScannerSystem : EntitySystem private bool IsAbleExamine(EntityUid uid) { - if (_invSystem.TryGetSlotEntity(uid, "eyes", out var huds) - && HasComp(huds)) - { + if (HasComp(uid)) return true; - } - else if (HasComp(uid)) - { + if (_invSystem.TryGetSlotEntity(uid, "eyes", out var huds) && HasComp(huds)) return true; - } return false; } - private void OnExamined(EntityUid eid, MetaDataComponent component, ExaminedEvent args) + private void OnExamined(EntityUid uid, MetaDataComponent component, ExaminedEvent args) { if (!IsAbleExamine(args.Examiner)) - { return; - } - else if (_tag.HasTag(args.Examined, "CP14Coin")) - { + if (_tag.HasTag(args.Examined, "CP14Coin")) + return; + if (HasComp(uid)) return; - } var getPrice = _price.GetPrice(args.Examined); @@ -59,5 +49,4 @@ public sealed class CP14PriceScannerSystem : EntitySystem args.PushMarkup(priceMsg); } - } diff --git a/Content.Shared/_CP14/WeatherEffect/Effects/RefillSolutions.cs b/Content.Shared/_CP14/WeatherEffect/Effects/RefillSolutions.cs index 9398d34f4c..ea20e913cc 100644 --- a/Content.Shared/_CP14/WeatherEffect/Effects/RefillSolutions.cs +++ b/Content.Shared/_CP14/WeatherEffect/Effects/RefillSolutions.cs @@ -1,5 +1,6 @@ using Content.Shared.Chemistry.EntitySystems; using Content.Shared.Chemistry.Reagent; +using Content.Shared.Nutrition.Components; using Robust.Shared.Prototypes; using Robust.Shared.Random; @@ -18,6 +19,9 @@ public sealed partial class RefillSolutions : CP14WeatherEffect if (!entManager.TryGetComponent(target, out var refillable)) return; + if (entManager.TryGetComponent(target, out var openable) && !openable.Opened) + return; + var solutionSystem = entManager.System(); solutionSystem.TryGetSolution(target, refillable.Solution, out var ent, out var solution); diff --git a/Resources/Prototypes/_CP14/Entities/Structures/Specific/Alchemy/heater.yml b/Resources/Prototypes/_CP14/Entities/Structures/Specific/Alchemy/heater.yml index 498979965c..0b29897a8c 100644 --- a/Resources/Prototypes/_CP14/Entities/Structures/Specific/Alchemy/heater.yml +++ b/Resources/Prototypes/_CP14/Entities/Structures/Specific/Alchemy/heater.yml @@ -100,6 +100,7 @@ normalState: burning - type: Climbable - type: Anchorable + - type: Rotatable - type: Fixtures fixtures: fix1: