From a4d56e78436298ee07171f4bef1c0b54d43f9854 Mon Sep 17 00:00:00 2001 From: Monty Date: Sun, 18 Apr 2021 02:25:19 +0200 Subject: [PATCH] more sprite stuff and crafting UI update fix item images fix CR display --- .../items/crafting_tools/craftsman_hammer.ron | 6 +- assets/common/items/tool/craftsman_hammer.ron | 18 +++++ assets/common/recipe_book.ron | 46 +++++++++---- assets/voxygen/i18n/en/hud/crafting.ron | 7 +- assets/voxygen/item_image_manifest.ron | 27 +++++++- .../voxygen/voxel/biped_weapon_manifest.ron | 6 +- .../voxygen/voxel/glider/glider_cultists.vox | 2 +- assets/voxygen/voxel/sprite/anvil/anvil-0.vox | 2 +- .../voxel/sprite/cauldron/cauldron-0.vox | 2 +- .../voxel/sprite/cooking_pot/pot-0.vox | 3 + assets/voxygen/voxel/sprite_manifest.ron | 11 ++++ .../voxygen/voxel/weapon/hammer/craftsman.vox | 2 +- common/src/terrain/sprite.rs | 3 + voxygen/src/hud/crafting.rs | 66 +++++++++++++++++-- voxygen/src/hud/mod.rs | 10 +-- voxygen/src/scene/terrain/watcher.rs | 3 + .../settlement/building/archetype/house.rs | 6 +- 17 files changed, 182 insertions(+), 38 deletions(-) create mode 100644 assets/common/items/tool/craftsman_hammer.ron create mode 100644 assets/voxygen/voxel/sprite/cooking_pot/pot-0.vox diff --git a/assets/common/items/crafting_tools/craftsman_hammer.ron b/assets/common/items/crafting_tools/craftsman_hammer.ron index f8d7f84ae3..24b5822c37 100644 --- a/assets/common/items/crafting_tools/craftsman_hammer.ron +++ b/assets/common/items/crafting_tools/craftsman_hammer.ron @@ -1,9 +1,9 @@ ItemDef( - name: "Craftsman Hammer", - description: "Used to craft various items.", + name: "Old Hammer", + description: "You don't quite remember where you got this from...", kind: Ingredient( kind: "CraftsmanHammer", ), - quality: Moderate, + quality: Low, tags: [CraftingTool], ) diff --git a/assets/common/items/tool/craftsman_hammer.ron b/assets/common/items/tool/craftsman_hammer.ron new file mode 100644 index 0000000000..599a308d0d --- /dev/null +++ b/assets/common/items/tool/craftsman_hammer.ron @@ -0,0 +1,18 @@ +ItemDef( + name: "Craftsman Hammer", + description: "Used to craft various items.", + kind: Tool(( + kind: Hammer, + hands: One, + stats: Direct(( + equip_time_secs: 0.25, + power: 0.2, + poise_strength: 0.25, + speed: 1.5, + crit_chance: 0.0, + crit_mult: 0.0, + )), + )), + quality: Common, + tags: [CraftingTool], +) \ No newline at end of file diff --git a/assets/common/recipe_book.ron b/assets/common/recipe_book.ron index 6b584e76b1..5b1b11f81b 100644 --- a/assets/common/recipe_book.ron +++ b/assets/common/recipe_book.ron @@ -1,19 +1,20 @@ { "crafting_hammer": ( - output: ("common.items.crafting_tools.craftsman_hammer", 1), + output: ("common.items.tool.craftsman_hammer", 1), inputs: [ (Item("common.items.crafting_ing.twigs"), 6), (Item("common.items.crafting_ing.stones"), 6), ], - craft_sprite: Some(CraftingBench), + craft_sprite: Some(Anvil), ), "mortar_pestle": ( output: ("common.items.crafting_tools.mortar_pestle", 1), inputs: [ (Item("common.items.crafting_ing.stones"), 6), (Item("common.items.food.coconut"), 1), - (Item("common.items.crafting_tools.craftsman_hammer"), 0), + (Item("common.items.tool.craftsman_hammer"), 0), ], + craft_sprite: Some(CraftingBench), ), "sewing_set": ( output: ("common.items.crafting_tools.sewing_set", 1), @@ -22,12 +23,13 @@ (Item("common.items.crafting_ing.twigs"), 4), (Item("common.items.crafting_ing.stones"), 2), ], + craft_sprite: Some(CraftingBench), ), "velorite_frag": ( output: ("common.items.ore.veloritefrag", 2), inputs: [ (Item("common.items.ore.velorite"), 1), - (Item("common.items.crafting_tools.craftsman_hammer"), 0), + (Item("common.items.tool.craftsman_hammer"), 0), ], craft_sprite: Some(Anvil), ), @@ -63,6 +65,7 @@ (Item("common.items.ore.veloritefrag"), 2), (Item("common.items.crafting_tools.mortar_pestle"), 0), ], + craft_sprite: Some(CraftingBench), ), "firework_blue": ( output: ("common.items.utility.firework_blue", 1), @@ -73,6 +76,7 @@ (Item("common.items.ore.veloritefrag"), 1), (Item("common.items.crafting_tools.mortar_pestle"), 0), ], + craft_sprite: Some(CraftingBench), ), "firework_green": ( output: ("common.items.utility.firework_green", 1), @@ -83,6 +87,7 @@ (Item("common.items.ore.veloritefrag"), 1), (Item("common.items.crafting_tools.mortar_pestle"), 0), ], + craft_sprite: Some(CraftingBench), ), "firework_purple": ( output: ("common.items.utility.firework_purple", 1), @@ -93,6 +98,7 @@ (Item("common.items.ore.veloritefrag"), 1), (Item("common.items.crafting_tools.mortar_pestle"), 0), ], + craft_sprite: Some(CraftingBench), ), "firework_red": ( output: ("common.items.utility.firework_red", 1), @@ -103,6 +109,7 @@ (Item("common.items.ore.veloritefrag"), 1), (Item("common.items.crafting_tools.mortar_pestle"), 0), ], + craft_sprite: Some(CraftingBench), ), "firework_white": ( output: ("common.items.utility.firework_white", 1), @@ -113,6 +120,7 @@ (Item("common.items.ore.veloritefrag"), 1), (Item("common.items.crafting_tools.mortar_pestle"), 0), ], + craft_sprite: Some(CraftingBench), ), "firework_yellow": ( output: ("common.items.utility.firework_yellow", 1), @@ -123,6 +131,7 @@ (Item("common.items.ore.veloritefrag"), 1), (Item("common.items.crafting_tools.mortar_pestle"), 0), ], + craft_sprite: Some(CraftingBench), ), "apple_shroom_curry": ( output: ("common.items.food.apple_mushroom_curry", 1), @@ -132,7 +141,7 @@ (Item("common.items.food.apple"), 4), (Item("common.items.crafting_tools.mortar_pestle"), 0), ], - craft_sprite: Some(Cauldron), + craft_sprite: Some(CookingPot), ), "salad_plain": ( output: ("common.items.food.plainsalad", 1), @@ -179,7 +188,7 @@ (Item("common.items.crafting_ing.twigs"), 5), (Item("common.items.crafting_ing.leather_scraps"), 5), (Item("common.items.crafting_ing.cloth_scraps"), 10), - (Item("common.items.crafting_tools.craftsman_hammer"), 0), + (Item("common.items.tool.craftsman_hammer"), 0), (Item("common.items.crafting_tools.sewing_set"), 0), ], craft_sprite: Some(CraftingBench), @@ -190,7 +199,7 @@ (Item("common.items.crafting_ing.twigs"), 5), (Item("common.items.crafting_ing.cloth_scraps_red"), 10), (Item("common.items.crafting_ing.leather_scraps"), 5), - (Item("common.items.crafting_tools.craftsman_hammer"), 0), + (Item("common.items.tool.craftsman_hammer"), 0), (Item("common.items.crafting_tools.sewing_set"), 0), ], craft_sprite: Some(CraftingBench), @@ -202,7 +211,7 @@ (Item("common.items.crafting_ing.leather_scraps"), 5), (Item("common.items.crafting_ing.cloth_scraps"), 5), (Item("common.items.crafting_ing.emerald"), 1), - (Item("common.items.crafting_tools.craftsman_hammer"), 0), + (Item("common.items.tool.craftsman_hammer"), 0), (Item("common.items.crafting_tools.sewing_set"), 0), ], craft_sprite: Some(CraftingBench), @@ -215,7 +224,7 @@ (Item("common.items.crafting_ing.leather_scraps"), 5), (Item("common.items.crafting_ing.cloth_scraps"), 5), (Item("common.items.crafting_ing.ruby"), 1), - (Item("common.items.crafting_tools.craftsman_hammer"), 0), + (Item("common.items.tool.craftsman_hammer"), 0), (Item("common.items.crafting_tools.sewing_set"), 0), ], craft_sprite: Some(CraftingBench), @@ -229,7 +238,7 @@ (Item("common.items.crafting_ing.cloth_scraps"), 5), (Item("common.items.crafting_ing.icy_fang"), 1), (Item("common.items.crafting_ing.ruby"), 1), - (Item("common.items.crafting_tools.craftsman_hammer"), 0), + (Item("common.items.tool.craftsman_hammer"), 0), (Item("common.items.crafting_tools.sewing_set"), 0), ], craft_sprite: Some(CraftingBench), @@ -242,7 +251,7 @@ (Item("common.items.crafting_ing.leather_scraps"), 5), (Item("common.items.crafting_ing.cloth_scraps"), 5), (Item("common.items.crafting_ing.ruby"), 1), - (Item("common.items.crafting_tools.craftsman_hammer"), 0), + (Item("common.items.tool.craftsman_hammer"), 0), (Item("common.items.crafting_tools.sewing_set"), 0), ], craft_sprite: Some(CraftingBench), @@ -253,7 +262,7 @@ (Item("common.items.crafting_ing.twigs"), 20), (Item("common.items.ore.veloritefrag"), 8), (Item("common.items.crafting_ing.ruby"), 4), - (Item("common.items.crafting_tools.craftsman_hammer"), 0), + (Item("common.items.tool.craftsman_hammer"), 0), ], ), "Hunting Bow": ( @@ -278,30 +287,37 @@ "adventure back": ( output: ("common.items.armor.agile.back", 1), inputs: [(Item("common.items.crafting_ing.leather_scraps"), 4)], + craft_sprite: Some(CraftingBench), ), "adventure belt": ( output: ("common.items.armor.agile.belt", 1), inputs: [(Item("common.items.crafting_ing.leather_scraps"), 2)], + craft_sprite: Some(CraftingBench), ), "adventure chest": ( output: ("common.items.armor.agile.chest", 1), inputs: [(Item("common.items.crafting_ing.leather_scraps"), 12)], + craft_sprite: Some(CraftingBench), ), "adventure feet": ( output: ("common.items.armor.agile.foot", 1), inputs: [(Item("common.items.crafting_ing.leather_scraps"), 3)], + craft_sprite: Some(CraftingBench), ), "adventure hands": ( output: ("common.items.armor.agile.hand", 1), inputs: [(Item("common.items.crafting_ing.leather_scraps"), 4)], + craft_sprite: Some(CraftingBench), ), "adventure pants": ( output: ("common.items.armor.agile.pants", 1), inputs: [(Item("common.items.crafting_ing.leather_scraps"), 8)], + craft_sprite: Some(CraftingBench), ), "adventure shoulder": ( output: ("common.items.armor.agile.shoulder", 1), inputs: [(Item("common.items.crafting_ing.leather_scraps"), 12)], + craft_sprite: Some(CraftingBench), ), "Seashell Necklace": ( output: ("common.items.armor.misc.neck.shell", 1), @@ -311,6 +327,7 @@ (Item("common.items.crafting_ing.seashells"), 3), (Item("common.items.crafting_tools.sewing_set"), 0), ], + craft_sprite: Some(CraftingBench), ), "red cloth": ( output: ("common.items.crafting_ing.cloth_scraps_red", 1), @@ -360,6 +377,7 @@ (Item("common.items.armor.misc.bag.tiny_leather_pouch"), 2), (Item("common.items.crafting_tools.sewing_set"), 0), ], + craft_sprite: Some(CraftingBench), ), "sturdy red backpack": ( output: ("common.items.armor.misc.bag.sturdy_red_backpack", 1), @@ -395,7 +413,7 @@ (Item("common.items.crafting_ing.cloth_scraps"), 1), // TODO: Replace with plant fiber when obtainable (Item("common.items.crafting_ing.stones"), 5), // TODO: Replace with iron ingots when obtainable (Item("common.items.crafting_ing.twigs"), 4), - (Item("common.items.crafting_tools.craftsman_hammer"), 0), + (Item("common.items.tool.craftsman_hammer"), 0), ], craft_sprite: Some(Anvil), ), @@ -417,7 +435,7 @@ // output: ("common.items.crafting_ing.modular.damage.sword.metal_blade", 1), // inputs: [ // (Tag(MetalIngot), 5), - // (Item("common.items.crafting_tools.craftsman_hammer"), 0), + // (Item("common.items.tool.craftsman_hammer"), 0), // ], //), } diff --git a/assets/voxygen/i18n/en/hud/crafting.ron b/assets/voxygen/i18n/en/hud/crafting.ron index 41d5cf4a49..985f4c3bd4 100644 --- a/assets/voxygen/i18n/en/hud/crafting.ron +++ b/assets/voxygen/i18n/en/hud/crafting.ron @@ -8,7 +8,12 @@ "hud.crafting.ingredients": "Ingredients:", "hud.crafting.craft": "Craft", "hud.crafting.tool_cata": "Requires:", - + // Crafting Stations + "hud.crafting.req_crafting_station": "Requires:", + "hud.crafting.anvil": "Anvil", + "hud.crafting.cauldron": "Cauldron", + "hud.crafting.cooking_pot": "Cooking Pot", + "hud.crafting.crafting_bench": "Crafting Bench", // Tabs "hud.crafting.tabs.all": "All", "hud.crafting.tabs.armor": "Armor", diff --git a/assets/voxygen/item_image_manifest.ron b/assets/voxygen/item_image_manifest.ron index c863e6abbc..1a90921bbb 100644 --- a/assets/voxygen/item_image_manifest.ron +++ b/assets/voxygen/item_image_manifest.ron @@ -2,6 +2,23 @@ // Vox(specier), // VoxTrans(specifier, offset, (x_rot, y_rot, z_rot), zoom) ({ + // Crafting Stations + Tool("Anvil"): VoxTrans( + "voxel.sprite.anvil.anvil-0", + (0.5, 0.5, 0.0), (0.0, 60.0, 90.0), 1.0, + ), + Tool("Cauldron"): VoxTrans( + "voxel.sprite.cauldron.cauldron-0", + (0.0, 0.0, 0.0), (-50.0, 40.0, 30.0), 1.0, + ), + Tool("CookingPot"): VoxTrans( + "voxel.sprite.cooking_pot.pot-0", + (0.0, 0.0, 0.0), (0.0, 90.0, 90.0), 1.2, + ), + Tool("CraftingBench"): VoxTrans( + "voxel.sprite.crafting_bench.crafting_bench-0", + (0.0, 0.0, 0.0), (-50.0, 40.0, 20.0), 1.0, + ), // Weapons // Diary Example Images Tool("example_utility"): VoxTrans( @@ -1920,10 +1937,14 @@ "voxel.object.training_dummy", (0.0, -1.0, 0.0), (-50.0, 40.0, 20.0), 0.8, ), - // Ingredients - Ingredient("CraftsmanHammer"): VoxTrans( //TODO This should be a 1h hammer! + // Ingredients + Tool("common.items.tool.craftsman_hammer"): VoxTrans( "voxel.weapon.hammer.craftsman", - (1.0, 1.0, 0.0), (-135.0, 90.0, 0.0), 1.0, + (1.0, -1.0, 0.0), (-135.0, 90.0, 0.0), 0.9, + ), + Ingredient("CraftsmanHammer"): VoxTrans( + "voxel.weapon.hammer.craftsman", + (1.0, 1.0, 0.0), (-135.0, 90.0, 0.0), 0.8, ), Ingredient("SewingSet"): Png( "element.items.sewing_set", diff --git a/assets/voxygen/voxel/biped_weapon_manifest.ron b/assets/voxygen/voxel/biped_weapon_manifest.ron index 1a69cb2f35..27f5b7c0ca 100644 --- a/assets/voxygen/voxel/biped_weapon_manifest.ron +++ b/assets/voxygen/voxel/biped_weapon_manifest.ron @@ -462,7 +462,11 @@ vox_spec: ("weapon.axe_1h.wood-1", (-1.5, -5.0, -3.0)), color: None ), - // Hammers + // Hammers + "common.items.tool.craftsman_hammer": ( + vox_spec: ("weapon.hammer.craftsman", (-2.5, -5.5, -4.5)), + color: None + ), "common.items.weapons.hammer.hammer_1": ( vox_spec: ("weapon.hammer.2hhammer_rusty", (-2.5, -5.5, -4.5)), color: None diff --git a/assets/voxygen/voxel/glider/glider_cultists.vox b/assets/voxygen/voxel/glider/glider_cultists.vox index f8d13a6080..e21bb0c6b0 100644 --- a/assets/voxygen/voxel/glider/glider_cultists.vox +++ b/assets/voxygen/voxel/glider/glider_cultists.vox @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:88540f687e06db70e617d19e969e4fd8903aaec801752201f7abb4bce393cdd5 +oid sha256:895d804a940f30dd14d1ba5676180e2e68510810d4f3ef70a5c0653ec44edb16 size 14960 diff --git a/assets/voxygen/voxel/sprite/anvil/anvil-0.vox b/assets/voxygen/voxel/sprite/anvil/anvil-0.vox index 34b464714e..5b117d035c 100644 --- a/assets/voxygen/voxel/sprite/anvil/anvil-0.vox +++ b/assets/voxygen/voxel/sprite/anvil/anvil-0.vox @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7e9e1fb7f109970122a3bccf8d9f66cb03db78843e8749d74a0cfcc8658e4425 +oid sha256:673fa4daf3a0a2835ad064c62578103329b52c85ffe23e2f587b9ff4337c0d3b size 4432 diff --git a/assets/voxygen/voxel/sprite/cauldron/cauldron-0.vox b/assets/voxygen/voxel/sprite/cauldron/cauldron-0.vox index 19a04ae7a9..d8276da2e6 100644 --- a/assets/voxygen/voxel/sprite/cauldron/cauldron-0.vox +++ b/assets/voxygen/voxel/sprite/cauldron/cauldron-0.vox @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5117a009abb9deae9b224936ba7138122a99cdb706b2f992340c4a608b950caf +oid sha256:fafc69bbd90506232891146a6f626e5b219ac2932b2e579a22ee51534974df07 size 10696 diff --git a/assets/voxygen/voxel/sprite/cooking_pot/pot-0.vox b/assets/voxygen/voxel/sprite/cooking_pot/pot-0.vox new file mode 100644 index 0000000000..14e9a3c62f --- /dev/null +++ b/assets/voxygen/voxel/sprite/cooking_pot/pot-0.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e616ae51d56fd59d500371e7b1341dbb46352b7e367168dd0e4988ce539e3847 +size 8340 diff --git a/assets/voxygen/voxel/sprite_manifest.ron b/assets/voxygen/voxel/sprite_manifest.ron index b4a5c38c4b..4e2b11a7cd 100644 --- a/assets/voxygen/voxel/sprite_manifest.ron +++ b/assets/voxygen/voxel/sprite_manifest.ron @@ -2896,4 +2896,15 @@ CraftingBench: Some(( ], wind_sway: 0.0, )), +// Cooking Pot +CookingPot: Some(( + variations: [ + ( + model: "voxygen.voxel.sprite.cooking_pot.pot-0", + offset: (-9.0, -10.0, 0.0), + lod_axes: (0.0, 0.0, 0.0), + ), + ], + wind_sway: 0.0, +)), ) diff --git a/assets/voxygen/voxel/weapon/hammer/craftsman.vox b/assets/voxygen/voxel/weapon/hammer/craftsman.vox index 7501e83d4f..a2adc3bd18 100644 --- a/assets/voxygen/voxel/weapon/hammer/craftsman.vox +++ b/assets/voxygen/voxel/weapon/hammer/craftsman.vox @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d4dccf2543585a5d0a18dea671d9b25347715a89ccab44e793faf735a0d52e62 +oid sha256:ff5902aca1ec5ee83d24798920391cff003ad292f1a0fb0d815bc085532cc7e1 size 2240 diff --git a/common/src/terrain/sprite.rs b/common/src/terrain/sprite.rs index 6aa1cb841d..2e1deb52b5 100644 --- a/common/src/terrain/sprite.rs +++ b/common/src/terrain/sprite.rs @@ -147,6 +147,7 @@ make_case_elim!( Forge = 0x78, Cauldron = 0x79, Anvil = 0x7A, + CookingPot = 0x7B, } ); @@ -192,6 +193,7 @@ impl SpriteKind { SpriteKind::Forge => 2.7, SpriteKind::Cauldron => 1.27, SpriteKind::Anvil => 1.1, + SpriteKind::CookingPot => 1.82, // TODO: Find suitable heights. SpriteKind::BarrelCactus | SpriteKind::RoundCactus @@ -321,6 +323,7 @@ impl SpriteKind { | SpriteKind::Forge | SpriteKind::Cauldron | SpriteKind::Anvil + | SpriteKind::CookingPot ) } } diff --git a/voxygen/src/hud/crafting.rs b/voxygen/src/hud/crafting.rs index 9b59b8398d..dac34d463c 100644 --- a/voxygen/src/hud/crafting.rs +++ b/voxygen/src/hud/crafting.rs @@ -1,6 +1,6 @@ use super::{ img_ids::{Imgs, ImgsRot}, - item_imgs::{animate_by_pulse, ItemImgs}, + item_imgs::{animate_by_pulse, ItemImgs, ItemKey::Tool}, Show, TEXT_COLOR, TEXT_DULL_RED_COLOR, TEXT_GRAY_COLOR, UI_HIGHLIGHT_0, UI_MAIN, }; use crate::{ @@ -20,6 +20,7 @@ use common::{ Inventory, }, recipe::RecipeInput, + terrain::SpriteKind, }; use conrod_core::{ color, image, @@ -59,6 +60,9 @@ widget_ids! { ingredient_img[], req_text[], ingredients_txt, + req_station_title, + req_station_img, + req_station_txt, output_img_frame, output_img, output_amount, @@ -657,14 +661,66 @@ impl<'a> Widget for Crafting<'a> { .set(state.ids.tags_ing[i], ui); } } - - // Ingredients Text - Text::new(&self.localized_strings.get("hud.crafting.ingredients")) + // Crafting Station Info + if recipe.craft_sprite.is_some() { + Text::new( + &self + .localized_strings + .get("hud.crafting.req_crafting_station"), + ) .top_left_with_margins_on(state.ids.align_ing, 10.0, 5.0) .font_id(self.fonts.cyri.conrod_id) .font_size(self.fonts.cyri.scale(18)) .color(TEXT_COLOR) - .set(state.ids.ingredients_txt, ui); + .set(state.ids.req_station_title, ui); + let station_img = match recipe.craft_sprite { + Some(SpriteKind::Anvil) => "Anvil", + Some(SpriteKind::Cauldron) => "Cauldron", + Some(SpriteKind::CookingPot) => "CookingPot", + Some(SpriteKind::CraftingBench) => "CraftingBench", + None => "CraftsmanHammer", + _ => "CraftsmanHammer", + }; + Image::new(animate_by_pulse( + &self + .item_imgs + .img_ids_or_not_found_img(Tool(station_img.to_string())), + self.pulse, + )) + .w_h(25.0, 25.0) + .down_from(state.ids.req_station_title, 10.0) + .parent(state.ids.align_ing) + .set(state.ids.req_station_img, ui); + + let station_name = match recipe.craft_sprite { + Some(SpriteKind::Anvil) => "hud.crafting.anvil", + Some(SpriteKind::Cauldron) => "hud.crafting.cauldron", + Some(SpriteKind::CookingPot) => "hud.crafting.cooking_pot", + Some(SpriteKind::CraftingBench) => "hud.crafting.crafting_bench", + _ => "", + }; + Text::new(&self.localized_strings.get(station_name)) + .right_from(state.ids.req_station_img, 10.0) + .font_id(self.fonts.cyri.conrod_id) + .font_size(self.fonts.cyri.scale(14)) + .color(if self.show.craft_sprite.is_some() { + TEXT_COLOR + } else { + TEXT_DULL_RED_COLOR + }) + .set(state.ids.req_station_txt, ui); + } + // Ingredients Text + let mut ing_txt = Text::new(&self.localized_strings.get("hud.crafting.ingredients")) + .font_id(self.fonts.cyri.conrod_id) + .font_size(self.fonts.cyri.scale(18)) + .color(TEXT_COLOR); + if recipe.craft_sprite.is_some() { + ing_txt = ing_txt.down_from(state.ids.req_station_img, 10.0); + } else { + ing_txt = ing_txt.top_left_with_margins_on(state.ids.align_ing, 10.0, 5.0); + }; + ing_txt.set(state.ids.ingredients_txt, ui); // Ingredient images with tooltip if state.ids.ingredient_frame.len() < recipe.inputs().len() { diff --git a/voxygen/src/hud/mod.rs b/voxygen/src/hud/mod.rs index 5e3cea6c4c..293f2208c2 100644 --- a/voxygen/src/hud/mod.rs +++ b/voxygen/src/hud/mod.rs @@ -3487,11 +3487,11 @@ fn try_hotbar_slot_from_input(input: GameInput) -> Option { } pub fn cr_color(combat_rating: f32) -> Color { - let common = 4.3; - let moderate = 6.0; - let high = 8.0; - let epic = 10.0; - let legendary = 79.0; + let common = 2.0; + let moderate = 3.5; + let high = 6.5; + let epic = 8.5; + let legendary = 10.4; let artifact = 122.0; let debug = 200.0; diff --git a/voxygen/src/scene/terrain/watcher.rs b/voxygen/src/scene/terrain/watcher.rs index baf8fff933..3b32b2f6a3 100644 --- a/voxygen/src/scene/terrain/watcher.rs +++ b/voxygen/src/scene/terrain/watcher.rs @@ -127,6 +127,9 @@ impl BlocksOfInterest { Some(SpriteKind::Anvil) => { interactables.push((pos, Interaction::Craft(CraftingTab::Weapon))) }, + Some(SpriteKind::CookingPot) => { + interactables.push((pos, Interaction::Craft(CraftingTab::Food))) + }, _ => {}, }, } diff --git a/world/src/site/settlement/building/archetype/house.rs b/world/src/site/settlement/building/archetype/house.rs index 398789a40c..9154d4d136 100644 --- a/world/src/site/settlement/building/archetype/house.rs +++ b/world/src/site/settlement/building/archetype/house.rs @@ -535,9 +535,10 @@ impl Archetype for House { 0..=1 => SpriteKind::Crate, 2 => SpriteKind::Bench, 3 => SpriteKind::Anvil, - 4 => SpriteKind::Cauldron, + 4 => SpriteKind::CookingPot, 5 => SpriteKind::CraftingBench, 6 => SpriteKind::FireBowlGround, + //7 => SpriteKind::Cauldron, //8 => SpriteKind::Forge, _ => unreachable!(), }; @@ -561,7 +562,7 @@ impl Archetype for House { center_offset.x, center_offset.y, z + 100, - )) % 12 + )) % 13 { 0 => SpriteKind::Planter, 1 => SpriteKind::ChairSingle, @@ -585,6 +586,7 @@ impl Archetype for House { SpriteKind::VialEmpty } }, + 11 => SpriteKind::Cauldron, _ => { if dynamic_rng.gen_range(0..2) == 0 { SpriteKind::Bowl