[MIRROR] Alt click reagent containers to set transfer volume (#11511)

Co-authored-by: SatinIsle <98125273+SatinIsle@users.noreply.github.com>
Co-authored-by: Cameron Lennox <killer65311@gmail.com>
This commit is contained in:
CHOMPStation2StaffMirrorBot
2025-08-27 07:38:59 -07:00
committed by GitHub
parent 575ff91c05
commit 3bf3fa4351
30 changed files with 84 additions and 64 deletions

View File

@@ -16,7 +16,7 @@
// PanDEMIC Vial
/obj/item/reagent_containers/glass/beaker/vial/vaccine
possible_transfer_amounts = (list(5, 10, 15))
max_transfer_amount = 15
volume = 15
/obj/item/reagent_containers/glass/beaker/vial/vaccine/Initialize(mapload)

View File

@@ -52,7 +52,8 @@
icon_state = "powder"
item_state = "powder"
amount_per_transfer_from_this = 2
possible_transfer_amounts = 2
max_transfer_amount = 2
min_transfer_amount = 1
w_class = ITEMSIZE_TINY
volume = 50

View File

@@ -153,7 +153,7 @@
matter = list(MAT_STEEL = 50, MAT_GLASS = 10)
volume = 20
flags = OPENCONTAINER
possible_transfer_amounts = null
max_transfer_amount = null
/obj/item/reagent_containers/ecig_cartridge/examine(mob/user as mob)//to see how much left
. = ..()

View File

@@ -10,7 +10,7 @@
matter = list(MAT_STEEL = 200)
w_class = ITEMSIZE_NORMAL
amount_per_transfer_from_this = 10
possible_transfer_amounts = list(10,20,30,60)
max_transfer_amount = 60
volume = 60
unacidable = FALSE
flags = OPENCONTAINER

View File

@@ -5,7 +5,7 @@
icon_state = "luminol"
item_state = "cleaner"
amount_per_transfer_from_this = 10
possible_transfer_amounts = list(5,10)
max_transfer_amount = 10
volume = 250
/obj/item/reagent_containers/spray/luminol/Initialize(mapload)

View File

@@ -18,7 +18,7 @@
icon = 'icons/obj/toy.dmi'
icon_state = "rag"
amount_per_transfer_from_this = 5
possible_transfer_amounts = list(5)
max_transfer_amount = 5
volume = 10
can_be_placed_into = null
flags = OPENCONTAINER | NOBLUDGEON

View File

@@ -22,7 +22,7 @@
center_of_mass_y = 10
amount_per_transfer_from_this = 5
possible_transfer_amounts = list(5,10,15,30)
max_transfer_amount = 30
flags = OPENCONTAINER
matter = list(MAT_GLASS = 60)

View File

@@ -6,7 +6,7 @@
desc = "Your standard drinking glass."
filling_states = list(20, 40, 60, 80, 100)
volume = 30
possible_transfer_amounts = list(5,10,15,30)
max_transfer_amount = 30
rim_pos = list(23,13,20) // y, x0, x1
matter = list(MAT_GLASS = 60)
@@ -17,7 +17,7 @@
icon_state = "rocks"
filling_states = list(25, 50, 75, 100)
volume = 20
possible_transfer_amounts = list(5,10,20)
max_transfer_amount = 20
rim_pos = list(21, 10, 23)
matter = list(MAT_GLASS = 40)
@@ -28,7 +28,7 @@
icon_state = "shake"
filling_states = list(25, 50, 75, 100)
volume = 30
possible_transfer_amounts = list(5,10,15,30)
max_transfer_amount = 30
rim_pos = list(25, 13, 21)
matter = list(MAT_GLASS = 30)
@@ -39,7 +39,7 @@
icon_state = "cocktail"
filling_states = list(33, 66, 100)
volume = 15
possible_transfer_amounts = list(5,10,15)
max_transfer_amount = 15
rim_pos = list(22, 13, 21)
matter = list(MAT_GLASS = 30)
@@ -50,7 +50,7 @@
icon_state = "shot"
filling_states = list(33, 66, 100)
volume = 5
possible_transfer_amounts = list(1,2,5)
max_transfer_amount = 5
rim_pos = list(17, 13, 21)
matter = list(MAT_GLASS = 10)
@@ -61,7 +61,7 @@
icon_state = "pint"
filling_states = list(16, 33, 50, 66, 83, 100)
volume = 60
possible_transfer_amounts = list(5,10,15,30,60)
max_transfer_amount = 60
rim_pos = list(25, 12, 21)
matter = list(MAT_GLASS = 120)
@@ -72,7 +72,7 @@
icon_state = "mug"
filling_states = list(25, 50, 75, 100)
volume = 40
possible_transfer_amounts = list(5,10,20,40)
max_transfer_amount = 40
rim_pos = list(22, 12, 20)
matter = list(MAT_GLASS = 80)
@@ -83,6 +83,6 @@
icon_state = "wine"
filling_states = list(20, 40, 60, 80, 100)
volume = 25
possible_transfer_amounts = list(5, 10, 15, 25)
max_transfer_amount = 25
rim_pos = list(25, 12, 21)
matter = list(MAT_GLASS = 50)

View File

@@ -5,7 +5,7 @@
icon = 'icons/obj/drinks.dmi'
filling_states = list(10, 20, 30, 40, 50, 60, 70, 80, 90, 100)
volume = 120
possible_transfer_amounts = list(5,15,30)
max_transfer_amount = 60
matter = list(MAT_GLASS = 50)
/obj/item/reagent_containers/food/drinks/glass2/pitcher
@@ -15,5 +15,5 @@
icon = 'icons/obj/drinks.dmi'
filling_states = list(15, 30, 50, 70, 85, 100)
volume = 120
possible_transfer_amounts = list(5,15,30)
max_transfer_amount = 60
matter = list(MAT_PLASTIC = 50)

View File

@@ -7,7 +7,7 @@
volume = 100
matter = list(MAT_PLASTIC = 2000)
filling_states = list(10,20,30,40,50,60,70,80)
possible_transfer_amounts = list(5, 10, 15, 25)
max_transfer_amount = 50
rim_pos = null // no fruit slices
var/lid_color = "black"

View File

@@ -5,7 +5,7 @@
/// Food.
////////////////////////////////////////////////////////////////////////////////
/obj/item/reagent_containers/food
possible_transfer_amounts = null
max_transfer_amount = null
volume = 50 //Sets the default container amount for all food items.
description_info = "Food can use the Rename Food verb in the Object Tab to rename it."
var/filling_color = "#FFFFFF" //Used by sandwiches and custom food.

View File

@@ -11,7 +11,7 @@
icon = 'icons/obj/food.dmi'
icon_state = "emptycondiment"
flags = OPENCONTAINER
possible_transfer_amounts = list(1,5,10)
max_transfer_amount = 10
center_of_mass_x = 16
center_of_mass_y = 6
volume = 50
@@ -241,7 +241,8 @@
reagents.add_reagent(REAGENT_ID_SPRINKLES, 50)
/obj/item/reagent_containers/food/condiment/small
possible_transfer_amounts = list(1,20)
max_transfer_amount = 20
min_transfer_amount = 1
amount_per_transfer_from_this = 1
volume = 20
center_of_mass_x = 0
@@ -297,7 +298,8 @@
/obj/item/reagent_containers/food/condiment/small/packet
icon_state = "packet_small"
w_class = ITEMSIZE_TINY
possible_transfer_amounts = "1;5;10"
max_transfer_amount = 5
min_transfer_amount = 1
amount_per_transfer_from_this = 1
volume = 5
@@ -542,7 +544,7 @@
name = "space spices"
desc = "An exotic blend of spices for cooking. Definitely not worms."
icon_state = "spacespicebottle"
possible_transfer_amounts = list(1,40) //for clown turning the lid off
max_transfer_amount = 40
amount_per_transfer_from_this = 1
volume = 40

View File

@@ -10,7 +10,7 @@
icon_state = null
flags = OPENCONTAINER
amount_per_transfer_from_this = 5
possible_transfer_amounts = list(5,10,15,25,30)
max_transfer_amount = 50
volume = 50
var/trash = null
var/cant_open = 0
@@ -228,7 +228,7 @@
force = 14
throwforce = 10
amount_per_transfer_from_this = 20
possible_transfer_amounts = null
max_transfer_amount = null
volume = 150
flags = OPENCONTAINER
@@ -442,7 +442,7 @@
name = "paper cup"
desc = "A paper water cup."
icon_state = "water_cup_e"
possible_transfer_amounts = null
max_transfer_amount = null
volume = 10
center_of_mass_x = 16
center_of_mass_y = 12

View File

@@ -8,7 +8,7 @@
icon_state = null
item_state = "atoxinbottle"
amount_per_transfer_from_this = 10
possible_transfer_amounts = list(5,10,15,25,30,60)
max_transfer_amount = 60
flags = 0
volume = 60
drop_sound = 'sound/items/drop/bottle.ogg'

View File

@@ -1,7 +1,7 @@
/obj/item/reagent_containers/glass/bottle/robot
amount_per_transfer_from_this = 10
possible_transfer_amounts = list(5,10,15,25,30,50,100)
max_transfer_amount = 60
flags = OPENCONTAINER
volume = 60
var/reagent = ""

View File

@@ -136,7 +136,7 @@
item_state = "mister"
w_class = ITEMSIZE_LARGE
amount_per_transfer_from_this = 50
possible_transfer_amounts = list(50)
max_transfer_amount = null
volume = 500
item_flags = NOBLUDGEON
slot_flags = NONE
@@ -187,7 +187,7 @@
icon_state = "misterjani"
item_state = "misterjani"
amount_per_transfer_from_this = 5
possible_transfer_amounts = list(5,10)
max_transfer_amount = 10
spray_size = 4
/*
@@ -216,7 +216,7 @@
icon_state = "mistersec"
item_state = "mistersec"
amount_per_transfer_from_this = 5
possible_transfer_amounts = list(5,10)
max_transfer_amount = 10
spray_size = 6
/*
@@ -252,7 +252,7 @@
w_class = ITEMSIZE_HUGE
volume = 2000
amount_per_transfer_from_this = 100
possible_transfer_amounts = list(75,100,150)
max_transfer_amount = 150
/*
* Atmos tank
@@ -282,7 +282,7 @@
w_class = ITEMSIZE_HUGE
volume = 200
amount_per_transfer_from_this = 5
possible_transfer_amounts = list(5,10)
max_transfer_amount = 10
spray_size = null
/obj/item/reagent_containers/spray/mister/atmos/Spray_at(atom/A as mob|obj)

View File

@@ -129,7 +129,7 @@ What Borgs are available is sadly handled in the above file in the proc
charge_cost = 20
recharge_time = 3
volume = 120
possible_transfer_amounts = list(1 ,5, 10, 20, 30)
max_transfer_amount = 60
//Resking proc for boozos

View File

@@ -7,8 +7,9 @@
volume = CARTRIDGE_VOLUME_LARGE
amount_per_transfer_from_this = 50
// Large, but inaccurate. Use a chem dispenser or beaker for accuracy.
possible_transfer_amounts = list(50, 100, 250, 500)
// Large, but inaccurate. Use a chem dispenser or beaker for small volumes.
max_transfer_amount = 500
min_transfer_amount = 50
unacidable = TRUE
var/spawn_reagent = null

View File

@@ -5,7 +5,8 @@
icon_state = null
w_class = ITEMSIZE_SMALL
var/amount_per_transfer_from_this = 5
var/possible_transfer_amounts = list(5,10,15,25,30)
var/max_transfer_amount = 30
var/min_transfer_amount = 5
var/volume = 30
var/list/starts_with
@@ -13,13 +14,13 @@
set name = "Set transfer amount"
set category = "Object"
set src in range(0)
var/N = tgui_input_list(usr, "Amount per transfer from this:","[src]", possible_transfer_amounts)
var/N = tgui_input_number(usr, "Amount per transfer from this: ([min_transfer_amount]-[max_transfer_amount])","[src]",amount_per_transfer_from_this,max_transfer_amount,min_transfer_amount)
if(N)
amount_per_transfer_from_this = N
/obj/item/reagent_containers/Initialize(mapload)
. = ..()
if(!possible_transfer_amounts)
if(!max_transfer_amount)
src.verbs -= /obj/item/reagent_containers/verb/set_APTFT
create_reagents(volume)
@@ -171,3 +172,13 @@
if(B)
balloon_alert(user, "\The [W] burns the blood in \the [src].")
B.changling_blood_test(reagents)
/obj/item/reagent_containers/AltClick(mob/user)
. = ..()
if(!Adjacent(user))
return
if(!max_transfer_amount)
return
var/N = tgui_input_number(user, "Amount per transfer from this: ([min_transfer_amount]-[max_transfer_amount])","[src]",amount_per_transfer_from_this,max_transfer_amount,min_transfer_amount)
if(N)
amount_per_transfer_from_this = N

View File

@@ -6,6 +6,7 @@
center_of_mass_x = 15
center_of_mass_y = 10
volume = 50
max_transfer_amount = 50
/obj/item/reagent_containers/food/drinks/bluespace_coffee/Initialize(mapload)
. = ..()

View File

@@ -6,7 +6,7 @@
icon_state = "borghypo"
amount_per_transfer_from_this = 5
volume = 30
possible_transfer_amounts = null
max_transfer_amount = null
var/mode = 1
var/charge_cost = 325
@@ -134,7 +134,7 @@
charge_cost = 20
recharge_time = 3
volume = 60
possible_transfer_amounts = list(5, 10, 20, 30)
max_transfer_amount = 30
reagent_ids = list(REAGENT_ID_ALE,
REAGENT_ID_APPLEJUICE, //CHOMPADD it has literally every other type of juice..
REAGENT_ID_BEER,

View File

@@ -7,7 +7,8 @@
icon = 'icons/obj/chemical.dmi'
icon_state = "dropper0"
amount_per_transfer_from_this = 5
possible_transfer_amounts = list(1,2,3,4,5)
max_transfer_amount = 5
min_transfer_amount = 1
w_class = ITEMSIZE_TINY
slot_flags = SLOT_EARS
volume = 5
@@ -106,7 +107,8 @@
name = "Industrial Dropper"
desc = "A larger dropper. Transfers up to 10 units at a time."
amount_per_transfer_from_this = 10
possible_transfer_amounts = list(1,2,3,4,5,6,7,8,9,10)
max_transfer_amount = 10
min_transfer_amount = 1
volume = 10
////////////////////////////////////////////////////////////////////////////////

View File

@@ -11,7 +11,7 @@
icon_state = "null"
item_state = "null"
amount_per_transfer_from_this = 10
possible_transfer_amounts = list(5,10,15,25,30,60)
max_transfer_amount = 60
volume = 60
w_class = ITEMSIZE_SMALL
flags = OPENCONTAINER | NOCONDUCT
@@ -249,7 +249,7 @@
matter = list(MAT_GLASS = 5000)
volume = 120
amount_per_transfer_from_this = 10
possible_transfer_amounts = list(5,10,15,25,30,60,120)
max_transfer_amount = 120
flags = OPENCONTAINER
rating = 3
@@ -273,7 +273,7 @@
matter = list(MAT_GLASS = 5000)
volume = 300
amount_per_transfer_from_this = 10
possible_transfer_amounts = list(5,10,15,25,30,60,120,300)
max_transfer_amount = 300
flags = OPENCONTAINER
rating = 5
@@ -287,7 +287,7 @@
volume = 30
w_class = ITEMSIZE_TINY
amount_per_transfer_from_this = 10
possible_transfer_amounts = list(5,10,15,30)
max_transfer_amount = 30
flags = OPENCONTAINER
/obj/item/reagent_containers/glass/beaker/cryoxadone
@@ -305,7 +305,7 @@
center_of_mass_y = 13
volume = 120
amount_per_transfer_from_this = 10
possible_transfer_amounts = list(5,10,15,25,30,60,120)
max_transfer_amount = 120
flags = OPENCONTAINER
/obj/item/reagent_containers/glass/bucket
@@ -319,7 +319,7 @@
matter = list(MAT_STEEL = 200)
w_class = ITEMSIZE_NORMAL
amount_per_transfer_from_this = 20
possible_transfer_amounts = list(10,20,30,60,120)
max_transfer_amount = 120
volume = 120
flags = OPENCONTAINER
unacidable = FALSE
@@ -378,7 +378,7 @@
matter = list(MAT_WOOD = 50)
w_class = ITEMSIZE_LARGE
amount_per_transfer_from_this = 20
possible_transfer_amounts = list(10,20,30,60,120)
max_transfer_amount = 120
volume = 120
flags = OPENCONTAINER
unacidable = FALSE
@@ -414,7 +414,7 @@
matter = list(MAT_PLASTIC = 2000)
w_class = ITEMSIZE_NO_CONTAINER
amount_per_transfer_from_this = 20
possible_transfer_amounts = list(10,20,30,60,120)
max_transfer_amount = 120
volume = 2000
slowdown = 2

View File

@@ -11,7 +11,7 @@
amount_per_transfer_from_this = 5
unacidable = TRUE
volume = 30
possible_transfer_amounts = null
max_transfer_amount = null
flags = OPENCONTAINER
slot_flags = SLOT_BELT
drop_sound = 'sound/items/drop/gun.ogg'

View File

@@ -12,7 +12,7 @@
base_state = "patch"
possible_transfer_amounts = null
max_transfer_amount = null
w_class = ITEMSIZE_TINY
slot_flags = SLOT_EARS
volume = 60

View File

@@ -12,7 +12,7 @@
var/base_state = "pill"
possible_transfer_amounts = null
max_transfer_amount = null
w_class = ITEMSIZE_TINY
slot_flags = SLOT_EARS
volume = 60

View File

@@ -15,7 +15,7 @@
throw_range = 10
amount_per_transfer_from_this = 10
unacidable = TRUE //plastic
possible_transfer_amounts = list(5,10) //Set to null instead of list, if there is only one.
max_transfer_amount = 10 //Set to null instead of list, if there is only one.
var/spray_size = 3
var/list/spray_sizes = list(1,3)
volume = 250
@@ -71,12 +71,14 @@
D.set_up(my_target, spray_size, 10)
return
/obj/item/reagent_containers/spray/attack_self(var/mob/user)
if(!possible_transfer_amounts)
/*
/obj/item/reagent_containers/spray/attack_self(var/mob/user) //Now done via alt-click instead
if(!max_transfer_amount)
return
amount_per_transfer_from_this = next_in_list(amount_per_transfer_from_this, possible_transfer_amounts)
spray_size = next_in_list(spray_size, spray_sizes)
balloon_alert(user, "pressure nozzle adjusted to [amount_per_transfer_from_this] units per spray.")
*/
/obj/item/reagent_containers/spray/examine(mob/user)
. = ..()
@@ -125,7 +127,7 @@
item_state = "pepperspray"
center_of_mass_x = 16
center_of_mass_y = 16
possible_transfer_amounts = null
max_transfer_amount = null
volume = 40
var/safety = TRUE
@@ -155,7 +157,7 @@
icon_state = "sunflower"
item_state = "sunflower"
amount_per_transfer_from_this = 1
possible_transfer_amounts = null
max_transfer_amount = null
volume = 10
drop_sound = 'sound/items/drop/herb.ogg'
pickup_sound = 'sound/items/pickup/herb.ogg'
@@ -175,7 +177,7 @@
center_of_mass_y = 16
throwforce = 3
w_class = ITEMSIZE_NORMAL
possible_transfer_amounts = null
max_transfer_amount = null
volume = 600
origin_tech = list(TECH_COMBAT = 3, TECH_MATERIAL = 3, TECH_ENGINEERING = 3)
@@ -221,7 +223,7 @@
center_of_mass_x = 16
center_of_mass_y = 10
possible_transfer_amounts = list(5,10,20)
max_transfer_amount = 20
var/heavy_spray = FALSE
var/spray_particles = 3

View File

@@ -4,7 +4,7 @@
icon = 'icons/obj/items.dmi'
icon_state = "windowsealant"
item_state = "spraycan"
possible_transfer_amounts = null
max_transfer_amount = null
volume = 80
/obj/item/reagent_containers/spray/windowsealant/Initialize(mapload)

View File

@@ -20,7 +20,7 @@
center_of_mass_y = 14
matter = list(MAT_GLASS = 150)
amount_per_transfer_from_this = 5
possible_transfer_amounts = null
max_transfer_amount = null
volume = 15
w_class = ITEMSIZE_TINY
slot_flags = SLOT_EARS

View File

@@ -14,7 +14,7 @@
volume = CARTRIDGE_VOLUME_LARGE
amount_per_transfer_from_this = CARTRIDGE_VOLUME_LARGE
possible_transfer_amounts = list(CARTRIDGE_VOLUME_LARGE)
max_transfer_amount = null //Can be null as there was only one value set previously anyway
unacidable = TRUE
VAR_PROTECTED/loaded_reagent = null