Skip to content

Select a machine in-game -> focus its block(s) in the web #3

Description

@ApocDev

The reverse of locate: a discrete in-game hotkey (reads player.selected on keypress, deliberately not a button) sends the selected entity's recipe and output to the app, and the web jumps to the relevant block.

Blocks are plans, not physical regions, so there is no direct entity-to-block link, only recipe association. Disambiguation:

  • Exactly one block uses that recipe: navigate straight to it.
  • Multiple blocks: open the factory resource view filtered to that good or recipe (it already lists producers and consumers per block) and let the user pick. Do not guess "closest", since blocks are not spatial.
  • No block: a "no block plans this yet, create one?" nudge.

Mechanism: the mod sends {recipe, product} to the app over the bridge; the app stores a pending navigation; the web polls a small endpoint and routes when one lands (the browser is separate from the server). This reuses the existing bridge and resource drawer, with no new UI buttons.

A better-than-recipe future option is to let the player tag a physical region or set of entities as "block X" in-world for a direct mapping. That is a bigger feature; recipe association is v1.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: bridgeLocal service / API bridge between Factorio and the apparea: protocolUDP message schema and request/response handlingarea: webWeb UI (React/TanStack/vite-plus)

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions