urgent fixes

Guide for urgent fixes

🚨 Urgent Fixes & Pending Tasks

Date: 2026-01-10 Status: Heavy Bug Fixing / stabilization

🛑 Critical Compilation Errors (Blockers)

  1. Guard Captain Shop (src/systems/ui/guard_captain_shop.rs)
    • Error: cannot move out of dereference of ... shop_state.selected_item
    • Location: Line 120 (approx)
    • Fix: Change if let Some(_item_id) = shop_state.selected_item to if let Some(_item_id) = &shop_state.selected_item (borrow instead of move).
  2. Magic / Projectile System (src/systems/magic/projectile.rs)
    • Status: User active in file.
    • Check: Verify DamageDealtEvent struct signature matches the instantiation (fields attacker, target, damage are present; interaction_type was removed).
    • Action: Ensure systems/combat/mod.rs event definition aligns with this usage.
  3. Editor Input (src/systems/editor/input.rs)
    • Status: Recent changes to snap_rot and history resource.
    • Action: Verify if EditorHistory resource is properly initialized in EditorPlugin.

⚠️ High Priority Warnings (Cleanup)

Run cargo check to surface these:
  1. Map System (src/systems/map.rs): mut materials param does not need to be mutable.
  2. Milestone Notifications (src/systems/ui/milestone_notifications.rs): Unused mut ui_offset, unused animation_timer.
  3. Progression Tracker (src/systems/ui/progression_tracker.rs): Unused button variable.

🏗️ Pending Features & Next Steps

1. Grand Bazaar (Economy)

  • Core Logic: Matching engine, OrderBook, TradeHistory.
  • In-Game UI: Basic "Counter" interface.
  • Web Integration:
    • Connect api.rs endpoints to actual Web Server (Axum/Actix).
    • Implement auth bridge for web users.
  • Visual Polish: Add 3D models or icons to the Trade Desk UI.

2. Editor & Building System

  • Snapping: Refine snap_rot logic in input.rs.
  • History: Ensure Undo/Redo (EditorHistory) is fully functional.

3. Magic System

  • Projectile Visuals: Replace default Sphere mesh with actual VFX scene/particles.
  • Collision: Ensure projectile_collision (or movement-based hit check) handles terrain/obstacles, not just target distance.

📝 General Todo

  • Run cargo clippy --all-targets and fix remaining lints.
  • Check tutorial_area_todo.md for specific level design tasks.