[PR #1740] [MERGED] refactor(port-pack): move YUNG, Lithostitched and CTOV conversion into legacy_structure_mods #3730

Closed
opened 2026-11-03 04:11:50 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/1740
Author: @ludovic111
Created: 10/25/2026
Status: ✅ Merged
Merged: 10/25/2026
Merged by: @ludovic111

Base: main ← Head: refactor/port-pack-legacy-structure-mods


📝 Commits (1)

  • 486df91 refactor(port-pack): move YUNG, Lithostitched and CTOV conversion into legacy_structure_mods

📊 Changes

8 files changed (+1819 additions, -1613 deletions)

View changed files

📝 crates/horizon-port-pack/src/carry.rs (+5 -5)
➕ crates/horizon-port-pack/src/legacy_structure_mods/ctov.rs (+179 -0)
➕ crates/horizon-port-pack/src/legacy_structure_mods/lithostitched.rs (+503 -0)
➕ crates/horizon-port-pack/src/legacy_structure_mods/mod.rs (+32 -0)
➕ crates/horizon-port-pack/src/legacy_structure_mods/yung.rs (+1055 -0)
📝 crates/horizon-port-pack/src/lib.rs (+1 -0)
📝 crates/horizon-port-pack/src/processors.rs (+17 -882)
📝 crates/horizon-port-pack/src/worldgen.rs (+27 -726)

📄 Description

🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself.

A pure move, no behaviour change. It walls off the conversion of YUNG's API and its mods, Lithostitched and ChoiceTheorem's Overhauled Village so a clean-room team can rewrite it from a written spec and delete the old module unread. Nothing player-facing changes (skip-release).

What moved

worldgen.rs and processors.rs mixed the conversion of these mods with the general conversion code for Repurposed Structures, Moog's, Mo' Structures and Formations. The mod-specific functions, constants and match branches now live in crates/horizon-port-pack/src/legacy_structure_mods/ (yung.rs, lithostitched.rs, ctov.rs), moved as written; only visibility and paths changed. The general code keeps a dispatch and calls these entry points:

Mod Entry points
yung upgrade, upgrade_pool_element, disables, pillar_type, processor
lithostitched upgrade, modifier, processor, expand_references
ctov code_set_entries, mark_loaded

Call sites: worldgen::upgrade_types, processors::carry_at, ProcessorData::mark_loaded, and two spots in carry.rs. A handful of general helpers became pub(crate) for the module (start_checks, placement_rules, moogs_terrain, the two terrain key constants, carry_all, referenced). The tests specific to these mods moved with the code (65 tests before and after). worldgen.rs goes from 1995 to about 1290 lines and processors.rs from 1750 to about 970; the diff is large because of the move, not because of new code.

How it was checked

  • Same output on a real pack. I built the crate at origin/main and at this branch and ran horizon-port-pack carry on a copy of the ATM10 work folder (42 mods, including all of YUNG's, Lithostitched and CTOV). The two output trees are identical (diff -r: 110,629 files, 78 with horizon:yungsapi, 244 with converted processors, the Lithostitched modifier additions and the CTOV set entries), and the two logs are identical.
  • cargo test -p horizon-port-pack: 65 passed, before and after.
  • No parity harness is affected: no crate of the game's workspace depends on horizon-port-pack (only the launcher does, and it uses none of the moved functions). pr_ready agrees ("no harness affected").
**pr_ready** (`tools/pr_ready.py --quick` on ludovics-mac-mini, against origin/main at 1ef5b82b7)
| Public tree | ✅ |
| rustfmt | ✅ |
| clippy (-D warnings) | ✅ |
| tests: horizon-port-pack | ✅ 65 passed |
| launcher rustfmt / clippy / tests | ✅ / ✅ / ✅ 118 passed |
| Parity | ➖ no harness affected |
| Scope | ⚠️ +1819 −1613: a move, split only by the module boundary |

Needs Ludovic

Nothing. The interface note for the clean-room team is outside the repo (horizon-parity/cleanroom/structures/port-pack-interface.md). Docs that describe the old conversion (docs/modpacks.md, around the YUNG and Lithostitched sections) are unchanged by this PR.

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/horizon-rust/horizon/pull/1740 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/25/2026 **Status:** ✅ Merged **Merged:** 10/25/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `refactor/port-pack-legacy-structure-mods` --- ### 📝 Commits (1) - [`486df91`](https://github.com/horizon-rust/horizon/commit/486df91b2db998fb012a088a3c4b0d3d2146ebdb) refactor(port-pack): move YUNG, Lithostitched and CTOV conversion into legacy_structure_mods ### 📊 Changes **8 files changed** (+1819 additions, -1613 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-port-pack/src/carry.rs` (+5 -5) ➕ `crates/horizon-port-pack/src/legacy_structure_mods/ctov.rs` (+179 -0) ➕ `crates/horizon-port-pack/src/legacy_structure_mods/lithostitched.rs` (+503 -0) ➕ `crates/horizon-port-pack/src/legacy_structure_mods/mod.rs` (+32 -0) ➕ `crates/horizon-port-pack/src/legacy_structure_mods/yung.rs` (+1055 -0) 📝 `crates/horizon-port-pack/src/lib.rs` (+1 -0) 📝 `crates/horizon-port-pack/src/processors.rs` (+17 -882) 📝 `crates/horizon-port-pack/src/worldgen.rs` (+27 -726) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. A pure move, no behaviour change. It walls off the conversion of YUNG's API and its mods, Lithostitched and ChoiceTheorem's Overhauled Village so a clean-room team can rewrite it from a written spec and delete the old module unread. Nothing player-facing changes (`skip-release`). ## What moved `worldgen.rs` and `processors.rs` mixed the conversion of these mods with the general conversion code for Repurposed Structures, Moog's, Mo' Structures and Formations. The mod-specific functions, constants and match branches now live in `crates/horizon-port-pack/src/legacy_structure_mods/` (`yung.rs`, `lithostitched.rs`, `ctov.rs`), moved as written; only visibility and paths changed. The general code keeps a dispatch and calls these entry points: | Mod | Entry points | |---|---| | `yung` | `upgrade`, `upgrade_pool_element`, `disables`, `pillar_type`, `processor` | | `lithostitched` | `upgrade`, `modifier`, `processor`, `expand_references` | | `ctov` | `code_set_entries`, `mark_loaded` | Call sites: `worldgen::upgrade_types`, `processors::carry_at`, `ProcessorData::mark_loaded`, and two spots in `carry.rs`. A handful of general helpers became `pub(crate)` for the module (`start_checks`, `placement_rules`, `moogs_terrain`, the two terrain key constants, `carry_all`, `referenced`). The tests specific to these mods moved with the code (65 tests before and after). `worldgen.rs` goes from 1995 to about 1290 lines and `processors.rs` from 1750 to about 970; the diff is large because of the move, not because of new code. ## How it was checked - **Same output on a real pack.** I built the crate at `origin/main` and at this branch and ran `horizon-port-pack carry` on a copy of the ATM10 work folder (42 mods, including all of YUNG's, Lithostitched and CTOV). The two output trees are identical (`diff -r`: 110,629 files, 78 with `horizon:yungsapi`, 244 with converted processors, the Lithostitched modifier additions and the CTOV set entries), and the two logs are identical. - `cargo test -p horizon-port-pack`: 65 passed, before and after. - No parity harness is affected: no crate of the game's workspace depends on `horizon-port-pack` (only the launcher does, and it uses none of the moved functions). `pr_ready` agrees ("no harness affected"). ``` **pr_ready** (`tools/pr_ready.py --quick` on ludovics-mac-mini, against origin/main at 1ef5b82b7) | Public tree | ✅ | | rustfmt | ✅ | | clippy (-D warnings) | ✅ | | tests: horizon-port-pack | ✅ 65 passed | | launcher rustfmt / clippy / tests | ✅ / ✅ / ✅ 118 passed | | Parity | ➖ no harness affected | | Scope | ⚠️ +1819 −1613: a move, split only by the module boundary | ``` ## Needs Ludovic Nothing. The interface note for the clean-room team is outside the repo (`horizon-parity/cleanroom/structures/port-pack-interface.md`). Docs that describe the old conversion (`docs/modpacks.md`, around the YUNG and Lithostitched sections) are unchanged by this PR. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 04:11:50 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#3730
No description provided.