diff --git a/assets/common/item_price_calculation.ron b/assets/common/item_price_calculation.ron index c544bb583a..e966996737 100644 --- a/assets/common/item_price_calculation.ron +++ b/assets/common/item_price_calculation.ron @@ -36,10 +36,10 @@ loot_tables: [ // 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) good_scaling: [ - (Potions, 0.0005), // common.items.consumable.potion_minor - (Food, 1.0), // common.items.food.mushroom - (Coin, 10.0), // common.items.utility.coins - (Armor, 0.5), // common.items.armor.misc.pants.worker_blue - (Tools, 0.5), // common.items.weapons.staff.starter_staff - (Ingredients, 2.5), // common.items.crafting_ing.leather_scraps + (Potions, 0.3), // common.items.consumable.potion_minor + (Food, 3.0), // common.items.food.mushroom + (Coin, 1.0), // common.items.utility.coins + (Armor, 0.2), // common.items.armor.misc.pants.worker_blue + (Tools, 0.2), // common.items.weapons.staff.starter_staff + (Ingredients, 0.25), // common.items.crafting_ing.leather_scraps ]) diff --git a/assets/common/professions.ron b/assets/common/professions.ron index 6dfe5a6edf..6e1451d1ed 100644 --- a/assets/common/professions.ron +++ b/assets/common/professions.ron @@ -1,5 +1,10 @@ // we use a vector to easily generate a key into all the economic data containers ([ + ( + name: "Banker", + orders: [ (Ingredients, 12.0), (Stone, 4.0), (Tools, 1.0), (RoadSecurity, 4.0) ], + products: [ (Coin, 16.0) ], + ), ( name: "Cook", orders: [ (Flour, 12.0), (Meat, 4.0), (Wood, 1.5), (Stone, 1.0) ], diff --git a/world/src/site/economy.rs b/world/src/site/economy.rs index ef8042b5be..c5b7e4b018 100644 --- a/world/src/site/economy.rs +++ b/world/src/site/economy.rs @@ -328,14 +328,15 @@ impl Economy { pub fn get_site_prices(&self) -> SitePrices { SitePrices { values: { + // Use labor values as prices. Not correct (doesn't care about exchange value) + let prices = self.labor_values.clone(); // Normalized values. Note: not correct, but better than nothing - let sum = self - .values + let sum = prices .iter() .map(|(_, price)| (*price).unwrap_or(0.0)) .sum::() .max(0.001); - self.values + prices .iter() .map(|(g, v)| (g, v.map(|v| v / sum).unwrap_or(Economy::MINIMUM_PRICE))) .collect()