From 0a4df2b158bc89f259387bc586e3dc92566d8bd7 Mon Sep 17 00:00:00 2001 From: Socksonme <9944708-Socksonme@users.noreply.gitlab.com> Date: Tue, 9 Nov 2021 06:12:16 +0000 Subject: [PATCH] Temporary fix to the textures of dropped items --- server/src/events/entity_manipulation.rs | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/server/src/events/entity_manipulation.rs b/server/src/events/entity_manipulation.rs index 4c90ae483d..fbea2b88c8 100644 --- a/server/src/events/entity_manipulation.rs +++ b/server/src/events/entity_manipulation.rs @@ -357,22 +357,26 @@ pub fn handle_destroy(server: &mut Server, entity: EcsEntity, last_change: Healt let pos = state.ecs().read_storage::().get(entity).cloned(); let vel = state.ecs().read_storage::().get(entity).cloned(); if let Some(pos) = pos { - // FIXME: Please, no BeastMeat from Possesed Turret + // TODO: This should only be temporary as you'd eventually want to actually + // render the items on the ground, rather than changing the texture depending on + // the body type let _ = state .create_object(comp::Pos(pos.0 + Vec3::unit_z() * 0.25), match old_body { Some(common::comp::Body::Humanoid(_)) => object::Body::Pouch, - Some(common::comp::Body::BipedSmall(_)) => object::Body::Pouch, + Some(common::comp::Body::BipedSmall(_)) + | Some(common::comp::Body::BipedLarge(_)) => object::Body::Pouch, Some(common::comp::Body::Golem(_)) => object::Body::Chest, Some(common::comp::Body::QuadrupedSmall(_)) => object::Body::SmallMeat, Some(common::comp::Body::FishMedium(_)) | Some(common::comp::Body::FishSmall(_)) => object::Body::FishMeat, Some(common::comp::Body::QuadrupedMedium(_)) => object::Body::BeastMeat, - Some(common::comp::Body::BipedLarge(_)) - | Some(common::comp::Body::QuadrupedLow(_)) => object::Body::ToughMeat, + Some(common::comp::Body::QuadrupedLow(_)) => object::Body::ToughMeat, Some(common::comp::Body::BirdLarge(_)) | Some(common::comp::Body::BirdMedium(_)) => object::Body::BirdMeat, - - _ => object::Body::BeastMeat, + Some(common::comp::Body::Theropod(_)) => object::Body::BeastMeat, + Some(common::comp::Body::Dragon(_)) => object::Body::BeastMeat, + Some(common::comp::Body::Object(_)) => object::Body::Chest, + _ => object::Body::Pouch, }) .maybe_with(vel) .with(item)