Correctly load the loot table

This commit is contained in:
Piotr Korgól 2020-07-04 18:40:23 +02:00
parent 518edcb85c
commit 27440e16c4
2 changed files with 2 additions and 2 deletions

View File

@ -180,7 +180,7 @@ impl Item {
BlockKind::ShortGrass => Some(assets::load_expect_cloned("common.items.grasses.short")),
BlockKind::Coconut => Some(assets::load_expect_cloned("common.items.coconut")),
BlockKind::Chest => {
let chosen = assets::load_expect::<lottery::Lottery<_>>("common.items.loot_table");
let chosen = assets::load_expect::<lottery::Lottery<_>>("common.loot_table");
let chosen = chosen.choose();
Some(assets::load_expect_cloned(chosen))

View File

@ -111,7 +111,7 @@ pub fn handle_destroy(server: &mut Server, entity: EcsEntity, cause: HealthSourc
item_drops.remove(entity);
item_drop.0
} else {
let chosen = assets::load_expect::<Lottery<_>>("common.items.loot_table");
let chosen = assets::load_expect::<Lottery<_>>("common.loot_table");
let chosen = chosen.choose();
assets::load_expect_cloned(chosen)