Merge pull request #2769 from ludovic111/refactor/cut-villager-poi

🤖 Agent: verify passed at 84c631a88. Move only: the villager Poi enum goes from mobs/villager_brain.rs to poi_sections.rs (re-exported), cutting world -> mobs (step B of the cycle plan). pr_ready --quick green (1323 tests). Ready to merge once parity is green.
This commit is contained in:
Ludovic Marie
2026-10-27 12:54:54 +01:00
committed by GitHub
3 changed files with 11 additions and 9 deletions
@@ -789,14 +789,7 @@ pub fn golem_detected(m: &mut Mob, now: i64) {
// ---- Behaviours ---------------------------------------------------------
/// The POI types villagers use.
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum Poi {
/// A job site, by profession index.
Job(u8),
Home,
Meeting,
}
pub use crate::poi_sections::Poi;
impl Poi {
fn max_tickets(self) -> usize {
match self {
@@ -79,6 +79,15 @@ impl<T: Copy> PoiSections<T> {
}
}
/// The POI types villagers use.
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum Poi {
/// A job site, by profession index.
Job(u8),
Home,
Meeting,
}
#[cfg(test)]
mod tests {
use super::*;
+1 -1
View File
@@ -92,7 +92,7 @@ pub struct World {
/// (`ChunkHolder.sectionLightChanged`).
pub light_log: Option<crate::fast_hash::FxHashMap<(i32, i32), u32>>,
/// The villager POIs of each section (`PoiManager`'s sections).
pub pois: crate::poi_sections::PoiSections<crate::mobs::villager_brain::Poi>,
pub pois: crate::poi_sections::PoiSections<crate::poi_sections::Poi>,
/// Moving-piston states removed during the last tick; retained until the
/// final block mesh is visible.
pub moving_piston_fallback: Vec<([i32; 3], horizon_world::piston_shape::MovingPistonState)>,