]> git.lizzy.rs Git - dragonfireclient.git/commitdiff
DevTest: Add food item to test food replacement (#10642)
authorWuzzy <wuzzy2@mail.ru>
Fri, 18 Dec 2020 18:38:39 +0000 (19:38 +0100)
committerGitHub <noreply@github.com>
Fri, 18 Dec 2020 18:38:39 +0000 (19:38 +0100)
games/devtest/mods/testfood/init.lua
games/devtest/mods/testfood/textures/testfood_replace.png [new file with mode: 0644]

index a6236ff68c17e2c67d4e39ae392a63f014eb567f..39b1213066646a1fff611417557bf3407b77ad09 100644 (file)
@@ -22,3 +22,10 @@ minetest.register_craftitem("testfood:bad5", {
        on_use = minetest.item_eat(-5),
 })
 
+minetest.register_craftitem("testfood:replace1", {
+       description = S("Replacing Food (+1)").."\n"..
+                       S("Replaced with 'Good Food (+1)' when eaten"),
+       inventory_image = "testfood_replace.png",
+       on_use = minetest.item_eat(1, "testfood:good1"),
+})
+
diff --git a/games/devtest/mods/testfood/textures/testfood_replace.png b/games/devtest/mods/testfood/textures/testfood_replace.png
new file mode 100644 (file)
index 0000000..1ef6876
Binary files /dev/null and b/games/devtest/mods/testfood/textures/testfood_replace.png differ