diff --git a/code/modules/reagents/reagent_containers/borghydro.dm b/code/modules/reagents/reagent_containers/borghydro.dm index 51937448..0178bf49 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() @@ -57,7 +58,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 @@ -67,9 +68,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) @@ -115,7 +118,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 8ac4b354..2e7269c7 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"