diff --git a/Content.Server/Chemistry/EntitySystems/SolutionHeaterSystem.cs b/Content.Server/Chemistry/EntitySystems/SolutionHeaterSystem.cs index 1508f326d8..a4dbc10d88 100644 --- a/Content.Server/Chemistry/EntitySystems/SolutionHeaterSystem.cs +++ b/Content.Server/Chemistry/EntitySystems/SolutionHeaterSystem.cs @@ -102,7 +102,7 @@ public sealed class SolutionHeaterSystem : EntitySystem foreach (var heatingEntity in placer.PlacedEntities) { if (!flammable.OnFire) - return; + continue; if (!TryComp(heatingEntity, out var container)) continue; diff --git a/Content.Server/_CP14/Temperature/Fireplace/CP14FireplaceComponent.cs b/Content.Server/_CP14/Temperature/Fireplace/CP14FireplaceComponent.cs index a8949a90fe..62c99e9e80 100644 --- a/Content.Server/_CP14/Temperature/Fireplace/CP14FireplaceComponent.cs +++ b/Content.Server/_CP14/Temperature/Fireplace/CP14FireplaceComponent.cs @@ -28,7 +28,7 @@ public sealed partial class CP14FireplaceComponent : Component /// current fuel quantity /// [DataField] - public float CurrentFuel = 10f; + public float Fuel = 10f; /// /// how much fuel is wasted every "UpdateFrequency" diff --git a/Content.Server/_CP14/Temperature/Fireplace/CP14FireplaceSystem.cs b/Content.Server/_CP14/Temperature/Fireplace/CP14FireplaceSystem.cs index 02575a7a70..c0d24707eb 100644 --- a/Content.Server/_CP14/Temperature/Fireplace/CP14FireplaceSystem.cs +++ b/Content.Server/_CP14/Temperature/Fireplace/CP14FireplaceSystem.cs @@ -41,7 +41,9 @@ public sealed partial class CP14FireplaceSystem : EntitySystem private bool TryFoundFuelInStorage(Entity fireplace, out Entity? fuel) { fuel = null; - var container = _containerSystem.GetContainer(fireplace, fireplace.Comp.ContainerId); + + if (!_containerSystem.TryGetContainer(fireplace, fireplace.Comp.ContainerId, out var container)) + return false; if (container.ContainedEntities.Count == 0) return false; @@ -63,7 +65,7 @@ public sealed partial class CP14FireplaceSystem : EntitySystem if (!TryComp(uid, out var flammable)) return; - component.CurrentFuel += fuel.Comp.CP14FireplaceFuel; + component.Fuel += fuel.Comp.CP14FireplaceFuel; if (flammable.OnFire) _audio.PlayPvs(component.InsertFuelSound, uid); @@ -93,9 +95,9 @@ public sealed partial class CP14FireplaceSystem : EntitySystem fireplace.NextUpdateTime = _timing.CurTime + fireplace.UpdateFrequency; - if (fireplace.CurrentFuel >= fireplace.FuelDrainingPerUpdate) + if (fireplace.Fuel >= fireplace.FuelDrainingPerUpdate) { - fireplace.CurrentFuel -= fireplace.FuelDrainingPerUpdate; + fireplace.Fuel -= fireplace.FuelDrainingPerUpdate; UpdateAppearance(uid, fireplace); flammable.FirestackFade = fireplace.FireFadeDelta; } @@ -114,13 +116,13 @@ public sealed partial class CP14FireplaceSystem : EntitySystem if (!Resolve(uid, ref fireplace, ref appearance)) return; - if (fireplace.CurrentFuel < fireplace.FuelDrainingPerUpdate) + if (fireplace.Fuel < fireplace.FuelDrainingPerUpdate) { _appearance.SetData(uid, FireplaceFuelVisuals.Status, FireplaceFuelStatus.Empty, appearance); return; } - if (fireplace.CurrentFuel < fireplace.MaxFuelLimit / 2) + if (fireplace.Fuel < fireplace.MaxFuelLimit / 2) _appearance.SetData(uid, FireplaceFuelVisuals.Status, FireplaceFuelStatus.Medium, appearance); else _appearance.SetData(uid, FireplaceFuelVisuals.Status, FireplaceFuelStatus.Full, appearance); diff --git a/Content.Shared/Storage/EntitySystems/SharedStorageSystem.cs b/Content.Shared/Storage/EntitySystems/SharedStorageSystem.cs index 66f0e7963c..38b0dcea1c 100644 --- a/Content.Shared/Storage/EntitySystems/SharedStorageSystem.cs +++ b/Content.Shared/Storage/EntitySystems/SharedStorageSystem.cs @@ -351,8 +351,10 @@ public abstract class SharedStorageSystem : EntitySystem if (HasComp(uid)) return; - if (HasComp(uid) && !storageComp.CP14CanStorageSolutionManagers) //CP14 bandage + if (storageComp.CP14Ignorelist != null && storageComp.CP14Ignorelist.IsValid(args.Used)) + { return; + } PlayerInsertHeldEntity(uid, args.User, storageComp); // Always handle it, even if insertion fails. diff --git a/Content.Shared/Storage/StorageComponent.cs b/Content.Shared/Storage/StorageComponent.cs index 0ea1baeb40..d4026b1f6f 100644 --- a/Content.Shared/Storage/StorageComponent.cs +++ b/Content.Shared/Storage/StorageComponent.cs @@ -123,13 +123,12 @@ namespace Content.Shared.Storage [DataField, ViewVariables(VVAccess.ReadWrite)] public StorageDefaultOrientation? DefaultStorageOrientation; + /// - /// CrystallPunk bandage. We need to put in both objects and liquids. - /// This avoids situations where a player puts a bucket into the cauldron - /// instead of pouring liquid from the bucket into the cauldron. + /// these items will be interrupted as early as the attempted interaction stage. Allows you to use some tools /// [DataField] - public bool CP14CanStorageSolutionManagers = true; + public EntityWhitelist? CP14Ignorelist; [Serializable, NetSerializable] public enum StorageUiKey : byte diff --git a/Resources/Prototypes/_CP14/Entities/Objects/Specific/Alchemy/tools.yml b/Resources/Prototypes/_CP14/Entities/Objects/Specific/Alchemy/tools.yml index 11b8b42a1e..2f52f61057 100644 --- a/Resources/Prototypes/_CP14/Entities/Objects/Specific/Alchemy/tools.yml +++ b/Resources/Prototypes/_CP14/Entities/Objects/Specific/Alchemy/tools.yml @@ -74,6 +74,9 @@ description: A device for conveniently grinding various materials into liquid parent: BaseItem components: + - type: Tag + tags: + - CP14Pestle - type: Item size: Tiny - type: Sprite @@ -138,7 +141,11 @@ fillBaseName: liq- - type: Storage maxItemSize: Normal - cP14CanStorageSolutionManagers: false + cP14Ignorelist: + components: + - Injector + tags: + - CP14Pestle whitelist: tags: - CP14FitInMortar diff --git a/Resources/Prototypes/_CP14/Entities/Structures/Furniture/wallmount_torch.yml b/Resources/Prototypes/_CP14/Entities/Structures/Furniture/wallmount_torch.yml index 5a8ba25896..243f8cee16 100644 --- a/Resources/Prototypes/_CP14/Entities/Structures/Furniture/wallmount_torch.yml +++ b/Resources/Prototypes/_CP14/Entities/Structures/Furniture/wallmount_torch.yml @@ -54,8 +54,8 @@ types: Heat: 0 - type: CP14Fireplace - maxFuelLimit: 150 - currentFuel: 150 + maxFuelLimit: 200 + fuel: 200 - type: FireVisuals sprite: _CP14/Structures/Furniture/wallmount_torch.rsi normalState: fire diff --git a/Resources/Prototypes/_CP14/Entities/Structures/Specific/Alchemy/heater.yml b/Resources/Prototypes/_CP14/Entities/Structures/Specific/Alchemy/heater.yml index 79a2eb6c37..977192b3e7 100644 --- a/Resources/Prototypes/_CP14/Entities/Structures/Specific/Alchemy/heater.yml +++ b/Resources/Prototypes/_CP14/Entities/Structures/Specific/Alchemy/heater.yml @@ -65,7 +65,7 @@ suffix: DEBUG components: - type: CP14Fireplace - currentFuel: 100 + fuel: 100 fuelDrainingPerUpdate: 0 - type: entity diff --git a/Resources/Prototypes/_CP14/Recipes/Reactions/biological.yml b/Resources/Prototypes/_CP14/Recipes/Reactions/biological.yml index 314a504ec0..8502870e71 100644 --- a/Resources/Prototypes/_CP14/Recipes/Reactions/biological.yml +++ b/Resources/Prototypes/_CP14/Recipes/Reactions/biological.yml @@ -74,8 +74,8 @@ CP14BloodGrassSap: amount: 0.5 products: - CP14BasicEffectEmpty: 0.5 - CP14BasicEffectSatiateHunger: 0.25 + CP14BasicEffectEmpty: 0.25 + CP14BasicEffectSatiateHunger: 0.5 CP14BasicEffectHealBrute: 0.25 effects: - !type:CP14AffectSolutionTemperature diff --git a/Resources/Prototypes/_CP14/Recipes/Reactions/chromium_inverse.yml b/Resources/Prototypes/_CP14/Recipes/Reactions/chromium_inverse.yml index d17228b960..2dd886c0fe 100644 --- a/Resources/Prototypes/_CP14/Recipes/Reactions/chromium_inverse.yml +++ b/Resources/Prototypes/_CP14/Recipes/Reactions/chromium_inverse.yml @@ -4,12 +4,12 @@ conserveEnergy: false reactants: CP14BasicEffectHealBrute: - amount: 1 + amount: 0.5 CP14ChromiumSlime: amount: 0.5 products: - CP14BasicEffectDamageBrute: 0.3 - CP14BasicEffectEmpty: 0.2 + CP14BasicEffectDamageBrute: 0.5 + CP14BasicEffectEmpty: 0.5 effects: - !type:CP14AffectSolutionTemperature addTemperature: -350 @@ -24,8 +24,8 @@ CP14ChromiumSlime: amount: 0.5 products: - CP14BasicEffectHealBrute: 0.3 - CP14BasicEffectEmpty: 0.2 + CP14BasicEffectHealBrute: 0.5 + CP14BasicEffectEmpty: 0.5 effects: - !type:CP14AffectSolutionTemperature addTemperature: -350 @@ -40,8 +40,8 @@ CP14ChromiumSlime: amount: 0.5 products: - CP14BasicEffectDamagePoison: 0.3 - CP14BasicEffectEmpty: 0.2 + CP14BasicEffectDamagePoison: 0.5 + CP14BasicEffectEmpty: 0.5 effects: - !type:CP14AffectSolutionTemperature addTemperature: -350 @@ -56,8 +56,8 @@ CP14ChromiumSlime: amount: 0.5 products: - CP14BasicEffectHealPoison: 0.3 - CP14BasicEffectEmpty: 0.2 + CP14BasicEffectHealPoison: 0.5 + CP14BasicEffectEmpty: 0.5 effects: - !type:CP14AffectSolutionTemperature addTemperature: -350 \ No newline at end of file diff --git a/Resources/Prototypes/_CP14/tags.yml b/Resources/Prototypes/_CP14/tags.yml index 52c1a87995..ea0e446fd6 100644 --- a/Resources/Prototypes/_CP14/tags.yml +++ b/Resources/Prototypes/_CP14/tags.yml @@ -17,4 +17,7 @@ id: CP14HerbalGathering - type: Tag - id: CP14FitInMortar \ No newline at end of file + id: CP14FitInMortar + +- type: Tag + id: CP14Pestle \ No newline at end of file