Fix fire extinguisher to use spray solution (#4616)
* Fix fire extinguisher to use spray solution * Fix FireExtinguisher more properly * Re-add missing check to VaporSystem
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using System.Threading.Tasks;
|
||||
using Content.Server.Chemistry.Components;
|
||||
using Content.Server.Fluids.Components;
|
||||
using Content.Shared.Chemistry.EntitySystems;
|
||||
using Content.Shared.Chemistry.Reagent;
|
||||
using Content.Shared.Interaction;
|
||||
@@ -17,7 +18,6 @@ namespace Content.Server.Extinguisher
|
||||
public class FireExtinguisherComponent : Component, IAfterInteract
|
||||
{
|
||||
public override string Name => "FireExtinguisher";
|
||||
private const string SolutionName = "fireExtinguisher";
|
||||
|
||||
[DataField("refillSound")] SoundSpecifier _refillSound = new SoundPathSpecifier("/Audio/Effects/refill.ogg");
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace Content.Server.Extinguisher
|
||||
var targetEntity = eventArgs.Target;
|
||||
if (eventArgs.Target.HasComponent<ReagentTankComponent>()
|
||||
&& solutionContainerSystem.TryGetDrainableSolution(targetEntity.Uid, out var targetSolution)
|
||||
&& solutionContainerSystem.TryGetSolution(Owner, SolutionName, out var container))
|
||||
&& solutionContainerSystem.TryGetDrainableSolution(Owner.Uid, out var container))
|
||||
{
|
||||
var transfer = ReagentUnit.Min(container.AvailableVolume, targetSolution.DrainAvailable);
|
||||
if (transfer > 0)
|
||||
|
||||
Reference in New Issue
Block a user