Merge branch 'qutrin/loot-table-fix' into 'master'

Correctly load the loot table

See merge request veloren/veloren!1154
This commit is contained in:
Joshua Barretto 2020-07-04 17:53:26 +00:00
commit acd6690cb0
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)