diff --git a/init.lua b/init.lua index 7405380..8653a1d 100644 --- a/init.lua +++ b/init.lua @@ -10,20 +10,16 @@ for i, size in ipairs(sizes) do local description local drop local tiles - local not_in_creative_inventory if slice == 0 then name = "cake:cake" description = "Cake" drop = nil tiles = {"cake_top.png", "cake_bottom.png", "cake_side.png"} - not_in_creative_inventory = 0 else name = "cake:cake_"..slice - description = "Cake (Slice "..slice..")" drop = '' tiles = {"cake_top.png", "cake_bottom.png", "cake_side.png", "cake_inner.png", "cake_side.png", "cake_side.png"} - not_in_creative_inventory = 1 end minetest.register_node(name, { @@ -33,7 +29,7 @@ for i, size in ipairs(sizes) do tiles = tiles, paramtype = "light", is_ground_content = false, - groups = {crumbly=3,not_in_creative_inventory=not_in_creative_inventory}, + groups = {crumbly=3}, --sounds = sounds, node_box = { type = "fixed", @@ -124,3 +120,9 @@ if throwable_cake then end, }) end + +if minetest.get_modpath("i18n") then + local separator = package.config:sub(1,1) + dofile(minetest.get_modpath("i18n")..separator.."init.lua") + i18n.localize_mod() +end diff --git a/lang/en_US.lua b/lang/en_US.lua new file mode 100644 index 0000000..21409c4 --- /dev/null +++ b/lang/en_US.lua @@ -0,0 +1,4 @@ +local l10n = {} +l10n["cake:cake"] = "Cake" +l10n["cake:sugar"] = "Sugar" +return l10n