init.lua 992 B

1234567891011121314151617181920212223242526272829303132333435
  1. local S = core.get_translator("testfood")
  2. core.register_craftitem("testfood:good1", {
  3. description = S("Good Food (+1)").."\n"..
  4. S("Punch: Eat"),
  5. inventory_image = "testfood_good.png",
  6. on_use = core.item_eat(1),
  7. })
  8. core.register_craftitem("testfood:good5", {
  9. description = S("Good Food (+5)").."\n"..
  10. S("Punch: Eat"),
  11. inventory_image = "testfood_good2.png",
  12. on_use = core.item_eat(5),
  13. })
  14. core.register_craftitem("testfood:bad1", {
  15. description = S("Bad Food (-1)").."\n"..
  16. S("Punch: Eat"),
  17. inventory_image = "testfood_bad.png",
  18. on_use = core.item_eat(-1),
  19. })
  20. core.register_craftitem("testfood:bad5", {
  21. description = S("Bad Food (-5)").."\n"..
  22. S("Punch: Eat"),
  23. inventory_image = "testfood_bad2.png",
  24. on_use = core.item_eat(-5),
  25. })
  26. core.register_craftitem("testfood:replace1", {
  27. description = S("Replacing Food (+1)").."\n"..
  28. S("Punch: Eat and replace with 'Good Food (+1)'"),
  29. inventory_image = "testfood_replace.png",
  30. on_use = core.item_eat(1, "testfood:good1"),
  31. })