Merge remote-tracking branch 'refs/remotes/upstream/master' into ed-13-05-2024-upstream
# Conflicts: # Content.Shared/Lock/LockSystem.cs # Resources/Prototypes/Maps/oasis.yml
This commit is contained in:
@@ -25,7 +25,6 @@ public sealed class HypospraySystem : SharedHypospraySystem
|
||||
{
|
||||
[Dependency] private readonly AudioSystem _audio = default!;
|
||||
[Dependency] private readonly InteractionSystem _interaction = default!;
|
||||
[Dependency] private readonly SolutionContainerSystem _solutionContainerSystem = default!;
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
|
||||
@@ -81,9 +81,9 @@ namespace Content.Server.Chemistry.EntitySystems
|
||||
return null;
|
||||
}
|
||||
|
||||
private List<KeyValuePair<string, KeyValuePair<string, string>>> GetInventory(Entity<ReagentDispenserComponent> reagentDispenser)
|
||||
private List<ReagentInventoryItem> GetInventory(Entity<ReagentDispenserComponent> reagentDispenser)
|
||||
{
|
||||
var inventory = new List<KeyValuePair<string, KeyValuePair<string, string>>>();
|
||||
var inventory = new List<ReagentInventoryItem>();
|
||||
|
||||
for (var i = 0; i < reagentDispenser.Comp.NumSlots; i++)
|
||||
{
|
||||
@@ -99,15 +99,17 @@ namespace Content.Server.Chemistry.EntitySystems
|
||||
else
|
||||
continue;
|
||||
|
||||
// Add volume remaining label
|
||||
// Get volume remaining and color of solution
|
||||
FixedPoint2 quantity = 0f;
|
||||
var reagentColor = Color.White;
|
||||
if (storedContainer != null && _solutionContainerSystem.TryGetDrainableSolution(storedContainer.Value, out _, out var sol))
|
||||
{
|
||||
quantity = sol.Volume;
|
||||
reagentColor = sol.GetColor(_prototypeManager);
|
||||
}
|
||||
var storedAmount = Loc.GetString("reagent-dispenser-window-quantity-label-text", ("quantity", quantity));
|
||||
|
||||
inventory.Add(new KeyValuePair<string, KeyValuePair<string, string>>(storageSlotId, new KeyValuePair<string, string>(reagentLabel, storedAmount)));
|
||||
inventory.Add(new ReagentInventoryItem(storageSlotId, reagentLabel, storedAmount, reagentColor));
|
||||
}
|
||||
|
||||
return inventory;
|
||||
|
||||
@@ -122,7 +122,7 @@ namespace Content.Server.Chemistry.EntitySystems
|
||||
var reagent = _protoManager.Index<ReagentPrototype>(reagentQuantity.Reagent.Prototype);
|
||||
|
||||
var reaction =
|
||||
reagent.ReactionTile(tile, (reagentQuantity.Quantity / vapor.TransferAmount) * 0.25f);
|
||||
reagent.ReactionTile(tile, (reagentQuantity.Quantity / vapor.TransferAmount) * 0.25f, EntityManager);
|
||||
|
||||
if (reaction > reagentQuantity.Quantity)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user