mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
fmt after applying clippy fixes after toolchain update
This commit is contained in:
parent
9b3b21f368
commit
db8aedd363
@ -781,8 +781,7 @@ impl Item {
|
|||||||
pub fn slots_mut(&mut self) -> &mut [InvSlot] { &mut self.slots }
|
pub fn slots_mut(&mut self) -> &mut [InvSlot] { &mut self.slots }
|
||||||
|
|
||||||
pub fn item_config_expect(&self) -> &ItemConfig {
|
pub fn item_config_expect(&self) -> &ItemConfig {
|
||||||
self
|
self.item_config
|
||||||
.item_config
|
|
||||||
.as_ref()
|
.as_ref()
|
||||||
.expect("Item was expected to have an ItemConfig")
|
.expect("Item was expected to have an ItemConfig")
|
||||||
}
|
}
|
||||||
|
@ -124,9 +124,7 @@ impl assets::Compound for RecipeBook {
|
|||||||
spec: &(RawRecipeInput, u32),
|
spec: &(RawRecipeInput, u32),
|
||||||
) -> Result<(RecipeInput, u32), assets::Error> {
|
) -> Result<(RecipeInput, u32), assets::Error> {
|
||||||
let def = match &spec.0 {
|
let def = match &spec.0 {
|
||||||
RawRecipeInput::Item(name) => {
|
RawRecipeInput::Item(name) => RecipeInput::Item(Arc::<ItemDef>::load_cloned(name)?),
|
||||||
RecipeInput::Item(Arc::<ItemDef>::load_cloned(name)?)
|
|
||||||
},
|
|
||||||
RawRecipeInput::Tag(tag) => RecipeInput::Tag(*tag),
|
RawRecipeInput::Tag(tag) => RecipeInput::Tag(*tag),
|
||||||
};
|
};
|
||||||
Ok((def, spec.1))
|
Ok((def, spec.1))
|
||||||
|
@ -443,7 +443,13 @@ impl Network {
|
|||||||
/// [`ListenAddr`]: crate::api::ListenAddr
|
/// [`ListenAddr`]: crate::api::ListenAddr
|
||||||
#[instrument(name="network", skip(self), fields(p = %self.local_pid))]
|
#[instrument(name="network", skip(self), fields(p = %self.local_pid))]
|
||||||
pub async fn connected(&self) -> Result<Participant, NetworkError> {
|
pub async fn connected(&self) -> Result<Participant, NetworkError> {
|
||||||
let participant = self.connected_receiver.lock().await.recv().await.ok_or(NetworkError::NetworkClosed)?;
|
let participant = self
|
||||||
|
.connected_receiver
|
||||||
|
.lock()
|
||||||
|
.await
|
||||||
|
.recv()
|
||||||
|
.await
|
||||||
|
.ok_or(NetworkError::NetworkClosed)?;
|
||||||
self.participant_disconnect_sender.lock().await.insert(
|
self.participant_disconnect_sender.lock().await.insert(
|
||||||
participant.remote_pid,
|
participant.remote_pid,
|
||||||
Arc::clone(&participant.a2s_disconnect_s),
|
Arc::clone(&participant.a2s_disconnect_s),
|
||||||
|
@ -237,9 +237,7 @@ impl NetworkMetrics {
|
|||||||
let _ = self
|
let _ = self
|
||||||
.channels_disconnected_total
|
.channels_disconnected_total
|
||||||
.remove_label_values(&[remote_p]);
|
.remove_label_values(&[remote_p]);
|
||||||
let _ = self
|
let _ = self.participants_bandwidth.remove_label_values(&[remote_p]);
|
||||||
.participants_bandwidth
|
|
||||||
.remove_label_values(&[remote_p]);
|
|
||||||
let _ = self.streams_opened_total.remove_label_values(&[remote_p]);
|
let _ = self.streams_opened_total.remove_label_values(&[remote_p]);
|
||||||
let _ = self.streams_closed_total.remove_label_values(&[remote_p]);
|
let _ = self.streams_closed_total.remove_label_values(&[remote_p]);
|
||||||
}
|
}
|
||||||
|
@ -1820,13 +1820,9 @@ impl<'a> AgentData<'a> {
|
|||||||
Tactic::Sceptre => {
|
Tactic::Sceptre => {
|
||||||
self.handle_sceptre_attack(agent, controller, &attack_data, tgt_data, read_data)
|
self.handle_sceptre_attack(agent, controller, &attack_data, tgt_data, read_data)
|
||||||
},
|
},
|
||||||
Tactic::StoneGolem => self.handle_stone_golem_attack(
|
Tactic::StoneGolem => {
|
||||||
agent,
|
self.handle_stone_golem_attack(agent, controller, &attack_data, tgt_data, read_data)
|
||||||
controller,
|
},
|
||||||
&attack_data,
|
|
||||||
tgt_data,
|
|
||||||
read_data,
|
|
||||||
),
|
|
||||||
Tactic::CircleCharge {
|
Tactic::CircleCharge {
|
||||||
radius,
|
radius,
|
||||||
circle_time,
|
circle_time,
|
||||||
@ -1905,13 +1901,9 @@ impl<'a> AgentData<'a> {
|
|||||||
read_data,
|
read_data,
|
||||||
),
|
),
|
||||||
Tactic::Tornado => self.handle_tornado_attack(controller),
|
Tactic::Tornado => self.handle_tornado_attack(controller),
|
||||||
Tactic::Mindflayer => self.handle_mindflayer_attack(
|
Tactic::Mindflayer => {
|
||||||
agent,
|
self.handle_mindflayer_attack(agent, controller, &attack_data, tgt_data, read_data)
|
||||||
controller,
|
},
|
||||||
&attack_data,
|
|
||||||
tgt_data,
|
|
||||||
read_data,
|
|
||||||
),
|
|
||||||
Tactic::BirdLargeFire => self.handle_birdlarge_fire_attack(
|
Tactic::BirdLargeFire => self.handle_birdlarge_fire_attack(
|
||||||
agent,
|
agent,
|
||||||
controller,
|
controller,
|
||||||
@ -1937,13 +1929,9 @@ impl<'a> AgentData<'a> {
|
|||||||
Tactic::Minotaur => {
|
Tactic::Minotaur => {
|
||||||
self.handle_minotaur_attack(agent, controller, &attack_data, tgt_data, read_data)
|
self.handle_minotaur_attack(agent, controller, &attack_data, tgt_data, read_data)
|
||||||
},
|
},
|
||||||
Tactic::ClayGolem => self.handle_clay_golem_attack(
|
Tactic::ClayGolem => {
|
||||||
agent,
|
self.handle_clay_golem_attack(agent, controller, &attack_data, tgt_data, read_data)
|
||||||
controller,
|
},
|
||||||
&attack_data,
|
|
||||||
tgt_data,
|
|
||||||
read_data,
|
|
||||||
),
|
|
||||||
Tactic::TidalWarrior => self.handle_tidal_warrior_attack(
|
Tactic::TidalWarrior => self.handle_tidal_warrior_attack(
|
||||||
agent,
|
agent,
|
||||||
controller,
|
controller,
|
||||||
|
@ -767,13 +767,8 @@ impl<'a> Widget for Bag<'a> {
|
|||||||
.resize(STATS.len(), &mut ui.widget_id_generator())
|
.resize(STATS.len(), &mut ui.widget_id_generator())
|
||||||
});
|
});
|
||||||
// Stats
|
// Stats
|
||||||
let combat_rating = combat_rating(
|
let combat_rating =
|
||||||
inventory,
|
combat_rating(inventory, self.health, self.skill_set, *self.body, self.msm)
|
||||||
self.health,
|
|
||||||
self.skill_set,
|
|
||||||
*self.body,
|
|
||||||
self.msm,
|
|
||||||
)
|
|
||||||
.min(999.9);
|
.min(999.9);
|
||||||
let indicator_col = cr_color(combat_rating);
|
let indicator_col = cr_color(combat_rating);
|
||||||
for i in STATS.iter().copied().enumerate() {
|
for i in STATS.iter().copied().enumerate() {
|
||||||
|
@ -601,8 +601,7 @@ impl<'a> Widget for Chat<'a> {
|
|||||||
.set(state.ids.chat_tab_tooltip_bg, ui);
|
.set(state.ids.chat_tab_tooltip_bg, ui);
|
||||||
|
|
||||||
Text::new(
|
Text::new(
|
||||||
self
|
self.localized_strings
|
||||||
.localized_strings
|
|
||||||
.get("hud.chat.chat_tab_hover_tooltip"),
|
.get("hud.chat.chat_tab_hover_tooltip"),
|
||||||
)
|
)
|
||||||
.mid_top_with_margin_on(state.ids.chat_tab_tooltip_bg, 3.0)
|
.mid_top_with_margin_on(state.ids.chat_tab_tooltip_bg, 3.0)
|
||||||
|
@ -684,8 +684,7 @@ impl<'a> Widget for Crafting<'a> {
|
|||||||
// Crafting Station Info
|
// Crafting Station Info
|
||||||
if recipe.craft_sprite.is_some() {
|
if recipe.craft_sprite.is_some() {
|
||||||
Text::new(
|
Text::new(
|
||||||
self
|
self.localized_strings
|
||||||
.localized_strings
|
|
||||||
.get("hud.crafting.req_crafting_station"),
|
.get("hud.crafting.req_crafting_station"),
|
||||||
)
|
)
|
||||||
.top_left_with_margins_on(state.ids.align_ing, 10.0, 5.0)
|
.top_left_with_margins_on(state.ids.align_ing, 10.0, 5.0)
|
||||||
|
@ -1132,8 +1132,7 @@ impl<'a> Widget for Diary<'a> {
|
|||||||
.mid_top_with_margin_on(state.skills_top_l[0], 3.0)
|
.mid_top_with_margin_on(state.skills_top_l[0], 3.0)
|
||||||
.with_tooltip(
|
.with_tooltip(
|
||||||
self.tooltip_manager,
|
self.tooltip_manager,
|
||||||
self
|
self.localized_strings
|
||||||
.localized_strings
|
|
||||||
.get("hud.skill.axe_double_strike_title"),
|
.get("hud.skill.axe_double_strike_title"),
|
||||||
self.localized_strings.get("hud.skill.axe_double_strike"),
|
self.localized_strings.get("hud.skill.axe_double_strike"),
|
||||||
&diary_tooltip,
|
&diary_tooltip,
|
||||||
@ -1316,8 +1315,7 @@ impl<'a> Widget for Diary<'a> {
|
|||||||
.mid_top_with_margin_on(state.skills_top_l[0], 3.0)
|
.mid_top_with_margin_on(state.skills_top_l[0], 3.0)
|
||||||
.with_tooltip(
|
.with_tooltip(
|
||||||
self.tooltip_manager,
|
self.tooltip_manager,
|
||||||
self
|
self.localized_strings
|
||||||
.localized_strings
|
|
||||||
.get("hud.skill.hmr_single_strike_title"),
|
.get("hud.skill.hmr_single_strike_title"),
|
||||||
self.localized_strings.get("hud.skill.hmr_single_strike"),
|
self.localized_strings.get("hud.skill.hmr_single_strike"),
|
||||||
&diary_tooltip,
|
&diary_tooltip,
|
||||||
@ -1370,8 +1368,7 @@ impl<'a> Widget for Diary<'a> {
|
|||||||
.mid_top_with_margin_on(state.skills_top_r[0], 3.0)
|
.mid_top_with_margin_on(state.skills_top_r[0], 3.0)
|
||||||
.with_tooltip(
|
.with_tooltip(
|
||||||
self.tooltip_manager,
|
self.tooltip_manager,
|
||||||
self
|
self.localized_strings
|
||||||
.localized_strings
|
|
||||||
.get("hud.skill.hmr_charged_melee_title"),
|
.get("hud.skill.hmr_charged_melee_title"),
|
||||||
self.localized_strings.get("hud.skill.hmr_charged_melee"),
|
self.localized_strings.get("hud.skill.hmr_charged_melee"),
|
||||||
&diary_tooltip,
|
&diary_tooltip,
|
||||||
@ -1726,8 +1723,7 @@ impl<'a> Widget for Diary<'a> {
|
|||||||
.mid_top_with_margin_on(state.skills_top_r[0], 3.0)
|
.mid_top_with_margin_on(state.skills_top_r[0], 3.0)
|
||||||
.with_tooltip(
|
.with_tooltip(
|
||||||
self.tooltip_manager,
|
self.tooltip_manager,
|
||||||
self
|
self.localized_strings
|
||||||
.localized_strings
|
|
||||||
.get("hud.skill.st_flamethrower_title"),
|
.get("hud.skill.st_flamethrower_title"),
|
||||||
self.localized_strings.get("hud.skill.st_flamethrower"),
|
self.localized_strings.get("hud.skill.st_flamethrower"),
|
||||||
&diary_tooltip,
|
&diary_tooltip,
|
||||||
@ -2183,12 +2179,10 @@ impl<'a> Diary<'a> {
|
|||||||
)
|
)
|
||||||
.with_tooltip(
|
.with_tooltip(
|
||||||
self.tooltip_manager,
|
self.tooltip_manager,
|
||||||
self
|
self.localized_strings
|
||||||
.localized_strings
|
|
||||||
.get(&format!("hud.skill.{}_title", skill_key)),
|
.get(&format!("hud.skill.{}_title", skill_key)),
|
||||||
&format_skill_description(
|
&format_skill_description(
|
||||||
self
|
self.localized_strings
|
||||||
.localized_strings
|
|
||||||
.get(&format!("hud.skill.{}", skill_key)),
|
.get(&format!("hud.skill.{}", skill_key)),
|
||||||
skill,
|
skill,
|
||||||
self.skill_set,
|
self.skill_set,
|
||||||
|
@ -150,8 +150,7 @@ impl<'a> Widget for Chat<'a> {
|
|||||||
|
|
||||||
// Chat Transp
|
// Chat Transp
|
||||||
Text::new(
|
Text::new(
|
||||||
self
|
self.localized_strings
|
||||||
.localized_strings
|
|
||||||
.get("hud.settings.background_transparency"),
|
.get("hud.settings.background_transparency"),
|
||||||
)
|
)
|
||||||
.down_from(state.ids.general_txt, 20.0)
|
.down_from(state.ids.general_txt, 20.0)
|
||||||
@ -178,8 +177,7 @@ impl<'a> Widget for Chat<'a> {
|
|||||||
|
|
||||||
// "Show character names in chat" toggle button
|
// "Show character names in chat" toggle button
|
||||||
Text::new(
|
Text::new(
|
||||||
self
|
self.localized_strings
|
||||||
.localized_strings
|
|
||||||
.get("hud.settings.chat_character_name"),
|
.get("hud.settings.chat_character_name"),
|
||||||
)
|
)
|
||||||
.down_from(state.ids.transp_slider, 10.0)
|
.down_from(state.ids.transp_slider, 10.0)
|
||||||
|
@ -188,8 +188,7 @@ impl<'a> Widget for Gameplay<'a> {
|
|||||||
|
|
||||||
// Camera clamp angle
|
// Camera clamp angle
|
||||||
Text::new(
|
Text::new(
|
||||||
self
|
self.localized_strings
|
||||||
.localized_strings
|
|
||||||
.get("hud.settings.camera_clamp_angle"),
|
.get("hud.settings.camera_clamp_angle"),
|
||||||
)
|
)
|
||||||
.down_from(state.ids.mouse_zoom_slider, 10.0)
|
.down_from(state.ids.mouse_zoom_slider, 10.0)
|
||||||
@ -241,8 +240,7 @@ impl<'a> Widget for Gameplay<'a> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Text::new(
|
Text::new(
|
||||||
self
|
self.localized_strings
|
||||||
.localized_strings
|
|
||||||
.get("hud.settings.invert_scroll_zoom"),
|
.get("hud.settings.invert_scroll_zoom"),
|
||||||
)
|
)
|
||||||
.right_from(state.ids.mouse_zoom_invert_button, 10.0)
|
.right_from(state.ids.mouse_zoom_invert_button, 10.0)
|
||||||
@ -271,8 +269,7 @@ impl<'a> Widget for Gameplay<'a> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Text::new(
|
Text::new(
|
||||||
self
|
self.localized_strings
|
||||||
.localized_strings
|
|
||||||
.get("hud.settings.invert_mouse_y_axis"),
|
.get("hud.settings.invert_mouse_y_axis"),
|
||||||
)
|
)
|
||||||
.right_from(state.ids.mouse_y_invert_button, 10.0)
|
.right_from(state.ids.mouse_y_invert_button, 10.0)
|
||||||
@ -301,8 +298,7 @@ impl<'a> Widget for Gameplay<'a> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Text::new(
|
Text::new(
|
||||||
self
|
self.localized_strings
|
||||||
.localized_strings
|
|
||||||
.get("hud.settings.invert_controller_y_axis"),
|
.get("hud.settings.invert_controller_y_axis"),
|
||||||
)
|
)
|
||||||
.right_from(state.ids.controller_y_invert_button, 10.0)
|
.right_from(state.ids.controller_y_invert_button, 10.0)
|
||||||
@ -331,8 +327,7 @@ impl<'a> Widget for Gameplay<'a> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Text::new(
|
Text::new(
|
||||||
self
|
self.localized_strings
|
||||||
.localized_strings
|
|
||||||
.get("hud.settings.enable_mouse_smoothing"),
|
.get("hud.settings.enable_mouse_smoothing"),
|
||||||
)
|
)
|
||||||
.right_from(state.ids.smooth_pan_toggle_button, 10.0)
|
.right_from(state.ids.smooth_pan_toggle_button, 10.0)
|
||||||
@ -344,8 +339,7 @@ impl<'a> Widget for Gameplay<'a> {
|
|||||||
|
|
||||||
// Free look behaviour
|
// Free look behaviour
|
||||||
Text::new(
|
Text::new(
|
||||||
self
|
self.localized_strings
|
||||||
.localized_strings
|
|
||||||
.get("hud.settings.free_look_behavior"),
|
.get("hud.settings.free_look_behavior"),
|
||||||
)
|
)
|
||||||
.down_from(state.ids.mouse_zoom_invert_button, 10.0)
|
.down_from(state.ids.mouse_zoom_invert_button, 10.0)
|
||||||
@ -355,11 +349,9 @@ impl<'a> Widget for Gameplay<'a> {
|
|||||||
.set(state.ids.free_look_behavior_text, ui);
|
.set(state.ids.free_look_behavior_text, ui);
|
||||||
|
|
||||||
let mode_label_list = [
|
let mode_label_list = [
|
||||||
self
|
self.localized_strings
|
||||||
.localized_strings
|
|
||||||
.get("hud.settings.press_behavior.toggle"),
|
.get("hud.settings.press_behavior.toggle"),
|
||||||
self
|
self.localized_strings
|
||||||
.localized_strings
|
|
||||||
.get("hud.settings.press_behavior.hold"),
|
.get("hud.settings.press_behavior.hold"),
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -383,8 +375,7 @@ impl<'a> Widget for Gameplay<'a> {
|
|||||||
|
|
||||||
// Auto walk behavior
|
// Auto walk behavior
|
||||||
Text::new(
|
Text::new(
|
||||||
self
|
self.localized_strings
|
||||||
.localized_strings
|
|
||||||
.get("hud.settings.auto_walk_behavior"),
|
.get("hud.settings.auto_walk_behavior"),
|
||||||
)
|
)
|
||||||
.down_from(state.ids.mouse_zoom_invert_button, 10.0)
|
.down_from(state.ids.mouse_zoom_invert_button, 10.0)
|
||||||
@ -413,8 +404,7 @@ impl<'a> Widget for Gameplay<'a> {
|
|||||||
|
|
||||||
// Camera clamp behavior
|
// Camera clamp behavior
|
||||||
Text::new(
|
Text::new(
|
||||||
self
|
self.localized_strings
|
||||||
.localized_strings
|
|
||||||
.get("hud.settings.camera_clamp_behavior"),
|
.get("hud.settings.camera_clamp_behavior"),
|
||||||
)
|
)
|
||||||
.down_from(state.ids.free_look_behavior_list, 10.0)
|
.down_from(state.ids.free_look_behavior_list, 10.0)
|
||||||
@ -443,8 +433,7 @@ impl<'a> Widget for Gameplay<'a> {
|
|||||||
|
|
||||||
// Player physics behavior
|
// Player physics behavior
|
||||||
Text::new(
|
Text::new(
|
||||||
self
|
self.localized_strings
|
||||||
.localized_strings
|
|
||||||
.get("hud.settings.player_physics_behavior"),
|
.get("hud.settings.player_physics_behavior"),
|
||||||
)
|
)
|
||||||
.down_from(state.ids.auto_walk_behavior_list, 10.0)
|
.down_from(state.ids.auto_walk_behavior_list, 10.0)
|
||||||
@ -499,8 +488,7 @@ impl<'a> Widget for Gameplay<'a> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Text::new(
|
Text::new(
|
||||||
self
|
self.localized_strings
|
||||||
.localized_strings
|
|
||||||
.get("hud.settings.stop_auto_walk_on_input"),
|
.get("hud.settings.stop_auto_walk_on_input"),
|
||||||
)
|
)
|
||||||
.right_from(state.ids.stop_auto_walk_on_input_button, 10.0)
|
.right_from(state.ids.stop_auto_walk_on_input_button, 10.0)
|
||||||
|
@ -690,8 +690,7 @@ impl<'a> Widget for Interface<'a> {
|
|||||||
*/
|
*/
|
||||||
// SCT/ Scrolling Combat Text
|
// SCT/ Scrolling Combat Text
|
||||||
Text::new(
|
Text::new(
|
||||||
self
|
self.localized_strings
|
||||||
.localized_strings
|
|
||||||
.get("hud.settings.scrolling_combat_text"),
|
.get("hud.settings.scrolling_combat_text"),
|
||||||
)
|
)
|
||||||
.top_left_with_margins_on(state.ids.window_r, 5.0, 5.0)
|
.top_left_with_margins_on(state.ids.window_r, 5.0, 5.0)
|
||||||
@ -715,8 +714,7 @@ impl<'a> Widget for Interface<'a> {
|
|||||||
events.push(Sct(!self.global_state.settings.interface.sct))
|
events.push(Sct(!self.global_state.settings.interface.sct))
|
||||||
}
|
}
|
||||||
Text::new(
|
Text::new(
|
||||||
self
|
self.localized_strings
|
||||||
.localized_strings
|
|
||||||
.get("hud.settings.scrolling_combat_text"),
|
.get("hud.settings.scrolling_combat_text"),
|
||||||
)
|
)
|
||||||
.right_from(state.ids.sct_show_radio, 10.0)
|
.right_from(state.ids.sct_show_radio, 10.0)
|
||||||
@ -739,8 +737,7 @@ impl<'a> Widget for Interface<'a> {
|
|||||||
.set(state.ids.sct_single_dmg_radio, ui);
|
.set(state.ids.sct_single_dmg_radio, ui);
|
||||||
|
|
||||||
Text::new(
|
Text::new(
|
||||||
self
|
self.localized_strings
|
||||||
.localized_strings
|
|
||||||
.get("hud.settings.single_damage_number"),
|
.get("hud.settings.single_damage_number"),
|
||||||
)
|
)
|
||||||
.right_from(state.ids.sct_single_dmg_radio, 10.0)
|
.right_from(state.ids.sct_single_dmg_radio, 10.0)
|
||||||
@ -810,8 +807,7 @@ impl<'a> Widget for Interface<'a> {
|
|||||||
))
|
))
|
||||||
}
|
}
|
||||||
Text::new(
|
Text::new(
|
||||||
self
|
self.localized_strings
|
||||||
.localized_strings
|
|
||||||
.get("hud.settings.cumulated_incoming_damage"),
|
.get("hud.settings.cumulated_incoming_damage"),
|
||||||
)
|
)
|
||||||
.right_from(state.ids.sct_batch_inc_radio, 10.0)
|
.right_from(state.ids.sct_batch_inc_radio, 10.0)
|
||||||
@ -852,8 +848,7 @@ impl<'a> Widget for Interface<'a> {
|
|||||||
events.push(SpeechBubbleDarkMode(speech_bubble_dark_mode));
|
events.push(SpeechBubbleDarkMode(speech_bubble_dark_mode));
|
||||||
}
|
}
|
||||||
Text::new(
|
Text::new(
|
||||||
self
|
self.localized_strings
|
||||||
.localized_strings
|
|
||||||
.get("hud.settings.speech_bubble_dark_mode"),
|
.get("hud.settings.speech_bubble_dark_mode"),
|
||||||
)
|
)
|
||||||
.right_from(state.ids.speech_bubble_dark_mode_button, 10.0)
|
.right_from(state.ids.speech_bubble_dark_mode_button, 10.0)
|
||||||
@ -876,8 +871,7 @@ impl<'a> Widget for Interface<'a> {
|
|||||||
events.push(SpeechBubbleIcon(speech_bubble_icon));
|
events.push(SpeechBubbleIcon(speech_bubble_icon));
|
||||||
}
|
}
|
||||||
Text::new(
|
Text::new(
|
||||||
self
|
self.localized_strings
|
||||||
.localized_strings
|
|
||||||
.get("hud.settings.speech_bubble_icon"),
|
.get("hud.settings.speech_bubble_icon"),
|
||||||
)
|
)
|
||||||
.right_from(state.ids.speech_bubble_icon_button, 10.0)
|
.right_from(state.ids.speech_bubble_icon_button, 10.0)
|
||||||
|
@ -137,8 +137,7 @@ impl<'a> Widget for Sound<'a> {
|
|||||||
.set(state.ids.master_volume_number, ui);
|
.set(state.ids.master_volume_number, ui);
|
||||||
// Master Volume (inactive window) ----------------------------------
|
// Master Volume (inactive window) ----------------------------------
|
||||||
Text::new(
|
Text::new(
|
||||||
self
|
self.localized_strings
|
||||||
.localized_strings
|
|
||||||
.get("hud.settings.inactive_master_volume_perc"),
|
.get("hud.settings.inactive_master_volume_perc"),
|
||||||
)
|
)
|
||||||
.down_from(state.ids.master_volume_slider, 10.0)
|
.down_from(state.ids.master_volume_slider, 10.0)
|
||||||
@ -196,8 +195,7 @@ impl<'a> Widget for Sound<'a> {
|
|||||||
|
|
||||||
// SFX Volume -------------------------------------------------------
|
// SFX Volume -------------------------------------------------------
|
||||||
Text::new(
|
Text::new(
|
||||||
self
|
self.localized_strings
|
||||||
.localized_strings
|
|
||||||
.get("hud.settings.sound_effect_volume"),
|
.get("hud.settings.sound_effect_volume"),
|
||||||
)
|
)
|
||||||
.down_from(state.ids.audio_volume_slider, 10.0)
|
.down_from(state.ids.audio_volume_slider, 10.0)
|
||||||
|
@ -544,8 +544,7 @@ impl<'a> Widget for Video<'a> {
|
|||||||
events.push(GraphicsChange::AdjustSpriteRenderDistance(new_val));
|
events.push(GraphicsChange::AdjustSpriteRenderDistance(new_val));
|
||||||
}
|
}
|
||||||
Text::new(
|
Text::new(
|
||||||
self
|
self.localized_strings
|
||||||
.localized_strings
|
|
||||||
.get("hud.settings.sprites_view_distance"),
|
.get("hud.settings.sprites_view_distance"),
|
||||||
)
|
)
|
||||||
.up_from(state.ids.sprite_dist_slider, 8.0)
|
.up_from(state.ids.sprite_dist_slider, 8.0)
|
||||||
@ -584,8 +583,7 @@ impl<'a> Widget for Video<'a> {
|
|||||||
events.push(GraphicsChange::AdjustFigureLoDRenderDistance(new_val));
|
events.push(GraphicsChange::AdjustFigureLoDRenderDistance(new_val));
|
||||||
}
|
}
|
||||||
Text::new(
|
Text::new(
|
||||||
self
|
self.localized_strings
|
||||||
.localized_strings
|
|
||||||
.get("hud.settings.figures_view_distance"),
|
.get("hud.settings.figures_view_distance"),
|
||||||
)
|
)
|
||||||
.up_from(state.ids.figure_dist_slider, 8.0)
|
.up_from(state.ids.figure_dist_slider, 8.0)
|
||||||
@ -693,8 +691,7 @@ impl<'a> Widget for Video<'a> {
|
|||||||
|
|
||||||
// CloudMode
|
// CloudMode
|
||||||
Text::new(
|
Text::new(
|
||||||
self
|
self.localized_strings
|
||||||
.localized_strings
|
|
||||||
.get("hud.settings.cloud_rendering_mode"),
|
.get("hud.settings.cloud_rendering_mode"),
|
||||||
)
|
)
|
||||||
.down_from(state.ids.upscale_factor_list, 8.0)
|
.down_from(state.ids.upscale_factor_list, 8.0)
|
||||||
@ -713,20 +710,15 @@ impl<'a> Widget for Video<'a> {
|
|||||||
];
|
];
|
||||||
let mode_label_list = [
|
let mode_label_list = [
|
||||||
self.localized_strings.get("common.none"),
|
self.localized_strings.get("common.none"),
|
||||||
self
|
self.localized_strings
|
||||||
.localized_strings
|
|
||||||
.get("hud.settings.cloud_rendering_mode.minimal"),
|
.get("hud.settings.cloud_rendering_mode.minimal"),
|
||||||
self
|
self.localized_strings
|
||||||
.localized_strings
|
|
||||||
.get("hud.settings.cloud_rendering_mode.low"),
|
.get("hud.settings.cloud_rendering_mode.low"),
|
||||||
self
|
self.localized_strings
|
||||||
.localized_strings
|
|
||||||
.get("hud.settings.cloud_rendering_mode.medium"),
|
.get("hud.settings.cloud_rendering_mode.medium"),
|
||||||
self
|
self.localized_strings
|
||||||
.localized_strings
|
|
||||||
.get("hud.settings.cloud_rendering_mode.high"),
|
.get("hud.settings.cloud_rendering_mode.high"),
|
||||||
self
|
self.localized_strings
|
||||||
.localized_strings
|
|
||||||
.get("hud.settings.cloud_rendering_mode.ultra"),
|
.get("hud.settings.cloud_rendering_mode.ultra"),
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -749,8 +741,7 @@ impl<'a> Widget for Video<'a> {
|
|||||||
|
|
||||||
// FluidMode
|
// FluidMode
|
||||||
Text::new(
|
Text::new(
|
||||||
self
|
self.localized_strings
|
||||||
.localized_strings
|
|
||||||
.get("hud.settings.fluid_rendering_mode"),
|
.get("hud.settings.fluid_rendering_mode"),
|
||||||
)
|
)
|
||||||
.down_from(state.ids.cloud_mode_list, 8.0)
|
.down_from(state.ids.cloud_mode_list, 8.0)
|
||||||
@ -761,11 +752,9 @@ impl<'a> Widget for Video<'a> {
|
|||||||
|
|
||||||
let mode_list = [FluidMode::Cheap, FluidMode::Shiny];
|
let mode_list = [FluidMode::Cheap, FluidMode::Shiny];
|
||||||
let mode_label_list = [
|
let mode_label_list = [
|
||||||
self
|
self.localized_strings
|
||||||
.localized_strings
|
|
||||||
.get("hud.settings.fluid_rendering_mode.cheap"),
|
.get("hud.settings.fluid_rendering_mode.cheap"),
|
||||||
self
|
self.localized_strings
|
||||||
.localized_strings
|
|
||||||
.get("hud.settings.fluid_rendering_mode.shiny"),
|
.get("hud.settings.fluid_rendering_mode.shiny"),
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -788,8 +777,7 @@ impl<'a> Widget for Video<'a> {
|
|||||||
|
|
||||||
// LightingMode
|
// LightingMode
|
||||||
Text::new(
|
Text::new(
|
||||||
self
|
self.localized_strings
|
||||||
.localized_strings
|
|
||||||
.get("hud.settings.lighting_rendering_mode"),
|
.get("hud.settings.lighting_rendering_mode"),
|
||||||
)
|
)
|
||||||
.down_from(state.ids.fluid_mode_list, 8.0)
|
.down_from(state.ids.fluid_mode_list, 8.0)
|
||||||
@ -804,14 +792,11 @@ impl<'a> Widget for Video<'a> {
|
|||||||
LightingMode::Lambertian,
|
LightingMode::Lambertian,
|
||||||
];
|
];
|
||||||
let mode_label_list = [
|
let mode_label_list = [
|
||||||
self
|
self.localized_strings
|
||||||
.localized_strings
|
|
||||||
.get("hud.settings.lighting_rendering_mode.ashikhmin"),
|
.get("hud.settings.lighting_rendering_mode.ashikhmin"),
|
||||||
self
|
self.localized_strings
|
||||||
.localized_strings
|
|
||||||
.get("hud.settings.lighting_rendering_mode.blinnphong"),
|
.get("hud.settings.lighting_rendering_mode.blinnphong"),
|
||||||
self
|
self.localized_strings
|
||||||
.localized_strings
|
|
||||||
.get("hud.settings.lighting_rendering_mode.lambertian"),
|
.get("hud.settings.lighting_rendering_mode.lambertian"),
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -834,8 +819,7 @@ impl<'a> Widget for Video<'a> {
|
|||||||
|
|
||||||
// ShadowMode
|
// ShadowMode
|
||||||
Text::new(
|
Text::new(
|
||||||
self
|
self.localized_strings
|
||||||
.localized_strings
|
|
||||||
.get("hud.settings.shadow_rendering_mode"),
|
.get("hud.settings.shadow_rendering_mode"),
|
||||||
)
|
)
|
||||||
.down_from(state.ids.lighting_mode_list, 8.0)
|
.down_from(state.ids.lighting_mode_list, 8.0)
|
||||||
@ -851,14 +835,11 @@ impl<'a> Widget for Video<'a> {
|
|||||||
ShadowMode::Map(shadow_map_mode.unwrap_or_default()),
|
ShadowMode::Map(shadow_map_mode.unwrap_or_default()),
|
||||||
];
|
];
|
||||||
let mode_label_list = [
|
let mode_label_list = [
|
||||||
self
|
self.localized_strings
|
||||||
.localized_strings
|
|
||||||
.get("hud.settings.shadow_rendering_mode.none"),
|
.get("hud.settings.shadow_rendering_mode.none"),
|
||||||
self
|
self.localized_strings
|
||||||
.localized_strings
|
|
||||||
.get("hud.settings.shadow_rendering_mode.cheap"),
|
.get("hud.settings.shadow_rendering_mode.cheap"),
|
||||||
self
|
self.localized_strings
|
||||||
.localized_strings
|
|
||||||
.get("hud.settings.shadow_rendering_mode.map"),
|
.get("hud.settings.shadow_rendering_mode.map"),
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -882,8 +863,7 @@ impl<'a> Widget for Video<'a> {
|
|||||||
if let Some(shadow_map_mode) = shadow_map_mode {
|
if let Some(shadow_map_mode) = shadow_map_mode {
|
||||||
// Display the shadow map mode if selected.
|
// Display the shadow map mode if selected.
|
||||||
Text::new(
|
Text::new(
|
||||||
self
|
self.localized_strings
|
||||||
.localized_strings
|
|
||||||
.get("hud.settings.shadow_rendering_mode.map.resolution"),
|
.get("hud.settings.shadow_rendering_mode.map.resolution"),
|
||||||
)
|
)
|
||||||
.right_from(state.ids.shadow_mode_list, 10.0)
|
.right_from(state.ids.shadow_mode_list, 10.0)
|
||||||
@ -975,8 +955,7 @@ impl<'a> Widget for Video<'a> {
|
|||||||
|
|
||||||
// Lossy terrain compression
|
// Lossy terrain compression
|
||||||
Text::new(
|
Text::new(
|
||||||
self
|
self.localized_strings
|
||||||
.localized_strings
|
|
||||||
.get("hud.settings.lossy_terrain_compression"),
|
.get("hud.settings.lossy_terrain_compression"),
|
||||||
)
|
)
|
||||||
.font_size(self.fonts.cyri.scale(14))
|
.font_size(self.fonts.cyri.scale(14))
|
||||||
|
@ -566,9 +566,7 @@ impl<'a> Widget for Trade<'a> {
|
|||||||
event = self
|
event = self
|
||||||
.item_pane(&mut state, ui, trade, prices, true)
|
.item_pane(&mut state, ui, trade, prices, true)
|
||||||
.or(event);
|
.or(event);
|
||||||
event = self
|
event = self.accept_decline_buttons(&mut state, ui, trade).or(event);
|
||||||
.accept_decline_buttons(&mut state, ui, trade)
|
|
||||||
.or(event);
|
|
||||||
event = self.close_button(&mut state, ui).or(event);
|
event = self.close_button(&mut state, ui).or(event);
|
||||||
|
|
||||||
event
|
event
|
||||||
|
@ -205,9 +205,7 @@ impl FigureMgrStates {
|
|||||||
match body {
|
match body {
|
||||||
Body::Humanoid(_) => self.character_states.remove(entity).map(|e| e.meta),
|
Body::Humanoid(_) => self.character_states.remove(entity).map(|e| e.meta),
|
||||||
Body::QuadrupedSmall(_) => self.quadruped_small_states.remove(entity).map(|e| e.meta),
|
Body::QuadrupedSmall(_) => self.quadruped_small_states.remove(entity).map(|e| e.meta),
|
||||||
Body::QuadrupedMedium(_) => {
|
Body::QuadrupedMedium(_) => self.quadruped_medium_states.remove(entity).map(|e| e.meta),
|
||||||
self.quadruped_medium_states.remove(entity).map(|e| e.meta)
|
|
||||||
},
|
|
||||||
Body::QuadrupedLow(_) => self.quadruped_low_states.remove(entity).map(|e| e.meta),
|
Body::QuadrupedLow(_) => self.quadruped_low_states.remove(entity).map(|e| e.meta),
|
||||||
Body::BirdMedium(_) => self.bird_medium_states.remove(entity).map(|e| e.meta),
|
Body::BirdMedium(_) => self.bird_medium_states.remove(entity).map(|e| e.meta),
|
||||||
Body::FishMedium(_) => self.fish_medium_states.remove(entity).map(|e| e.meta),
|
Body::FishMedium(_) => self.fish_medium_states.remove(entity).map(|e| e.meta),
|
||||||
|
@ -424,10 +424,9 @@ fn draw_graphic(
|
|||||||
),
|
),
|
||||||
border_color,
|
border_color,
|
||||||
)),
|
)),
|
||||||
Graphic::Voxel(ref segment, trans, sample_strat) => Some((
|
Graphic::Voxel(ref segment, trans, sample_strat) => {
|
||||||
renderer::draw_vox(segment, dims, trans, sample_strat),
|
Some((renderer::draw_vox(segment, dims, trans, sample_strat), None))
|
||||||
None,
|
},
|
||||||
)),
|
|
||||||
Graphic::Blank => None,
|
Graphic::Blank => None,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user