start dev mode only when run with cargo. remove "mute_music" feature
This commit is contained in:
parent
b00c583d4d
commit
cfadb5e2bf
|
@ -47,9 +47,8 @@ embed-resource = "1.6.3" # embedding of .exe metadata
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = ["x11", "embed_assets"]
|
default = ["x11", "embed_assets"]
|
||||||
mute_music = []
|
|
||||||
dev_mode = []
|
dev_mode = []
|
||||||
dev = ["dev_mode", "mute_music", "bevy/dynamic_linking", "bevy/file_watcher"]
|
dev = ["dev_mode", "bevy/dynamic_linking", "bevy/file_watcher"]
|
||||||
release_linux = ["x11", "wayland", "embed_assets"]
|
release_linux = ["x11", "wayland", "embed_assets"]
|
||||||
release_windows = ["embed_assets"]
|
release_windows = ["embed_assets"]
|
||||||
wasm = ["bevy/webgl2"]
|
wasm = ["bevy/webgl2"]
|
||||||
|
|
|
@ -6,7 +6,7 @@ For development, it's recommended to use `--features dev`:
|
||||||
cargo [run|build] --features dev
|
cargo [run|build] --features dev
|
||||||
```
|
```
|
||||||
|
|
||||||
This enables the following:
|
This enables the following, but ONLY if you run it with `cargo run`:
|
||||||
|
|
||||||
- Mutes music by default (you can still unmute it)
|
- Mutes music by default (you can still unmute it)
|
||||||
- Enables "dev mode", which changes the game slightly:
|
- Enables "dev mode", which changes the game slightly:
|
||||||
|
|
|
@ -128,9 +128,9 @@ pub struct Settings {
|
||||||
|
|
||||||
impl Default for Settings {
|
impl Default for Settings {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
let dev_mode = cfg!(feature = "dev_mode");
|
let dev_mode = cfg!(feature = "dev_mode") && env::var("CARGO").is_ok();
|
||||||
let default_mute_sfx = false;
|
let default_mute_sfx = false;
|
||||||
let default_mute_music = cfg!(feature = "mute_music");
|
let default_mute_music = dev_mode;
|
||||||
let version = if let Some(version) = option_env!("CARGO_PKG_VERSION") {
|
let version = if let Some(version) = option_env!("CARGO_PKG_VERSION") {
|
||||||
version.to_string()
|
version.to_string()
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue