Deadlock Stacked Recipes for Space Exploration


Adds support for stacking recipes in Deadlock's beltboxes and loaders.

Tweaks
3 months ago
2.0
138
Logistics Manufacturing

g Patch: replace rusty-locale with flib (also for Deadlock Extra)

7 days ago

Hi Avokator,

rusty-locale's README says its 2.0 version is a stop-gap and asks dependent mods to move to flib, and it doesn't load on Factorio 2.1. I've made the switch for Deadlock Stacked Recipes and for Avokator's Deadlock Extra, in case it saves you some time.

Deadlock Stacked Recipes: the rusty-locale calls in utils/deadlock.lua and mods/CompressedFluids/data-final-fixes.lua now go through a new utils/lookup.lua that returns the same values rusty-locale did:
- item names: flib_locale.of(item)
- recipe names: the recipe's localised_name, otherwise its main product's name via flib. That is rusty-locale's rule; flib's own of_recipe only uses the product name when the product has the recipe's name, so I didn't use it.
- get_main_product, find_by_name and recipe icons: small local functions
- info.json: rusty-locale → flib >= 0.16.3

Deadlock Extra doesn't call rusty-locale, so its patch only removes the dependency from info.json.

Tested on 2.1.22 with Space Exploration 0.7.63 and se-deadlock-bridge, version tags bumped for the test: the full data stage (9,816 prototypes) and all 39,003 lines of the mod's debug log at debug_logging_level 2, which include the 281 computed recipe names, are identical with rusty-locale and with flib. The CompressedFluids part couldn't be run, since CompressedFluids is still on 1.1, so that part is checked by reading only.

Unrelated to flib, both mods needed these changes to load on 2.1. I left them out of the patch so it stays on 2.0:
- data.raw.tool no longer exists (science packs are plain items): utils/deadlock.lua:841, data/technology.lua:63, and Deadlock Extra data-final-fixes.lua:66
- recipe category → categories: Deadlock Extra data-final-fixes.lua:164 (2.1 rejects the old key)
- item fuel_category → fuel_categories: utils/deadlock.lua:166

Patches for both mods and the new file: https://gist.github.com/Capta1n-n9m0/c936cfd68c3e2af1d5fb73e1e5218d7a

Abbas

New response