From e7d852835c8b91307c653620ab058335c4e2da43 Mon Sep 17 00:00:00 2001 From: Sarra Kitty Date: Tue, 19 Jan 2021 18:23:44 +0000 Subject: [PATCH] Sarrakitty/rotsys item sprites --- assets/common/items/crafting_ing/bowl.ron | 8 ++++ assets/common/items/food/fish.ron | 21 +++++++++ assets/common/loot_tables/loot_table_fish.ron | 3 ++ assets/common/loot_tables/loot_table_food.ron | 3 ++ .../loot_tables/loot_table_villager.ron | 4 ++ assets/common/recipe_book.ron | 15 +++++++ assets/voxygen/audio/sfx.ron | 22 +++++++++- assets/voxygen/item_image_manifest.ron | 44 +++++++++++++++++++ .../voxygen/voxel/sprite/cabbage/cabbage.vox | 3 ++ assets/voxygen/voxel/sprite/carrot/carrot.vox | 3 ++ .../voxel/sprite/crafting_ing/bowl.vox | 3 ++ .../voxel/sprite/crafting_ing/claw.vox | 3 ++ .../voxygen/voxel/sprite/crafting_ing/oil.vox | 3 ++ .../voxel/sprite/crafting_ing/ooze.vox | 3 ++ .../voxel/sprite/crafting_ing/pelt.vox | 3 ++ .../voxygen/voxel/sprite/food/meat_fish.vox | 3 ++ assets/voxygen/voxel/sprite/food/roastpig.vox | 3 ++ .../voxygen/voxel/sprite/food/salad_plain.vox | 3 ++ .../voxel/sprite/food/salad_tomato.vox | 3 ++ assets/voxygen/voxel/sprite/tomato/tomato.vox | 3 ++ assets/voxygen/voxel/sprite_manifest.ron | 11 +++++ common/src/comp/inventory/item/mod.rs | 1 + common/src/terrain/sprite.rs | 3 ++ server/src/events/entity_manipulation.rs | 2 + .../settlement/building/archetype/house.rs | 8 +++- 25 files changed, 178 insertions(+), 3 deletions(-) create mode 100644 assets/common/items/crafting_ing/bowl.ron create mode 100644 assets/common/items/food/fish.ron create mode 100644 assets/common/loot_tables/loot_table_fish.ron create mode 100644 assets/voxygen/voxel/sprite/cabbage/cabbage.vox create mode 100644 assets/voxygen/voxel/sprite/carrot/carrot.vox create mode 100644 assets/voxygen/voxel/sprite/crafting_ing/bowl.vox create mode 100644 assets/voxygen/voxel/sprite/crafting_ing/claw.vox create mode 100644 assets/voxygen/voxel/sprite/crafting_ing/oil.vox create mode 100644 assets/voxygen/voxel/sprite/crafting_ing/ooze.vox create mode 100644 assets/voxygen/voxel/sprite/crafting_ing/pelt.vox create mode 100644 assets/voxygen/voxel/sprite/food/meat_fish.vox create mode 100644 assets/voxygen/voxel/sprite/food/roastpig.vox create mode 100644 assets/voxygen/voxel/sprite/food/salad_plain.vox create mode 100644 assets/voxygen/voxel/sprite/food/salad_tomato.vox create mode 100644 assets/voxygen/voxel/sprite/tomato/tomato.vox diff --git a/assets/common/items/crafting_ing/bowl.ron b/assets/common/items/crafting_ing/bowl.ron new file mode 100644 index 0000000000..10b83a58e3 --- /dev/null +++ b/assets/common/items/crafting_ing/bowl.ron @@ -0,0 +1,8 @@ +ItemDef( + name: "Bowl", + description: "a simple bowl for preparing meals.", + kind: Ingredient( + kind: "Bowl", + ), + quality: Common, +) diff --git a/assets/common/items/food/fish.ron b/assets/common/items/food/fish.ron new file mode 100644 index 0000000000..de9a11eb2a --- /dev/null +++ b/assets/common/items/food/fish.ron @@ -0,0 +1,21 @@ +ItemDef( + name: "Fish", + description: "Restores 10 Health over 20 seconds\n\nA fresh seafood steak, chopped from a fish.", + kind: Consumable( + kind: "Fish", + effect: [ + Buff(( + kind: Saturation, + data: ( + strength: 5.0, + duration: Some(( + secs: 10, + nanos: 0, + )), + ), + cat_ids: [Natural], + )), + ] + ), + quality: Common, +) diff --git a/assets/common/loot_tables/loot_table_fish.ron b/assets/common/loot_tables/loot_table_fish.ron new file mode 100644 index 0000000000..c7268289e5 --- /dev/null +++ b/assets/common/loot_tables/loot_table_fish.ron @@ -0,0 +1,3 @@ +[ + (1, "common.items.food.fish"), +] diff --git a/assets/common/loot_tables/loot_table_food.ron b/assets/common/loot_tables/loot_table_food.ron index 33491204cb..85257308bb 100644 --- a/assets/common/loot_tables/loot_table_food.ron +++ b/assets/common/loot_tables/loot_table_food.ron @@ -4,6 +4,9 @@ (3, "common.items.food.apple"), (3, "common.items.food.mushroom"), (1, "common.items.food.coconut"), + (1, "common.items.food.lettuce"), + (1, "common.items.food.tomato"), + (2, "common.items.food.carrot"), // crafted (0.05, "common.items.food.apple_mushroom_curry"), (0.10, "common.items.food.apple_stick"), diff --git a/assets/common/loot_tables/loot_table_villager.ron b/assets/common/loot_tables/loot_table_villager.ron index a798589728..e1c8ffc508 100644 --- a/assets/common/loot_tables/loot_table_villager.ron +++ b/assets/common/loot_tables/loot_table_villager.ron @@ -1,5 +1,6 @@ [ // Crafting Ingredients + (2, "common.items.crafting_ing.bowl"), (1, "common.items.crafting_ing.empty_vial"), (0.10, "common.items.crafting_ing.shiny_gem"), (1, "common.items.crafting_ing.cloth_scraps"), @@ -21,6 +22,9 @@ (0.05, "common.items.utility.collar"), // Food (0.5, "common.items.food.coconut"), + (0.5, "common.items.food.lettuce"), + (0.75, "common.items.food.carrot"), + (0.75, "common.items.food.tomato"), (0.05, "common.items.food.apple_mushroom_curry"), (0.10, "common.items.food.apple_stick"), (0.10, "common.items.food.mushroom_stick"), diff --git a/assets/common/recipe_book.ron b/assets/common/recipe_book.ron index e6db59bb0e..b88126f6f3 100644 --- a/assets/common/recipe_book.ron +++ b/assets/common/recipe_book.ron @@ -119,6 +119,21 @@ ("common.items.crafting_tools.mortar_pestle", 0), ], ), + "salad_plain": ( + ("common.items.food.plainsalad", 1), + [ + ("common.items.food.lettuce", 1), + ("common.items.crafting_ing.bowl", 1), + ], + ), + "salad_tomato": ( + ("common.items.food.tomatosalad", 1), + [ + ("common.items.food.lettuce", 1), + ("common.items.food.tomato", 2), + ("common.items.crafting_ing.bowl", 1), + ], + ), "apples_stick": ( ("common.items.food.apple_stick", 1), [("common.items.crafting_ing.twigs", 2), ("common.items.food.apple", 2)], diff --git a/assets/voxygen/audio/sfx.ron b/assets/voxygen/audio/sfx.ron index b4c6b24bb8..6f199393ff 100644 --- a/assets/voxygen/audio/sfx.ron +++ b/assets/voxygen/audio/sfx.ron @@ -1,6 +1,6 @@ ( { - // + // // Ambient // Campfire: ( @@ -153,7 +153,7 @@ ], threshold: 0.5, ), - //Glide: ( + //Glide: ( // files: [ // // Event Missing or not implemented? // ], @@ -565,6 +565,24 @@ ], threshold: 0.3, ), + Inventory(Consumed("Tomato")): ( + files: [ + "voxygen.audio.sfx.inventory.consumable.food", + ], + threshold: 0.3, + ), + Inventory(Consumed("Fish")): ( + files: [ + "voxygen.audio.sfx.inventory.consumable.food", + ], + threshold: 0.3, + ), + Inventory(Consumed("Carrot")): ( + files: [ + "voxygen.audio.sfx.inventory.consumable.food", + ], + threshold: 0.3, + ), Inventory(Consumed("Velorite")): ( files: [ "voxygen.audio.sfx.inventory.consumable.food", diff --git a/assets/voxygen/item_image_manifest.ron b/assets/voxygen/item_image_manifest.ron index 8222c16af7..12ede03821 100644 --- a/assets/voxygen/item_image_manifest.ron +++ b/assets/voxygen/item_image_manifest.ron @@ -1459,6 +1459,30 @@ Consumable("SunflowerTea"): Png( "element.icons.item_sunflower_tea", ), + Consumable("Carrot"): VoxTrans( + "voxel.sprite.carrot.carrot", + (0.0, 0.0, 0.0), (-20.0, 10.0, 20.0), 0.9, + ), + Consumable("Tomato"): VoxTrans( + "voxel.sprite.tomato.tomato", + (0.0, 0.0, 0.0), (-50.0, 30.0, 20.0), 0.8, + ), + Consumable("Lettuce"): VoxTrans( + "voxel.sprite.cabbage.cabbage", + (0.0, 0.0, 0.0), (-50.0, 30.0, 20.0), 0.8, + ), + Consumable("Fish"): VoxTrans( + "voxel.sprite.food.meat_fish", + (0.0, 0.0, 0.0), (-20.0, 10.0, 20.0), 0.9, + ), + Consumable("PlainSalad"): VoxTrans( + "voxel.sprite.food.salad_plain", + (0.0, 0.0, 0.0), (-50.0, 30.0, 20.0), 0.8, + ), + Consumable("TomatoSalad"): VoxTrans( + "voxel.sprite.food.salad_tomato", + (0.0, 0.0, 0.0), (-50.0, 30.0, 20.0), 0.8, + ), // Throwables Throwable(Bomb): VoxTrans( "voxel.object.bomb", @@ -1529,6 +1553,14 @@ "voxel.sprite.twigs.twigs-0", (0.0, 0.0, 0.0), (-20.0, 10.0, 20.0), 0.9, ), + Ingredient("AnimalPelt"): VoxTrans( + "voxel.sprite.crafting_ing.pelt", + (0.0, 0.0, 0.0), (-20.0, 10.0, 20.0), 0.9, + ), + Ingredient("Claw"): VoxTrans( + "voxel.sprite.crafting_ing.claw", + (0.0, 0.0, 0.0), (-20.0, 10.0, 20.0), 0.9, + ), Ingredient("Honey"): Png( "element.icons.item_honey", ), @@ -1554,6 +1586,18 @@ "voxel.object.potion_empty", (0.0, 0.0, 0.0), (-50.0, 30.0, 20.0), 0.8, ), + Ingredient("Bowl"): VoxTrans( + "voxel.sprite.crafting_ing.bowl", + (0.0, 0.0, 0.0), (-50.0, 30.0, 20.0), 0.8, + ), + Ingredient("Oil"): VoxTrans( + "voxel.sprite.crafting_ing.oil", + (0.0, 0.0, 0.0), (-50.0, 30.0, 20.0), 0.8, + ), + Ingredient("ViscousOoze"): VoxTrans( + "voxel.sprite.crafting_ing.ooze", + (0.0, 0.0, 0.0), (-50.0, 30.0, 20.0), 0.8, + ), // Gliders Glider("Starter"): VoxTrans( "voxel.glider.glider_starter", diff --git a/assets/voxygen/voxel/sprite/cabbage/cabbage.vox b/assets/voxygen/voxel/sprite/cabbage/cabbage.vox new file mode 100644 index 0000000000..84ed75156c --- /dev/null +++ b/assets/voxygen/voxel/sprite/cabbage/cabbage.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5fd740cc28a72efe03edd6a9e1c91d81f64c97bfdb33c985fbf091b386622f70 +size 1472 diff --git a/assets/voxygen/voxel/sprite/carrot/carrot.vox b/assets/voxygen/voxel/sprite/carrot/carrot.vox new file mode 100644 index 0000000000..726e236f5d --- /dev/null +++ b/assets/voxygen/voxel/sprite/carrot/carrot.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0cf5666e1a0a3250bbdea204c428424957113a9dacbf9f8b9798df42368efbd4 +size 1328 diff --git a/assets/voxygen/voxel/sprite/crafting_ing/bowl.vox b/assets/voxygen/voxel/sprite/crafting_ing/bowl.vox new file mode 100644 index 0000000000..c1199a5d4b --- /dev/null +++ b/assets/voxygen/voxel/sprite/crafting_ing/bowl.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6014c9eed61ebbd3955d4db8eeecf51785130ac90d16c490da56f9945a117201 +size 1596 diff --git a/assets/voxygen/voxel/sprite/crafting_ing/claw.vox b/assets/voxygen/voxel/sprite/crafting_ing/claw.vox new file mode 100644 index 0000000000..db869174d5 --- /dev/null +++ b/assets/voxygen/voxel/sprite/crafting_ing/claw.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f41998eb6af8a150f70a27088ee880103622e3ccf43f2fd9919d049b7ace3480 +size 1604 diff --git a/assets/voxygen/voxel/sprite/crafting_ing/oil.vox b/assets/voxygen/voxel/sprite/crafting_ing/oil.vox new file mode 100644 index 0000000000..df02f56271 --- /dev/null +++ b/assets/voxygen/voxel/sprite/crafting_ing/oil.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b4e7bdc5540fe317f4bf7b4e58d968f7a91e41a7e1c95a6ec8df46ea8e15c9fa +size 1784 diff --git a/assets/voxygen/voxel/sprite/crafting_ing/ooze.vox b/assets/voxygen/voxel/sprite/crafting_ing/ooze.vox new file mode 100644 index 0000000000..241cc2ccec --- /dev/null +++ b/assets/voxygen/voxel/sprite/crafting_ing/ooze.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dc550384ea1d340af76773363f774eb5823784950d22cb836645bb29e2b56791 +size 1784 diff --git a/assets/voxygen/voxel/sprite/crafting_ing/pelt.vox b/assets/voxygen/voxel/sprite/crafting_ing/pelt.vox new file mode 100644 index 0000000000..11444ece83 --- /dev/null +++ b/assets/voxygen/voxel/sprite/crafting_ing/pelt.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ea4bba66b2b82aad639d7783d751dfa38d0c42c38e88c80b28b004951c577d4e +size 1872 diff --git a/assets/voxygen/voxel/sprite/food/meat_fish.vox b/assets/voxygen/voxel/sprite/food/meat_fish.vox new file mode 100644 index 0000000000..3401334ce3 --- /dev/null +++ b/assets/voxygen/voxel/sprite/food/meat_fish.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fb745f6488ef68775367b97eb0b337cd76545d42e1288a81b36f20bbaeec2017 +size 1720 diff --git a/assets/voxygen/voxel/sprite/food/roastpig.vox b/assets/voxygen/voxel/sprite/food/roastpig.vox new file mode 100644 index 0000000000..b03b4da254 --- /dev/null +++ b/assets/voxygen/voxel/sprite/food/roastpig.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0cba0158adabe42bd0a22d40101b68a07e2bed3d4023ddda573f374838cd209c +size 3540 diff --git a/assets/voxygen/voxel/sprite/food/salad_plain.vox b/assets/voxygen/voxel/sprite/food/salad_plain.vox new file mode 100644 index 0000000000..c7ca2d8100 --- /dev/null +++ b/assets/voxygen/voxel/sprite/food/salad_plain.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:04edb93b98cd42af4b3bfc8046a12cad88ad22a888ba7e7f5e9f3a34c8bc838d +size 2020 diff --git a/assets/voxygen/voxel/sprite/food/salad_tomato.vox b/assets/voxygen/voxel/sprite/food/salad_tomato.vox new file mode 100644 index 0000000000..bbb6e93d95 --- /dev/null +++ b/assets/voxygen/voxel/sprite/food/salad_tomato.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:467bd3a1b1e81ee1c7a01b9548fd19454ea99e0d6a9b0a1db05651356851f17e +size 2052 diff --git a/assets/voxygen/voxel/sprite/tomato/tomato.vox b/assets/voxygen/voxel/sprite/tomato/tomato.vox new file mode 100644 index 0000000000..e097f023e7 --- /dev/null +++ b/assets/voxygen/voxel/sprite/tomato/tomato.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f8cafe42a40cf408583644ce65e6fd4728dfd742e891215dd23192dfbca21077 +size 2024 diff --git a/assets/voxygen/voxel/sprite_manifest.ron b/assets/voxygen/voxel/sprite_manifest.ron index 0915456ff9..5d6e894ea3 100644 --- a/assets/voxygen/voxel/sprite_manifest.ron +++ b/assets/voxygen/voxel/sprite_manifest.ron @@ -2001,6 +2001,17 @@ VialEmpty: Some(( ], wind_sway: 0.0, )), +// Bowls +Bowl: Some(( + variations: [ + ( + model: "voxygen.voxel.sprite.crafting_ing.bowl", + offset: (-5.5, -5.5, 0.0), + lod_axes: (1.0, 1.0, 1.0), + ), + ], + wind_sway: 0.0, +)), // Minor Potion PotionMinor: Some(( variations: [ diff --git a/common/src/comp/inventory/item/mod.rs b/common/src/comp/inventory/item/mod.rs index 063ee47561..f8ef9636fc 100644 --- a/common/src/comp/inventory/item/mod.rs +++ b/common/src/comp/inventory/item/mod.rs @@ -537,6 +537,7 @@ impl Item { SpriteKind::Twigs => "common.items.crafting_ing.twigs", SpriteKind::ShinyGem => "common.items.crafting_ing.shiny_gem", SpriteKind::VialEmpty => "common.items.crafting_ing.empty_vial", + SpriteKind::Bowl => "common.items.crafting_ing.bowl", SpriteKind::PotionMinor => "common.items.consumable.potion_minor", _ => return None, })) diff --git a/common/src/terrain/sprite.rs b/common/src/terrain/sprite.rs index aa8ed81ab9..55a75d3dac 100644 --- a/common/src/terrain/sprite.rs +++ b/common/src/terrain/sprite.rs @@ -110,6 +110,7 @@ make_case_elim!( Mud = 0x53, FireBowlGround = 0x54, CaveMushroom = 0x55, + Bowl = 0x56, } ); @@ -198,6 +199,7 @@ impl SpriteKind { SpriteKind::Beehive => true, SpriteKind::VialEmpty => true, SpriteKind::PotionMinor => true, + SpriteKind::Bowl => true, SpriteKind::ChestBurried => true, SpriteKind::Mud => true, _ => false, @@ -238,6 +240,7 @@ impl SpriteKind { | SpriteKind::Door | SpriteKind::Beehive | SpriteKind::PotionMinor + | SpriteKind::Bowl | SpriteKind::VialEmpty | SpriteKind::FireBowlGround ) diff --git a/server/src/events/entity_manipulation.rs b/server/src/events/entity_manipulation.rs index da95b8f51d..c445a8af74 100644 --- a/server/src/events/entity_manipulation.rs +++ b/server/src/events/entity_manipulation.rs @@ -343,6 +343,8 @@ pub fn handle_destroy(server: &mut Server, entity: EcsEntity, cause: HealthSourc 0 => "common.loot_tables.loot_table_food", _ => "common.loot_tables.loot_table", }, + Some(common::comp::Body::FishMedium(_)) => "common.loot_tables.loot_table_fish", + Some(common::comp::Body::FishSmall(_)) => "common.loot_tables.loot_table_fish", Some(common::comp::Body::BipedLarge(biped_large)) => match biped_large.species { biped_large::Species::Wendigo => match rng.gen_range(0, 7) { 0 => "common.loot_tables.loot_table_food", diff --git a/world/src/site/settlement/building/archetype/house.rs b/world/src/site/settlement/building/archetype/house.rs index 8f81b8eec4..0e6b8085f9 100644 --- a/world/src/site/settlement/building/archetype/house.rs +++ b/world/src/site/settlement/building/archetype/house.rs @@ -561,7 +561,13 @@ impl Archetype for House { SpriteKind::VialEmpty } }, - _ => SpriteKind::Pot, + _ => { + if dynamic_rng.gen_range(0, 2) == 0 { + SpriteKind::Bowl + } else { + SpriteKind::Pot + } + }, }; return BlockMask::new(