From f999edffaa814fe7bc5ec040e97c3a351208516b Mon Sep 17 00:00:00 2001 From: Joshua Barretto Date: Tue, 14 Apr 2020 01:50:58 +0100 Subject: [PATCH] Fixed crop crash issues --- assets/common/items/coconut.ron | 2 +- common/src/terrain/block.rs | 1 + voxygen/src/scene/terrain.rs | 26 +++++++++++++------------- world/src/site/settlement/mod.rs | 4 ++-- 4 files changed, 17 insertions(+), 16 deletions(-) diff --git a/assets/common/items/coconut.ron b/assets/common/items/coconut.ron index f0cd3398c8..76d3212e39 100644 --- a/assets/common/items/coconut.ron +++ b/assets/common/items/coconut.ron @@ -1,5 +1,5 @@ Item( - name: "Mushroom", + name: "Coconut", description: "Reliable Source of water and fat. Restores 20 Health.", diff --git a/common/src/terrain/block.rs b/common/src/terrain/block.rs index ed68abcc34..4a373efe39 100644 --- a/common/src/terrain/block.rs +++ b/common/src/terrain/block.rs @@ -130,6 +130,7 @@ impl BlockKind { BlockKind::Velorite => false, BlockKind::VeloriteFrag => false, BlockKind::Chest => false, + BlockKind::Pumpkin => false, BlockKind::Welwitch => false, BlockKind::LingonBerry => false, BlockKind::LeafyPlant => false, diff --git a/voxygen/src/scene/terrain.rs b/voxygen/src/scene/terrain.rs index 8f75cdd7e5..a620e5b44f 100644 --- a/voxygen/src/scene/terrain.rs +++ b/voxygen/src/scene/terrain.rs @@ -1212,90 +1212,90 @@ impl Terrain { ( (BlockKind::WheatGreen, 0), make_model( - "voxygen.voxel.sprite.wheat_yellow.wheat-0", + "voxygen.voxel.sprite.wheat_green.wheat-0", Vec3::new(-6.0, -6.0, 0.0), ), ), ( (BlockKind::WheatGreen, 1), make_model( - "voxygen.voxel.sprite.wheat_yellow.wheat-1", + "voxygen.voxel.sprite.wheat_green.wheat-1", Vec3::new(-6.0, -6.0, 0.0), ), ), ( (BlockKind::WheatGreen, 2), make_model( - "voxygen.voxel.sprite.wheat_yellow.wheat-2", + "voxygen.voxel.sprite.wheat_green.wheat-2", Vec3::new(-6.0, -6.0, 0.0), ), ), ( (BlockKind::WheatGreen, 3), make_model( - "voxygen.voxel.sprite.wheat_yellow.wheat-3", + "voxygen.voxel.sprite.wheat_green.wheat-3", Vec3::new(-6.0, -6.0, 0.0), ), ), ( (BlockKind::WheatGreen, 4), make_model( - "voxygen.voxel.sprite.wheat_yellow.wheat-4", + "voxygen.voxel.sprite.wheat_green.wheat-4", Vec3::new(-6.0, -6.0, 0.0), ), ), ( (BlockKind::WheatGreen, 5), make_model( - "voxygen.voxel.sprite.wheat_yellow.wheat-5", + "voxygen.voxel.sprite.wheat_green.wheat-5", Vec3::new(-6.0, -6.0, 0.0), ), ), ( (BlockKind::WheatGreen, 6), make_model( - "voxygen.voxel.sprite.wheat_yellow.wheat-6", + "voxygen.voxel.sprite.wheat_green.wheat-6", Vec3::new(-6.0, -6.0, 0.0), ), ), ( (BlockKind::WheatGreen, 7), make_model( - "voxygen.voxel.sprite.wheat_yellow.wheat-7", + "voxygen.voxel.sprite.wheat_green.wheat-7", Vec3::new(-6.0, -6.0, 0.0), ), ), ( (BlockKind::WheatGreen, 8), make_model( - "voxygen.voxel.sprite.wheat_yellow.wheat-8", + "voxygen.voxel.sprite.wheat_green.wheat-8", Vec3::new(-6.0, -6.0, 0.0), ), ), ( (BlockKind::WheatGreen, 9), make_model( - "voxygen.voxel.sprite.wheat_yellow.wheat-9", + "voxygen.voxel.sprite.wheat_green.wheat-9", Vec3::new(-6.0, -6.0, 0.0), ), ), // Cabbage ( - (BlockKind::WheatGreen, 0), + (BlockKind::Cabbage, 0), make_model( "voxygen.voxel.sprite.cabbage.cabbage-0", Vec3::new(-6.0, -6.0, 0.0), ), ), ( - (BlockKind::WheatGreen, 1), + (BlockKind::Cabbage, 1), make_model( "voxygen.voxel.sprite.cabbage.cabbage-1", Vec3::new(-6.0, -6.0, 0.0), ), ), ( - (BlockKind::WheatGreen, 2), + (BlockKind::Cabbage, 2), make_model( "voxygen.voxel.sprite.cabbage.cabbage-2", Vec3::new(-6.0, -6.0, 0.0), diff --git a/world/src/site/settlement/mod.rs b/world/src/site/settlement/mod.rs index 5c3f9ae294..ebce8bfe77 100644 --- a/world/src/site/settlement/mod.rs +++ b/world/src/site/settlement/mod.rs @@ -550,8 +550,8 @@ impl Settlement { Crop::Corn => Some(BlockKind::Corn), Crop::Wheat if roll(1, 2) == 0 => Some(BlockKind::WheatYellow), Crop::Wheat => Some(BlockKind::WheatGreen), - Crop::Cabbage => Some(BlockKind::Cabbage), - Crop::Pumpkin if roll(2, 3) == 0 => Some(BlockKind::Pumpkin), + Crop::Cabbage if roll(2, 2) == 0 => Some(BlockKind::Cabbage), + Crop::Pumpkin if roll(3, 2) == 0 => Some(BlockKind::Pumpkin), Crop::Sunflower => Some(BlockKind::Sunflower), _ => None, }