Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set terrain arg to store true. #374

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

benjamin051000
Copy link
Contributor

This was erroneously set to store false, which means it's impossible to enable the terrain from the cli.

@benjamin051000
Copy link
Contributor Author

Hm, this is failing with the following:

cargo r --no-default-features --release -- --bbox "-71.035194,42.327427,-71.008286,42.342210" --path "/home/benjamin/.var/app/org.prismlauncher.PrismLauncher/data/PrismLauncher/instances/Fabulously Optimized(3)/.minecraft/saves/testing" --terrain

(with a dbg! around the first line of ground::fetch_elevation_data) Prints:

[src/ground.rs:130:32] bbox_str.split_whitespace().map(|s: &str|
s.parse::<f64>()).collect::<Result<Vec<f64>, _>>() = Err(
    ParseFloatError {
        kind: Invalid,
    },
)
Warning: Failed to fetch elevation data: invalid float literal

@benjamin051000
Copy link
Contributor Author

I'll add a unit test that verifies this before merging.

@benjamin051000 benjamin051000 force-pushed the fix-terrain-flag branch 10 times, most recently from bc0c93a to 5bdea24 Compare February 20, 2025 02:02
This was erroneously set to `SetFalse`, which means it's impossible to
enable the terrain from the cli.

According to clap docs, the default action for a bool arg is SetTrue,
and the default value is false. (https://docs.rs/clap/latest/clap/_derive/index.html#arg-types)

So we don't need to provide any additional args here.
@benjamin051000
Copy link
Contributor Author

Blocked on #378

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant