init.lua 922 B

123456789101112131415161718192021222324
  1. -- support for MT game translation.
  2. local S = default.get_translator
  3. local items_list = minetest.registered_items
  4. for id in pairs(items_list) do
  5. local item_description = items_list[id].description
  6. -- Weapons
  7. if string.find(id, "sword") or string.find(id, "axe") or string.find(id, "pick") or string.find(id, "shovel") then
  8. local item_damage = items_list[id].tool_capabilities.damage_groups.fleshy
  9. minetest.override_item(id, {
  10. description = items_list[id].description .. "\n" .. S("Damage") .. ": " .. item_damage
  11. })
  12. -- elseif string.find(id, "armor") then -- Nem jöttem rá hogy működnek az armor-ok...
  13. -- local item_defense = items_list[id].tool_capabilities.damage_groups.fleshy
  14. --
  15. -- minetest.override_item(id, {
  16. -- description = items_list[id].description .. "\n" .. S("Defense") .. ": " .. item_defense
  17. -- })
  18. end
  19. end