Skip to content

Commit

Permalink
feat: allow setting asset and asset pack dirs with environment variab…
Browse files Browse the repository at this point in the history
…les. (#866)

Jumpy will now read the `JUMPY_ASSETS` and `JUMPY_ASSET_PACKS`
environment variables.
  • Loading branch information
zicklag authored Oct 26, 2023
1 parent 5a128c5 commit d4a818b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,12 @@ fn main() {
env!("CARGO_PKG_VERSION_PATCH").parse().unwrap(),
),
app_namespace: ("org".into(), "fishfolk".into(), "jumpy".into()),
asset_dir: "assets".into(),
packs_dir: "packs".into(),
asset_dir: std::env::var("JUMPY_ASSETS")
.unwrap_or_else(|_| "assets".into())
.into(),
packs_dir: std::env::var("JUMPY_ASSET_PACKS")
.unwrap_or_else(|_| "packs".into())
.into(),
custom_load_progress: Some(Box::new(load_progress)),
}
.app()
Expand Down

0 comments on commit d4a818b

Please sign in to comment.