diff --git a/Content.Server/_CP14/Chemistry/ReagentEffect/CP14AffectSolutionTemperature.cs b/Content.Server/_CP14/Chemistry/ReagentEffect/CP14AffectSolutionTemperature.cs index 08387aa241..6dd76560da 100644 --- a/Content.Server/_CP14/Chemistry/ReagentEffect/CP14AffectSolutionTemperature.cs +++ b/Content.Server/_CP14/Chemistry/ReagentEffect/CP14AffectSolutionTemperature.cs @@ -1,5 +1,4 @@ -using Content.Server.Xenoarchaeology.XenoArtifacts; -using Content.Shared.Chemistry.Reagent; +using Content.Shared.EntityEffects; using JetBrains.Annotations; using Robust.Shared.Prototypes; @@ -7,7 +6,7 @@ namespace Content.Server._CP14.Chemistry.ReagentEffect; [UsedImplicitly] [DataDefinition] -public sealed partial class CP14AffectSolutionTemperature : Shared.Chemistry.Reagent.ReagentEffect +public sealed partial class CP14AffectSolutionTemperature : EntityEffect { /// /// Temperature added to the solution. If negative, the solution is cooling. @@ -15,11 +14,6 @@ public sealed partial class CP14AffectSolutionTemperature : Shared.Chemistry.Rea [DataField] private float AddTemperature = -300f; - public override void Effect(ReagentEffectArgs args) - { - if (args.Source != null) - args.Source.Temperature += AddTemperature; - } protected override string? ReagentEffectGuidebookText(IPrototypeManager prototype, IEntitySystemManager entSys) { @@ -27,4 +21,18 @@ public sealed partial class CP14AffectSolutionTemperature : Shared.Chemistry.Rea ("chance", Probability), ("temperature", AddTemperature)); } + + public override void Effect(EntityEffectBaseArgs args) + { + if (args is EntityEffectReagentArgs reagentArgs) + { + if (reagentArgs.Source != null) + reagentArgs.Source.Temperature += AddTemperature; + + return; + } + + // TODO: Someone needs to figure out how to do this for non-reagent effects. + throw new NotImplementedException(); + } } diff --git a/Content.Server/_CP14/Chemistry/ReagentEffect/CP14InverseEffect.cs b/Content.Server/_CP14/Chemistry/ReagentEffect/CP14InverseEffect.cs index 2ee3be5c78..ee8f91c2b1 100644 --- a/Content.Server/_CP14/Chemistry/ReagentEffect/CP14InverseEffect.cs +++ b/Content.Server/_CP14/Chemistry/ReagentEffect/CP14InverseEffect.cs @@ -1,6 +1,7 @@ using Content.Shared.Chemistry.Components; using Content.Shared.Chemistry.EntitySystems; using Content.Shared.Chemistry.Reagent; +using Content.Shared.EntityEffects; using Content.Shared.FixedPoint; using JetBrains.Annotations; using Robust.Shared.Prototypes; @@ -9,7 +10,7 @@ namespace Content.Server._CP14.Chemistry.ReagentEffect; [UsedImplicitly] [DataDefinition] -public sealed partial class CP14InverseEffect : Shared.Chemistry.Reagent.ReagentEffect +public sealed partial class CP14InverseEffect : EntityEffect { [DataField] public Dictionary, ProtoId> Inversion = new(); @@ -18,30 +19,37 @@ public sealed partial class CP14InverseEffect : Shared.Chemistry.Reagent.Reagent return Loc.GetString("cp14-reagent-effect-guidebook-inverse-effect", ("chance", Probability)); } - public override void Effect(ReagentEffectArgs args) + public override void Effect(EntityEffectBaseArgs args) { - if (args.Source == null) - return; - - if (!args.EntityManager.TryGetComponent(args.SolutionEntity, out var solutionComp)) - return; - - var solutionContainer = args.EntityManager.System(); - - var ent = new Entity(args.SolutionEntity, solutionComp); - - Dictionary taskList = new(); - - foreach (var reagent in args.Source.Contents) + if (args is EntityEffectReagentArgs reagentArgs) { - if (Inversion.ContainsKey(reagent.Reagent.Prototype)) - taskList.Add(reagent.Reagent, reagent.Quantity); + if (reagentArgs.Source == null) + return; + + if (!args.EntityManager.TryGetComponent(reagentArgs.SolutionEntity, out var solutionComp)) + return; + + var solutionContainer = args.EntityManager.System(); + + var ent = new Entity(reagentArgs.SolutionEntity, solutionComp); + + Dictionary taskList = new(); + + foreach (var reagent in reagentArgs.Source.Contents) + { + if (Inversion.ContainsKey(reagent.Reagent.Prototype)) + taskList.Add(reagent.Reagent, reagent.Quantity); + } + + foreach (var task in taskList) + { + solutionContainer.RemoveReagent(ent, task.Key, task.Value); + solutionContainer.TryAddReagent(ent, Inversion[task.Key.Prototype].Id, task.Value); + } + return; } - foreach (var task in taskList) - { - solutionContainer.RemoveReagent(ent, task.Key, task.Value); - solutionContainer.TryAddReagent(ent, Inversion[task.Key.Prototype].Id, task.Value); - } + // TODO: Someone needs to figure out how to do this for non-reagent effects. + throw new NotImplementedException(); } } diff --git a/Resources/Prototypes/_CP14/Entities/fire.yml b/Resources/Prototypes/_CP14/Entities/fire.yml index d2f345a52c..1e65ccd65e 100644 --- a/Resources/Prototypes/_CP14/Entities/fire.yml +++ b/Resources/Prototypes/_CP14/Entities/fire.yml @@ -30,11 +30,20 @@ - ItemMask density: 1000 hard: false - - type: Lava - fireStacks: 0.2 - type: StepTrigger requiredTriggeredSpeed: 0 intersectRatio: 0.1 + blacklist: + tags: + - Catwalk + - type: TileEntityEffect + effects: + - !type:FlammableReaction + multiplier: 1.75 + multiplierOnExisting: 0.75 + - !type:Ignite + - type: Transform + anchored: true - type: AmbientSound enabled: true volume: -5