diff --git a/data/sprites/items.sprite b/data/sprites/items.sprite index b3b50c2..4b88d46 100644 --- a/data/sprites/items.sprite +++ b/data/sprites/items.sprite @@ -46,6 +46,30 @@ "frame_time" : 100, "originx" : 48, "originy" : 112 +}, + +"cactus_one" : { + "texture" : "plant_repack", + "topx" : 32, + "topy" : 160, + "height" : 32, + "width" : 32, + "number_of_frames" : 1, + "frame_time" : 100, + "originx" : 16, + "originy" : 16 +}, + +"cactus_full" : { + "texture" : "plant_repack", + "topx" : 352, + "topy" : 192, + "height" : 96, + "width" : 64, + "number_of_frames" : 1, + "frame_time" : 100, + "originx" : 32, + "originy" : 80 } } diff --git a/src/saland/Game.cpp b/src/saland/Game.cpp index 1ce9995..61c1087 100644 --- a/src/saland/Game.cpp +++ b/src/saland/Game.cpp @@ -302,6 +302,10 @@ Game::Game() { slot7.icon = "tree_palm"; //Quite big. As this has no icon slot7.name = "spell_spawn_item"; slot7.item_name = "tree_palm"; + Spell& slot8 = data->slot_spell.at(8); + slot8.icon = "cactus_one"; + slot8.name = "spell_spawn_item"; + slot8.item_name = "cactus_full"; Spell& slot9 = data->slot_spell.at(9); slot9.icon = "icon_trash_can"; slot9.name = "spell_clear_block"; diff --git a/src/saland/GameItems.cpp b/src/saland/GameItems.cpp index 9a82d68..95a3797 100644 --- a/src/saland/GameItems.cpp +++ b/src/saland/GameItems.cpp @@ -54,5 +54,10 @@ const ItemDef& getItem(const std::string& itemName) { itemDef.sprite = "tree_palm"; itemDef.isStatic = true; } + if (itemName == "cactus_full") { + itemDef.radius = 20.0f; + itemDef.sprite = "cactus_full"; + itemDef.isStatic = true; + } return itemDef; } \ No newline at end of file