Skip to content

Commit

Permalink
demo-city: Squeeze curbs and lamps closer.
Browse files Browse the repository at this point in the history
This is part of an effort to make the proportions of the city more sane
for _walking_ around.
  • Loading branch information
kpreid committed Sep 29, 2023
1 parent d76df42 commit 6bc094f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions all-is-cubes-content/src/city.rs
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,8 @@ pub(crate) async fn demo_city<I: Instant>(
}

// Curbs
if i > road_radius {
for (side, &p) in [-(road_radius + 1), road_radius + 1].iter().enumerate() {
if i >= road_radius {
for &(side, p) in [(1, -road_radius), (0, road_radius)].iter() {
let position = step.cube_ahead() + perpendicular * p + curb_y;

// Place curb and combine it with other curb blocks .
Expand All @@ -186,7 +186,7 @@ pub(crate) async fn demo_city<I: Instant>(
position,
block::Composite::new(
demo_blocks[Curb].clone().rotate(rotations[side]),
block::CompositeOperator::Over,
block::CompositeOperator::In,
)
.with_disassemblable()
.compose_or_replace(to_compose_with),
Expand Down Expand Up @@ -530,7 +530,7 @@ struct CityPlanner {
impl CityPlanner {
const ROAD_RADIUS: GridCoordinate = 2;
/// Distance from the center cube to the line of cubes where lampposts are placed.
const LAMP_POSITION_RADIUS: GridCoordinate = Self::ROAD_RADIUS + 2;
const LAMP_POSITION_RADIUS: GridCoordinate = Self::ROAD_RADIUS + 1;
/// Distance from the center cube to the line of the front of each placed exhibit.
/// TODO: The units of this isn't being consistent, since it is actually + 2 from the lamps
const PLOT_FRONT_RADIUS: GridCoordinate = Self::LAMP_POSITION_RADIUS + 1;
Expand Down

0 comments on commit 6bc094f

Please sign in to comment.