fix issue #1059: Debug items should disappear when dropped

This commit is contained in:
Enrico Marconi 2021-04-09 13:46:43 +02:00
parent 90aa671e42
commit 4c5de60d0d

View File

@ -607,9 +607,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,