More cheese is less cheese

Update CHANGELOG.md
fmt
Update crafting.rs
This commit is contained in:
Monty 2021-04-05 13:40:12 +02:00
parent 69891f0b70
commit b8c474057c
3 changed files with 11 additions and 10 deletions

View File

@ -20,8 +20,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Buy and sell prices in tooltips when trading with a merchant now have colors.
- Attacks now emit sound effects from the target on hit.
- Crafting menu tabs
- Cheese count indicator next to the coin count indicator
### Changed

View File

@ -49,10 +49,10 @@ widget_ids! {
bg_frame,
char_ico,
coin_ico,
cheese_ico,
//cheese_ico,
space_txt,
coin_txt,
cheese_txt,
//cheese_txt,
inventory_title,
inventory_title_bg,
scrollbar_bg,
@ -339,8 +339,10 @@ impl<'a> InventoryScroller<'a> {
let bag_space_percentage = space_used as f32 / space_max as f32;
let coin_itemdef = Arc::<ItemDef>::load_expect_cloned("common.items.utility.coins");
let coin_count = self.inventory.item_count(&coin_itemdef);
let cheese_itemdef = Arc::<ItemDef>::load_expect_cloned("common.items.food.cheese");
let cheese_count = self.inventory.item_count(&cheese_itemdef);
// TODO: Reuse this to generally count a stackable item the player selected
//let cheese_itemdef =
// Arc::<ItemDef>::load_expect_cloned("common.items.food.cheese");
// let cheese_count = self.inventory.item_count(&cheese_itemdef);
// Coin Icon and Coin Text
Image::new(self.imgs.coin_ico)
@ -353,8 +355,9 @@ impl<'a> InventoryScroller<'a> {
.font_size(self.fonts.cyri.scale(14))
.color(Color::Rgba(0.871, 0.863, 0.05, 1.0))
.set(state.ids.coin_txt, ui);
// Cheese Icon and Cheese Text
Image::new(self.imgs.cheese_ico)
// TODO: Add a customizable counter for stackable items here
// TODO: Cheese is funny until it's real
/*Image::new(self.imgs.cheese_ico)
.w_h(16.0, 17.0)
.bottom_left_with_margins_on(self.bg_ids.bg_frame, 2.0, 110.0)
.set(state.ids.cheese_ico, ui);
@ -363,7 +366,7 @@ impl<'a> InventoryScroller<'a> {
.font_id(self.fonts.cyri.conrod_id)
.font_size(self.fonts.cyri.scale(14))
.color(Color::Rgba(0.871, 0.863, 0.05, 1.0))
.set(state.ids.cheese_txt, ui);
.set(state.ids.cheese_txt, ui);*/
//Free Bag-Space
Text::new(&bag_space)
.bottom_right_with_margins_on(self.bg_ids.bg_frame, 6.0, 43.0)

View File

@ -291,7 +291,7 @@ impl<'a> Widget for Crafting<'a> {
SelectedCraftingTab::Tool => "Tools",
SelectedCraftingTab::Utility => "Utility",
SelectedCraftingTab::Weapon => "Weapons",
SelectedCraftingTab::Bag => "Weapons",
SelectedCraftingTab::Bag => "Bags",
};
let tab_img = match i.1 {
SelectedCraftingTab::Armor => self.imgs.icon_armor,