Repository navigation
Port Yuoki 1.3.0 startup to Factorio 2.1 - #11
Conversation
There was a problem hiding this comment.
Hey - I've found 3 issues
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="prototypes/integration/omnia/ir_atomics.lua" line_range="18" />
<code_context>
main_product = "y-unicomp-a2",
subgroup = "j-y-atomics-4",
- category = "yuoki-atomics",
+ categories = { "yuoki-atomics" },
icons = {
{
</code_context>
<issue_to_address>
**Optional integration recipes retain old categories**
When bob’s Ores or Silica is installed and its integration prototypes are loaded, when the Bob’s Ores or Silica integration is loaded, its recipe prototypes still set the removed `category` field instead of `categories`; Factorio rejects those prototypes during startup, so the mod configuration fails to load.
Convert the recipe categories in the remaining integrations to `categories` arrays.
</issue_to_address>
### Comment 2
<location path="prototypes/entity/e_advmachinery.lua" line_range="78" />
<code_context>
volume = 200,
production_type = "input",
- pipe_picture = assembler2pipepictures(),
+ pipe_picture = assembler_pictures.assembler2pipepictures,
pipe_covers = pipecoverspictures(),
base_area = 10,
</code_context>
<issue_to_address>
**Assembler prototypes receive functions**
When factorio 2.1's assembler-pictures module exports `assembler2pipepictures` and `assembler3pipepictures` as factory functions, the assembler-picture exports are factory functions, so assigning them directly gives `pipe_picture` a function instead of the required picture table; Factorio rejects the affected machine prototypes and startup stops.
Invoke each assembler-picture factory when assigning `pipe_picture` in all affected prototypes.
Also at `prototypes/entity/e_entity219.lua:84`, `prototypes/entity/e_entity220.lua:88`, `prototypes/entity/e_mastercrafted.lua:47`, `prototypes/entity/e_smelter.lua:134`, `prototypes/entity/y_entities.lua:400`, `prototypes/entity/y_entities.lua:477`.
</issue_to_address>
### Comment 3
<location path="prototypes/integration/space-age/r_metal-process.lua" line_range="9" />
<code_context>
icon = "__Yuoki__/graphics/icons/pure-iron-n.png",
icon_size = 64,
- category = "metallurgy",
+ categories = { "metallurgy" },
subgroup = "vulcanus-processes",
order = "a[melting]-b[molten-iron]",
</code_context>
<issue_to_address>
**Hidden slag remains recyclable**
When angels Refining and Quality are enabled and a generated recycling recipe produces `y-slag`, `angelsrefining.lua` reads `recipe.category`, so it skips recycling recipes whose category is in Factorio 2.1’s `recipe.categories`; its cleanup leaves those recipes able to return hidden `y-slag` in the recycler.
Update the cleanup to check recycling categories through `recipe.categories`.
Also at `prototypes/recipe/r_metal-process.lua:154`, `prototypes/recipe/r_metal-process.lua:173`.
</issue_to_address>Sourcery assessment
Approval pending. 3 findings to address first.
Blocking findings: prototypes/integration/omnia/ir_atomics.lua:18, prototypes/entity/e_advmachinery.lua:78, prototypes/integration/space-age/r_metal-process.lua:9
|
@pullfrog review |
There was a problem hiding this comment.
Important
One Factorio 2.1 compatibility gap remains: Angel’s slag recycling cleanup is skipped when Recycler is enabled without Quality.
Reviewed changes: Reviewed all 32 changed files across the three commits porting Yuoki 1.3.0 to Factorio 2.1.20.
- Assembler pictures: Imports the official picture-table exports instead of calling the removed globals; verified that these exports are tables, not functions.
- Prototype fields: Migrates recipe and item fuel categories to arrays, including the active recipe-generation helpers, and preserves product probabilities through
independent_probability. - Optional quality module: Requires both Space Age and Quality before defining the quality module and its recipe.
- Angel’s integration: Updates recycling-category matching and removes technology unlocks for deleted slag-returning recipes, but retains a guard that misses Recycler-only configurations.
- Release metadata: Sets Yuoki 1.3.0 and Factorio 2.1, with base and optional expansion minimums of 2.1.20.
Independent validation with official Factorio 2.1.20, build 87512: Base + Yuoki, Recycler + Quality + Yuoki, Space Age + Quality + Yuoki, and Space Age + Yuoki with Quality disabled each created a fresh map and completed 120 ticks. Generated-data assertions checked representative categories, fuel values, asteroid probabilities, and the quality-module guard. A minimal Angel’s dependency fixture reproduced the finding with Quality disabled and confirmed cleanup with Quality enabled; this does not constitute full Angel’s gameplay, visual, or old-save testing.
gpt-6.1-sol | 𝕏

Summary
Yuoki 1.2.x cannot start on Factorio 2.1 because required prototype fields and assembler picture APIs changed. This ports Yuoki 1.3.0 to Factorio 2.1.20 while preserving existing gameplay values.
independent_probabilityfor product results and shared helpers without changing probabilities.y-slagand their technology unlock references, with Quality enabled or disabled. Match recycling in any category position and preserve unrelated recipes and effects.factorio_version2.1, and base/optional Space Age/Quality minimums 2.1.20. Yuoki 1.2.x remains the Factorio 2.0 line.Targets
release/1.3.0injatmn/Yuoki-Factorio-2.x.Validation
Official Factorio 2.1.20 (build 87512, linux64, headless) with isolated mod and write directories. Each configuration passed generated-data assertions, created a fresh map, and completed 120 ticks with the final Yuoki 1.3.0 source:
The recycling regression fails on starting head
a7d5cdf: with Angel's and Recycler enabled but Quality disabled,y-slag-recycling,y_slag_granulate-recycling, andy_tile_slagfilled-recyclingreturn hidden slag and retain their unlocks. The final source removes all three recipes and unlocks in both Quality configurations. A full before/after generated-data comparison shows only the intended recipe removals, unlock removals, and slag recycling flags changed.The dependency fixture defines only
angels-slagand the mod identity. Yuoki's real loading stages and the official Recycler perform the behavior under test. Controls verify normal slag recycling without Angel's, Angel's replacement without Recycler, unrelated recycling and technology unlocks, representative recipe/fuel categories and fuel values, asteroid probabilities of 0.2, and the optional quality-module guard. The official assembler-picture exports were verified as tables.The repair hunk and affected contracts were reviewed;
git diff --checkpassed. The committed tree exactly matches the tested candidate.Reviewed and tested commit:
bbd2ce77b0ec5b59623bd96347d95937d7658f17.Scope and limitations
Quality scaling, module effects, balance, and disabled monuments remain unchanged. Unloaded legacy Bob's/Silica files and unrelated obsolete fields remain outside this startup port.
The full Angel's mod and other third-party mod gameplay were not runtime-tested. Headless validation does not establish visual correctness, gameplay balance, or old-save migration.