-
-
Notifications
You must be signed in to change notification settings - Fork 766
Open
Labels
featureFeature requestFeature request
Description
Idea
Right now the code skips tunnels and subways.
I don't know Rust very well. I think this can be added:
If the tag includes tunnel or subway, and terrain is turned on and fill ground is turned on, then
respect the layer tag, and render the rails underground. Include one block of air above the rail.
Any rail stations can be rendered as grey terracotta or concrete next to the rail line.
Code idea
I attempted to add the idea by adding these lines of code, among others. It sometimes works for underground tunnels, but not for overhead flyover lines.
Line 44 of railways.rs:
let mut ground_level = ground.level(XZPoint::new(bx, bz));
if let Some(level_str) = element.tags.get("layer") {
if let Ok(level) = level_str.parse::<i32>() {
ground_level += level * 2;
}
}
Then I also added at line 66:
if ground_level<0 {
editor.set_block(AIR, bx, ground_level + 2, bz, None, None);
}
So that there was an air block above the rails.
Oleg4260, lazerkatsweirdstuff, fedorissimo and danielwerg
Metadata
Metadata
Assignees
Labels
featureFeature requestFeature request