From 090ac9030c14a3ee2212e6022bcb7b384a56be0e Mon Sep 17 00:00:00 2001 From: InfRandomness Date: Fri, 11 Feb 2022 17:05:10 +0000 Subject: [PATCH] Change Path colors --- CHANGELOG.md | 1 + world/src/site2/mod.rs | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 30d9037529..08f452f7ee 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -81,6 +81,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Made /home command a mod+ exclusive - Friendly creatures will now defend each other - Creatures will now defend their pets +- [WorldGen] Change path colors ### Removed diff --git a/world/src/site2/mod.rs b/world/src/site2/mod.rs index 39f73d563a..8650b189cb 100644 --- a/world/src/site2/mod.rs +++ b/world/src/site2/mod.rs @@ -758,6 +758,9 @@ impl Site { if dist.map_or(false, |d| d <= 1.5) { let alt = canvas.col(wpos2d).map_or(0, |col| col.alt as i32); + let sub_surface_color = canvas + .col(wpos2d) + .map_or(vek::Rgb::zero(), |col| col.sub_surface_color); let mut underground = true; for z in -8..6 { canvas.map(Vec3::new(wpos2d.x, wpos2d.y, alt + z), |b| { @@ -766,7 +769,10 @@ impl Site { b.into_vacant() } else if b.is_filled() { if b.is_terrain() { - Block::new(BlockKind::Earth, Rgb::new(0x6A, 0x47, 0x24)) + Block::new( + BlockKind::Earth, + (sub_surface_color * 255.0).as_(), + ) } else { b }