From af8089b1ed2e672f41167241e232fa0cfc0122a3 Mon Sep 17 00:00:00 2001 From: Brevven Date: Fri, 27 Dec 2024 03:01:30 -0800 Subject: [PATCH] recycling redo --- changelog.txt | 1 + data-updates.lua | 3 +++ data-util.lua | 9 +++++++++ 3 files changed, 13 insertions(+) diff --git a/changelog.txt b/changelog.txt index 834b8b3..75e1398 100644 --- a/changelog.txt +++ b/changelog.txt @@ -3,6 +3,7 @@ Version: 2.0.7 Date: 2024-12-27 Fixes: - Fix size of ore pictures + - Ensure recycling changes always happen regardless of mod load order --------------------------------------------------------------------------------------------------- Version: 2.0.6 Date: 2024-12-27 diff --git a/data-updates.lua b/data-updates.lua index eb7fccf..ffe7618 100644 --- a/data-updates.lua +++ b/data-updates.lua @@ -6,3 +6,6 @@ require("map-gen-preset-updates") require("strange-matter") require("compatibility/248k") require("compatibility/crafting-efficiency") + +local util = require("data-util") +util.redo_recycling() diff --git a/data-util.lua b/data-util.lua index 0b15cbd..7de0ead 100644 --- a/data-util.lua +++ b/data-util.lua @@ -1356,4 +1356,13 @@ function util.set_vtk_dcm_ingredients() end end +-- Recalculate recycling recipes, since our mod might make updates after quality generates them +function util.redo_recycling() + if mods.quality then + local recycling = require("__quality__.prototypes.recycling") + for _, recipe in pairs(data.raw.recipe) do + recycling.generate_recycling_recipe(recipe) + end + end +end return util