Add gas selling to tanks too (#11304)
This commit is contained in:
@@ -1,16 +1,15 @@
|
||||
using Content.Server.Atmos.Components;
|
||||
using Content.Server.Body.Components;
|
||||
using Content.Server.Body.Systems;
|
||||
using Content.Server.Cargo.Systems;
|
||||
using Content.Server.Explosion.EntitySystems;
|
||||
using Content.Server.UserInterface;
|
||||
using Content.Shared.Actions;
|
||||
using Content.Shared.Atmos;
|
||||
using Content.Shared.Atmos.Components;
|
||||
using Content.Shared.Audio;
|
||||
using Content.Shared.Interaction.Events;
|
||||
using Content.Shared.Toggleable;
|
||||
using Content.Shared.Examine;
|
||||
using Content.Shared.Inventory;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Server.GameObjects;
|
||||
using Robust.Server.Player;
|
||||
@@ -45,6 +44,7 @@ namespace Content.Server.Atmos.EntitySystems
|
||||
SubscribeLocalEvent<GasTankComponent, GasTankSetPressureMessage>(OnGasTankSetPressure);
|
||||
SubscribeLocalEvent<GasTankComponent, GasTankToggleInternalsMessage>(OnGasTankToggleInternals);
|
||||
SubscribeLocalEvent<GasTankComponent, GasAnalyzerScanEvent>(OnAnalyzed);
|
||||
SubscribeLocalEvent<GasTankComponent, PriceCalculationEvent>(OnGasTankPrice);
|
||||
}
|
||||
|
||||
private void OnGasShutdown(EntityUid uid, GasTankComponent component, ComponentShutdown args)
|
||||
@@ -332,5 +332,10 @@ namespace Content.Server.Atmos.EntitySystems
|
||||
{
|
||||
args.GasMixtures = new Dictionary<string, GasMixture?> { {Name(uid), component.Air} };
|
||||
}
|
||||
|
||||
private void OnGasTankPrice(EntityUid uid, GasTankComponent component, ref PriceCalculationEvent args)
|
||||
{
|
||||
args.Price += _atmosphereSystem.GetPrice(component.Air);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user