#1493

Mapped street lamps: pass them to the road builder again

Openglki6wants to merge intofrom

Summary

Road tiles guess every street lamp, even where OpenStreetMap maps them: in 95 Hong Kong road geotiles the 6 mapped lamps are not drawn. #981 (44d05fc4) already solved this for every place with mapped lamps, such as Prague and Utrecht: each lamp stands at its mapped point and its road guesses none. But the argument that hands those lamps to the road builder is missing from the roads.build_tile call in blockworker._tile_parts, so furniture.place gets none. This PR puts it back, with a test that fails without it. That brings the road tiles back on par with #981 and with earthd.build_roads_tile, which still passes the argument.

Why I think the removal was not meant

I found no statement of why the argument went. This is what the history shows, then what I conclude from it.

  • 44d05fc4 (#981, 2026-11-10 17:33) added mapped_lamps=mapped_lamps) as the last argument of the call.
  • 92246470 (road wear) appended wear=roadwear.tier_of(wear) to that same line, and 1abd47c7 edited the line again. Both kept the lamp argument.
  • 97d0bcf2 (fallen leaves, 19:32 the same day) replaced the line mapped_lamps=mapped_lamps, wear=roadwear.tier_of(wear), with wear=wear if isinstance(wear, dict) else roadwear.tier_of(wear),. The lamp argument went with it. The commit message does not mention lamps.
  • The rest of the feature is still on dev. _tile_parts still builds the list (its comment: "furniture.place draws them"). BNE_MAPPED_LAMPS is still read and still in the README. earthd.build_roads_tile still passes the argument. No later commit touches mapped_lamps in blockworker.py.

So I read it as a line rewritten for one argument that lost the other. That is a conclusion from the diff, not something I know. If the lamps were taken out on purpose, close this.

Results

Hong Kong, 95 road geotiles at 12 places. OpenStreetMap has few lamps there, so the change is small: 6 mapped lamps drawn where dev draws none. The rows of 4 tiles change; the other 91 are identical to dev.

Known limits

  • Not run outside Hong Kong. My lab could not build tiles elsewhere. A city with many mapped lamps will change far more than 4 tiles: its lamps stand at their mapped points again, and a road with two of them along it guesses none (furniture.roads_with_points), as #981 meant.
  • Not seen in the game on dev. Seen on a 1.10.1-beta tree with this line and the Hong Kong lamp source together.

Who this affects

  • Every place with OpenStreetMap street lamps. BNE_MAPPED_LAMPS=off still gives the guessed lamps only.
  • Cache keys: nothing new; the tiles' code key changes with blockworker.py as for any change to it.
  • #1492 (Hong Kong's lamp posts) has this same commit as its first. This PR is the line alone.

Validation

  • test_blockworker passes with one new test, MappedLampsTest.test_road_tile_gets_the_mapped_lamps: a stubbed _tile_parts whose roads.build_tile must receive the row worldprops.tile_props made. With dev's blockworker.py it fails.
  • test_worldprops and test_furniture pass.
  • test_determinism.platform_maths finds nothing in blockworker.py. I have not run the whole suite.

🤖 Generated with Claude Code on Fable 5.2