This commit is contained in:
timothyteakettle
2022-02-23 00:52:17 +00:00
parent fd997e1615
commit b578c65d74
4 changed files with 12 additions and 8 deletions
+7 -5
View File
@@ -715,17 +715,19 @@ GLOBAL_LIST_EMPTY(PDAs)
option = lowertext(option)
var/list/reagents_required
var/found_reagent_name
var/required_temp
for(var/reagent_name in GLOB.drink_reactions_list)
message_admins(reagent_name)
if(findtext(reagent_name, option))
if(findtext(lowertext(reagent_name), option))
found_reagent_name = reagent_name
reagents_required = GLOB.drink_reactions_list[reagent_name].required_reagents
required_temp = GLOB.drink_reactions_list[reagent_name].required_temp
break
if(length(reagents_required))
to_chat(U, "Reagent found: [found_reagent_name]<br>Required Reagents:<br>")
to_chat(U, "<b>Recipe found: [found_reagent_name]</b>[required_temp ? "<br>Required Temperature: [required_temp]K" : ""]<br>Required Reagents:")
var/reagents_required_string = ""
for(var/datum/reagent/r in reagents_required)
reagents_required_string += "[initial(r.name)]: [reagents_required[r]]<br>"
for(var/r in reagents_required)
var/datum/reagent/reagent = r
reagents_required_string += "<br>[initial(reagent.name)]: [reagents_required[r]]"
to_chat(U, reagents_required_string)
return
else
@@ -222,6 +222,7 @@
/obj/item/pda/bar
name = "bartender PDA"
icon_state = "pda-bartender"
default_cartridge = /obj/item/cartridge/bartender
inserted_item = /obj/item/pen/fountain
/obj/item/pda/atmos
+4 -3
View File
@@ -14,6 +14,7 @@
GLOB.chemical_reagents_list[path] = D
/proc/build_chemical_reactions_list()
message_admins("STARTY START START!")
//Chemical Reactions - Initialises all /datum/chemical_reaction into a list
// It is filtered into multiple lists within a list.
// For example:
@@ -26,17 +27,17 @@
//Randomized need to go last since they need to check against conflicts with normal recipes
var/paths = subtypesof(/datum/chemical_reaction) - typesof(/datum/chemical_reaction/randomized) + subtypesof(/datum/chemical_reaction/randomized)
GLOB.chemical_reactions_list = list()
GLOB.drink_reactions_list = list()
for(var/path in paths)
var/datum/chemical_reaction/D = new path()
var/list/reaction_ids = list()
// store drinks separately for bartender cartridge
if(D.id)
if(istype(D.id, /datum/reagent/consumable))
if(ispath(D.id, /datum/reagent/consumable))
var/datum/reagent/consumable/r = D.id
GLOB.drink_reactions_list[lowertext(initial(r.name))] = D
GLOB.drink_reactions_list[initial(r.name)] = D
if(D.required_reagents && D.required_reagents.len)
for(var/reaction in D.required_reagents)
BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB