Merge branch 'UMR1352/fix#1059' into 'master'

fix issue #1059: Debug items should disappear when dropped

Closes #1059

See merge request veloren/veloren!2088
This commit is contained in:
Marcel 2021-04-10 17:41:43 +00:00
commit db8c167797

View File

@ -612,9 +612,11 @@ pub fn handle_inventory(server: &mut Server, entity: EcsEntity, manip: comp::Inv
}
},
}
// Drop items
for (pos, ori, item) in dropped_items {
// Drop items, Debug items should simply disappear when dropped
for (pos, ori, item) in dropped_items
.into_iter()
.filter(|(_, _, i)| !matches!(i.quality(), item::Quality::Debug))
{
// hack: special case coins for now
let body = match item.item_definition_id() {
"common.items.utility.coins" => comp::object::Body::Coins,