Adds pills type selection and pills canister (#5539)
* Added pill type selection Ui textures missing for now * bugfixes * Pill type selection * ui changes * Added pills canister * Change requests
This commit is contained in:
@@ -43,9 +43,10 @@ namespace Content.Shared.Chemistry.Components
|
||||
public readonly bool BufferModeTransfer;
|
||||
|
||||
public readonly FixedPoint2 BufferCurrentVolume;
|
||||
public readonly uint SelectedPillType;
|
||||
|
||||
public ChemMasterBoundUserInterfaceState(bool hasPower, bool hasBeaker, FixedPoint2 beakerCurrentVolume, FixedPoint2 beakerMaxVolume, string containerName,
|
||||
string dispenserName, IReadOnlyList<Solution.ReagentQuantity> containerReagents, IReadOnlyList<Solution.ReagentQuantity> bufferReagents, bool bufferModeTransfer, FixedPoint2 bufferCurrentVolume)
|
||||
string dispenserName, IReadOnlyList<Solution.ReagentQuantity> containerReagents, IReadOnlyList<Solution.ReagentQuantity> bufferReagents, bool bufferModeTransfer, FixedPoint2 bufferCurrentVolume, uint selectedPillType)
|
||||
{
|
||||
HasPower = hasPower;
|
||||
HasBeaker = hasBeaker;
|
||||
@@ -57,6 +58,7 @@ namespace Content.Shared.Chemistry.Components
|
||||
BufferReagents = bufferReagents;
|
||||
BufferModeTransfer = bufferModeTransfer;
|
||||
BufferCurrentVolume = bufferCurrentVolume;
|
||||
SelectedPillType = selectedPillType;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,34 +68,36 @@ namespace Content.Shared.Chemistry.Components
|
||||
[Serializable, NetSerializable]
|
||||
public class UiActionMessage : BoundUserInterfaceMessage
|
||||
{
|
||||
public readonly UiAction action;
|
||||
public readonly FixedPoint2 amount;
|
||||
public readonly string id = "";
|
||||
public readonly bool isBuffer;
|
||||
public readonly int pillAmount;
|
||||
public readonly int bottleAmount;
|
||||
public readonly UiAction Action;
|
||||
public readonly FixedPoint2 Amount;
|
||||
public readonly string Id = "";
|
||||
public readonly bool IsBuffer;
|
||||
public readonly uint PillType;
|
||||
public readonly int PillAmount;
|
||||
public readonly int BottleAmount;
|
||||
|
||||
public UiActionMessage(UiAction _action, FixedPoint2? _amount, string? _id, bool? _isBuffer, int? _pillAmount, int? _bottleAmount)
|
||||
public UiActionMessage(UiAction action, FixedPoint2? amount, string? id, bool? isBuffer, uint? pillType, int? pillAmount, int? bottleAmount)
|
||||
{
|
||||
action = _action;
|
||||
if (action == UiAction.ChemButton)
|
||||
Action = action;
|
||||
if (Action == UiAction.ChemButton)
|
||||
{
|
||||
amount = _amount.GetValueOrDefault();
|
||||
if (_id == null)
|
||||
Amount = amount.GetValueOrDefault();
|
||||
if (id == null)
|
||||
{
|
||||
id = "null";
|
||||
Id = "null";
|
||||
}
|
||||
else
|
||||
{
|
||||
id = _id;
|
||||
Id = id;
|
||||
}
|
||||
|
||||
isBuffer = _isBuffer.GetValueOrDefault();
|
||||
isBuffer = isBuffer.GetValueOrDefault();
|
||||
}
|
||||
else
|
||||
{
|
||||
pillAmount = _pillAmount.GetValueOrDefault();
|
||||
bottleAmount = _bottleAmount.GetValueOrDefault();
|
||||
PillAmount = pillAmount.GetValueOrDefault();
|
||||
PillType = pillType.GetValueOrDefault();
|
||||
BottleAmount = bottleAmount.GetValueOrDefault();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -114,8 +118,8 @@ namespace Content.Shared.Chemistry.Components
|
||||
Discard,
|
||||
ChemButton,
|
||||
CreatePills,
|
||||
CreateBottles
|
||||
CreateBottles,
|
||||
SetPillType
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user