[MIRROR] Improves the chem recipe lookup by reducing it's lag and other requested changes from feedback (#3649)

* Improves the chem recipe lookup by reducing it's lag and other requested changes from feedback (#57156)

So the recipe lookup is considerably laggier than it was testing locally, someone suggested I paginate the big list so less of it has to load, so that's what I did!

* Improves the chem recipe lookup by reducing it's lag and other requested changes from feedback

Co-authored-by: Thalpy <33956696+Thalpy@users.noreply.github.com>
This commit is contained in:
SkyratBot
2021-02-25 17:36:58 +01:00
committed by GitHub
parent 1648bb297b
commit 3c4abaeb5c
2 changed files with 204 additions and 80 deletions
@@ -1634,6 +1634,8 @@
if(reagent.chemical_flags & REAGENT_DEAD_PROCESS)
data["reagent_mode_reagent"] += list("deadProcess" = TRUE)
else
data["reagent_mode_reagent"] = null
//reaction lookup data
if (ui_reaction_id)
@@ -1733,6 +1735,8 @@
tooltip_bool = TRUE
data["reagent_mode_recipe"]["catalysts"] += list(list("name" = reagent.name, "id" = reagent.type, "ratio" = reaction.required_catalysts[reagent.type], "color" = color_r, "tooltipBool" = tooltip_bool, "tooltip" = tooltip))
data["reagent_mode_recipe"]["isColdRecipe"] = reaction.is_cold_recipe
else
data["reagent_mode_recipe"] = null
return data