Iam0204 Posted June 14, 2024 Share Posted June 14, 2024 Spoiler function CookbookPageCrockPot:_sortfn_default(a, b) return a.recipe_def.priority > b.recipe_def.priority or (a.recipe_def.priority == b.recipe_def.priority and a.defaultsortkey > b.defaultsortkey) end Spoiler local data = { prefab = prefab, name = STRINGS.NAMES[string.upper(prefab)] or subfmt(STRINGS.UI.COOKBOOK.UNKNOWN_FOOD_NAME, {food = prefab or "SDF"}), recipe_def = recipe_def, defaultsortkey = hash(prefab), food_atlas = "images/quagmire_recipebook.xml", food_tex = "cookbook_unknown.tex", } It sorts them by priority first but anyway. I hope it could be more reasonable. Link to comment https://forums.kleientertainment.com/forums/topic/157102-the-game-uses-hashes-to-sort-the-foods-in-cookbook/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.
Please be aware that the content of this thread may be outdated and no longer applicable.