[PR #4597] [MERGED] Port map: MoveThroughVillageGoal is ported for zombies #5720

Closed
opened 2026-11-03 05:14:33 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/4597
Author: @xFedeT
Created: 10/30/2026
Status: ✅ Merged
Merged: 10/31/2026
Merged by: @rdbtCVS

Base: main ← Head: fix/move-through-village-map


📝 Commits (1)

  • 90e269d Port map: MoveThroughVillageGoal is ported for zombies

📊 Changes

1 file changed (+1 additions, -1 deletions)

View changed files

📝 tools/port_map/game-009.tsv (+1 -1)

📄 Description

🤖 Opened by xFedeT's AI agent (Claude Code, Sonnet 5.5), not by xFedeT personally.

Refs #3521 (row MoveThroughVillageGoal)

What

The row is wrong: zombies already register MoveThroughVillage at priority 6 (mobs/undead.rs, g.add(6, MoveThroughVillage::new(1.0, true, 4, |m| m.extra.can_break_doors)), and the raider variant is mobs/raider.rs). The port map (tools/port_map/game-009.tsv) still listed it as missing. This PR only corrects that row. No game code changes.

How I checked

I read MoveThroughVillageGoal.java and compared it with undead.rs::MoveThroughVillage method by method:

Vanilla Horizon
constructor: speed, onlyAtNight, distanceToPoi (4), canDealWithDoors, MOVE flag, ground navigation only new(1.0, true, 4, can_break_doors), flags() = MOVE, can_navigate_ground
canUse: trim visited to 16, not by day (isBrightOutside), isCloseToVillage(pos, 6) same, with village_sections / sections_to_village(.., 6)
LandRandomPos.getPos(mob, 15, 7, p -> isVillage(p) ? -distSqr(first unvisited occupied village POI within 10) : -inf) land_random_pos_scored(15, 7, ...) with the same score
the POI nearest that spot, createPath(poi, 0) with setCanOpenDoors(canDealWithDoors) same, then can_open_doors = true again
no path: DefaultRandomPos.getPosTowards(mob, 10, 7, poi, PI/2) and a path to it default_random_pos_towards(10, 7, ..., FRAC_PI_2)
a wooden door on the path: re-path only to its node same
canContinueToUse: navigation busy and not poi.closerToCenterThan(position, width + distance) same
start: moveTo(path, speed); stop: remember the POI when done or within distance same

There is no tick-for-tick check yet: the mob_ai scenario I tried did not make the goal start in vanilla (the village set up for it is not recognised), so it stays an open item.

A map change has no in-game effect, so there is no screenshot.

🤖 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/4597 **Author:** [@xFedeT](https://github.com/xFedeT) **Created:** 10/30/2026 **Status:** ✅ Merged **Merged:** 10/31/2026 **Merged by:** [@rdbtCVS](https://github.com/rdbtCVS) **Base:** `main` ← **Head:** `fix/move-through-village-map` --- ### 📝 Commits (1) - [`90e269d`](https://github.com/horizon-rust/horizon/commit/90e269dc36a68bb283285c487d6f9c0f9425b6ad) Port map: MoveThroughVillageGoal is ported for zombies ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `tools/port_map/game-009.tsv` (+1 -1) </details> ### 📄 Description > 🤖 Opened by xFedeT's AI agent (Claude Code, Sonnet 5.5), not by xFedeT personally. Refs #3521 (row `MoveThroughVillageGoal`) ## What The row is wrong: zombies already register `MoveThroughVillage` at priority 6 (`mobs/undead.rs`, `g.add(6, MoveThroughVillage::new(1.0, true, 4, |m| m.extra.can_break_doors))`, and the raider variant is `mobs/raider.rs`). The port map (`tools/port_map/game-009.tsv`) still listed it as `missing`. This PR only corrects that row. No game code changes. ## How I checked I read `MoveThroughVillageGoal.java` and compared it with `undead.rs::MoveThroughVillage` method by method: | Vanilla | Horizon | |---|---| | constructor: speed, `onlyAtNight`, `distanceToPoi` (4), `canDealWithDoors`, `MOVE` flag, ground navigation only | `new(1.0, true, 4, can_break_doors)`, `flags() = MOVE`, `can_navigate_ground` | | `canUse`: trim `visited` to 16, not by day (`isBrightOutside`), `isCloseToVillage(pos, 6)` | same, with `village_sections` / `sections_to_village(.., 6)` | | `LandRandomPos.getPos(mob, 15, 7, p -> isVillage(p) ? -distSqr(first unvisited occupied village POI within 10) : -inf)` | `land_random_pos_scored(15, 7, ...)` with the same score | | the POI nearest that spot, `createPath(poi, 0)` with `setCanOpenDoors(canDealWithDoors)` | same, then `can_open_doors = true` again | | no path: `DefaultRandomPos.getPosTowards(mob, 10, 7, poi, PI/2)` and a path to it | `default_random_pos_towards(10, 7, ..., FRAC_PI_2)` | | a wooden door on the path: re-path only to its node | same | | `canContinueToUse`: navigation busy and not `poi.closerToCenterThan(position, width + distance)` | same | | `start`: `moveTo(path, speed)`; `stop`: remember the POI when done or within `distance` | same | There is no tick-for-tick check yet: the `mob_ai` scenario I tried did not make the goal start in vanilla (the village set up for it is not recognised), so it stays an open item. A map change has no in-game effect, so there is no screenshot. 🤖 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 05:14:33 +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#5720
No description provided.