Reach strategy missing for wall shape 9 and loc shapes 12-21 #25
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
World.reachable?/1now routes wall locs (shapes 0-3) throughWorld.Collision.Flags.reach_wall?/5and everything else throughWorld.Collision.Flags.interactable_from?/3. Two ranges are still handled bythe more permissive branch than they should be:
purposes —
class60callsaddGameObjectfor it, andFlags.place/5matchesthat — but reach for a diagonal wall is edge-based, not footprint-based: the
four cardinal neighbours, each conditional on the facing wall being clear.
Ours gives it the footprint test.
reachable at all by the engine's own strategy table. They are roof and
diagonal variants that are not normally clicked, so this has not surfaced.
Both are the same direction of wrong — more permissive than the client — which
is the direction that produces "I used that through a wall" rather than "I could
not use that", and so does not get reported.
Flags.reach_wall?/5already has the structure; shape 9 is four clauses. Theharder half is routing:
dispatch/2sends a wall click toMovement.route/3targeting the loc's own tile, which for shape 9 is solid, sothe route falls back to the nearest reachable tile rather than one that can
actually reach it.
Worth doing when a real interactive loc in either range turns up, with the loc
in hand rather than from the shape table alone.
Leaving this open — the condition it sets for itself (a real interactive loc in either range, with the loc in hand rather than the shape table alone) has not come up yet.
One thing has moved under it, though.
World.reachable?/1is gone: the per-kind reach rules now live inContract.Reach, pure and taking a flags snapshot, with one clause per kind of target and no catch-all. So shape 9 becomes a clause there plus the fourwall_reach/2entries inFlags, and it can be tested without a running world — which is most of what made this look expensive.The routing half is unchanged and is still the harder one:
dispatch/2sends a wall click toMovement.route/3targeting the loc's own tile, which for shape 9 is solid, so the route falls back to the nearest reachable tile rather than one that can actually reach it.