mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Correctly load the loot table
This commit is contained in:
parent
518edcb85c
commit
27440e16c4
@ -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))
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user