Rip out remaining machine upgrades (#24413)
* Rip out remaining machine upgrades * eek
This commit is contained in:
@@ -1,6 +1,4 @@
|
||||
using Content.Shared.Atmos;
|
||||
using Content.Shared.Construction.Prototypes;
|
||||
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
|
||||
|
||||
namespace Content.Server.Atmos.Piping.Binary.Components
|
||||
{
|
||||
@@ -19,28 +17,10 @@ namespace Content.Server.Atmos.Piping.Binary.Components
|
||||
[DataField("outlet")]
|
||||
public string OutletName { get; set; } = "outlet";
|
||||
|
||||
[ViewVariables(VVAccess.ReadWrite)]
|
||||
[DataField, ViewVariables(VVAccess.ReadWrite)]
|
||||
public float MinTemp = 300 + Atmospherics.T0C;
|
||||
|
||||
[DataField("BaseMinTemp")]
|
||||
public float BaseMinTemp = 300 + Atmospherics.T0C;
|
||||
|
||||
[DataField("machinePartMinTemp", customTypeSerializer: typeof(PrototypeIdSerializer<MachinePartPrototype>))]
|
||||
public string MachinePartMinTemp = "Capacitor";
|
||||
|
||||
[DataField("partRatingMinTempMultiplier")]
|
||||
public float PartRatingMinTempMultiplier = 0.95f;
|
||||
|
||||
[ViewVariables(VVAccess.ReadWrite)]
|
||||
[DataField, ViewVariables(VVAccess.ReadWrite)]
|
||||
public float MinPressure = 30 * Atmospherics.OneAtmosphere;
|
||||
|
||||
[DataField("BaseMinPressure")]
|
||||
public float BaseMinPressure = 30 * Atmospherics.OneAtmosphere;
|
||||
|
||||
[DataField("machinePartMinPressure", customTypeSerializer: typeof(PrototypeIdSerializer<MachinePartPrototype>))]
|
||||
public string MachinePartMinPressure = "Manipulator";
|
||||
|
||||
[DataField("partRatingMinPressureMultiplier")]
|
||||
public float PartRatingMinPressureMultiplier = 0.8f;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
using Content.Server.Atmos.EntitySystems;
|
||||
using Content.Server.Atmos.Piping.Binary.Components;
|
||||
using Content.Server.Atmos.Piping.Components;
|
||||
using Content.Server.Construction;
|
||||
using Content.Server.NodeContainer;
|
||||
using Content.Server.NodeContainer.EntitySystems;
|
||||
using Content.Server.NodeContainer.Nodes;
|
||||
@@ -29,8 +28,6 @@ namespace Content.Server.Atmos.Piping.Binary.EntitySystems
|
||||
SubscribeLocalEvent<GasRecyclerComponent, AtmosDeviceUpdateEvent>(OnUpdate);
|
||||
SubscribeLocalEvent<GasRecyclerComponent, AtmosDeviceDisabledEvent>(OnDisabled);
|
||||
SubscribeLocalEvent<GasRecyclerComponent, ExaminedEvent>(OnExamined);
|
||||
SubscribeLocalEvent<GasRecyclerComponent, RefreshPartsEvent>(OnRefreshParts);
|
||||
SubscribeLocalEvent<GasRecyclerComponent, UpgradeExamineEvent>(OnUpgradeExamine);
|
||||
}
|
||||
|
||||
private void OnEnabled(EntityUid uid, GasRecyclerComponent comp, ref AtmosDeviceEnabledEvent args)
|
||||
@@ -125,20 +122,5 @@ namespace Content.Server.Atmos.Piping.Binary.EntitySystems
|
||||
|
||||
_appearance.SetData(uid, PumpVisuals.Enabled, comp.Reacting);
|
||||
}
|
||||
|
||||
private void OnRefreshParts(EntityUid uid, GasRecyclerComponent component, RefreshPartsEvent args)
|
||||
{
|
||||
var ratingTemp = args.PartRatings[component.MachinePartMinTemp];
|
||||
var ratingPressure = args.PartRatings[component.MachinePartMinPressure];
|
||||
|
||||
component.MinTemp = component.BaseMinTemp * MathF.Pow(component.PartRatingMinTempMultiplier, ratingTemp - 1);
|
||||
component.MinPressure = component.BaseMinPressure * MathF.Pow(component.PartRatingMinPressureMultiplier, ratingPressure - 1);
|
||||
}
|
||||
|
||||
private void OnUpgradeExamine(EntityUid uid, GasRecyclerComponent component, UpgradeExamineEvent args)
|
||||
{
|
||||
args.AddPercentageUpgrade("gas-recycler-upgrade-min-temp", component.MinTemp / component.BaseMinTemp);
|
||||
args.AddPercentageUpgrade("gas-recycler-upgrade-min-pressure", component.MinPressure / component.BaseMinPressure);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
using Content.Shared.Atmos;
|
||||
using Content.Shared.Construction.Prototypes;
|
||||
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
|
||||
|
||||
namespace Content.Server.Atmos.Portable
|
||||
{
|
||||
@@ -39,51 +37,13 @@ namespace Content.Server.Atmos.Portable
|
||||
/// <summary>
|
||||
/// Maximum internal pressure before it refuses to take more.
|
||||
/// </summary>
|
||||
[ViewVariables(VVAccess.ReadWrite)]
|
||||
[DataField, ViewVariables(VVAccess.ReadWrite)]
|
||||
public float MaxPressure = 2500;
|
||||
|
||||
/// <summary>
|
||||
/// The base amount of maximum internal pressure
|
||||
/// </summary>
|
||||
[DataField("baseMaxPressure")]
|
||||
public float BaseMaxPressure = 2500;
|
||||
|
||||
/// <summary>
|
||||
/// The machine part that modifies the maximum internal pressure
|
||||
/// </summary>
|
||||
[DataField("machinePartMaxPressure", customTypeSerializer: typeof(PrototypeIdSerializer<MachinePartPrototype>))]
|
||||
public string MachinePartMaxPressure = "MatterBin";
|
||||
|
||||
/// <summary>
|
||||
/// How much the <see cref="MachinePartMaxPressure"/> will affect the pressure.
|
||||
/// The value will be multiplied by this amount for each increasing part tier.
|
||||
/// </summary>
|
||||
[DataField("partRatingMaxPressureModifier")]
|
||||
public float PartRatingMaxPressureModifier = 1.5f;
|
||||
|
||||
/// <summary>
|
||||
/// The speed at which gas is scrubbed from the environment.
|
||||
/// </summary>
|
||||
[ViewVariables(VVAccess.ReadWrite)]
|
||||
[DataField, ViewVariables(VVAccess.ReadWrite)]
|
||||
public float TransferRate = 800;
|
||||
|
||||
/// <summary>
|
||||
/// The base speed at which gas is scrubbed from the environment.
|
||||
/// </summary>
|
||||
[DataField("baseTransferRate")]
|
||||
public float BaseTransferRate = 800;
|
||||
|
||||
/// <summary>
|
||||
/// The machine part which modifies the speed of <see cref="TransferRate"/>
|
||||
/// </summary>
|
||||
[DataField("machinePartTransferRate", customTypeSerializer: typeof(PrototypeIdSerializer<MachinePartPrototype>))]
|
||||
public string MachinePartTransferRate = "Manipulator";
|
||||
|
||||
/// <summary>
|
||||
/// How much the <see cref="MachinePartTransferRate"/> will modify the rate.
|
||||
/// The value will be multiplied by this amount for each increasing part tier.
|
||||
/// </summary>
|
||||
[DataField("partRatingTransferRateModifier")]
|
||||
public float PartRatingTransferRateModifier = 1.4f;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,7 +12,6 @@ using Content.Server.NodeContainer.Nodes;
|
||||
using Content.Server.NodeContainer.NodeGroups;
|
||||
using Content.Server.Audio;
|
||||
using Content.Server.Administration.Logs;
|
||||
using Content.Server.Construction;
|
||||
using Content.Server.NodeContainer.EntitySystems;
|
||||
using Content.Shared.Database;
|
||||
|
||||
@@ -39,8 +38,6 @@ namespace Content.Server.Atmos.Portable
|
||||
SubscribeLocalEvent<PortableScrubberComponent, ExaminedEvent>(OnExamined);
|
||||
SubscribeLocalEvent<PortableScrubberComponent, DestructionEventArgs>(OnDestroyed);
|
||||
SubscribeLocalEvent<PortableScrubberComponent, GasAnalyzerScanEvent>(OnScrubberAnalyzed);
|
||||
SubscribeLocalEvent<PortableScrubberComponent, RefreshPartsEvent>(OnRefreshParts);
|
||||
SubscribeLocalEvent<PortableScrubberComponent, UpgradeExamineEvent>(OnUpgradeExamine);
|
||||
}
|
||||
|
||||
private bool IsFull(PortableScrubberComponent component)
|
||||
@@ -170,20 +167,5 @@ namespace Content.Server.Atmos.Portable
|
||||
}
|
||||
args.GasMixtures = gasMixDict;
|
||||
}
|
||||
|
||||
private void OnRefreshParts(EntityUid uid, PortableScrubberComponent component, RefreshPartsEvent args)
|
||||
{
|
||||
var pressureRating = args.PartRatings[component.MachinePartMaxPressure];
|
||||
var transferRating = args.PartRatings[component.MachinePartTransferRate];
|
||||
|
||||
component.MaxPressure = component.BaseMaxPressure * MathF.Pow(component.PartRatingMaxPressureModifier, pressureRating - 1);
|
||||
component.TransferRate = component.BaseTransferRate * MathF.Pow(component.PartRatingTransferRateModifier, transferRating - 1);
|
||||
}
|
||||
|
||||
private void OnUpgradeExamine(EntityUid uid, PortableScrubberComponent component, UpgradeExamineEvent args)
|
||||
{
|
||||
args.AddPercentageUpgrade("portable-scrubber-component-upgrade-max-pressure", component.MaxPressure / component.BaseMaxPressure);
|
||||
args.AddPercentageUpgrade("portable-scrubber-component-upgrade-transfer-rate", component.TransferRate / component.BaseTransferRate);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user