mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-24 21:48:39 +01:00
ChemMaster QoL: Reusable Custom Transfer Amounts (#96563)
## About The Pull Request https://github.com/user-attachments/assets/a6c6d3d9-3284-4a45-80c4-14dbc4956cf8 Adds custom transfer amount functionality to the ChemMaster UI through a number input (by the eject button) and paired button. ## Why It's Good For The Game If I have to hit the one-off custom transfer button, several times in a row, for my artisanal chemical atrocities one more time, I'm going to lose it. Less-jokingly, maybe someone has some oddly specific mixing things they need it for (I know I do!).
This commit is contained in:
@@ -32,6 +32,8 @@
|
||||
var/printing_speed = 0.75 SECONDS
|
||||
/// Amount of layers which printed pills will be coated in
|
||||
var/pill_layers = 3
|
||||
/// Current custom transfer amount
|
||||
var/custom_transfer_amount = 15
|
||||
|
||||
/obj/machinery/chem_master/Initialize(mapload)
|
||||
create_reagents(100)
|
||||
@@ -281,6 +283,7 @@
|
||||
.["selectedPillDuration"] = pill_layers
|
||||
var/obj/item/held_item = user.get_active_held_item()
|
||||
.["hasBeakerInHand"] = held_item?.is_chem_container() || FALSE
|
||||
.["customTransferAmount"] = custom_transfer_amount
|
||||
|
||||
//contents of source beaker
|
||||
var/list/beaker_data = null
|
||||
@@ -414,6 +417,18 @@
|
||||
|
||||
return TRUE
|
||||
|
||||
if("setCustomTransfer")
|
||||
var/target = params["target"]
|
||||
if(isnull(target))
|
||||
return FALSE
|
||||
|
||||
target = text2num(target)
|
||||
if(isnull(target))
|
||||
return FALSE
|
||||
|
||||
custom_transfer_amount = clamp(target, 0, beaker.volume)
|
||||
return TRUE
|
||||
|
||||
if("transfer")
|
||||
if(is_printing)
|
||||
say("The buffer is locked while printing.")
|
||||
|
||||
Reference in New Issue
Block a user