Merge branch 'slipped/meatfollowup' into 'master'

various fixes to items

See merge request veloren/veloren!2399
This commit is contained in:
Marcel 2021-06-08 09:57:31 +00:00
commit eecb561838
24 changed files with 35 additions and 33 deletions

View File

@ -28,7 +28,7 @@ loot_tables: [
(0.2, true, "common.loot_tables.food.prepared"),
// TODO: Change consumables and split them up
(1.0, true, "common.loot_tables.consumable.default"),
(10.5, false, "common.loot_tables.trading"),
(1.0, false, "common.loot_tables.trading"),
],
// this is the amount of that good the most common item represents
// so basically this table balances the goods against each other (higher=less valuable)

View File

@ -4,7 +4,7 @@ ItemDef(
kind: Armor((
kind: Chest("Scale"),
stats: (
protection: Normal(72.0),
protection: Normal(21.0),
poise_resilience: Normal(0.0),
energy_max: 0,
energy_reward: 0.0,

View File

@ -13,7 +13,6 @@ ItemDef(
),
)),
quality: High,
tags: [
Bag,
],
tags: [Bag],
slots: 18,
)

View File

@ -4,7 +4,7 @@ ItemDef(
kind: Ingredient(
kind: "AnimalHide",
),
quality: Common,
quality: Low,
tags: [
Material(Leather)
],

View File

@ -4,6 +4,6 @@ ItemDef(
kind: Ingredient(
kind: "Carapace",
),
quality: Common,
quality: High,
tags: [],
)

View File

@ -4,6 +4,6 @@ ItemDef(
kind: Ingredient(
kind: "RigidLeather",
),
quality: Common,
quality: Epic,
tags: [BaseMaterial, Leather],
)

View File

@ -4,6 +4,6 @@ ItemDef(
kind: Ingredient(
kind: "SimpleLeather",
),
quality: Common,
quality: Low,
tags: [BaseMaterial, Leather],
)

View File

@ -4,6 +4,6 @@ ItemDef(
kind: Ingredient(
kind: "Diamond",
),
quality: Common,
quality: Epic,
tags: [],
)

View File

@ -4,6 +4,6 @@ ItemDef(
kind: Ingredient(
kind: "Emerald",
),
quality: Common,
quality: High,
tags: [],
)

View File

@ -4,6 +4,6 @@ ItemDef(
kind: Ingredient(
kind: "Ruby",
),
quality: Common,
quality: High,
tags: [],
)

View File

@ -4,6 +4,6 @@ ItemDef(
kind: Ingredient(
kind: "Sapphire",
),
quality: Common,
quality: High,
tags: [],
)

View File

@ -4,6 +4,6 @@ ItemDef(
kind: Ingredient(
kind: "BloodsteelIngot",
),
quality: Common,
quality: Epic,
tags: [MetalIngot],
)

View File

@ -4,6 +4,6 @@ ItemDef(
kind: Ingredient(
kind: "BronzeIngot",
),
quality: Common,
quality: Low,
tags: [MetalIngot],
)

View File

@ -4,6 +4,6 @@ ItemDef(
kind: Ingredient(
kind: "CobaltIngot",
),
quality: Common,
quality: High,
tags: [MetalIngot],
)

View File

@ -4,6 +4,6 @@ ItemDef(
kind: Ingredient(
kind: "CopperIngot",
),
quality: Common,
quality: Low,
tags: [MetalIngot],
)

View File

@ -4,6 +4,6 @@ ItemDef(
kind: Ingredient(
kind: "OrichalcumIngot",
),
quality: Epic,
quality: Legendary,
tags: [MetalIngot],
)

View File

@ -4,6 +4,6 @@ ItemDef(
kind: Ingredient(
kind: "SteelIngot",
),
quality: Common,
quality: Moderate,
tags: [MetalIngot],
)

View File

@ -4,6 +4,6 @@ ItemDef(
kind: Ingredient(
kind: "BloodstoneOre",
),
quality: Common,
quality: Epic,
tags: [],
)

View File

@ -4,6 +4,6 @@ ItemDef(
kind: Ingredient(
kind: "CobaltOre",
),
quality: Common,
quality: High,
tags: [],
)

View File

@ -4,6 +4,6 @@ ItemDef(
kind: Ingredient(
kind: "CopperOre",
),
quality: Common,
quality: Low,
tags: [],
)

View File

@ -4,6 +4,6 @@ ItemDef(
kind: Ingredient(
kind: "TinOre",
),
quality: Common,
quality: Low,
tags: [],
)

View File

@ -4,11 +4,9 @@
(0.2, Item("common.items.mineral.ore.bloodstone")),
(1.0, Item("common.items.mineral.ore.coal")),
(0.4, Item("common.items.mineral.ore.cobalt")),
(2.5, Item("common.items.mineral.ore.copper")),
(0.05, Item("common.items.mineral.ore.gold")),
(1.2, Item("common.items.mineral.ore.iron")),
(0.07, Item("common.items.mineral.ore.silver")),
(2.5, Item("common.items.mineral.ore.tin")),
(1.2, Item("common.items.mineral.ore.velorite")),
(0.6, Item("common.items.mineral.ore.veloritefrag")),
(0.8, Item("common.items.mineral.gem.amethyst")),

View File

@ -184,6 +184,13 @@
],
craft_sprite: Some(CookingPot),
),
"leather strips": (
output: ("common.items.crafting_ing.leather.leather_strips", 4),
inputs: [
(Item("common.items.crafting_ing.leather.simple_leather"), 1),
],
craft_sprite: Some(TanningRack),
),
"simple leather": (
output: ("common.items.crafting_ing.leather.simple_leather", 1),
inputs: [
@ -1690,7 +1697,7 @@
"tin pickaxe": (
output: ("common.items.tool.pickaxe_stone", 1),
inputs: [
(Item("common.items.crafting_ing.cloth.linen"), 1),
(Item("common.items.crafting_ing.leather.leather_strips"), 4),
(Item("common.items.crafting_ing.stones"), 5),
(Item("common.items.tool.craftsman_hammer"), 0),
],
@ -1709,28 +1716,24 @@
output: ("common.items.crafting_ing.cloth.linen", 1),
inputs: [
(Tag(Material(Linen)), 1),
(Item("common.items.crafting_tools.sewing_set"), 0),
],
),
"wool": (
output: ("common.items.crafting_ing.cloth.wool", 1),
inputs: [
(Tag(Material(Wool)), 1),
(Item("common.items.crafting_tools.sewing_set"), 0),
],
),
"rawhide": (
output: ("common.items.crafting_ing.leather.simple_leather", 1),
inputs: [
(Tag(Material(Rawhide)), 1),
(Item("common.items.crafting_tools.sewing_set"), 0),
],
),
"leather": (
output: ("common.items.crafting_ing.leather.thick_leather", 1),
inputs: [
(Tag(Material(Leather)), 1),
(Item("common.items.crafting_tools.sewing_set"), 0),
],
),
"bronze": (

View File

@ -163,7 +163,7 @@ impl TradePricing {
_ if name.starts_with("common.items.food.") => &self.food,
_ if name.starts_with("common.items.utility.") => &self.other,
_ if name.starts_with("common.items.boss_drops.") => &self.other,
_ if name.starts_with("common.items.ore.") => &self.ingredients,
_ if name.starts_with("common.items.mineral.") => &self.ingredients,
_ if name.starts_with("common.items.flowers.") => &self.ingredients,
_ if name.starts_with("common.items.crafting_tools.") => &self.other,
_ if name.starts_with("common.items.lantern.") => &self.other,
@ -186,7 +186,7 @@ impl TradePricing {
_ if name.starts_with("common.items.food.") => &mut self.food,
_ if name.starts_with("common.items.utility.") => &mut self.other,
_ if name.starts_with("common.items.boss_drops.") => &mut self.other,
_ if name.starts_with("common.items.ore.") => &mut self.ingredients,
_ if name.starts_with("common.items.mineral.") => &mut self.ingredients,
_ if name.starts_with("common.items.flowers.") => &mut self.ingredients,
_ if name.starts_with("common.items.crafting_tools.") => &mut self.other,
_ if name.starts_with("common.items.lantern.") => &mut self.other,
@ -337,7 +337,9 @@ impl TradePricing {
// (start with cheap ones to avoid changing material prices after evaluation)
while price_sort(&result, &eqset.read(), &mut ordered_recipes) {
ordered_recipes.retain(|e| {
if e.material_cost < TradePricing::UNAVAILABLE_PRICE {
if e.material_cost < 1e-5 {
false
} else if e.material_cost < TradePricing::UNAVAILABLE_PRICE {
let actual_cost = calculate_material_cost(&result, &eqset.read(), e);
add(
&mut result.get_list_by_path_mut(&e.output),