Commit Graph

1707 Commits

Author SHA1 Message Date
Luigi
9be36112e2 Speed up the bench rotation search by generating a mask of roads and paths, and searching that instead of the actual blocks. 2026-04-12 13:44:06 +02:00
Luigi
505724a5e1 bench now tries to face the closest path/road 2026-04-11 16:16:07 +02:00
Luigi
01669c581c ran cargo fmt 2026-04-10 22:05:29 +02:00
Luigi
068c72ccea Set logs on a blacklist to prevent benches from destroying trees. 2026-04-10 20:40:33 +02:00
Luigi
b68775401d using coordinate deltas to reduce code duplication. 2026-04-10 20:29:10 +02:00
Luigi
5e4df64394 created top_stair function to remove duplicate code 2026-04-10 19:37:53 +02:00
Luigi
81c98b4841 New park bench 2026-04-10 19:11:55 +02:00
Louis Erbkamm
e95f4725ce Merge pull request #906 from louis-e/banner-decorations
Add banner decorations for hospitals, tourism info boards, and fire hydrants
2026-04-09 22:28:41 +02:00
louis-e
977d7316b8 Fix code review 2026-04-09 21:56:08 +02:00
louis-e
a3168e1866 Add banner decorations for hospitals, tourism info boards, and fire hydrants
- Add green cross banners on hospital exterior walls (Geneva-safe alternative)
- Add blue 'i' info banners on all 4 sides of tourism information boards
- Add flame-patterned banners on all 4 sides of fire hydrants
- Widen Block.id from u8 to u16 to support new banner block types
- Add wall banner blocks: white, blue, black, red, green (IDs 256-260)
- Add Bedrock block mappings for all new wall banner colors
- Cap garage/garages/carport buildings to single-story height
2026-04-09 19:42:14 +02:00
Louis Erbkamm
347dec799c Merge pull request #901 from luigi052005/better-traffic-lights
Better traffic lights
2026-04-09 17:13:41 +02:00
Louis Erbkamm
94913d7cd7 Clean up whitespace in banner block entity methods (clippy) 2026-04-09 17:13:17 +02:00
Luigi
b8beee0c3e added allow too many arguments and removed worthless comments 2026-04-08 23:12:54 +02:00
Luigi
682ad98142 Apply cargo fmt 2026-04-08 14:03:03 +02:00
Luigi
ce79e6239a Refactor: removed duplicate functions 2026-04-08 13:39:24 +02:00
Luigi
71f18c2f47 Refactored Banner logic for better reusablilty 2026-04-08 12:39:58 +02:00
Luigi
5fa06be0a7 New Traffic lights 2026-04-08 11:42:09 +02:00
Louis Erbkamm
18dae32f08 Merge pull request #897 from louis-e/prepare-v2.6.0-release
Prepare v2.6.0 release
v2.6.0
2026-04-06 21:53:22 +02:00
louis-e
06de4617dd Prepare v2.6.0 release 2026-04-06 21:52:04 +02:00
Louis Erbkamm
d30208fcf8 Merge pull request #895 from louis-e/feature/building-passage
Implement tunnel=building_passage support
2026-04-06 21:49:40 +02:00
louis-e
96711c4f48 Gate passage logic on is_ground_level for elevated building:parts
Elevated building:part elements (min_level > 0) sit above ground-level
passages and must not have their walls, floors, or decorations carved.
Create an effective_passages reference in generate_buildings() that
substitutes an empty bitmap for non-ground-level buildings, ensuring
all downstream functions receive no passage coordinates.
2026-04-06 21:42:42 +02:00
Louis Erbkamm
6f54e2ff08 Merge pull request #896 from louis-e/fix/terrain-blur-preserve-mountain-detail
Reduce Gaussian blur to preserve mountain terrain detail
2026-04-06 21:39:48 +02:00
louis-e
cfcbe58b82 Fix misleading test comment and rename for clarity
Rename test_output_sigma_large_bbox_no_regression to
test_output_sigma_large_bbox_grid_dominates and update its comment
to accurately reflect what it tests: that sigma_from_grid wins for
large areas, without implying value parity with the old constants.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-06 21:39:21 +02:00
louis-e
51b1715784 Reduce Gaussian blur to preserve mountain terrain detail
The terrain sigma floor (×12) was designed to suppress SRTM rooftop
artifacts in dense urban areas (Manhattan), but it flattened mountains
into gentle walkable slopes everywhere. Reduce to ×3 (still covers
Voronoi-block suppression from NaN-fill) and halve BASE_SIGMA_REF
from 5.0 to 2.5 so the grid-proportional component also preserves
more detail.

Result: mountains now have 2-3 block steps on steep faces (realistic
cliff terrain) while cities remain smooth (~0.4 max step). The
slope-based material system (grass → gravel → stone) will activate
more often on steep terrain, adding visual realism.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-06 21:32:17 +02:00
louis-e
6cc61d0258 Address review: use shared constant and skip bitmap allocation when unused
- Make BUILDING_PASSAGE_HEIGHT pub(crate) and use it in buildings_interior.rs
  instead of hardcoded literal 4 (Copilot comment 4)
- Add CoordinateBitmap::new_empty() zero-allocation constructor
- Skip bitmap allocation in collect_building_passage_coords when no
  tunnel=building_passage ways exist (Copilot comment 5)
2026-04-06 21:27:24 +02:00
louis-e
343cd2a4d8 Implement tunnel=building_passage support
Render ground-level archway openings through buildings where highway
ways tagged tunnel=building_passage pass through. A pre-scan phase
collects passage highway coordinates into a CoordinateBitmap, which
is threaded into building generation to:

- Cut wall blocks below passage height in build_wall_ring()
- Skip ground floors and place passage ceiling lintels
- Add corridor side walls where interior meets the passage
- Skip foundation pillars, corner quoins, wall depth features,
  window decorations, and special doors at passage coordinates
- Suppress interior furniture placement inside the passage zone
2026-04-06 21:13:45 +02:00
Louis Erbkamm
721df43f9b Merge pull request #800 from JasonOA888/fix/cli-create-new-world-706
fix: allow CLI to create new world in non-existent directory
2026-04-06 20:21:27 +02:00
Louis Erbkamm
15ea716c4d Update test to use temporary directory for path 2026-04-06 20:21:11 +02:00
Louis Erbkamm
41101292a8 Merge pull request #807 from wabalabudabdab/fix/railways-elevation-and-layer
fix(railways): respect layer tag and use ascending rails on terrain slopes
2026-04-06 19:45:15 +02:00
Louis Erbkamm
59d668dce2 Merge pull request #826 from QuickMash/main
Add Improvements to README.md
2026-04-06 19:38:52 +02:00
Louis Erbkamm
38d81b01b5 Merge pull request #894 from louis-e/utah-capitol-fix
Fix visual appearance of Utah State Capitol building
2026-04-06 19:32:04 +02:00
louis-e
ffc90e5e21 Fix visual appearance of Utah State Capitol building 2026-04-06 19:31:38 +02:00
Louis Erbkamm
064fe640ee Merge pull request #892 from louis-e/fix/ui-layout-and-timeout
Fix map layout to fill window and reduce private.coffee timeout
2026-04-06 17:52:23 +02:00
louis-e
495eee73ae Fix map layout to fill window and reduce private.coffee timeout
- Make map stretch to fill available viewport height when window is
  maximized, with proper buffer for footer version text
- Remove body default margin and prevent scrollbar overflow
- Reduce Overpass private.coffee fallback server timeout from 360s to 120s

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-06 17:51:36 +02:00
Louis Erbkamm
7e18252f69 Merge pull request #891 from louis-e/fix/polygon-clipping-artifacts
Fix triangular artifacts from polygon clipping and open polyline flood fill
2026-04-06 17:33:09 +02:00
louis-e
2c1ad47190 Fix parking flood fill to use cache instead of direct call
Parking areas in amenities.rs were calling flood_fill_area() directly
with a hand-built coordinate list that wasn't properly closed, which
would produce empty results after the open-polyline rejection check.
Switch to flood_fill_cache.get_or_compute_element() which uses the
original ProcessedWay with proper closure, matching all other element
processors.
2026-04-06 17:23:56 +02:00
louis-e
fb85d1571d Fix triangular artifacts from polygon clipping and open polyline flood fill
Three bugs fixed:

1. Open polylines (e.g. natural=ridge) were being flood-filled as polygons.
   geo::Polygon auto-closes by connecting last to first, creating massive
   diagonal triangular artifacts. Fix: SH-clipped closed polygons now
   explicitly preserve first==last closure, and flood_fill_area rejects
   unclosed input.

2. insert_bbox_corners was adding incorrect geometry after Sutherland-Hodgman
   clipping. SH already produces correct output including bbox corners; the
   post-processing incorrectly added extra corners between interior-crossing
   polygon edges, inflating polygons into wrong shapes. Removed entirely.

3. clip_polygon_sutherland_hodgman_simple (water variant) skipped the closing
   edge on passes 2-4 because it assumed explicit closure that only existed
   on pass 1. Fixed to match the main variant's is_closed detection.
2026-04-06 16:55:58 +02:00
Louis Erbkamm
9c184fdc18 Merge pull request #890 from louis-e/fix/height-limit-checkbox
Fix/height limit checkbox
2026-04-06 15:34:53 +02:00
louis-e
6252094be2 Auto-disable height limit for Bedrock, add CLI test, fix clippy
- Uncheck and grey out "Disable Height Limit" toggle when Bedrock
  format is selected (not supported without data packs)
- Add test for --disable-height-limit CLI flag parsing
- Fix clippy manual_div_ceil warning in heightmap packing
2026-04-06 15:20:07 +02:00
louis-e
d7f3a2cfdd Add disable-height checkbox 2026-04-06 15:03:57 +02:00
louis-e
c1c93e9a56 Add yellow accent-color for disable-height-limit checkbox
The new #disable-height-limit-toggle checkbox was missing its
accent-color: #fecc44 CSS rule, causing it to render with the
default browser checkbox color instead of the yellow theme.
2026-04-06 14:53:53 +02:00
Louis Erbkamm
1787b5545e Merge pull request #887 from louis-e/feature/road-surface-mix
Replace black_concrete roads with scattered gray_concrete_powder/cyan_terracotta mix
2026-04-06 14:03:20 +02:00
louis-e
22818b70d2 Fix corner post placement and remove re-introduced duplicate
- Use empty blacklist Some(&[]) instead of None for corner posts so
  they actually overwrite the cap slab (None/None = no-op when a
  block already exists)
- Remove is_zebra_crossing duplicate re-introduced by merge from main
2026-04-06 14:01:15 +02:00
Louis Erbkamm
7b3f11e14d Merge branch 'main' into feature/road-surface-mix 2026-04-06 13:58:49 +02:00
louis-e
483eb19026 Fix cargo fmt 2026-04-06 13:52:14 +02:00
louis-e
558ee304ed Fix third round of code review issues
- Add BLACK_CONCRETE to zebra crossing whitelist so stripes render on
  asphalt area surfaces and older generated roads
- Remove AIR-only whitelist from parapet corner posts so they reliably
  overwrite the cap slab placed just before them
- Swap lobby base priority above floor separation band so the ground
  floor of modern skyscrapers is solid wall block throughout
2026-04-06 13:51:24 +02:00
louis-e
87ad539f3b Address second round of code review feedback
- Add unit tests for gray_concrete_powder and cyan_terracotta Bedrock
  block mappings to catch palette serialization regressions
- Use bitwise AND (h & 1) instead of modulo in road_block() for
  idiomatic bit checking
- Deduplicate effective_block computation by hoisting it before the
  use_absolute_y branch in the main road surface drawing path
2026-04-06 13:44:09 +02:00
louis-e
5373624ae2 Fix code review issues for road surface changes
- Move is_zebra_crossing outside inner loop (perf) and remove
  String allocation in tag comparison
- Add BLACK_CONCRETE back to road surface blacklist to prevent
  overwriting asphalt areas and parking driving lanes
- Add BLACK_CONCRETE to generate_siding check to protect all
  paved surfaces
- Add Bedrock block mappings for gray_concrete_powder (concretePowder
  with color state) and cyan_terracotta (stained_hardened_clay with
  color state) to fix Bedrock edition export
2026-04-06 02:47:14 +02:00
louis-e
e4c1f6a671 Add visual improvements to modern skyscrapers
- Floor-level ledge bands: horizontal slab projections at each floor
  separation row, complementing the existing vertical fins
- Foundation course: continuous accent block band at ground level
- Lobby base (70%): solid wall block for the first floor cycle instead
  of glass, reading as a podium
- Enhanced parapet: accent slab cap with corner posts for a defined
  roofline crown
2026-04-06 02:46:58 +02:00
louis-e
a44b0d794e Replace black_concrete roads with scattered gray_concrete_powder/cyan_terracotta mix
Use a deterministic coordinate-based hash to randomly scatter two block types
for road surfaces instead of uniform black_concrete. Update all protection
lists across tree, natural, landuse, amenities, and ground generation to
recognize the new road blocks.
2026-04-06 01:58:39 +02:00