/// The maximum amount of solution that can be transferred at once from this solution.
/// </summary>
[DataField("maxTransferAmount")]
- public FixedPoint2 MaximumTransferAmount = FixedPoint2.New(50);
+ public FixedPoint2 MaximumTransferAmount = FixedPoint2.New(15);
/// <summary>
/// Amount to inject or draw on each usage. If the injector is inject only, it will
if (!HasComp<ActorComponent>(args.User))
return;
+ var user = args.User;
var (_, component) = entity;
- // Add specific transfer verbs according to the container's size
+ var min = component.MinimumTransferAmount;
+ var max = component.MaximumTransferAmount;
+ var cur = component.TransferAmount;
+ var toggleAmount = cur == max ? min : max;
+
var priority = 0;
- var user = args.User;
+ AlternativeVerb toggleVerb = new()
+ {
+ Text = Loc.GetString("comp-solution-transfer-verb-toggle", ("amount", toggleAmount)),
+ Category = VerbCategory.SetTransferAmount,
+ Act = () =>
+ {
+ component.TransferAmount = toggleAmount;
+ Popup.PopupClient(Loc.GetString("comp-solution-transfer-set-amount", ("amount", toggleAmount)), user, user);
+ Dirty(entity);
+ },
+
+ Priority = priority
+ };
+ args.Verbs.Add(toggleVerb);
+
+ priority -= 1;
+
+ // Add specific transfer verbs according to the container's size
foreach (var amount in TransferAmounts)
{
if (amount < component.MinimumTransferAmount || amount > component.MaximumTransferAmount)
## Displayed in change transfer amount verb's name
comp-solution-transfer-verb-custom-amount = Custom
comp-solution-transfer-verb-amount = {$amount}u
+comp-solution-transfer-verb-toggle = Toggle to {$amount}u
## Displayed after you successfully change a solution's amount using the BUI
comp-solution-transfer-set-amount = Transfer amount set to {$amount}u.