mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Merge branch 'isse/fix-test-voxygen' into 'master'
Fix `test-voxygen` errors and warnings See merge request veloren/veloren!4560
This commit is contained in:
commit
67905d0388
@ -439,7 +439,7 @@ impl Client {
|
||||
auth_trusted: impl FnMut(&str) -> bool,
|
||||
init_stage_update: &(dyn Fn(ClientInitStage) + Send + Sync),
|
||||
add_foreign_systems: impl Fn(&mut DispatcherBuilder) + Send + 'static,
|
||||
config_dir: PathBuf,
|
||||
#[cfg_attr(not(feature = "plugins"), allow(unused_variables))] config_dir: PathBuf,
|
||||
) -> Result<Self, Error> {
|
||||
let network = Network::new(Pid::new(), &runtime);
|
||||
|
||||
@ -628,7 +628,7 @@ impl Client {
|
||||
server_constants,
|
||||
repair_recipe_book,
|
||||
description,
|
||||
active_plugins,
|
||||
active_plugins: _active_plugins,
|
||||
} = loop {
|
||||
tokio::select! {
|
||||
// Spawn in a blocking thread (leaving the network thread free). This is mostly
|
||||
@ -665,12 +665,15 @@ impl Client {
|
||||
#[cfg(feature = "plugins")]
|
||||
common_state::plugin::PluginMgr::from_asset_or_default(),
|
||||
);
|
||||
|
||||
#[cfg_attr(not(feature = "plugins"), allow(unused_mut))]
|
||||
let mut missing_plugins: Vec<PluginHash> = Vec::new();
|
||||
#[cfg_attr(not(feature = "plugins"), allow(unused_mut))]
|
||||
let mut local_plugins: Vec<PathBuf> = Vec::new();
|
||||
#[cfg(feature = "plugins")]
|
||||
{
|
||||
let already_present = state.ecs().read_resource::<PluginMgr>().plugin_list();
|
||||
for hash in active_plugins.iter() {
|
||||
for hash in _active_plugins.iter() {
|
||||
if !already_present.contains(hash) {
|
||||
// look in config_dir first (cache)
|
||||
if let Ok(local_path) = common_state::plugin::find_cached(&config_dir, hash)
|
||||
|
@ -278,6 +278,7 @@ impl PlayState for CharSelectionState {
|
||||
Rc::clone(&self.client),
|
||||
)));
|
||||
},
|
||||
#[cfg_attr(not(feature = "plugins"), allow(unused_variables))]
|
||||
client::Event::PluginDataReceived(data) => {
|
||||
#[cfg(feature = "plugins")]
|
||||
{
|
||||
|
@ -41,7 +41,6 @@ use iced::{
|
||||
button, scrollable, slider, text_input, Align, Button, Color, Column, Container,
|
||||
HorizontalAlignment, Length, Row, Scrollable, Slider, Space, Text, TextInput,
|
||||
};
|
||||
use server::settings::SINGLEPLAYER_SERVER_NAME;
|
||||
use std::sync::Arc;
|
||||
use vek::{Rgba, Vec2};
|
||||
|
||||
@ -536,11 +535,15 @@ impl Controls {
|
||||
*info_content = None;
|
||||
}
|
||||
|
||||
let server_name = if client.server_info().name == SINGLEPLAYER_SERVER_NAME {
|
||||
&i18n.get_msg("common-singleplayer").to_string()
|
||||
} else {
|
||||
&client.server_info().name
|
||||
};
|
||||
#[cfg(feature = "singleplayer")]
|
||||
let server_name =
|
||||
if client.server_info().name == server::settings::SINGLEPLAYER_SERVER_NAME {
|
||||
&i18n.get_msg("common-singleplayer").to_string()
|
||||
} else {
|
||||
&client.server_info().name
|
||||
};
|
||||
#[cfg(not(feature = "singleplayer"))]
|
||||
let server_name = &client.server_info().name;
|
||||
|
||||
let server = Container::new(
|
||||
Column::with_children(vec![
|
||||
|
@ -23,6 +23,7 @@ use common_state::plugin::PluginMgr;
|
||||
use i18n::LocalizationHandle;
|
||||
#[cfg(feature = "singleplayer")]
|
||||
use server::ServerInitStage;
|
||||
#[cfg(feature = "singleplayer")]
|
||||
use specs::WorldExt;
|
||||
use std::{path::Path, sync::Arc};
|
||||
use tokio::runtime;
|
||||
@ -283,6 +284,7 @@ impl PlayState for MainMenuState {
|
||||
);
|
||||
self.init = InitState::None;
|
||||
},
|
||||
#[cfg_attr(not(feature = "plugins"), allow(unused_variables))]
|
||||
client::Event::PluginDataReceived(data) => {
|
||||
#[cfg(feature = "plugins")]
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user