various fixes

Balanced crafted weapon power

Adjusted tooltip color

Added tooltip showing account name to the social window
This commit is contained in:
Monty Marz 2020-08-24 01:16:53 +02:00
parent 877eaee151
commit 1d49186e31
9 changed files with 18 additions and 9 deletions

View File

@ -6,7 +6,7 @@ Item(
kind: Bow("WoodShortbow0"), kind: Bow("WoodShortbow0"),
stats: ( stats: (
equip_time_millis: 400, equip_time_millis: 400,
power: 1.0, power: 0.8,
), ),
) )
), ),

View File

@ -6,7 +6,7 @@ Item(
kind: Sword("WoodTraining"), kind: Sword("WoodTraining"),
stats: ( stats: (
equip_time_millis: 400, equip_time_millis: 400,
power: 1.0, power: 0.8,
), ),
) )
), ),

Binary file not shown.

Binary file not shown.

View File

@ -329,6 +329,7 @@ magischen Gegenstände ergattern?"#,
"hud.social.not_yet_available": "Noch nicht verfügbar", "hud.social.not_yet_available": "Noch nicht verfügbar",
"hud.social.faction": "Fraktion", "hud.social.faction": "Fraktion",
"hud.social.play_online_fmt": "{nb_player} Spieler online", "hud.social.play_online_fmt": "{nb_player} Spieler online",
"hud.social.account": "Account",
"hud.spell": "Zauber", "hud.spell": "Zauber",

View File

@ -335,6 +335,7 @@ magically infused items?"#,
"hud.social.name": "Name", "hud.social.name": "Name",
"hud.social.level": "Level", "hud.social.level": "Level",
"hud.social.zone": "Zone", "hud.social.zone": "Zone",
"hud.social.account": "Account",
"hud.crafting": "Crafting", "hud.crafting": "Crafting",

View File

@ -183,6 +183,7 @@ impl<'a> Widget for Crafting<'a> {
.set(ids.align_ing, ui); .set(ids.align_ing, ui);
let client = &self.client; let client = &self.client;
// First available recipes, then unavailable ones // First available recipes, then unavailable ones
// TODO Sort these alphabetically by using "sort_by_key(|x| x.to_lowercase())"
let recipe_iter = self let recipe_iter = self
.client .client
.recipe_book() .recipe_book()

View File

@ -417,6 +417,11 @@ impl<'a> Widget for Social<'a> {
} else { } else {
button.down_from(state.ids.player_names[i - 1], 1.0) button.down_from(state.ids.player_names[i - 1], 1.0)
}; };
let acc_name_txt = format!(
"{}: {}",
&self.localized_strings.get("hud.social.account"),
alias
);
button button
.w_h(133.0, 20.0) .w_h(133.0, 20.0)
.hover_image(if selected { .hover_image(if selected {
@ -434,6 +439,7 @@ impl<'a> Widget for Social<'a> {
.label_y(conrod_core::position::Relative::Scalar(1.0)) .label_y(conrod_core::position::Relative::Scalar(1.0))
.label_font_id(self.fonts.cyri.conrod_id) .label_font_id(self.fonts.cyri.conrod_id)
.label_color(TEXT_COLOR) .label_color(TEXT_COLOR)
.with_tooltip(self.tooltip_manager, &acc_name_txt, "", &button_tooltip)
.set(state.ids.player_names[i], ui); .set(state.ids.player_names[i], ui);
// Player Levels // Player Levels
Button::image(if !selected { Button::image(if !selected {

View File

@ -29,7 +29,7 @@ pub struct Colors {
fn close(x: f32, tgt: f32, falloff: f32) -> f32 { fn close(x: f32, tgt: f32, falloff: f32) -> f32 {
(1.0 - (x - tgt).abs() / falloff).max(0.0).powf(0.5) (1.0 - (x - tgt).abs() / falloff).max(0.0).powf(0.5)
} }
const MUSH_FACT: f32 = 0.0001; // To balance everything around the mushroom spawning rate const MUSH_FACT: f32 = 1.0e-4; // To balance everything around the mushroom spawning rate
pub fn apply_scatter_to<'a>( pub fn apply_scatter_to<'a>(
wpos2d: Vec2<i32>, wpos2d: Vec2<i32>,
mut get_column: impl FnMut(Vec2<i32>) -> Option<&'a ColumnSample<'a>>, mut get_column: impl FnMut(Vec2<i32>) -> Option<&'a ColumnSample<'a>>,
@ -130,10 +130,10 @@ pub fn apply_scatter_to<'a>(
// Collecable Objects // Collecable Objects
// Only spawn twigs in temperate forests // Only spawn twigs in temperate forests
(Twigs, false, |c| { (Twigs, false, |c| {
((c.tree_density - 0.5).max(0.0) * 0.001, None) ((c.tree_density - 0.5).max(0.0) * 1.0e-3, None)
}), }),
(Stones, false, |c| { (Stones, false, |c| {
((c.rockiness - 0.5).max(0.0) * 0.05, None) ((c.rockiness - 0.5).max(0.0) * 1.0e-3, None)
}), }),
// Don't spawn Mushrooms in snowy regions // Don't spawn Mushrooms in snowy regions
(Mushroom, false, |c| { (Mushroom, false, |c| {