diff --git a/code/modules/reagents/chemistry/machinery/chem_dispenser.dm b/code/modules/reagents/chemistry/machinery/chem_dispenser.dm index 217c915a9e..4580a51a1f 100644 --- a/code/modules/reagents/chemistry/machinery/chem_dispenser.dm +++ b/code/modules/reagents/chemistry/machinery/chem_dispenser.dm @@ -92,8 +92,11 @@ /obj/machinery/chem_dispenser/Initialize() . = ..() - for(var/list/L in list(dispensable_reagents, emagged_reagents, upgrade_reagents, upgrade_reagents2, upgrade_reagents3)) - L = sortList(L, /proc/cmp_reagents_asc) + emagged_reagents = sortList(emagged_reagents, /proc/cmp_reagents_asc) + upgrade_reagents = sortList(upgrade_reagents, /proc/cmp_reagents_asc) + upgrade_reagents2 = sortList(upgrade_reagents2, /proc/cmp_reagents_asc) + upgrade_reagents3 = sortList(upgrade_reagents3, /proc/cmp_reagents_asc) + dispensable_reagents = sortList(dispensable_reagents, /proc/cmp_reagents_asc) update_icon() /obj/machinery/chem_dispenser/Destroy() diff --git a/code/modules/reagents/reagent_containers/borghydro.dm b/code/modules/reagents/reagent_containers/borghydro.dm index 980e823a82..48a5c10e3b 100644 --- a/code/modules/reagents/reagent_containers/borghydro.dm +++ b/code/modules/reagents/reagent_containers/borghydro.dm @@ -31,6 +31,7 @@ Borg Hypospray var/accepts_reagent_upgrades = TRUE //If upgrades can increase number of reagents dispensed. var/list/modes = list() //Basically the inverse of reagent_ids. Instead of having numbers as "keys" and strings as values it has strings as keys and numbers as values. //Used as list for input() in shakers. + var/list/reagent_names = list() /obj/item/reagent_containers/borghypo/Initialize() . = ..() @@ -54,7 +55,7 @@ Borg Hypospray return 1 // Use this to add more chemicals for the borghypo to produce. -/obj/item/reagent_containers/borghypo/proc/add_reagent(reagent) +/obj/item/reagent_containers/borghypo/proc/add_reagent(datum/reagent/reagent) reagent_ids |= reagent var/datum/reagents/RG = new(30) RG.my_atom = src @@ -64,9 +65,11 @@ Borg Hypospray R.add_reagent(reagent, 30) modes[reagent] = modes.len + 1 + reagent_names[initial(reagent.name)] = reagent -/obj/item/reagent_containers/borghypo/proc/del_reagent(reagent) +/obj/item/reagent_containers/borghypo/proc/del_reagent(datum/reagent/reagent) reagent_ids -= reagent + reagent_names -= initial(reagent.name) var/datum/reagents/RG var/datum/reagents/TRG for(var/i in 1 to reagent_ids.len) @@ -112,7 +115,7 @@ Borg Hypospray log_combat(user, M, "injected", src, "(CHEMICALS: [english_list(injected)])") /obj/item/reagent_containers/borghypo/attack_self(mob/user) - var/chosen_reagent = modes[input(user, "What reagent do you want to dispense?") as null|anything in reagent_ids] + var/chosen_reagent = modes[reagent_names[input(user, "What reagent do you want to dispense?") as null|anything in reagent_names]] if(!chosen_reagent) return mode = chosen_reagent diff --git a/code/modules/reagents/reagent_dispenser.dm b/code/modules/reagents/reagent_dispenser.dm index e9f8053631..1a8c960b2f 100644 --- a/code/modules/reagents/reagent_dispenser.dm +++ b/code/modules/reagents/reagent_dispenser.dm @@ -184,7 +184,7 @@ icon_state = "virus_food" anchored = TRUE density = FALSE - reagent_id = /datum/reagent/toxin/mutagen/mutagenvirusfood + reagent_id = /datum/reagent/consumable/virus_food /obj/structure/reagent_dispensers/cooking_oil name = "vat of cooking oil"