mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
fix test-voxygen errors and warnings
This commit is contained in:
parent
676b678b52
commit
6659a512ec
@ -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,
|
||||
#[allow(unused_variables)] config_dir: PathBuf,
|
||||
) -> Result<Self, Error> {
|
||||
let network = Network::new(Pid::new(), &runtime);
|
||||
|
||||
@ -615,6 +615,7 @@ impl Client {
|
||||
init_stage_update(ClientInitStage::LoadingInitData);
|
||||
// Wait for initial sync
|
||||
let mut ping_interval = tokio::time::interval(Duration::from_secs(1));
|
||||
#[allow(unused_variables)]
|
||||
let ServerInit::GameSync {
|
||||
entity_package,
|
||||
time_of_day,
|
||||
@ -665,7 +666,9 @@ impl Client {
|
||||
#[cfg(feature = "plugins")]
|
||||
common_state::plugin::PluginMgr::from_asset_or_default(),
|
||||
);
|
||||
#[allow(unused_mut)]
|
||||
let mut missing_plugins: Vec<PluginHash> = Vec::new();
|
||||
#[allow(unused_mut)]
|
||||
let mut local_plugins: Vec<PathBuf> = Vec::new();
|
||||
#[cfg(feature = "plugins")]
|
||||
{
|
||||
|
@ -278,16 +278,16 @@ impl PlayState for CharSelectionState {
|
||||
Rc::clone(&self.client),
|
||||
)));
|
||||
},
|
||||
client::Event::PluginDataReceived(data) => {
|
||||
client::Event::PluginDataReceived(_data) => {
|
||||
#[cfg(feature = "plugins")]
|
||||
{
|
||||
tracing::info!("plugin data {}", data.len());
|
||||
tracing::info!("plugin data {}", _data.len());
|
||||
let mut client = self.client.borrow_mut();
|
||||
let hash = client
|
||||
.state()
|
||||
.ecs()
|
||||
.write_resource::<PluginMgr>()
|
||||
.cache_server_plugin(&global_state.config_dir, data);
|
||||
.cache_server_plugin(&global_state.config_dir, _data);
|
||||
match hash {
|
||||
Ok(hash) => {
|
||||
if client.plugin_received(hash) == 0 {
|
||||
|
@ -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,16 +284,16 @@ impl PlayState for MainMenuState {
|
||||
);
|
||||
self.init = InitState::None;
|
||||
},
|
||||
client::Event::PluginDataReceived(data) => {
|
||||
client::Event::PluginDataReceived(_data) => {
|
||||
#[cfg(feature = "plugins")]
|
||||
{
|
||||
tracing::info!("plugin data {}", data.len());
|
||||
tracing::info!("plugin data {}", _data.len());
|
||||
if let InitState::Pipeline(client) = &mut self.init {
|
||||
let hash = client
|
||||
.state()
|
||||
.ecs()
|
||||
.write_resource::<PluginMgr>()
|
||||
.cache_server_plugin(&global_state.config_dir, data);
|
||||
.cache_server_plugin(&global_state.config_dir, _data);
|
||||
match hash {
|
||||
Ok(hash) => {
|
||||
if client.plugin_received(hash) == 0 {
|
||||
|
Loading…
Reference in New Issue
Block a user