diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c625773df1b72588b308a2db72ac353174a42243..565f0dc0f67bbad947ecb8f2d38160890d5d7ac7 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -4,6 +4,7 @@ variables: BINARY_FOLDER: game_core BINARY_NAME: trader_tales OUTPUT_NAME: trader_tales + DISABLED_LOG: "true" stages: - build diff --git a/Makefile b/Makefile index 31681c14eca7f06a67118024811e0bd3230cc056..117c01b128f268f4b42c59c9a561d2bff7766774 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -PROJECT_NAME=game_core +PROJECT_NAME=trader_tales CURRENT_DIRECTORY=$(shell pwd) linux-deps: @@ -38,19 +38,19 @@ msdf: @msdf-atlas-gen -font raw_assets/fonts/EquipmentPro.ttf -type msdf -minsize 32 -format png -imageout raw_assets/fonts/EquipmentPro.png -json raw_assets/fonts/EquipmentPro.kayak_font build-windows: clean_dist top_tail - docker run --rm --name "${PROJECT_NAME}-build-windows" -v "$(CURRENT_DIRECTORY):/app" -w /app --user $(shell id -u):$(shell id -g) r.lcr.gr/microhacks/bevy-builder \ + docker run --rm --name "${PROJECT_NAME}-build-windows" -v "$(CURRENT_DIRECTORY):/app" -w /app --user $(shell id -u):$(shell id -g) r.lcr.gr/microhacks/bevy-builder:latest \ cargo build --release -p game_core --target x86_64-pc-windows-gnu mkdir -p dist cp -r assets dist/assets - cp target/x86_64-pc-windows-gnu/release/game_core.exe "dist/${PROJECT_NAME}.exe" + cp target/x86_64-pc-windows-gnu/release/trader_tales.exe "dist/${PROJECT_NAME}.exe" cd dist && zip -r "${PROJECT_NAME}-windows.zip" "./${PROJECT_NAME}.exe" ./assets build-linux: clean_dist top_tail - docker run --rm --name "${PROJECT_NAME}-build-linux" -v "$(CURRENT_DIRECTORY):/app" -w /app --user $(shell id -u):$(shell id -g) r.lcr.gr/microhacks/bevy-builder \ + docker run --rm --name "${PROJECT_NAME}-build-linux" -v "$(CURRENT_DIRECTORY):/app" -w /app --user $(shell id -u):$(shell id -g) r.lcr.gr/microhacks/bevy-builder:latest \ cargo build --release -p game_core --target x86_64-unknown-linux-gnu mkdir -p dist cp -r assets dist/assets - cp target/x86_64-unknown-linux-gnu/release/game_core "dist/${PROJECT_NAME}" + cp target/x86_64-unknown-linux-gnu/release/trader_tales "dist/${PROJECT_NAME}" cd dist && zip -r "${PROJECT_NAME}-linux.zip" "./${PROJECT_NAME}" ./assets build-web: top_tail diff --git a/game_core/src/main.rs b/game_core/src/main.rs index eb9f88b076fba7affba1a9400cc36e8c73018719..76eed47ee5fc7a76849407439a235679bb01bcc8 100644 --- a/game_core/src/main.rs +++ b/game_core/src/main.rs @@ -1,3 +1,5 @@ +#![windows_subsystem = "windows"] + use bevy::prelude::*; use game_core::assets::AssetHandles; use game_core::system::flow::AppState; diff --git a/game_core/src/system/resources.rs b/game_core/src/system/resources.rs index 4731dc27ff123cdfe177ae86d25ce1d4c9dd9d80..0fde5f029595b97311b74f66f9f27dd259311566 100644 --- a/game_core/src/system/resources.rs +++ b/game_core/src/system/resources.rs @@ -14,6 +14,7 @@ impl Plugin for DefaultResourcesPlugin { } pub fn configure_default_plugins() -> PluginGroupBuilder { let (width, height) = initial_size(); + DefaultPlugins .set(WindowPlugin { window: WindowDescriptor { @@ -23,6 +24,7 @@ pub fn configure_default_plugins() -> PluginGroupBuilder { mode: WindowMode::Windowed, title: String::from("Trader Tales"), present_mode: PresentMode::AutoNoVsync, + ..Default::default() }, ..Default::default() @@ -32,11 +34,18 @@ pub fn configure_default_plugins() -> PluginGroupBuilder { watch_for_changes: true, }) .set(ImagePlugin::default_nearest()) - .set(LogPlugin { + .set(if option_env!("DISABLED_LOG").is_some() { + LogPlugin { + filter: String::from("error"), + level: Level::ERROR, + } + } else { + LogPlugin { filter: String::from( "info,symphonia_core=warn,symphonia_bundle_mp3=warn,wgpu_core=warn,wgpu_hal=warn", ), level: Level::DEBUG, + } }) } diff --git a/game_core/src/world/spawning.rs b/game_core/src/world/spawning.rs index 1625ab15de4635a3e2694e79a3eda5654608ba29..73fa009fe038187eaf61b8481c8a733dfa2301c1 100644 --- a/game_core/src/world/spawning.rs +++ b/game_core/src/world/spawning.rs @@ -372,7 +372,7 @@ pub fn populate_world( let ent = commands.spawn((bundle, VisibilityBundle::default())).id(); if let Some(spec) = maybe_spec { commands.entity(ent).insert(spec); - } else if is_royal_lampoon { + } else if !is_royal_lampoon { town_entities_a.push(ent); } });