Repository navigation
fix: preserve Yuoki behavior across Factorio 2.1 API changes - #18
Conversation
|
@pullfrog review |
There was a problem hiding this comment.
Hey - I've reviewed your changes and they look great!
Sourcery assessment
Needs a human reviewer. If the quality conversion is wrong, production runs can create items with incorrect quality probabilities, and those results remain in saved games after reverting the mod. The impact is bounded to gameplay state and can generally be repaired by rolling back or correcting affected saves; the pipe changes mainly affect connection indicators and are reversible runtime behavior.
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes: Reviewed all five changed files and both commits against release/1.3.0, including active loading paths, related compatibility work, and official Factorio API contracts.
- Quality chance: Changing
qualityfrom0.1to0.01preserves the module's normal-quality 1% upgrade chance while leaving consumption and productivity unchanged. The 2.0 contract multiplied the effect by the quality'snext_probability; the 2.1 contract uses the direct percentage scalar. - Pipe visibility: All 22 connections across the eight affected prototypes receive
hide_connection_info, matching the 2.1.20 connection API, without changing directions, positions, capacities, or underground distances. - Release documentation: README compatibility and installation guidance match
info.jsonand the optional module guard; release dates, homepage, and changelog entries are consistent.
Independent validation passed: package build, package validation covering all 1,038 release files, and PR whitespace checks. The current Lua and packaging CI checks also pass. I did not rerun the headless engine or local Lua tooling in this review; the PR's reported engine tests remain the runtime evidence, with graphical behavior, Factorio 2.0 save migration, and full third-party combinations outside that coverage.
gpt-6.1-sol | 𝕏

Problem and change
Factorio 2.1 changed quality-effect units and moved pipe connection visibility into each connection definition. The startup port left Yuoki's quality effect at
0.1, raising its normal-quality chance from 1% to 10%, and left eight pipes using the removed fluid-box flag.0.01to preserve the YI Quality Module's previous 1% chance; retain its consumption and productivity effects.Targets release/1.3.0 only. Follows the startup compatibility work in #11 and the baseline in #17. No version bump or gameplay rebalance.
Validation
Official Factorio 2.1.21, build 87673, Linux headless, using the built mod ZIP:
The quality regression fails on starting source
62d9981: the official runtime reports0.1instead of expected0.01. With this change, a save made from that source retains its installed module and reports0.01on both the item prototype and placed assembler; consumption/productivity remain unchanged. It completes 120 ticks, as does a fresh save. The run-owned probe uses real Yuoki and official expansion mods; no dependency substitutes.Full before/after prototype comparisons for all five configurations show only the intended quality scalar and pipe-flag migrations. Yuoki boilers also pass 2.1.21's stricter temperature validation, and the optional quality-module guard behaves correctly.
Lua 5.2.4 syntax, Luacheck 1.2.0 (zero warnings), StyLua 2.5.2, package build/validation, ZIP membership inspection, README links and
git diff --checkpass. All changed hunks reviewed; committed tree matches the validated candidate.Reviewed commit:
664b3c5a21a7030cb5895499188d8aedf025cd96. Packaging, archive contents and diff checks pass on this final tree. Lua and engine evidence above was obtained onb79fbc4and remains applicable: the follow-up changes only README wording, release dates and the homepage URL.Sources and limits
Official 2.1 changelog, PipeConnectionDefinition, and runtime entity effects.
Headless validation does not prove rendered pipe indicators, full third-party mod combinations, or migration of Factorio 2.0 saves. Unloaded legacy files and unrelated historic circuit/productivity behavior are outside this repair. The audit found no further startup blocker in the tested configurations.
Summary by Sourcery
Preserve Yuoki Industries behavior and compatibility across Factorio 2.1 API changes.
Bug Fixes:
Enhancements:
Documentation: