From 2c14f59a35aef32b302763761724776fe5aaf118 Mon Sep 17 00:00:00 2001 From: Illia Denysenko Date: Wed, 5 May 2021 20:35:57 +0000 Subject: [PATCH] Don't drop Debug item with /dropall --- server/src/cmd.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/server/src/cmd.rs b/server/src/cmd.rs index 20b5d05b6d..93b232a62e 100644 --- a/server/src/cmd.rs +++ b/server/src/cmd.rs @@ -16,7 +16,7 @@ use common::{ self, aura::{Aura, AuraKind, AuraTarget}, buff::{Buff, BuffCategory, BuffData, BuffKind, BuffSource}, - inventory::item::{tool::AbilityMap, MaterialStatManifest}, + inventory::item::{tool::AbilityMap, MaterialStatManifest, Quality}, invite::InviteKind, ChatType, Inventory, Item, LightEmitter, WaypointArea, }, @@ -284,7 +284,10 @@ fn handle_drop_all( let mut rng = rand::thread_rng(); - for item in items { + let item_to_place = items + .into_iter() + .filter(|i| !matches!(i.quality(), Quality::Debug)); + for item in item_to_place { let vel = Vec3::new(rng.gen_range(-0.1..0.1), rng.gen_range(-0.1..0.1), 0.5); server