mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
fix test; add tusk, crest, pincer
This commit is contained in:
parent
8c5901516e
commit
5ee72f8a5e
@ -30,8 +30,11 @@
|
||||
(4.0, Item("common.items.crafting_ing.hide.animal_hide")),
|
||||
|
||||
// Mob Drops
|
||||
(0.10, Item("common.items.crafting_ing.animal_misc.long_tusk")),
|
||||
(0.15, Item("common.items.crafting_ing.animal_misc.elegant_crest")),
|
||||
(0.15, Item("common.items.crafting_ing.animal_misc.grim_eyeball")),
|
||||
(0.15, Item("common.items.crafting_ing.animal_misc.icy_fang")),
|
||||
(0.2, Item("common.items.crafting_ing.animal_misc.strong_pincer")),
|
||||
(0.5, Item("common.items.crafting_ing.animal_misc.raptor_feather")),
|
||||
(1.2, Item("common.items.crafting_ing.animal_misc.claw")),
|
||||
(2.5, Item("common.items.crafting_ing.animal_misc.fur")),
|
||||
|
@ -906,7 +906,7 @@ impl TradePricing {
|
||||
|
||||
#[cfg(test)]
|
||||
fn print_sorted(&self) {
|
||||
use crate::comp::item::{armor, ItemKind, MaterialStatManifest};
|
||||
use crate::comp::item::armor; //, ItemKind, MaterialStatManifest};
|
||||
|
||||
println!("Item, ForSale, Amount, Good, Quality, Deal, Unit,");
|
||||
|
||||
@ -968,27 +968,30 @@ impl TradePricing {
|
||||
},
|
||||
) in sorted.iter()
|
||||
{
|
||||
let it = Item::new_from_item_definition_id(
|
||||
Item::new_from_item_definition_id(
|
||||
item_id.as_ref(),
|
||||
AbilityMap::load(),
|
||||
MaterialStatManifest::load(),
|
||||
);
|
||||
//let price = mat_use.iter().map(|(amount, _good)| *amount).sum::<f32>();
|
||||
let prob = 1.0 / pricesum;
|
||||
let (info, unit) = more_information(&it, prob);
|
||||
let materials = mat_use
|
||||
.iter()
|
||||
.fold(String::new(), |agg, i| agg + &format!("{:?}.", i.1));
|
||||
println!(
|
||||
"{:?}, {}, {:>4.2}, {}, {:?}, {}, {},",
|
||||
&item_id,
|
||||
if *can_sell { "yes" } else { "no" },
|
||||
pricesum,
|
||||
materials,
|
||||
it.quality(),
|
||||
info,
|
||||
unit,
|
||||
);
|
||||
&AbilityMap::load().read(),
|
||||
&MaterialStatManifest::load().read(),
|
||||
)
|
||||
.ok()
|
||||
.map(|it| {
|
||||
//let price = mat_use.iter().map(|(amount, _good)| *amount).sum::<f32>();
|
||||
let prob = 1.0 / pricesum;
|
||||
let (info, unit) = more_information(&it, prob);
|
||||
let materials = mat_use
|
||||
.iter()
|
||||
.fold(String::new(), |agg, i| agg + &format!("{:?}.", i.1));
|
||||
println!(
|
||||
"{:?}, {}, {:>4.2}, {}, {:?}, {}, {},",
|
||||
&item_id,
|
||||
if *can_sell { "yes" } else { "no" },
|
||||
pricesum,
|
||||
materials,
|
||||
it.quality(),
|
||||
info,
|
||||
unit,
|
||||
);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user