From c17e3ad9969802e10d6a81595a46a40980870103 Mon Sep 17 00:00:00 2001 From: Monty Date: Sun, 13 Jun 2021 13:52:56 +0200 Subject: [PATCH] Cactus Colada Made cacti lootable Cactus colada recipe and item price balance fmt "make it 8 and drop it to 20 or 25? Not really sure tbh" --- assets/common/items/crafting_ing/cactus.ron | 9 ++++++++ assets/common/items/food/cactus_colada.ron | 22 ++++++++++++++++++++ assets/common/loot_tables/food/prepared.ron | 1 + assets/common/recipe_book.ron | 8 +++++++ assets/voxygen/item_image_manifest.ron | 8 +++++++ assets/voxygen/voxel/object/cactus_drink.vox | 3 +++ common/src/comp/inventory/item/mod.rs | 3 +++ common/src/terrain/sprite.rs | 3 +++ 8 files changed, 57 insertions(+) create mode 100644 assets/common/items/crafting_ing/cactus.ron create mode 100644 assets/common/items/food/cactus_colada.ron create mode 100644 assets/voxygen/voxel/object/cactus_drink.vox diff --git a/assets/common/items/crafting_ing/cactus.ron b/assets/common/items/crafting_ing/cactus.ron new file mode 100644 index 0000000000..33c34e742b --- /dev/null +++ b/assets/common/items/crafting_ing/cactus.ron @@ -0,0 +1,9 @@ +ItemDef( + name: "Cactus", + description: "Grows in warm and dry places.", + kind: Ingredient( + kind: "Cactus", + ), + quality: Common, + tags: [], +) \ No newline at end of file diff --git a/assets/common/items/food/cactus_colada.ron b/assets/common/items/food/cactus_colada.ron new file mode 100644 index 0000000000..cef46eee0d --- /dev/null +++ b/assets/common/items/food/cactus_colada.ron @@ -0,0 +1,22 @@ +ItemDef( + name: "Cactus Colada", + description: "Giving you that special prickle.", + kind: Consumable( + kind: "CactusColada", + effect: [ + Buff(( + kind: Saturation, + data: ( + strength: 25.0, + duration: Some(( + secs: 15, + nanos: 0, + )), + ), + cat_ids: [Natural], + )), + ] + ), + quality: Moderate, + tags: [Food], +) diff --git a/assets/common/loot_tables/food/prepared.ron b/assets/common/loot_tables/food/prepared.ron index 89d78c10bf..a738723739 100644 --- a/assets/common/loot_tables/food/prepared.ron +++ b/assets/common/loot_tables/food/prepared.ron @@ -6,4 +6,5 @@ (1.2, Item("common.items.food.plainsalad")), (0.5, Item("common.items.food.sunflower_icetea")), (1.0, Item("common.items.food.tomatosalad")), + (1.4, Item("common.items.food.cactus_colada")), ] diff --git a/assets/common/recipe_book.ron b/assets/common/recipe_book.ron index fa306b04d3..85f6d48076 100644 --- a/assets/common/recipe_book.ron +++ b/assets/common/recipe_book.ron @@ -49,6 +49,14 @@ ], craft_sprite: Some(Cauldron), ), + "cactus_colada": ( + output: ("common.items.food.cactus_colada", 1), + inputs: [ + (Item("common.items.crafting_ing.empty_vial"), 1), + (Item("common.items.crafting_ing.cactus"), 8), + ], + craft_sprite: Some(Cauldron), + ), "collar_basic": ( output: ("common.items.utility.collar", 1), inputs: [ diff --git a/assets/voxygen/item_image_manifest.ron b/assets/voxygen/item_image_manifest.ron index 5bb8796f1c..0e93d0282e 100644 --- a/assets/voxygen/item_image_manifest.ron +++ b/assets/voxygen/item_image_manifest.ron @@ -2272,6 +2272,10 @@ Consumable("Coconut"): Png( "element.items.item_coconut", ), + Consumable("CactusColada"): VoxTrans( + "voxel.object.cactus_drink", + (-1.0, 1.0, 0.0), (-50.0, 30.0, 20.0), 0.8, + ), Consumable("PotionMed"): VoxTrans( "voxel.object.potion_red", (0.0, 0.0, 0.0), (-50.0, 30.0, 20.0), 0.7, @@ -2448,6 +2452,10 @@ "voxel.sprite.rocks.rock-0", (0.0, 0.0, 0.0), (-50.0, 40.0, 20.0), 0.8, ), + Ingredient("Cactus"): VoxTrans( + "voxel.sprite.cacti.flat_cactus_med", + (0.0, 0.0, 0.0), (-50.0, 40.0, 20.0), 0.9, + ), Ingredient("Seashells"): VoxTrans( "voxel.sprite.seashells.shell-0", (0.0, 0.0, 0.0), (-50.0, 40.0, 20.0), 0.8, diff --git a/assets/voxygen/voxel/object/cactus_drink.vox b/assets/voxygen/voxel/object/cactus_drink.vox new file mode 100644 index 0000000000..bb9815be42 --- /dev/null +++ b/assets/voxygen/voxel/object/cactus_drink.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4b36bfc8f2a1eecd3563e4686efa4834a8ae891ce8ad2013571ad8ee6f204a4b +size 2656 diff --git a/common/src/comp/inventory/item/mod.rs b/common/src/comp/inventory/item/mod.rs index 64583dfa60..d246a16039 100644 --- a/common/src/comp/inventory/item/mod.rs +++ b/common/src/comp/inventory/item/mod.rs @@ -851,6 +851,9 @@ impl Item { SpriteKind::Pyrebloom => "common.items.flowers.pyrebloom", SpriteKind::WildFlax => "common.items.flowers.wild_flax", SpriteKind::Seashells => "common.items.crafting_ing.seashells", + SpriteKind::RoundCactus => "common.items.crafting_ing.cactus", + SpriteKind::ShortFlatCactus => "common.items.crafting_ing.cactus", + SpriteKind::MedFlatCactus => "common.items.crafting_ing.cactus", // Containers // IMPORTANT: Add any new container to `SpriteKind::is_container` container diff --git a/common/src/terrain/sprite.rs b/common/src/terrain/sprite.rs index d859ac0495..e35a99035f 100644 --- a/common/src/terrain/sprite.rs +++ b/common/src/terrain/sprite.rs @@ -298,6 +298,9 @@ impl SpriteKind { SpriteKind::Moonbell => true, SpriteKind::Pyrebloom => true, SpriteKind::WildFlax => true, + SpriteKind::RoundCactus => true, + SpriteKind::ShortFlatCactus => true, + SpriteKind::MedFlatCactus => true, _ => false, } }