FOB build areas, rotatable, with draggable placed markers - #16
Conversation
|
The interaction work here is really nice - moving markers, rotation, snapping and undo/history all look well thought out The blocker for me is the actual FOB build-area size. Since the 60 m half-side is currently eyeballed from footage, I don't want to publish it as an authoritative game measurement yet If we can confirm the dimensions from game data or another reliable source, I'd be happy to revisit this It should also be rebased after the main-zone dependency is resolved |
|
Fair, similar to the other PRs. I did get one good example where it lined up with the actual grid really well but it could still be off a little bit so we might aswell wait ye |
|
Hey, I managed to confirm the FOB build area from the game data - it is indeed a 120×120 m square, so The FOB part of this PR looks good to me now. The only thing blocking a merge is that #16 is still stacked on #9 and would also bring in the unverified Main Zone values/fallback Could you rebase/update #16 on the current main and drop the Main Zone/#9 changes from it, keeping just the FOB build-area + rotation/marker-drag related changes? Also, the comment in config.js still says the FOB size is a placeholder/not measured, which can be updated now that the value is confirmed After that I should be good to merge it |
3dc7e45 to
da517be
Compare
|
Thanks for updating this. The previous blockers are resolved now: the FOB area is confirmed as a 120×120 m square, the Main Zone changes are no longer part of this PR, and the placeholder wording has been removed. The FOB marker is already available in |
Rebased onto current main and unstacked from #9 — the diff here is now only the FOB build-area work, three commits, no merge commit. It still needs the tactical markers branch, not yet opened, before any of this is reachable in the UI: the build area is drawn around a placed marker whose icon id is "fob", and that icon does not exist until that branch lands. Until then the code is inert rather than broken, drawing nothing and leaving the wheel to zoom as it always has.
Adds a "fob" ring kind measured by halfSide, the distance from the FOB to an edge, so the buildable side is twice it. A square, not a circle, so it gets its own drawing primitive rather than reusing the ring.
The square turns with the wheel while the marker tool is active and the cursor is over a FOB, or by dragging the grip on the icon's top-left corner. Shift snaps to 15 degrees, double-clicking the grip straightens it. Rotation lives on the marker, so undo, export and persistence come for free.
Pressing a marker that is already placed now picks it up and moves it instead of stacking a second one on top.
The 60 m half-side is confirmed from the game data — the build area is a 120 x 120 m square — so the placeholder wording in config.js is gone with it.
Only en has the new mapLayerFobAreas string; the other eleven fall back to English and are worth one follow-up pass.