fix client without singleplayer feature

This commit is contained in:
Isse 2023-10-12 01:47:30 +02:00
parent 3e19c847f1
commit 68857d5af7
2 changed files with 6 additions and 0 deletions

View File

@ -21,6 +21,7 @@ use common::comp;
use common_base::span;
use i18n::LocalizationHandle;
use scene::Scene;
#[cfg(feature = "singleplayer")]
use server::ServerInitStage;
use std::sync::Arc;
use tokio::runtime;
@ -29,7 +30,9 @@ use ui::{Event as MainMenuEvent, MainMenuUi};
#[derive(Debug)]
pub enum DetailedInitializationStage {
#[cfg(feature = "singleplayer")]
Singleplayer,
#[cfg(feature = "singleplayer")]
SingleplayerServer(ServerInitStage),
StartingMultiplayer,
Client(ClientInitStage),

View File

@ -16,6 +16,7 @@ use i18n::Localization;
use iced::{button, Align, Column, Container, Length, Row, Space, Text};
use keyboard_keynames::key_layout::KeyLayout;
use serde::{Deserialize, Serialize};
#[cfg(feature = "singleplayer")]
use server::{ServerInitStage, WorldCivStage, WorldGenerateStage, WorldSimStage};
struct LoadingAnimation {
@ -139,9 +140,11 @@ impl Screen {
let stage = {
let stage_message = match init_stage {
#[cfg(feature = "singleplayer")]
DetailedInitializationStage::Singleplayer => {
i18n.get_msg("hud-init-stage-singleplayer")
},
#[cfg(feature = "singleplayer")]
DetailedInitializationStage::SingleplayerServer(server_stage) => {
match server_stage {
ServerInitStage::DbMigrations => {