mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Changed repair recipe to round down on material costs.
This commit is contained in:
parent
00710a4eb0
commit
ff9f755c0c
@ -982,7 +982,7 @@ impl RepairRecipe {
|
||||
pub fn inputs(&self, item: &Item) -> impl ExactSizeIterator<Item = (&RecipeInput, u32)> {
|
||||
let item_durability = item.durability().unwrap_or(0);
|
||||
self.inputs.iter().map(move |(input, amount)| {
|
||||
let amount = amount.mul(item_durability).div_ceil(Item::MAX_DURABILITY);
|
||||
let amount = amount.mul(item_durability).div_floor(Item::MAX_DURABILITY);
|
||||
(input, amount)
|
||||
})
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user