From 157e56d8ca100e1bd2bcf6fbb208ef43a1039a76 Mon Sep 17 00:00:00 2001 From: Scott Williams Date: Sun, 24 Jan 2021 16:40:22 +0000 Subject: [PATCH] Removed Shiny Gem, Added migration to change shiny gems to diamonds. Changed shiny gem recipes to diamonds --- .../common/items/crafting_ing/shiny_gem.ron | 8 --- .../loot_tables/loot_table_crafting.ron | 2 +- .../loot_tables/loot_table_humanoids.ron | 2 +- .../common/loot_tables/loot_table_rocks.ron | 2 +- .../common/loot_tables/loot_table_saurok.ron | 2 +- .../loot_tables/loot_table_villager.ron | 2 +- assets/common/recipe_book.ron | 20 +++--- assets/voxygen/audio/sfx.ron | 2 +- assets/voxygen/item_image_manifest.ron | 3 - assets/voxygen/voxel/sprite_manifest.ron | 22 ------- common/src/comp/inventory/item/mod.rs | 1 - common/src/terrain/sprite.rs | 62 +++++++++---------- .../down.sql | 8 +++ .../up.sql | 2 + voxygen/src/audio/sfx/mod.rs | 2 +- 15 files changed, 57 insertions(+), 83 deletions(-) delete mode 100644 assets/common/items/crafting_ing/shiny_gem.ron create mode 100644 server/src/migrations/2021-01-24-141845_shinygem-to-diamond/down.sql create mode 100644 server/src/migrations/2021-01-24-141845_shinygem-to-diamond/up.sql diff --git a/assets/common/items/crafting_ing/shiny_gem.ron b/assets/common/items/crafting_ing/shiny_gem.ron deleted file mode 100644 index 957a12f979..0000000000 --- a/assets/common/items/crafting_ing/shiny_gem.ron +++ /dev/null @@ -1,8 +0,0 @@ -ItemDef( - name: "Shiny Gem", - description: "It's so shiny!", - kind: Ingredient( - kind: "ShinyGem", - ), - quality: High, -) diff --git a/assets/common/loot_tables/loot_table_crafting.ron b/assets/common/loot_tables/loot_table_crafting.ron index fe9f61e862..d36df69e77 100644 --- a/assets/common/loot_tables/loot_table_crafting.ron +++ b/assets/common/loot_tables/loot_table_crafting.ron @@ -3,6 +3,6 @@ (2, "common.items.crafting_ing.leather_scraps"), (4, "common.items.crafting_ing.cloth_scraps"), (1, "common.items.crafting_ing.empty_vial"), - (0.10, "common.items.crafting_ing.shiny_gem"), + (0.10, "common.items.crafting_ing.diamond"), ] diff --git a/assets/common/loot_tables/loot_table_humanoids.ron b/assets/common/loot_tables/loot_table_humanoids.ron index e7872e3107..7d626d1423 100644 --- a/assets/common/loot_tables/loot_table_humanoids.ron +++ b/assets/common/loot_tables/loot_table_humanoids.ron @@ -1,7 +1,7 @@ [ // Crafting Ingredients (2, "common.items.crafting_ing.empty_vial"), - (0.10, "common.items.crafting_ing.shiny_gem"), + (0.10, "common.items.crafting_ing.diamond"), (4, "common.items.crafting_ing.cloth_scraps"), // Consumables (0.2, "common.items.consumable.potion_minor"), diff --git a/assets/common/loot_tables/loot_table_rocks.ron b/assets/common/loot_tables/loot_table_rocks.ron index 8496d9e852..83a5e7a33c 100644 --- a/assets/common/loot_tables/loot_table_rocks.ron +++ b/assets/common/loot_tables/loot_table_rocks.ron @@ -1,6 +1,6 @@ [ (1, "common.items.crafting_ing.stones"), - (0.05, "common.items.crafting_ing.shiny_gem"), + (0.05, "common.items.crafting_ing.diamond"), (0.10, "common.items.ore.velorite"), (0.20, "common.items.ore.veloritefrag"), ] diff --git a/assets/common/loot_tables/loot_table_saurok.ron b/assets/common/loot_tables/loot_table_saurok.ron index 0fe75b1c74..950ac51b7b 100644 --- a/assets/common/loot_tables/loot_table_saurok.ron +++ b/assets/common/loot_tables/loot_table_saurok.ron @@ -1,6 +1,6 @@ [ (2, "common.items.crafting_ing.empty_vial"), - (0.01, "common.items.crafting_ing.shiny_gem"), + (0.01, "common.items.crafting_ing.diamond"), (3, "common.items.crafting_ing.cloth_scraps"), (2, "common.items.crafting_ing.leather_scraps"), // Consumables diff --git a/assets/common/loot_tables/loot_table_villager.ron b/assets/common/loot_tables/loot_table_villager.ron index e1c8ffc508..44258d60e1 100644 --- a/assets/common/loot_tables/loot_table_villager.ron +++ b/assets/common/loot_tables/loot_table_villager.ron @@ -2,7 +2,7 @@ // Crafting Ingredients (2, "common.items.crafting_ing.bowl"), (1, "common.items.crafting_ing.empty_vial"), - (0.10, "common.items.crafting_ing.shiny_gem"), + (0.10, "common.items.crafting_ing.diamond"), (1, "common.items.crafting_ing.cloth_scraps"), // Consumables (0.2, "common.items.consumable.potion_minor"), diff --git a/assets/common/recipe_book.ron b/assets/common/recipe_book.ron index bdbf6cd59a..4782f90c68 100644 --- a/assets/common/recipe_book.ron +++ b/assets/common/recipe_book.ron @@ -48,7 +48,7 @@ ("common.items.utility.collar", 1), [ ("common.items.crafting_ing.leather_scraps", 5), - ("common.items.crafting_ing.shiny_gem", 1), + ("common.items.crafting_ing.diamond", 1), ], ), "bomb_coconut": ( @@ -160,7 +160,7 @@ ("common.items.crafting_ing.twigs", 5), ("common.items.crafting_ing.leather_scraps", 5), ("common.items.crafting_ing.cloth_scraps", 5), - ("common.items.crafting_ing.shiny_gem", 1), + ("common.items.crafting_ing.diamond", 1), ("common.items.crafting_tools.craftsman_hammer", 0), ("common.items.crafting_tools.sewing_set", 0), ], @@ -172,7 +172,7 @@ ("common.items.crafting_ing.twigs", 5), ("common.items.crafting_ing.leather_scraps", 5), ("common.items.crafting_ing.cloth_scraps", 5), - ("common.items.crafting_ing.shiny_gem", 1), + ("common.items.crafting_ing.diamond", 1), ("common.items.crafting_tools.craftsman_hammer", 0), ("common.items.crafting_tools.sewing_set", 0), ], @@ -185,7 +185,7 @@ ("common.items.crafting_ing.leather_scraps", 5), ("common.items.crafting_ing.cloth_scraps", 5), ("common.items.crafting_ing.icy_fang", 1), - ("common.items.crafting_ing.shiny_gem", 1), + ("common.items.crafting_ing.diamond", 1), ("common.items.crafting_tools.craftsman_hammer", 0), ("common.items.crafting_tools.sewing_set", 0), ], @@ -197,7 +197,7 @@ ("common.items.crafting_ing.twigs", 15), ("common.items.crafting_ing.leather_scraps", 5), ("common.items.crafting_ing.cloth_scraps", 5), - ("common.items.crafting_ing.shiny_gem", 1), + ("common.items.crafting_ing.diamond", 1), ("common.items.crafting_tools.craftsman_hammer", 0), ("common.items.crafting_tools.sewing_set", 0), ], @@ -207,7 +207,7 @@ [ ("common.items.crafting_ing.twigs", 20), ("common.items.ore.veloritefrag", 8), - ("common.items.crafting_ing.shiny_gem", 4), + ("common.items.crafting_ing.diamond", 4), ("common.items.crafting_tools.craftsman_hammer", 0), ], ), @@ -297,7 +297,7 @@ "traveler backpack": ( ("common.items.armor.back.backpack_0", 1), [ - ("common.items.crafting_ing.shiny_gem", 2), + ("common.items.crafting_ing.diamond", 2), ("common.items.crafting_ing.twigs", 2), ("common.items.crafting_ing.cloth_scraps", 3), ("common.items.crafting_ing.leather_scraps", 3), @@ -308,7 +308,7 @@ "sturdy red backpack": ( ("common.items.armor.bag.sturdy_red_backpack", 1), [ - ("common.items.crafting_ing.shiny_gem", 2), + ("common.items.crafting_ing.diamond", 2), ("common.items.crafting_ing.cloth_scraps_red", 3), ("common.items.armor.bag.woven_red_bag", 1), ("common.items.crafting_tools.sewing_set", 0), @@ -319,7 +319,7 @@ [ ("common.items.crafting_ing.leather_troll", 10), ("common.items.crafting_ing.leather_scraps", 10), - ("common.items.crafting_ing.shiny_gem", 1), + ("common.items.crafting_ing.diamond", 1), ("common.items.crafting_tools.sewing_set", 0), ], ), @@ -328,7 +328,7 @@ [ ("common.items.crafting_ing.mindflayer_bag_damaged", 1), ("common.items.crafting_ing.leather_scraps", 10), - ("common.items.crafting_ing.shiny_gem", 4), + ("common.items.crafting_ing.diamond", 4), ("common.items.ore.veloritefrag", 10), ("common.items.crafting_tools.sewing_set", 0), ], diff --git a/assets/voxygen/audio/sfx.ron b/assets/voxygen/audio/sfx.ron index 2a8478a276..7471ebdee8 100644 --- a/assets/voxygen/audio/sfx.ron +++ b/assets/voxygen/audio/sfx.ron @@ -491,7 +491,7 @@ ], threshold: 0.3, ), - Inventory(CollectedItem("ShinyGem")): ( + Inventory(CollectedItem("Diamond")): ( files: [ "voxygen.audio.sfx.weapon.staff_out", ], diff --git a/assets/voxygen/item_image_manifest.ron b/assets/voxygen/item_image_manifest.ron index 7459a9b640..4a6a36bdfa 100644 --- a/assets/voxygen/item_image_manifest.ron +++ b/assets/voxygen/item_image_manifest.ron @@ -1600,9 +1600,6 @@ Ingredient("ClothScrapsRed"): Png( "element.icons.item_cloth_red", ), - Ingredient("ShinyGem"): Png( - "element.icons.gem", - ), Ingredient("MortarPestle"): Png( "element.icons.item_mortarpestlecoco", ), diff --git a/assets/voxygen/voxel/sprite_manifest.ron b/assets/voxygen/voxel/sprite_manifest.ron index 29079d3264..6f5d74d391 100644 --- a/assets/voxygen/voxel/sprite_manifest.ron +++ b/assets/voxygen/voxel/sprite_manifest.ron @@ -1988,28 +1988,6 @@ Twigs: Some(( wind_sway: 0.0, )), -// Shiny Gems -ShinyGem: Some(( - variations: [ - ( - model: "voxygen.voxel.sprite.gem.gem_blue", - offset: (-2.0, -3.0, 0.0), - lod_axes: (1.0, 1.0, 1.0), - ), - ( - model: "voxygen.voxel.sprite.gem.gem_green", - offset: (-2.0, -3.0, 0.0), - lod_axes: (1.0, 1.0, 1.0), - ), - ( - model: "voxygen.voxel.sprite.gem.gem_red", - offset: (-3.0, -2.0, -2.0), - lod_axes: (1.0, 1.0, 1.0), - ), - ], - wind_sway: 0.0, -)), - // Drop Gate Parts DropGate: Some(( variations: [ diff --git a/common/src/comp/inventory/item/mod.rs b/common/src/comp/inventory/item/mod.rs index 36bc0b2de5..786e709d9f 100644 --- a/common/src/comp/inventory/item/mod.rs +++ b/common/src/comp/inventory/item/mod.rs @@ -535,7 +535,6 @@ impl Item { SpriteKind::Beehive => "common.items.crafting_ing.honey", SpriteKind::Stones => "common.items.crafting_ing.stones", 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", diff --git a/common/src/terrain/sprite.rs b/common/src/terrain/sprite.rs index d524b61365..9fccea234a 100644 --- a/common/src/terrain/sprite.rs +++ b/common/src/terrain/sprite.rs @@ -96,37 +96,36 @@ make_case_elim!( Pot = 0x45, Stones = 0x46, Twigs = 0x47, - ShinyGem = 0x48, - DropGate = 0x49, - DropGateBottom = 0x4A, - GrassSnow = 0x4B, - Reed = 0x4C, - Beehive = 0x4D, - LargeCactus = 0x4E, - VialEmpty = 0x4F, - PotionMinor = 0x50, - GrassBlue = 0x51, - ChestBurried = 0x52, - Mud = 0x53, - FireBowlGround = 0x54, - CaveMushroom = 0x55, - Bowl = 0x56, - SavannaGrass = 0x57, - TallSavannaGrass = 0x58, - RedSavannaGrass = 0x59, - SavannaBush = 0x5A, - Amethyst = 0x5B, - Ruby = 0x5C, - Sapphire = 0x5D, - Emerald = 0x5E, - Topaz = 0x5F, - Diamond = 0x60, - AmethystSmall = 0x61, - TopazSmall = 0x62, - DiamondSmall = 0x63, - RubySmall = 0x64, - EmeraldSmall = 0x65, - SapphireSmall = 0x66, + DropGate = 0x48, + DropGateBottom = 0x49, + GrassSnow = 0x4A, + Reed = 0x4B, + Beehive = 0x4C, + LargeCactus = 0x4D, + VialEmpty = 0x4E, + PotionMinor = 0x4F, + GrassBlue = 0x50, + ChestBurried = 0x51, + Mud = 0x52, + FireBowlGround = 0x53, + CaveMushroom = 0x54, + Bowl = 0x55, + SavannaGrass = 0x56, + TallSavannaGrass = 0x57, + RedSavannaGrass = 0x58, + SavannaBush = 0x59, + Amethyst = 0x5A, + Ruby = 0x5B, + Sapphire = 0x5C, + Emerald = 0x5D, + Topaz = 0x5E, + Diamond = 0x5F, + AmethystSmall = 0x60, + TopazSmall = 0x61, + DiamondSmall = 0x62, + RubySmall = 0x63, + EmeraldSmall = 0x64, + SapphireSmall = 0x65, } ); @@ -210,7 +209,6 @@ impl SpriteKind { SpriteKind::Coconut => true, SpriteKind::Stones => true, SpriteKind::Twigs => true, - SpriteKind::ShinyGem => true, SpriteKind::Crate => true, SpriteKind::Beehive => true, SpriteKind::VialEmpty => true, diff --git a/server/src/migrations/2021-01-24-141845_shinygem-to-diamond/down.sql b/server/src/migrations/2021-01-24-141845_shinygem-to-diamond/down.sql new file mode 100644 index 0000000000..9a71837e02 --- /dev/null +++ b/server/src/migrations/2021-01-24-141845_shinygem-to-diamond/down.sql @@ -0,0 +1,8 @@ +UPDATE item +SET item_definition_id = 'common.items.weapons.crafting.shiny_gem' WHERE item_definition_id = 'common.items.crafting_ing.diamond'; + +DELETE FROM item WHERE item_definition_id = 'common.items.crafting_ing.ruby'; +DELETE FROM item WHERE item_definition_id = 'common.items.crafting_ing.emerald'; +DELETE FROM item WHERE item_definition_id = 'common.items.crafting_ing.sapphire'; +DELETE FROM item WHERE item_definition_id = 'common.items.crafting_ing.topaz'; +DELETE FROM item WHERE item_definition_id = 'common.items.crafting_ing.amethyst'; diff --git a/server/src/migrations/2021-01-24-141845_shinygem-to-diamond/up.sql b/server/src/migrations/2021-01-24-141845_shinygem-to-diamond/up.sql new file mode 100644 index 0000000000..84c84084af --- /dev/null +++ b/server/src/migrations/2021-01-24-141845_shinygem-to-diamond/up.sql @@ -0,0 +1,2 @@ +UPDATE item +SET item_definition_id = 'common.items.crafting_ing.diamond' WHERE item_definition_id = 'common.items.crafting_ing.shiny_gem'; \ No newline at end of file diff --git a/voxygen/src/audio/sfx/mod.rs b/voxygen/src/audio/sfx/mod.rs index 1c817b698b..c7d149ccc1 100644 --- a/voxygen/src/audio/sfx/mod.rs +++ b/voxygen/src/audio/sfx/mod.rs @@ -192,7 +192,7 @@ impl From<&InventoryUpdateEvent> for SfxEvent { SfxEvent::Inventory(SfxInventoryEvent::CollectedTool(tool.kind)) }, ItemKind::Ingredient { kind } => match &kind[..] { - "ShinyGem" => { + "Diamond" => { SfxEvent::Inventory(SfxInventoryEvent::CollectedItem(kind.clone())) }, _ => SfxEvent::Inventory(SfxInventoryEvent::Collected),