diff options
author | Vanessa Dannenberg <vanessa.e.dannenberg@gmail.com> | 2019-04-01 19:38:47 -0400 |
---|---|---|
committer | Vanessa Dannenberg <vanessa.e.dannenberg@gmail.com> | 2019-04-01 19:38:47 -0400 |
commit | 8555f75acc050f29508d88f1e57159f79cb948d1 (patch) | |
tree | 367cbd14aafff8523b448e81027c11000863a107 | |
parent | b548167fde186dc92d97a243e6689efe0a51a115 (diff) | |
download | dreambuilder_modpack-8555f75acc050f29508d88f1e57159f79cb948d1.tar dreambuilder_modpack-8555f75acc050f29508d88f1e57159f79cb948d1.tar.gz dreambuilder_modpack-8555f75acc050f29508d88f1e57159f79cb948d1.tar.bz2 dreambuilder_modpack-8555f75acc050f29508d88f1e57159f79cb948d1.tar.xz dreambuilder_modpack-8555f75acc050f29508d88f1e57159f79cb948d1.zip |
update blox, castles, cottages, technic, farming_redo, gloopblocks,
homedecor, led_marquee, locks, maptools, mesecons, plantlife, moreblocks,
nixie_tubes, replacer, travelnet, and unified inventory
58 files changed, 4454 insertions, 2294 deletions
diff --git a/blox/init.lua b/blox/init.lua index e1ed379..311ed92 100644 --- a/blox/init.lua +++ b/blox/init.lua @@ -1,713 +1,617 @@ ---[[
-***********
-Blox
-by Sanchez
-
-modified mapgen
-by blert2112
-***********
---]]
-
-blox = {}
-
-local version = "0.8"
-
-local BloxColours = {
- "pink",
- "yellow",
- "white",
- "orange",
- "purple",
- "blue",
- "cyan",
- "red",
- "green",
- "black",
-}
-
-local NodeClass = {
- "diamond",
- "quarter",
- "cross",
- "checker",
- "corner",
- "loop",
-}
-
-local NodeMaterial = {
- "stone",
- "wood",
- "cobble",
-}
-
-local moreblocks = minetest.get_modpath("moreblocks")
-
--- Nodes
-
-minetest.register_node("blox:glowstone", {
- description = "Glowstone",
- tiles = {"blox_glowstone.png"},
- --inventory_image = "blox_glowstone.png",
- light_propagates = true,
- paramtype = "light",
- sunlight_propagates = true,
- light_source = 14,
- is_ground_content = true,
- groups = {cracky=2},
- sounds = default.node_sound_stone_defaults(),
-})
-
-minetest.register_node("blox:glowore", {
- description = "Glow Ore",
- tiles = {"default_stone.png^blox_glowore.png"},
- --inventory_image = {"default_stone.png^blox_glowore.png"},
- light_propagates = true,
- paramtype = "light",
- sunlight_propagates = false,
- light_source = 8,
- drop = {
- max_items = 1,
- items = {
- {
- items = {"blox:glowstone"},
- rarity = 15,
- },
- {
- items = {"blox:glowdust"},
- }
- }
- },
- is_ground_content = true,
- groups = {cracky=2},
- sounds = default.node_sound_stone_defaults(),
-})
-
-minetest.register_node("blox:glowdust", {
- description = "Glow Dust",
- drawtype = "plantlike",
- tiles = {"blox_glowdust.png"},
- inventory_image = "blox_glowdust.png",
- light_propagates = true,
- paramtype = "light",
- sunlight_propagates = true,
- light_source = 9,
- walkable = false,
- groups = {cracky=3, snappy=3},
- })
-
--- param2-colored nodes: standard patterns
-
-blox.old_89_color_nodes = {}
-
-for _, nodeclass in ipairs(NodeClass) do
-
- minetest.register_node("blox:stone_"..nodeclass, {
- description = "Blox stone "..nodeclass,
- tiles = {
- { name = "default_stone.png", color = 0xffffffff },
- },
- overlay_tiles = {
- "blox_stone_"..nodeclass..".png"
- },
- palette = "unifieddyes_palette_extended.png",
- paramtype = "light",
- paramtype2 = "color",
- is_ground_content = true,
- groups = {cracky=3, ud_param2_colorable = 1},
- sounds = default.node_sound_stone_defaults(),
- on_construct = unifieddyes.on_construct,
- })
-
- minetest.register_node("blox:cobble_"..nodeclass, {
- description = "Blox cobble "..nodeclass,
- tiles = {
- { name = "default_cobble.png", color = 0xffffffff },
- },
- overlay_tiles = {
- "blox_cobble_"..nodeclass..".png"
- },
- palette = "unifieddyes_palette_extended.png",
- paramtype = "light",
- paramtype2 = "color",
- is_ground_content = true,
- groups = {cracky=3, ud_param2_colorable = 1},
- sounds = default.node_sound_stone_defaults(),
- on_construct = unifieddyes.on_construct,
- })
-
- minetest.register_node("blox:wood_"..nodeclass, {
- description = "Blox wood "..nodeclass,
- tiles = {
- { name = "default_wood.png", color = 0xffffffff },
- },
- overlay_tiles = {
- "blox_wood_"..nodeclass..".png"
- },
- palette = "unifieddyes_palette_extended.png",
- paramtype = "light",
- paramtype2 = "color",
- is_ground_content = true,
- groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2,flammable=3, ud_param2_colorable = 1},
- sounds = default.node_sound_wood_defaults(),
- on_construct = unifieddyes.on_construct,
- })
-
- table.insert(blox.old_89_color_nodes, "blox:stone_"..nodeclass)
- table.insert(blox.old_89_color_nodes, "blox:cobble_"..nodeclass)
- table.insert(blox.old_89_color_nodes, "blox:wood_"..nodeclass)
-end
-
--- param2-colored nodes: tinted wood, cobble, stone, stone square
-
-minetest.register_node("blox:wood_tinted", {
- description = "Blox tinted wood",
- tiles = { "blox_wood_tinted.png" },
- palette = "unifieddyes_palette_extended.png",
- paramtype = "light",
- paramtype2 = "color",
- is_ground_content = true,
- groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2,flammable=3, ud_param2_colorable = 1},
- sounds = default.node_sound_wood_defaults(),
- on_construct = unifieddyes.on_construct,
-})
-
-minetest.register_node("blox:stone_square", {
- description = "Blox stone square",
- tiles = { "blox_stone_square.png" },
- palette = "unifieddyes_palette_extended.png",
- paramtype = "light",
- paramtype2 = "color",
- is_ground_content = true,
- groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2,flammable=3, ud_param2_colorable = 1},
- sounds = default.node_sound_wood_defaults(),
- on_construct = unifieddyes.on_construct,
-})
-
-minetest.register_node("blox:cobble_tinted", {
- description = "Blox tinted cobble",
- tiles = { "blox_cobble_tinted.png" },
- palette = "unifieddyes_palette_extended.png",
- paramtype = "light",
- paramtype2 = "color",
- is_ground_content = true,
- groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2,flammable=3, not_in_creative_inventory = 1, ud_param2_colorable = 1},
- sounds = default.node_sound_wood_defaults(),
- on_construct = unifieddyes.on_construct,
-})
-
-minetest.register_node("blox:stone_tinted", {
- description = "Blox tinted stone",
- tiles = { "blox_stone_tinted.png" },
- palette = "unifieddyes_palette_extended.png",
- paramtype = "light",
- paramtype2 = "color",
- is_ground_content = true,
- groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2,flammable=3, not_in_creative_inventory = 1, ud_param2_colorable = 1},
- sounds = default.node_sound_wood_defaults(),
- on_construct = unifieddyes.on_construct,
- drop = {
- items = {
- {items = {"blox:cobble_tinted"}, inherit_color = true },
- }
- }
-})
-
-table.insert(blox.old_89_color_nodes, "blox:wood_tinted")
-table.insert(blox.old_89_color_nodes, "blox:stone_square")
-table.insert(blox.old_89_color_nodes, "blox:cobble_tinted")
-table.insert(blox.old_89_color_nodes, "blox:stone_tinted")
-
--- Override default stone and default cobble
-
-minetest.override_item("default:stone_block", {
- palette = "unifieddyes_palette_extended.png",
- airbrush_replacement_node = "blox:stone_square",
- groups = {cracky = 3, stone = 1, ud_param2_colorable = 1},
-})
-
-minetest.override_item("default:stone", {
- palette = "unifieddyes_palette_extended.png",
- airbrush_replacement_node = "blox:stone_tinted",
- groups = {cracky = 3, stone = 1, ud_param2_colorable = 1},
-})
-
-minetest.override_item("default:cobble", {
- palette = "unifieddyes_palette_extended.png",
- airbrush_replacement_node = "blox:cobble_tinted",
- groups = {cracky = 3, stone = 2, ud_param2_colorable = 1},
-})
-
--- override the Moreblocks nodes we use
-
-if moreblocks then
- minetest.override_item("moreblocks:circle_stone_bricks", {
- palette = "unifieddyes_palette_extended.png",
- airbrush_replacement_node = "blox:stone_loop",
- groups = {cracky = 3, ud_param2_colorable = 1},
- })
-
- unifieddyes.register_color_craft({
- output = "blox:stone_loop",
- type = "shapeless",
- palette = "extended",
- neutral_node = "moreblocks:circle_stone_bricks",
- recipe = {
- "NEUTRAL_NODE",
- "MAIN_DYE"
- }
- })
-
- minetest.override_item("moreblocks:iron_checker", {
- palette = "unifieddyes_palette_extended.png",
- airbrush_replacement_node = "blox:stone_checker",
- groups = {cracky = 3, ud_param2_colorable = 1},
- })
-
- unifieddyes.register_color_craft({
- output = "blox:stone_checker",
- type = "shapeless",
- palette = "extended",
- neutral_node = "moreblocks:iron_checker",
- recipe = {
- "NEUTRAL_NODE",
- "MAIN_DYE"
- }
- })
-
- minetest.override_item("moreblocks:wood_tile", {
- palette = "unifieddyes_palette_extended.png",
- airbrush_replacement_node = "blox:wood_quarter",
- groups = {wood = 1, snappy = 1, choppy = 2, oddly_breakable_by_hand = 2, flammable = 3, ud_param2_colorable = 1},
- })
-
- unifieddyes.register_color_craft({
- output = "blox:wood_quarter",
- type = "shapeless",
- palette = "extended",
- neutral_node = "moreblocks:wood_tile",
- recipe = {
- "NEUTRAL_NODE",
- "MAIN_DYE"
- }
- })
-
- minetest.override_item("moreblocks:wood_tile_flipped", {
- palette = "unifieddyes_palette_extended.png",
- airbrush_replacement_node = "blox:wood_quarter",
- groups = {wood = 1, snappy = 1, choppy = 2, oddly_breakable_by_hand = 2, flammable = 3, ud_param2_colorable = 1},
- })
-
- unifieddyes.register_color_craft({
- output = "blox:wood_quarter",
- type = "shapeless",
- palette = "extended",
- neutral_node = "moreblocks:wood_tile_flipped",
- recipe = {
- "NEUTRAL_NODE",
- "MAIN_DYE"
- }
- })
-end
-
-local dye_color = "dye:white"
-
-if minetest.get_modpath("coloredwood") then
- minetest.register_craft({
- output = unifieddyes.make_colored_itemstack("blox:wood_tinted 4", "extended", dye_color),
- recipe = {
- { dye_color, "default:wood", dye_color },
- { "default:wood", "", "default:wood" },
- { dye_color, "default:wood", dye_color },
- }
- })
-
- unifieddyes.register_color_craft({
- output = "blox:wood_tinted",
- type = "shapeless",
- palette = "extended",
- neutral_node = "blox:wood_tinted",
- recipe = {
- "NEUTRAL_NODE",
- "MAIN_DYE"
- }
- })
-
-else
- minetest.override_item("default:wood", {
- airbrush_replacement_node = "blox:wood_tinted",
- groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2, wood = 1, ud_param2_colorable = 1},
- })
-
- minetest.override_item("blox:wood_tinted", {
- drop = "default:wood",
- groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2,flammable=3, not_in_creative_inventory = 1, ud_param2_colorable = 1},
- })
-
- unifieddyes.register_color_craft({
- output = "blox:wood_tinted",
- type = "shapeless",
- palette = "extended",
- neutral_node = "default:wood",
- recipe = {
- "NEUTRAL_NODE",
- "MAIN_DYE"
- }
- })
-
-end
-
--- Other crafts
-
-for _, nodeclass in ipairs(NodeClass) do
- for _, material in ipairs(NodeMaterial) do
-
- local item = "blox:"..material.."_"..nodeclass
- unifieddyes.register_color_craft({
- output = item,
- type = "shapeless",
- palette = "extended",
- neutral_node = item,
- recipe = {
- "NEUTRAL_NODE",
- "MAIN_DYE"
- }
- })
- end
-end
-
-unifieddyes.register_color_craft({
- output = "blox:stone_square",
- type = "shapeless",
- palette = "extended",
- neutral_node = "default:stone_block",
- recipe = {
- "NEUTRAL_NODE",
- "MAIN_DYE"
- }
-})
-
-unifieddyes.register_color_craft({
- output = "blox:stone_square",
- type = "shapeless",
- palette = "extended",
- neutral_node = "blox:stone_square",
- recipe = {
- "NEUTRAL_NODE",
- "MAIN_DYE"
- }
-})
-
-unifieddyes.register_color_craft({
- output = "blox:cobble_tinted",
- type = "shapeless",
- palette = "extended",
- neutral_node = "default:cobble",
- recipe = {
- "NEUTRAL_NODE",
- "MAIN_DYE"
- }
-})
-
-unifieddyes.register_color_craft({
- output = "blox:cobble_tinted",
- type = "shapeless",
- palette = "extended",
- neutral_node = "blox:cobble_tinted",
- recipe = {
- "NEUTRAL_NODE",
- "MAIN_DYE"
- }
-})
-
-unifieddyes.register_color_craft({
- output = "blox:stone_tinted",
- type = "shapeless",
- palette = "extended",
- neutral_node = "default:stone",
- recipe = {
- "NEUTRAL_NODE",
- "MAIN_DYE"
- }
-})
-
-unifieddyes.register_color_craft({
- output = "blox:stone_tinted",
- type = "shapeless",
- palette = "extended",
- neutral_node = "blox:stone_tinted",
- recipe = {
- "NEUTRAL_NODE",
- "MAIN_DYE"
- }
-})
-
-
-minetest.register_craft({
- output = 'blox:glowstone 2',
- recipe = {
- {"", 'blox:glowdust', ""},
- {'blox:glowdust', 'default:stone', 'blox:glowdust'},
- {"", 'blox:glowdust', ""},
- }
-})
-
-for _, material in ipairs(NodeMaterial) do
-
- local def_mat = "default:"..material
-
- unifieddyes.register_color_craft({
- output = "blox:"..material.."_diamond 4",
- palette = "extended",
- neutral_node = def_mat,
- recipe = {
- { "NEUTRAL_NODE", "MAIN_DYE", "NEUTRAL_NODE" },
- { "MAIN_DYE", "", "MAIN_DYE" },
- { "NEUTRAL_NODE", "MAIN_DYE", "NEUTRAL_NODE" }
- }
- })
-
- if not (moreblocks and material == "wood") then
- unifieddyes.register_color_craft({
- output = "blox:"..material.."_quarter 4",
- palette = "extended",
- neutral_node = def_mat,
- recipe = {
- { "MAIN_DYE", "NEUTRAL_NODE" },
- { "NEUTRAL_NODE", "MAIN_DYE" },
- }
- })
- end
-
- unifieddyes.register_color_craft({
- output = "blox:"..material.."_cross 4",
- palette = "extended",
- neutral_node = def_mat,
- recipe = {
- { "NEUTRAL_NODE", "", "NEUTRAL_NODE" },
- { "", "MAIN_DYE", "" },
- { "NEUTRAL_NODE", "", "NEUTRAL_NODE" }
- }
- })
-
- unifieddyes.register_color_craft({
- output = "blox:"..material.."_corner 4",
- palette = "extended",
- neutral_node = def_mat,
- recipe = {
- { "MAIN_DYE", "", "MAIN_DYE" },
- { "", "NEUTRAL_NODE", "" },
- { "MAIN_DYE", "", "MAIN_DYE" }
- }
- })
-
- if not (moreblocks and material == "stone") then
-
- unifieddyes.register_color_craft({
- output = "blox:"..material.."_checker 6",
- palette = "extended",
- neutral_node = def_mat,
- recipe = {
- { "NEUTRAL_NODE", "MAIN_DYE", "NEUTRAL_NODE" },
- { "MAIN_DYE", "NEUTRAL_NODE", "MAIN_DYE" },
- { "NEUTRAL_NODE", "MAIN_DYE", "NEUTRAL_NODE" }
- }
- })
-
- unifieddyes.register_color_craft({
- output = "blox:"..material.."_checker 8",
- palette = "extended",
- neutral_node = def_mat,
- recipe = {
- { "MAIN_DYE", "NEUTRAL_NODE", "MAIN_DYE" },
- { "NEUTRAL_NODE", "MAIN_DYE", "NEUTRAL_NODE" },
- { "MAIN_DYE", "NEUTRAL_NODE", "MAIN_DYE" }
- }
- })
-
- unifieddyes.register_color_craft({
- output = "blox:"..material.."_loop 6",
- palette = "extended",
- neutral_node = def_mat,
- recipe = {
- { "NEUTRAL_NODE", "NEUTRAL_NODE", "NEUTRAL_NODE" },
- { "NEUTRAL_NODE", "MAIN_DYE", "NEUTRAL_NODE" },
- { "NEUTRAL_NODE", "NEUTRAL_NODE", "NEUTRAL_NODE" },
- }
- })
-
- end
-end
-
---Fuel
-
-for _, nodeclass in ipairs(NodeClass) do
- minetest.register_craft({
- type = "fuel",
- recipe = "blox:wood_"..nodeclass,
- burntime = 7,
- })
-end
-
-minetest.register_craft({
- type = "fuel",
- recipe = "blox:wood_tinted",
- burntime = 7,
-})
-
--- Tools
-
-minetest.register_tool("blox:bloodbane", {
- description = "Blood Bane",
- inventory_image = "blox_bloodbane.png",
- tool_capabilities = {
- full_punch_interval = 0.2,
- max_drop_level=1,
- groupcaps={
- fleshy={times={[1]=0.001, [2]=0.001, [3]=0.001}, uses=0, maxlevel=3},
- snappy={times={[1]=0.01, [2]=0.01, [3]=0.01}, uses=0, maxlevel=3},
- crumbly={times={[1]=0.01, [2]=0.01, [3]=0.01}, uses=0, maxlevel=3},
- cracky={times={[1]=0.01, [2]=0.01, [3]=0.01}, uses=0, maxlevel=3},
- choppy={times={[1]=0.01, [2]=0.01, [3]=0.01}, uses=0, maxlevel=3}
- },
- damage_groups = {fleshy=200},
- }
-})
-
--- Ores
-
-local sea_level = 1
-
-minetest.register_on_mapgen_init(function(mapgen_params)
- sea_level = mapgen_params.water_level
-end)
-
-minetest.register_ore({
- ore_type = "scatter",
- ore = "blox:glowore",
- wherein = "default:stone",
- clust_scarcity = 36 * 36 * 36,
- clust_num_ores = 3,
- clust_size = 2,
- y_min = sea_level,
- y_max = 31000,
-})
-
-minetest.register_ore({
- ore_type = "scatter",
- ore = "blox:glowore",
- wherein = "default:stone",
- clust_scarcity = 14 * 14 * 14,
- clust_num_ores = 5,
- clust_size = 3,
- y_min = sea_level - 30,
- y_max = sea_level + 20,
-})
-
-minetest.register_ore({
- ore_type = "scatter",
- ore = "blox:glowore",
- wherein = "default:stone",
- clust_scarcity = 36 * 36 * 36,
- clust_num_ores = 3,
- clust_size = 2,
- y_min = -31000,
- y_max = sea_level - 1,
-})
-
--- Convert old static nodes to param2 color
-
-blox.old_static_list = {}
-
-for _, nodeclass in ipairs(NodeClass) do
- if nodeclass ~= "colored" then
- for _, color in ipairs(BloxColours) do
- table.insert(blox.old_static_list, "blox:"..color..nodeclass)
- table.insert(blox.old_static_list, "blox:"..color..nodeclass.."_cobble")
- table.insert(blox.old_static_list, "blox:"..color..nodeclass.."_wood")
- end
- end
-end
-
-for _, color in ipairs(BloxColours) do
- table.insert(blox.old_static_list, "blox:"..color.."square")
- table.insert(blox.old_static_list, "blox:"..color.."stone")
- table.insert(blox.old_static_list, "blox:"..color.."wood")
- table.insert(blox.old_static_list, "blox:"..color.."cobble")
-end
-
-minetest.register_lbm({
- name = "blox:convert",
- label = "Convert blox blocks to use param2 color",
- run_at_every_load = false,
- nodenames = blox.old_static_list,
- action = function(pos, node)
- local basename = string.sub(node.name, 6)
- local color = basename
- local material = "stone"
- local pattern = "tinted"
-
- if string.find(basename, "_cobble") then
- basename = string.sub(basename, 1, -8)
- material = "cobble"
- elseif string.find(basename, "cobble") then
- basename = string.sub(basename, 1, -7)
- material = "cobble"
- elseif string.find(basename, "_wood") then
- basename = string.sub(basename, 1, -6)
- material = "wood"
- elseif string.find(basename, "wood") then
- basename = string.sub(basename, 1, -5)
- material = "wood"
- elseif string.find(basename, "square") then
- basename = string.sub(basename, 1, -7)
- pattern = "square"
- elseif string.find(basename, "stone") then
- basename = string.sub(basename, 1, -6)
- end
-
- -- at this point, the material type has been deleted from `basename`.
-
- if string.find(basename, "quarter") then
- basename = string.sub(basename, 1, -8)
- pattern = "quarter"
- elseif string.find(basename, "cross") then
- basename = string.sub(basename, 1, -6)
- pattern = "cross"
- elseif string.find(basename, "corner") then
- basename = string.sub(basename, 1, -7)
- pattern = "corner"
- elseif string.find(basename, "diamond") then
- basename = string.sub(basename, 1, -8)
- pattern = "diamond"
- elseif string.find(basename, "loop") then
- basename = string.sub(basename, 1, -5)
- pattern = "loop"
- elseif string.find(basename, "checker") then
- basename = string.sub(basename, 1, -8)
- pattern = "checker"
- end
-
- -- all that's left in `basename` now is the color.
-
- color = basename
- if color == "purple" then
- color = "violet"
- elseif color == "blue" then
- color = "azure"
- elseif color == "pink" then
- color = "magenta"
- elseif color == "black" and
- ( pattern == "square" or
- pattern == "tinted" ) then
- color = "dark_grey"
- end
-
- local paletteidx, _ = unifieddyes.getpaletteidx("unifieddyes:"..color, "extended")
- minetest.set_node(pos, { name = "blox:"..material.."_"..pattern, param2 = paletteidx })
- local meta = minetest.get_meta(pos)
- meta:set_string("dye", "unifieddyes:"..color)
- meta:set_string("palette", "ext")
- end
-})
-
-print("Blox Mod [" ..version.. "] Loaded!")
+--[[ +*********** +Blox +by Sanchez + +modified mapgen +by blert2112 +*********** +--]] + +blox = {} + +local version = "0.8" + +local BloxColours = { + "pink", + "yellow", + "white", + "orange", + "purple", + "blue", + "cyan", + "red", + "green", + "black", +} + +local NodeClass = { + "diamond", + "quarter", + "cross", + "checker", + "corner", + "loop", +} + +local NodeMaterial = { + "stone", + "wood", + "cobble", +} + +local moreblocks = minetest.get_modpath("moreblocks") + +-- Nodes + +minetest.register_node("blox:glowstone", { + description = "Glowstone", + tiles = {"blox_glowstone.png"}, + --inventory_image = "blox_glowstone.png", + light_propagates = true, + paramtype = "light", + sunlight_propagates = true, + light_source = 14, + is_ground_content = true, + groups = {cracky=2}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("blox:glowore", { + description = "Glow Ore", + tiles = {"default_stone.png^blox_glowore.png"}, + --inventory_image = {"default_stone.png^blox_glowore.png"}, + light_propagates = true, + paramtype = "light", + sunlight_propagates = false, + light_source = 8, + drop = { + max_items = 1, + items = { + { + items = {"blox:glowstone"}, + rarity = 15, + }, + { + items = {"blox:glowdust"}, + } + } + }, + is_ground_content = true, + groups = {cracky=2}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("blox:glowdust", { + description = "Glow Dust", + drawtype = "plantlike", + tiles = {"blox_glowdust.png"}, + inventory_image = "blox_glowdust.png", + light_propagates = true, + paramtype = "light", + sunlight_propagates = true, + light_source = 9, + walkable = false, + groups = {cracky=3, snappy=3}, + }) + +-- param2-colored nodes: standard patterns + +blox.old_89_color_nodes = {} + +for _, nodeclass in ipairs(NodeClass) do + + minetest.register_node("blox:stone_"..nodeclass, { + description = "Blox stone "..nodeclass, + tiles = { + { name = "default_stone.png", color = 0xffffffff }, + }, + overlay_tiles = { + "blox_stone_"..nodeclass..".png" + }, + palette = "unifieddyes_palette_extended.png", + paramtype = "light", + paramtype2 = "color", + is_ground_content = true, + groups = {cracky=3, ud_param2_colorable = 1}, + sounds = default.node_sound_stone_defaults(), + on_construct = unifieddyes.on_construct, + }) + + minetest.register_node("blox:cobble_"..nodeclass, { + description = "Blox cobble "..nodeclass, + tiles = { + { name = "default_cobble.png", color = 0xffffffff }, + }, + overlay_tiles = { + "blox_cobble_"..nodeclass..".png" + }, + palette = "unifieddyes_palette_extended.png", + paramtype = "light", + paramtype2 = "color", + is_ground_content = true, + groups = {cracky=3, ud_param2_colorable = 1}, + sounds = default.node_sound_stone_defaults(), + on_construct = unifieddyes.on_construct, + }) + + minetest.register_node("blox:wood_"..nodeclass, { + description = "Blox wood "..nodeclass, + tiles = { + { name = "default_wood.png", color = 0xffffffff }, + }, + overlay_tiles = { + "blox_wood_"..nodeclass..".png" + }, + palette = "unifieddyes_palette_extended.png", + paramtype = "light", + paramtype2 = "color", + is_ground_content = true, + groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2,flammable=3, ud_param2_colorable = 1}, + sounds = default.node_sound_wood_defaults(), + on_construct = unifieddyes.on_construct, + }) + + table.insert(blox.old_89_color_nodes, "blox:stone_"..nodeclass) + table.insert(blox.old_89_color_nodes, "blox:cobble_"..nodeclass) + table.insert(blox.old_89_color_nodes, "blox:wood_"..nodeclass) +end + +-- param2-colored nodes: tinted wood, cobble, stone, stone square + +minetest.register_node("blox:wood_tinted", { + description = "Blox tinted wood", + tiles = { "blox_wood_tinted.png" }, + palette = "unifieddyes_palette_extended.png", + paramtype = "light", + paramtype2 = "color", + is_ground_content = true, + groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2,flammable=3, ud_param2_colorable = 1}, + sounds = default.node_sound_wood_defaults(), + on_construct = unifieddyes.on_construct, +}) + +minetest.register_node("blox:stone_square", { + description = "Blox stone square", + tiles = { "blox_stone_square.png" }, + palette = "unifieddyes_palette_extended.png", + paramtype = "light", + paramtype2 = "color", + is_ground_content = true, + groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2,flammable=3, ud_param2_colorable = 1}, + sounds = default.node_sound_wood_defaults(), + on_construct = unifieddyes.on_construct, +}) + +minetest.register_node("blox:cobble_tinted", { + description = "Blox tinted cobble", + tiles = { "blox_cobble_tinted.png" }, + palette = "unifieddyes_palette_extended.png", + paramtype = "light", + paramtype2 = "color", + is_ground_content = true, + groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2,flammable=3, not_in_creative_inventory = 1, ud_param2_colorable = 1}, + sounds = default.node_sound_wood_defaults(), + on_construct = unifieddyes.on_construct, +}) + +minetest.register_node("blox:stone_tinted", { + description = "Blox tinted stone", + tiles = { "blox_stone_tinted.png" }, + palette = "unifieddyes_palette_extended.png", + paramtype = "light", + paramtype2 = "color", + is_ground_content = true, + groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2,flammable=3, not_in_creative_inventory = 1, ud_param2_colorable = 1}, + sounds = default.node_sound_wood_defaults(), + on_construct = unifieddyes.on_construct, + drop = { + items = { + {items = {"blox:cobble_tinted"}, inherit_color = true }, + } + } +}) + +table.insert(blox.old_89_color_nodes, "blox:wood_tinted") +table.insert(blox.old_89_color_nodes, "blox:stone_square") +table.insert(blox.old_89_color_nodes, "blox:cobble_tinted") +table.insert(blox.old_89_color_nodes, "blox:stone_tinted") + +-- Override default stone and default cobble + +minetest.override_item("default:stone_block", { + palette = "unifieddyes_palette_extended.png", + airbrush_replacement_node = "blox:stone_square", + groups = {cracky = 3, stone = 1, ud_param2_colorable = 1}, +}) + +minetest.override_item("default:stone", { + palette = "unifieddyes_palette_extended.png", + airbrush_replacement_node = "blox:stone_tinted", + groups = {cracky = 3, stone = 1, ud_param2_colorable = 1}, +}) + +minetest.override_item("default:cobble", { + palette = "unifieddyes_palette_extended.png", + airbrush_replacement_node = "blox:cobble_tinted", + groups = {cracky = 3, stone = 2, ud_param2_colorable = 1}, +}) + +-- override the Moreblocks nodes we use + +if moreblocks then + minetest.override_item("moreblocks:circle_stone_bricks", { + palette = "unifieddyes_palette_extended.png", + airbrush_replacement_node = "blox:stone_loop", + groups = {cracky = 3, ud_param2_colorable = 1}, + }) + + unifieddyes.register_color_craft({ + output = "blox:stone_loop", + type = "shapeless", + palette = "extended", + neutral_node = "moreblocks:circle_stone_bricks", + recipe = { + "NEUTRAL_NODE", + "MAIN_DYE" + } + }) + + minetest.override_item("moreblocks:iron_checker", { + palette = "unifieddyes_palette_extended.png", + airbrush_replacement_node = "blox:stone_checker", + groups = {cracky = 3, ud_param2_colorable = 1}, + }) + + unifieddyes.register_color_craft({ + output = "blox:stone_checker", + type = "shapeless", + palette = "extended", + neutral_node = "moreblocks:iron_checker", + recipe = { + "NEUTRAL_NODE", + "MAIN_DYE" + } + }) + + minetest.override_item("moreblocks:wood_tile", { + palette = "unifieddyes_palette_extended.png", + airbrush_replacement_node = "blox:wood_quarter", + groups = {wood = 1, snappy = 1, choppy = 2, oddly_breakable_by_hand = 2, flammable = 3, ud_param2_colorable = 1}, + }) + + unifieddyes.register_color_craft({ + output = "blox:wood_quarter", + type = "shapeless", + palette = "extended", + neutral_node = "moreblocks:wood_tile", + recipe = { + "NEUTRAL_NODE", + "MAIN_DYE" + } + }) + + minetest.override_item("moreblocks:wood_tile_flipped", { + palette = "unifieddyes_palette_extended.png", + airbrush_replacement_node = "blox:wood_quarter", + groups = {wood = 1, snappy = 1, choppy = 2, oddly_breakable_by_hand = 2, flammable = 3, ud_param2_colorable = 1}, + }) + + unifieddyes.register_color_craft({ + output = "blox:wood_quarter", + type = "shapeless", + palette = "extended", + neutral_node = "moreblocks:wood_tile_flipped", + recipe = { + "NEUTRAL_NODE", + "MAIN_DYE" + } + }) +end + +local dye_color = "dye:white" + +if minetest.get_modpath("coloredwood") then + minetest.register_craft({ + output = unifieddyes.make_colored_itemstack("blox:wood_tinted 4", "extended", dye_color), + recipe = { + { dye_color, "default:wood", dye_color }, + { "default:wood", "", "default:wood" }, + { dye_color, "default:wood", dye_color }, + } + }) + + unifieddyes.register_color_craft({ + output = "blox:wood_tinted", + type = "shapeless", + palette = "extended", + neutral_node = "blox:wood_tinted", + recipe = { + "NEUTRAL_NODE", + "MAIN_DYE" + } + }) + +else + minetest.override_item("default:wood", { + airbrush_replacement_node = "blox:wood_tinted", + groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2, wood = 1, ud_param2_colorable = 1}, + }) + + minetest.override_item("blox:wood_tinted", { + drop = "default:wood", + groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2,flammable=3, not_in_creative_inventory = 1, ud_param2_colorable = 1}, + }) + + unifieddyes.register_color_craft({ + output = "blox:wood_tinted", + type = "shapeless", + palette = "extended", + neutral_node = "default:wood", + recipe = { + "NEUTRAL_NODE", + "MAIN_DYE" + } + }) + +end + +-- Other crafts + +for _, nodeclass in ipairs(NodeClass) do + for _, material in ipairs(NodeMaterial) do + + local item = "blox:"..material.."_"..nodeclass + unifieddyes.register_color_craft({ + output = item, + type = "shapeless", + palette = "extended", + neutral_node = item, + recipe = { + "NEUTRAL_NODE", + "MAIN_DYE" + } + }) + end +end + +unifieddyes.register_color_craft({ + output = "blox:stone_square", + type = "shapeless", + palette = "extended", + neutral_node = "default:stone_block", + recipe = { + "NEUTRAL_NODE", + "MAIN_DYE" + } +}) + +unifieddyes.register_color_craft({ + output = "blox:stone_square", + type = "shapeless", + palette = "extended", + neutral_node = "blox:stone_square", + recipe = { + "NEUTRAL_NODE", + "MAIN_DYE" + } +}) + +unifieddyes.register_color_craft({ + output = "blox:cobble_tinted", + type = "shapeless", + palette = "extended", + neutral_node = "default:cobble", + recipe = { + "NEUTRAL_NODE", + "MAIN_DYE" + } +}) + +unifieddyes.register_color_craft({ + output = "blox:cobble_tinted", + type = "shapeless", + palette = "extended", + neutral_node = "blox:cobble_tinted", + recipe = { + "NEUTRAL_NODE", + "MAIN_DYE" + } +}) + +unifieddyes.register_color_craft({ + output = "blox:stone_tinted", + type = "shapeless", + palette = "extended", + neutral_node = "default:stone", + recipe = { + "NEUTRAL_NODE", + "MAIN_DYE" + } +}) + +unifieddyes.register_color_craft({ + output = "blox:stone_tinted", + type = "shapeless", + palette = "extended", + neutral_node = "blox:stone_tinted", + recipe = { + "NEUTRAL_NODE", + "MAIN_DYE" + } +}) + + +minetest.register_craft({ + output = 'blox:glowstone 2', + recipe = { + {"", 'blox:glowdust', ""}, + {'blox:glowdust', 'default:stone', 'blox:glowdust'}, + {"", 'blox:glowdust', ""}, + } +}) + +for _, material in ipairs(NodeMaterial) do + + local def_mat = "default:"..material + + unifieddyes.register_color_craft({ + output = "blox:"..material.."_diamond 4", + palette = "extended", + neutral_node = def_mat, + recipe = { + { "NEUTRAL_NODE", "MAIN_DYE", "NEUTRAL_NODE" }, + { "MAIN_DYE", "", "MAIN_DYE" }, + { "NEUTRAL_NODE", "MAIN_DYE", "NEUTRAL_NODE" } + } + }) + + if not (moreblocks and material == "wood") then + unifieddyes.register_color_craft({ + output = "blox:"..material.."_quarter 4", + palette = "extended", + neutral_node = def_mat, + recipe = { + { "MAIN_DYE", "NEUTRAL_NODE" }, + { "NEUTRAL_NODE", "MAIN_DYE" }, + } + }) + end + + unifieddyes.register_color_craft({ + output = "blox:"..material.."_cross 4", + palette = "extended", + neutral_node = def_mat, + recipe = { + { "NEUTRAL_NODE", "", "NEUTRAL_NODE" }, + { "", "MAIN_DYE", "" }, + { "NEUTRAL_NODE", "", "NEUTRAL_NODE" } + } + }) + + unifieddyes.register_color_craft({ + output = "blox:"..material.."_corner 4", + palette = "extended", + neutral_node = def_mat, + recipe = { + { "MAIN_DYE", "", "MAIN_DYE" }, + { "", "NEUTRAL_NODE", "" }, + { "MAIN_DYE", "", "MAIN_DYE" } + } + }) + + if not (moreblocks and material == "stone") then + + unifieddyes.register_color_craft({ + output = "blox:"..material.."_checker 6", + palette = "extended", + neutral_node = def_mat, + recipe = { + { "NEUTRAL_NODE", "MAIN_DYE", "NEUTRAL_NODE" }, + { "MAIN_DYE", "NEUTRAL_NODE", "MAIN_DYE" }, + { "NEUTRAL_NODE", "MAIN_DYE", "NEUTRAL_NODE" } + } + }) + + unifieddyes.register_color_craft({ + output = "blox:"..material.."_checker 8", + palette = "extended", + neutral_node = def_mat, + recipe = { + { "MAIN_DYE", "NEUTRAL_NODE", "MAIN_DYE" }, + { "NEUTRAL_NODE", "MAIN_DYE", "NEUTRAL_NODE" }, + { "MAIN_DYE", "NEUTRAL_NODE", "MAIN_DYE" } + } + }) + + unifieddyes.register_color_craft({ + output = "blox:"..material.."_loop 6", + palette = "extended", + neutral_node = def_mat, + recipe = { + { "NEUTRAL_NODE", "NEUTRAL_NODE", "NEUTRAL_NODE" }, + { "NEUTRAL_NODE", "MAIN_DYE", "NEUTRAL_NODE" }, + { "NEUTRAL_NODE", "NEUTRAL_NODE", "NEUTRAL_NODE" }, + } + }) + + end +end + +--Fuel + +for _, nodeclass in ipairs(NodeClass) do + minetest.register_craft({ + type = "fuel", + recipe = "blox:wood_"..nodeclass, + burntime = 7, + }) +end + +minetest.register_craft({ + type = "fuel", + recipe = "blox:wood_tinted", + burntime = 7, +}) + +-- Tools + +minetest.register_tool("blox:bloodbane", { + description = "Blood Bane", + inventory_image = "blox_bloodbane.png", + tool_capabilities = { + full_punch_interval = 0.2, + max_drop_level=1, + groupcaps={ + fleshy={times={[1]=0.001, [2]=0.001, [3]=0.001}, uses=0, maxlevel=3}, + snappy={times={[1]=0.01, [2]=0.01, [3]=0.01}, uses=0, maxlevel=3}, + crumbly={times={[1]=0.01, [2]=0.01, [3]=0.01}, uses=0, maxlevel=3}, + cracky={times={[1]=0.01, [2]=0.01, [3]=0.01}, uses=0, maxlevel=3}, + choppy={times={[1]=0.01, [2]=0.01, [3]=0.01}, uses=0, maxlevel=3} + }, + damage_groups = {fleshy=200}, + } +}) + +-- Ores + +local sea_level = 1 + +minetest.register_on_mapgen_init(function(mapgen_params) + sea_level = mapgen_params.water_level +end) + +minetest.register_ore({ + ore_type = "scatter", + ore = "blox:glowore", + wherein = "default:stone", + clust_scarcity = 36 * 36 * 36, + clust_num_ores = 3, + clust_size = 2, + y_min = sea_level, + y_max = 31000, +}) + +minetest.register_ore({ + ore_type = "scatter", + ore = "blox:glowore", + wherein = "default:stone", + clust_scarcity = 14 * 14 * 14, + clust_num_ores = 5, + clust_size = 3, + y_min = sea_level - 30, + y_max = sea_level + 20, +}) + +minetest.register_ore({ + ore_type = "scatter", + ore = "blox:glowore", + wherein = "default:stone", + clust_scarcity = 36 * 36 * 36, + clust_num_ores = 3, + clust_size = 2, + y_min = -31000, + y_max = sea_level - 1, +}) + +print("Blox Mod [" ..version.. "] Loaded!") diff --git a/castle_storage/crate.lua b/castle_storage/crate.lua index e370b87..e0e697f 100644 --- a/castle_storage/crate.lua +++ b/castle_storage/crate.lua @@ -20,7 +20,8 @@ minetest.register_node("castle_storage:crate", { default.gui_bg_img .. default.gui_slots .. "list[current_name;main;0,0;8,5;]".. - "list[current_player;main;0,5;8,4;]") + "list[current_player;main;0,5;8,4;]".. + "listring[]") meta:set_string("infotext", S("Crate")) local inv = meta:get_inventory() inv:set_size("main", 8*4) @@ -56,4 +57,4 @@ if minetest.get_modpath("hopper") and hopper ~= nil and hopper.add_container ~= {"side", "castle_storage:crate", "main"}, {"bottom", "castle_storage:crate", "main"}, }) -end
\ No newline at end of file +end diff --git a/castle_storage/ironbound_chest.lua b/castle_storage/ironbound_chest.lua index c042244..7cc8c89 100644 --- a/castle_storage/ironbound_chest.lua +++ b/castle_storage/ironbound_chest.lua @@ -12,7 +12,8 @@ local get_ironbound_chest_formspec = function(pos) default.gui_bg_img .. default.gui_slots .. "list[nodemeta:".. spos .. ";main;,0;8,4;]".. - "list[current_player;main;,5;8,4;]" + "list[current_player;main;,5;8,4;]".. + "listring[]" return formspec end @@ -140,4 +141,4 @@ if minetest.get_modpath("hopper") and hopper ~= nil and hopper.add_container ~= {"side", "castle_storage:ironbound_chest", "main"}, {"bottom", "castle_storage:ironbound_chest", "main"}, }) -end
\ No newline at end of file +end diff --git a/concrete/locale/pl.txt b/concrete/locale/pl.txt new file mode 100644 index 0000000..3b2e6f5 --- /dev/null +++ b/concrete/locale/pl.txt @@ -0,0 +1,10 @@ +# Polish Translation for technic_concrete +# Polskie tłumaczenie technic_concrete +# by mat9117 + +Rebar = Pręt zbrojeniowy +Concrete Block = Blok betonu +Blast-resistant Concrete Block = Przeciwwybuchowy blok betonu +Concrete Post Platform = Betonowa platforma +Concrete Post = Betonowy słup + diff --git a/cottages/init.lua b/cottages/init.lua index b6c412b..3874218 100644 --- a/cottages/init.lua +++ b/cottages/init.lua @@ -4,6 +4,8 @@ -- License: GPLv3 -- -- Modified: +-- 11.03.19 Adjustments for MT 5.x +-- cottages_feldweg_mode is now a setting in minetest.conf -- 27.07.15 Moved into its own repository. -- Made sure textures and craft receipe indigrents are available or can be replaced. -- Took care of "unregistered globals" warnings. diff --git a/cottages/nodes_feldweg.lua b/cottages/nodes_feldweg.lua index d81cc02..9205952 100644 --- a/cottages/nodes_feldweg.lua +++ b/cottages/nodes_feldweg.lua @@ -15,8 +15,14 @@ local S = cottages.S -- * flat: each node is a full node; junction, t-junction and corner are included -- * nodebox: like flat - except that each node has a nodebox that fits to that road node -- * mesh: like nodebox - except that it uses a nice roundish model -if( not( cottages_feldweg_mode )) then +local cottages_feldweg_mode = minetest.settings:get("cottages_feldweg_mode") +if( cottages_feldweg_mode ~= "mesh" + and cottages_feldweg_mode ~= "flat" + and cottages_feldweg_mode ~= "nodebox" + and cottages_feldweg_mode ~= "flat") then cottages_feldweg_mode = "mesh"; + -- add the setting to the minetest.conf so that the player can set it there + minetest.settings:set("cottages_feldweg_mode", "mesh") end local function register_recipes(include_end) diff --git a/cottages/nodes_furniture.lua b/cottages/nodes_furniture.lua index 5705c76..65e229d 100644 --- a/cottages/nodes_furniture.lua +++ b/cottages/nodes_furniture.lua @@ -393,7 +393,7 @@ cottages.sit_on_bench = function( pos, node, clicker, itemstack, pointed_thing ) if( animation and animation.animation=="sit") then default.player_attached[pname] = false - clicker:setpos({x=pos.x,y=pos.y-0.5,z=pos.z}) + clicker:set_pos({x=pos.x,y=pos.y-0.5,z=pos.z}) clicker:set_eye_offset({x=0,y=0,z=0}, {x=0,y=0,z=0}) clicker:set_physics_override(1, 1, 1) default.player_set_animation(clicker, "stand", 30) @@ -411,7 +411,7 @@ cottages.sit_on_bench = function( pos, node, clicker, itemstack, pointed_thing ) end clicker:set_eye_offset({x=0,y=-7,z=2}, {x=0,y=0,z=0}) - clicker:setpos( p2 ) + clicker:set_pos( p2 ) default.player_set_animation(clicker, "sit", 30) clicker:set_physics_override(0, 0, 0) default.player_attached[pname] = true @@ -441,7 +441,7 @@ cottages.sleep_in_bed = function( pos, node, clicker, itemstack, pointed_thing ) -- let players get back up if( animation and animation.animation=="lay" ) then default.player_attached[pname] = false - clicker:setpos({x=pos.x,y=pos.y-0.5,z=pos.z}) + clicker:set_pos({x=pos.x,y=pos.y-0.5,z=pos.z}) clicker:set_eye_offset({x=0,y=0,z=0}, {x=0,y=0,z=0}) clicker:set_physics_override(1, 1, 1) default.player_set_animation(clicker, "stand", 30) @@ -542,7 +542,7 @@ cottages.sleep_in_bed = function( pos, node, clicker, itemstack, pointed_thing ) -- no sleeping on this place else default.player_attached[pname] = false - clicker:setpos({x=pos.x,y=pos.y-0.5,z=pos.z}) + clicker:set_pos({x=pos.x,y=pos.y-0.5,z=pos.z}) clicker:set_eye_offset({x=0,y=0,z=0}, {x=0,y=0,z=0}) clicker:set_physics_override(1, 1, 1) default.player_set_animation(clicker, "stand", 30) @@ -553,7 +553,7 @@ cottages.sleep_in_bed = function( pos, node, clicker, itemstack, pointed_thing ) clicker:set_eye_offset({x=0,y=-7,z=2}, {x=0,y=0,z=0}) - clicker:setpos( p ); + clicker:set_pos( p ); default.player_set_animation(clicker, new_animation, 30) clicker:set_physics_override(0, 0, 0) default.player_attached[pname] = true diff --git a/cottages/nodes_pitchfork.lua b/cottages/nodes_pitchfork.lua index 666393a..8e0cad9 100644 --- a/cottages/nodes_pitchfork.lua +++ b/cottages/nodes_pitchfork.lua @@ -30,9 +30,9 @@ minetest.register_tool("cottages:pitchfork", { full_punch_interval = 1.0, max_drop_level=1, groupcaps={ - fleshy={times={[2]=0.80, [3]=0.40}, maxwear=0.05, maxlevel=1, uses=40}, - snappy={times={[2]=0.80, [3]=0.40}, maxwear=0.05, maxlevel=1, uses=40}, - hay ={times={[2]=0.10, [3]=0.10}, maxwear=0.05, maxlevel=1, uses=40}, + fleshy={times={[2]=0.80, [3]=0.40}, maxlevel=1, uses=1/0.002 }, + snappy={times={[2]=0.80, [3]=0.40}, maxlevel=1, uses=1/0.002 }, + hay ={times={[2]=0.10, [3]=0.10}, maxlevel=1, uses=1/0.002 }, }, damage_groups = {fleshy=5}, -- slightly stronger than a stone sword }, @@ -73,7 +73,7 @@ minetest.register_node("cottages:pitchfork_placed", { paramtype = "light", paramtype2 = "facedir", is_ground_content = false, - groups = {snappy = 2, dig_immediate = 3, falling_node = 1, attached_node = 1}, + groups = {snappy = 2, dig_immediate = 3, falling_node = 1, attached_node = 1, not_in_creative_inventory=1}, sounds = cottages.sounds.wood, node_box = { type = "fixed", diff --git a/cottages/nodes_water.lua b/cottages/nodes_water.lua index c2bb118..44e4119 100644 --- a/cottages/nodes_water.lua +++ b/cottages/nodes_water.lua @@ -202,7 +202,8 @@ minetest.register_node("cottages:water_gen", { return stack:get_count() end, allow_metadata_inventory_take = function(pos, listname, index, stack, player) - if not(cottages.player_can_use(meta:get_string(pos), player)) then + local meta = minetest.get_meta(pos) + if not(cottages.player_can_use(meta, player)) then return 0 end return stack:get_count() diff --git a/extranodes/locale/pl.txt b/extranodes/locale/pl.txt new file mode 100644 index 0000000..f15bcf5 --- /dev/null +++ b/extranodes/locale/pl.txt @@ -0,0 +1,9 @@ +# Polish Translation for technic_extranodes +# Polskie tłumaczenie technic_extranodes +# by mat9117 + +Marble = Marmur +Marble Bricks = Marmurowe cegły +Granite = Granit +Concrete = Beton + diff --git a/farming/crops/potato.lua b/farming/crops/potato.lua index 1547fc0..256ce97 100644 --- a/farming/crops/potato.lua +++ b/farming/crops/potato.lua @@ -14,7 +14,16 @@ minetest.register_craftitem("farming:potato", { on_place = function(itemstack, placer, pointed_thing) return farming.place_seed(itemstack, placer, pointed_thing, "farming:potato_1") end, - on_use = minetest.item_eat(1), +-- on_use = minetest.item_eat(1), + on_use = function(itemstack, user, pointed_thing) + if user then + if math.random(1, 3) == 1 then + return minetest.do_item_eat(-1, nil, itemstack, user, pointed_thing) + else + return minetest.do_item_eat(1, nil, itemstack, user, pointed_thing) + end + end + end, }) -- baked potato diff --git a/farming/hoes.lua b/farming/hoes.lua index 6ffa98f..430d0f7 100644 --- a/farming/hoes.lua +++ b/farming/hoes.lua @@ -433,7 +433,7 @@ minetest.register_tool("farming:scythe_mithril", { -- Run script hook for _, callback in pairs(core.registered_on_dignodes) do - callback(pos, node) + callback(pos, node, placer) end -- play sound diff --git a/gloopblocks/init.lua b/gloopblocks/init.lua index 52eeaa2..aed5b44 100644 --- a/gloopblocks/init.lua +++ b/gloopblocks/init.lua @@ -1,916 +1,916 @@ ---[[
-GloopBlocks
-Originally written by GloopMaster
-
-Maintained by VanessaE.
-
---]]
-
--- Load support for intllib.
-local MP = minetest.get_modpath(minetest.get_current_modname())
-local S, NS = dofile(MP.."/intllib.lua")
-
--- Nodes
-
-minetest.register_node("gloopblocks:rainbow_block_diagonal", {
- description = S("Diagonal Rainbow Block"),
- tiles = {"gloopblocks_rainbow_block.png"},
- is_ground_content = true,
- groups = {cracky=3},
- sounds = default.node_sound_defaults(),
-})
-minetest.register_alias("gloopblocks:rainbow_block", "gloopblocks:rainbow_block_diagonal")
-
-minetest.register_node("gloopblocks:rainbow_block_horizontal", {
- description = S("Horizontal Rainbow Block"),
- tiles = {
- "gloopblocks_rainbow_horizontal.png^[transformR90",
- "gloopblocks_rainbow_horizontal.png^[transformR90",
- "gloopblocks_rainbow_horizontal.png"
- },
- paramtype = "light",
- light_source = default.LIGHT_MAX,
- paramtype2 = "facedir",
- groups = {cracky = 2},
- is_ground_content = false,
- sounds = default.node_sound_defaults(),
-})
-
-if not minetest.setting_getbool("pbj_pup_alias_nyancat") then
- if not minetest.registered_nodes["nyancat:nyancat_rainbow"] then
- minetest.register_alias("nyancat:nyancat_rainbow", "gloopblocks:rainbow_block_horizontal")
- elseif not minetest.registered_nodes["default:nyancat_rainbow"] then
- minetest.register_alias("default:nyancat_rainbow", "gloopblocks:rainbow_block_horizontal")
- end
-end
-
-minetest.register_node("gloopblocks:evil_block", {
- description = S("Evil Block"),
- tiles = {"gloopblocks_evil_block.png"},
- light_source = 5,
- is_ground_content = true,
- groups = {cracky=2},
- sounds = default.node_sound_stone_defaults(),
-})
-
-minetest.register_node("gloopblocks:basalt", {
- description = S("Basalt"),
- tiles = {"gloopblocks_basalt.png"},
- groups = {cracky=2},
- sounds = default.node_sound_stone_defaults(),
-})
-
-minetest.register_node("gloopblocks:pumice", {
- description = S("Pumice"),
- tiles = {"gloopblocks_pumice.png"},
- groups = {cracky=3},
- sounds = default.node_sound_stone_defaults(),
-})
-
-
-minetest.register_node("gloopblocks:pavement", {
- description = S("Pavement"),
- tiles = {"gloopblocks_pavement.png"},
- groups = {cracky=3, oddly_breakable_by_hand=3},
- sounds = default.node_sound_stone_defaults(),
-})
-
-minetest.register_node("gloopblocks:oerkki_block", {
- drawtype = "nodebox",
- description = S("Oerkki Block"),
- paramtype = "light",
- paramtype2 = "facedir",
- tiles = {
- "gloopblocks_oerkkiblock_tb.png",
- "gloopblocks_oerkkiblock_tb.png",
- "gloopblocks_oerkkiblock_sides.png",
- "gloopblocks_oerkkiblock_sides.png",
- "gloopblocks_oerkkiblock_sides.png",
- "gloopblocks_oerkkiblock_front.png"
- },
- groups = {cracky=3, oddly_breakable_by_hand=3},
- sounds = default.node_sound_stone_defaults(),
- selection_box = {
- type = "fixed",
- fixed = { -0.5, -0.5, -0.5, 0.5, 0.5, 0.5 }
- },
- node_box = {
- type = "fixed",
- fixed = {
- {-0.5, -0.5, -0.1875, 0.5, 0.5, 0.1875}, -- NodeBox1
- {-0.5, -0.5, -0.5, -0.4375, 0.5, 0.5}, -- NodeBox2
- {0.4375, -0.5, -0.5, 0.5, 0.5, 0.5}, -- NodeBox3
- {-0.5, 0.4375, -0.5, 0.5, 0.5, 0.5}, -- NodeBox4
- {-0.5, -0.5, -0.5, 0.5, -0.4375, 0.5}, -- NodeBox5
- {-0.5, -0.0625, -0.5, 0.5, 0.0625, 0.5}, -- NodeBox6
- }
- }
-})
-
-minetest.register_node("gloopblocks:stone_brick_mossy", {
- description = S("Mossy Stone Brick"),
- tiles = {"gloopblocks_stone_brick_mossy.png"},
- groups = {cracky=3, stone=1},
- sounds = default.node_sound_stone_defaults(),
-})
-
-minetest.register_node("gloopblocks:stone_mossy", {
- description = S("Mossy Stone"),
- tiles = {"gloopblocks_stone_mossy.png"},
- groups = {cracky=3, stone=1},
- sounds = default.node_sound_stone_defaults(),
- drop = "default:mossycobble"
-})
-
-minetest.register_node("gloopblocks:cobble_road", {
- description = S("Cobblestone Road Bed"),
- tiles = {"gloopblocks_cobble_road.png"},
- groups = {cracky=3, stone=1},
- sounds = default.node_sound_stone_defaults(),
-})
-
-minetest.register_node("gloopblocks:cobble_road_mossy", {
- description = S("Mossy Cobblestone Road Bed"),
- tiles = {"gloopblocks_cobble_road_mossy.png"},
- groups = {cracky=3, stone=1},
- sounds = default.node_sound_stone_defaults(),
-})
-
-minetest.register_node("gloopblocks:scaffolding", {
- description = S("Wooden Scaffold"),
- drawtype = "allfaces",
- paramtype = "light",
- sunlight_propagates = true,
- tiles = {"gloopblocks_scaffold.png"},
- groups = {choppy=3, oddly_breakable_by_hand=3},
- sounds = default.node_sound_wood_defaults(),
-})
-
-minetest.register_alias("moreblocks:oerkkiblock", "gloopblocks:oerkki_block")
-minetest.register_alias("gloopblocks:obsidian", "default:obsidian")
-
--- Nodes imported from Usesdirt ================================================================================
-
-if not minetest.get_modpath("usesdirt") then
-
- local dirt_brick_tex = "default_dirt.png^gloopblocks_dirt_brick_overlay.png"
- local dirt_cobble_tex = "default_cobble.png^(default_dirt.png^[mask:gloopblocks_dirt_cobble_mask.png)"
- local dirt_stone_tex = "default_stone.png^(default_dirt.png^[mask:gloopblocks_dirt_stone_mask.png)"
-
- local dirt_ladder_tex = "(default_dirt.png^[mask:gloopblocks_ladder_mask.png)^gloopblocks_ladder_overlay.png"
- local dirt_brick_ladder_tex = "(("..dirt_brick_tex..")^[mask:gloopblocks_ladder_mask.png)^gloopblocks_ladder_overlay.png"
- local dirt_cobble_ladder_tex = "(("..dirt_cobble_tex..")^[mask:gloopblocks_ladder_mask.png)^gloopblocks_ladder_overlay.png"
- local dirt_stone_ladder_tex = "(("..dirt_stone_tex..")^[mask:gloopblocks_ladder_mask.png)^gloopblocks_ladder_overlay.png"
-
- minetest.register_node(":usesdirt:dirt_brick", {
- tiles = { dirt_brick_tex },
- description = "Dirt Brick",
- groups = {snappy=2,choppy=1,oddly_breakable_by_hand=2},
- })
-
- minetest.register_node(":usesdirt:dirt_brick_ladder", {
- description = "Dirt Brick Ladder",
- drawtype = "signlike",
- tiles = { dirt_brick_ladder_tex },
- inventory_image = dirt_brick_ladder_tex,
- wield_image = dirt_brick_ladder_tex,
- paramtype = "light",
- paramtype2 = "wallmounted",
- is_ground_content = true,
- walkable = false,
- climbable = true,
- selection_box = {
- type = "wallmounted",
- --wall_top = = <default>
- --wall_bottom = = <default>
- --wall_side = = <default>
- },
- groups = {cracky=3, stone=2},
- legacy_wallmounted = true,
- })
- minetest.register_craft({
- output = 'usesdirt:dirt_brick_ladder 3',
- recipe = {
- {'usesdirt:dirt_brick', '', 'usesdirt:dirt_brick'},
- {'usesdirt:dirt_brick', 'usesdirt:dirt_brick','usesdirt:dirt_brick'},
- {'usesdirt:dirt_brick','','usesdirt:dirt_brick'},
- }
- })
-
- default.register_fence(":usesdirt:dirt_brick_fence", {
- description = "Dirt Brick Fence",
- texture = dirt_brick_tex,
- inventory_image = "default_fence_overlay.png^("..dirt_brick_tex..")^default_fence_overlay.png^[makealpha:255,126,126",
- wield_image = "default_fence_overlay.png^("..dirt_brick_tex..")^default_fence_overlay.png^[makealpha:255,126,126",
- material = "usesdirt:dirt_brick",
- groups = {cracky=3, stone=2},
- sounds = default.node_sound_stone_defaults()
- })
-
- if minetest.get_modpath("moreblocks") then
- minetest.register_craft({
- output = 'usesdirt:dirt_brick 24',
- recipe = {
- {'moreblocks:dirt_compressed', 'moreblocks:dirt_compressed', '' },
- {'moreblocks:dirt_compressed', 'moreblocks:dirt_compressed', '' }
- }
- })
- else
- minetest.register_craft({
- output = 'usesdirt:dirt_brick 6',
- recipe = {
- {'default:dirt', 'default:dirt', 'default:dirt'},
- {'default:dirt', 'default:dirt', 'default:dirt'},
- {'default:dirt', 'default:dirt', 'default:dirt'},
- }
- })
- end
-
- minetest.register_node(":usesdirt:dirt_ladder", {
- description = "Dirt Ladder",
- drawtype = "signlike",
- tiles = { dirt_ladder_tex },
- inventory_image = dirt_ladder_tex,
- wield_image = dirt_ladder_tex,
- paramtype = "light",
- paramtype2 = "wallmounted",
- is_ground_content = true,
- walkable = false,
- climbable = true,
- selection_box = {
- type = "wallmounted",
- --wall_top = = <default>
- --wall_bottom = = <default>
- --wall_side = = <default>
- },
- groups = {snappy=2,choppy=2,oddly_breakable_by_hand=3},
- legacy_wallmounted = true,
- })
- minetest.register_craft({
- output = 'usesdirt:dirt_ladder 3',
- recipe = {
- {'usesdirt:dirt_brick', '', 'usesdirt:dirt_brick'},
- {'usesdirt:dirt_brick', 'usesdirt:dirt_brick','usesdirt:dirt_brick'},
- {'usesdirt:dirt_brick','','usesdirt:dirt_brick'},
- }
- })
-
- default.register_fence(":usesdirt:dirt_fence", {
- description = "Dirt Fence",
- texture = "default_dirt.png",
- inventory_image = "default_fence_overlay.png^default_dirt.png^default_fence_overlay.png^[makealpha:255,126,126",
- wield_image = "default_fence_overlay.png^default_dirt.png^default_fence_overlay.png^[makealpha:255,126,126",
- material = "default:dirt",
- groups = {snappy=2,choppy=1,oddly_breakable_by_hand=3},
- sounds = default.node_sound_dirt_defaults()
- })
-
-----
-
- minetest.register_node(":usesdirt:dirt_cobble_stone", {
- tiles = { dirt_cobble_tex },
- description = "Dirt Cobble Stone",
- is_ground_content = true,
- groups = {cracky=3, stone=2},
- })
- minetest.register_craft({
- output = '"usesdirt:dirt_cobble_stone" 3',
- recipe = {
- {'usesdirt:dirt_brick', 'usesdirt:dirt_brick', 'usesdirt:dirt_brick'},
- {'usesdirt:dirt_brick', 'usesdirt:dirt_brick', 'usesdirt:dirt_brick'},
- {'usesdirt:dirt_brick', 'usesdirt:dirt_brick', 'usesdirt:dirt_brick'},
- }
- })
-
- minetest.register_node(":usesdirt:dirt_cobble_stone_ladder", {
- description = "Dirt Cobble Stone Ladder",
- drawtype = "signlike",
- tiles = { dirt_cobble_ladder_tex },
- inventory_image = dirt_cobble_ladder_tex,
- wield_image = dirt_cobble_ladder_tex,
- paramtype = "light",
- paramtype2 = "wallmounted",
- is_ground_content = true,
- walkable = false,
- climbable = true,
- selection_box = {
- type = "wallmounted",
- --wall_top = = <default>
- --wall_bottom = = <default>
- --wall_side = = <default>
- },
- groups = {cracky=3, stone=2},
- legacy_wallmounted = true,
- })
- minetest.register_craft({
- output = 'usesdirt:dirt_cobble_stone_ladder 3',
- recipe = {
- {'usesdirt:dirt_cobble_stone', '', 'usesdirt:dirt_cobble_stone'},
- {'usesdirt:dirt_cobble_stone', 'usesdirt:dirt_cobble_stone','usesdirt:dirt_cobble_stone'},
- {'usesdirt:dirt_cobble_stone','','usesdirt:dirt_cobble_stone'},
- }
- })
-
- default.register_fence(":usesdirt:dirt_cobble_stone_fence", {
- description = "Dirt Cobble Stone Fence",
- texture = dirt_cobble_tex,
- inventory_image = "default_fence_overlay.png^("..dirt_cobble_tex..")^default_fence_overlay.png^[makealpha:255,126,126",
- wield_image = "default_fence_overlay.png^("..dirt_cobble_tex..")^default_fence_overlay.png^[makealpha:255,126,126",
- material = "usesdirt:dirt_cobble_stone",
- groups = {cracky=3, stone=2},
- sounds = default.node_sound_stone_defaults()
- })
-
-----
-
- minetest.register_node(":usesdirt:dirt_stone", {
- tiles = { dirt_stone_tex },
- description = "Dirt Stone",
- is_ground_content = true,
- groups = {cracky=3, stone=2},
- })
-
- minetest.register_node(":usesdirt:dirt_stone_ladder", {
- description = "Dirt Stone Ladder",
- drawtype = "signlike",
- tiles = { dirt_stone_ladder_tex },
- inventory_image = dirt_stone_ladder_tex,
- wield_image = dirt_stone_ladder_tex,
- paramtype = "light",
- paramtype2 = "wallmounted",
- is_ground_content = true,
- walkable = false,
- climbable = true,
- selection_box = {
- type = "wallmounted",
- --wall_top = = <default>
- --wall_bottom = = <default>
- --wall_side = = <default>
- },
- groups = {cracky=3, stone=2},
- legacy_wallmounted = true,
- })
- minetest.register_craft({
- output = 'usesdirt:dirt_stone_ladder 3',
- recipe = {
- {'usesdirt:dirt_stone', '', 'usesdirt:dirt_stone'},
- {'usesdirt:dirt_stone', 'usesdirt:dirt_stone','usesdirt:dirt_stone'},
- {'usesdirt:dirt_stone','','usesdirt:dirt_stone'},
- }
- })
-
- default.register_fence(":usesdirt:dirt_stone_fence", {
- description = "Dirt Stone Fence",
- texture = dirt_stone_tex,
- inventory_image = "default_fence_overlay.png^("..dirt_stone_tex..")^default_fence_overlay.png^[makealpha:255,126,126",
- wield_image = "default_fence_overlay.png^("..dirt_stone_tex..")^default_fence_overlay.png^[makealpha:255,126,126",
- material = "usesdirt:dirt_stone",
- groups = {cracky=3, stone=2},
- sounds = default.node_sound_stone_defaults()
- })
-end
-
--- Stairs/slabs defs, conversion of normal -> mossy items
-
-if minetest.setting_getbool("gloopblocks_mossy_conversion") ~= false then
-
- function gloopblocks_register_mossy_conversion(mossyobjects)
- for i in ipairs(mossyobjects) do
- minetest.register_abm({
- nodenames = { mossyobjects[i][1] },
- neighbors = {"default:water_source", "default:water_flowing"},
- interval = 120,
- chance = 50,
- action = function(pos, node)
- if minetest.find_node_near(pos, 2, "air") then
- local fdir = node.param2
- minetest.add_node(pos, {name = mossyobjects[i][2], param2 = fdir})
- end
- end,
- })
- end
- end
-end
-
-if minetest.get_modpath("moreblocks") then
-
- stairsplus:register_all("gloopblocks", "oerkki_block", "gloopblocks:oerkki_block", {
- description = S("Oerkki Block"),
- tiles = {
- "gloopblocks_oerkkiblock_tb.png",
- "gloopblocks_oerkkiblock_tb.png",
- "gloopblocks_oerkkiblock_sides.png",
- "gloopblocks_oerkkiblock_sides.png",
- "gloopblocks_oerkkiblock_sides.png",
- "gloopblocks_oerkkiblock_front.png"
- },
- groups = {cracky=2, not_in_creative_inventory=1},
- sounds = default.node_sound_stone_defaults(),
- sunlight_propagates = true,
- })
-
- stairsplus:register_all("gloopblocks", "stone_brick_mossy", "gloopblocks:stone_brick_mossy", {
- description = S("Mossy Stone Brick"),
- tiles = {"gloopblocks_stone_brick_mossy.png"},
- groups = {cracky=1, not_in_creative_inventory=1},
- sounds = default.node_sound_stone_defaults(),
- sunlight_propagates = true,
- })
-
- stairsplus:register_all("gloopblocks", "stone_mossy", "gloopblocks:stone_mossy", {
- description = S("Mossy Stone"),
- tiles = {"gloopblocks_stone_mossy.png"},
- groups = {cracky=1, not_in_creative_inventory=1},
- sounds = default.node_sound_stone_defaults(),
- sunlight_propagates = true,
- })
-
- stairsplus:register_all("gloopblocks", "cobble_road", "gloopblocks:cobble_road", {
- description = S("Cobblestone Roadbed"),
- tiles = {"gloopblocks_cobble_road.png"},
- groups = {cracky=3, stone=1, not_in_creative_inventory=1},
- sounds = default.node_sound_stone_defaults(),
- sunlight_propagates = true,
- })
-
- stairsplus:register_all("gloopblocks", "cobble_road_mossy", "gloopblocks:cobble_road_mossy", {
- description = S("Mossy Cobblestone Roadbed"),
- tiles = {"gloopblocks_cobble_road_mossy.png"},
- groups = {cracky=3, stone=1, not_in_creative_inventory=1},
- sounds = default.node_sound_stone_defaults(),
- sunlight_propagates = true,
- })
-
- stairsplus:register_all("gloopblocks", "pavement", "gloopblocks:pavement", {
- description = S("Pavement"),
- tiles = {"gloopblocks_pavement.png"},
- groups = {cracky=2, not_in_creative_inventory=1},
- sounds = default.node_sound_stone_defaults(),
- sunlight_propagates = true,
- })
-
- stairsplus:register_all("gloopblocks", "rainbow_block", "gloopblocks:rainbow_block", {
- description = S("Rainbow Block"),
- tiles = {"gloopblocks_rainbow_block.png"},
- groups = {cracky=3, not_in_creative_inventory=1},
- sounds = default.node_sound_defaults(),
- sunlight_propagates = true,
- })
-
- stairsplus:register_all("gloopblocks", "evil_block", "gloopblocks:evil_block", {
- description = S("Evil Block"),
- tiles = {"gloopblocks_evil_block.png"},
- groups = {cracky=3, not_in_creative_inventory=1},
- sounds = default.node_sound_defaults(),
- light_source = 5,
- sunlight_propagates = true,
- })
-
- stairsplus:register_all("gloopblocks", "basalt", "gloopblocks:basalt", {
- description = S("Basalt"),
- tiles = {"gloopblocks_basalt.png"},
- groups = {cracky=2, not_in_creative_inventory=1},
- sounds = default.node_sound_stone_defaults(),
- sunlight_propagates = true,
- })
-
- stairsplus:register_all("gloopblocks", "pumice", "gloopblocks:pumice", {
- description = S("Pumice"),
- tiles = {"gloopblocks_pumice.png"},
- groups = {cracky=3, not_in_creative_inventory=1},
- sounds = default.node_sound_stone_defaults(),
- sunlight_propagates = true,
- })
-
- stairsplus:register_all("gloopblocks", "gravel", "default:gravel", {
- description = S("Gravel"),
- tiles = {"default_gravel.png"},
- groups = {crumbly = 2, falling_node = 1, not_in_creative_inventory=1},
- sounds = default.node_sound_stone_defaults(),
- sunlight_propagates = false,
- })
-
- if minetest.get_modpath("caverealms") then
- stairsplus:register_all("caverealms", "glow_crystal", "caverealms:glow_crystal", {
- description = S("Glow Crystal"),
- tiles = {"caverealms_glow_crystal.png"},
- groups = {cracky=3, not_in_creative_inventory=1},
- sounds = default.node_sound_glass_defaults(),
- light_source = 12,
- use_texture_alpha = true,
- paramtype="light",
- sunlight_propagates = true,
- })
-
- stairsplus:register_all("caverealms", "glow_emerald", "caverealms:glow_emerald", {
- description = S("Glow Emerald"),
- tiles = {"caverealms_glow_emerald.png"},
- groups = {cracky=3, not_in_creative_inventory=1},
- sounds = default.node_sound_glass_defaults(),
- light_source = 12,
- use_texture_alpha = true,
- paramtype="light",
- sunlight_propagates = true,
- })
-
- stairsplus:register_all("caverealms", "glow_mese", "caverealms:glow_mese", {
- description = S("Glow Mese"),
- tiles = {"caverealms_glow_mese.png"},
- groups = {cracky=3, not_in_creative_inventory=1},
- sounds = default.node_sound_glass_defaults(),
- light_source = 12,
- use_texture_alpha = true,
- paramtype="light",
- sunlight_propagates = true,
- })
- end
-
- -- ABMs for mossy objects
-
- if minetest.setting_getbool("gloopblocks_mossy_conversion") ~= false then
-
- gloopblocks_register_mossy_conversion({
- { "moreblocks:stair_cobble", "moreblocks:stair_mossycobble" },
- { "moreblocks:stair_cobble_inner", "moreblocks:stair_mossycobble_inner" },
- { "moreblocks:stair_cobble_outer", "moreblocks:stair_mossycobble_outer" },
- { "moreblocks:stair_cobble_half", "moreblocks:stair_mossycobble_half" },
- { "moreblocks:slab_cobble_quarter", "moreblocks:slab_mossycobble_quarter" },
- { "moreblocks:slab_cobble", "moreblocks:slab_mossycobble" },
- { "moreblocks:slab_cobble_three_quarter", "moreblocks:slab_mossycobble_three_quarter" },
- { "moreblocks:panel_cobble", "moreblocks:panel_mossycobble" },
- { "moreblocks:micro_cobble", "moreblocks:micro_mossycobble" },
- { "moreblocks:stair_cobble_alt", "moreblocks:stair_mossycobble_alt" },
-
- { "gloopblocks:cobble_road", "gloopblocks:cobble_road_mossy" },
- { "gloopblocks:stair_cobble_road", "gloopblocks:stair_cobble_road_mossy" },
- { "gloopblocks:slab_cobble_road", "gloopblocks:slab_cobble_road_mossy" },
- { "gloopblocks:stair_cobble_road", "gloopblocks:stair_cobble_road_mossy" },
- { "gloopblocks:stair_cobble_road_inner", "gloopblocks:stair_cobble_road_mossy_inner" },
- { "gloopblocks:stair_cobble_road_outer", "gloopblocks:stair_cobble_road_mossy_outer" },
- { "gloopblocks:stair_cobble_road_half", "gloopblocks:stair_cobble_road_mossy_half" },
- { "gloopblocks:slab_cobble_road_quarter", "gloopblocks:slab_cobble_road_mossy_quarter" },
- { "gloopblocks:slab_cobble_road", "gloopblocks:slab_cobble_road_mossy" },
- { "gloopblocks:slab_cobble_road_three_quarter", "gloopblocks:slab_cobble_road_mossy_three_quarter" },
- { "gloopblocks:panel_cobble_road", "gloopblocks:panel_cobble_road_mossy" },
- { "gloopblocks:micro_cobble_road", "gloopblocks:micro_cobble_road_mossy" },
- { "gloopblocks:stair_cobble_road_alt", "gloopblocks:stair_cobble_road_mossy_alt" },
-
- { "default:stonebrick", "gloopblocks:stone_brick_mossy" },
- { "default:stair_stonebrick", "gloopblocks:stair_stone_brick_mossy" },
- { "default:slab_stonebrick", "gloopblocks:slab_stone_brick_mossy" },
- { "moreblocks:stair_stonebrick", "gloopblocks:stair_stone_brick_mossy" },
- { "moreblocks:stair_stonebrick_inner", "gloopblocks:stair_stone_brick_mossy_inner" },
- { "moreblocks:stair_stonebrick_outer", "gloopblocks:stair_stone_brick_mossy_outer" },
- { "moreblocks:stair_stonebrick_half", "gloopblocks:stair_stone_brick_mossy_half" },
- { "moreblocks:slab_stonebrick_quarter", "gloopblocks:slab_stone_brick_mossy_quarter" },
- { "moreblocks:slab_stonebrick", "gloopblocks:slab_stone_brick_mossy" },
- { "moreblocks:slab_stonebrick_three_quarter", "gloopblocks:slab_stone_brick_mossy_three_quarter" },
- { "moreblocks:panel_stonebrick", "gloopblocks:panel_stone_brick_mossy" },
- { "moreblocks:micro_stonebrick", "gloopblocks:micro_stone_brick_mossy" },
- { "moreblocks:stair_stonebrick_alt", "gloopblocks:stair_stone_brick_mossy_alt" },
-
- { "default:stone", "gloopblocks:stone_mossy" },
- { "default:stair_stone", "gloopblocks:stair_stone_mossy" },
- { "default:slab_stone", "gloopblocks:slab_stone_mossy" },
- { "moreblocks:stair_stone", "gloopblocks:stair_stone_mossy" },
- { "moreblocks:stair_stone_inner", "gloopblocks:stair_stone_mossy_inner" },
- { "moreblocks:stair_stone_outer", "gloopblocks:stair_stone_mossy_outer" },
- { "moreblocks:stair_stone_half", "gloopblocks:stair_stone_mossy_half" },
-
- { "moreblocks:slab_stone_quarter", "gloopblocks:slab_stone_mossy_quarter" },
- { "moreblocks:slab_stone", "gloopblocks:slab_stone_mossy" },
- { "moreblocks:slab_stone_three_quarter", "gloopblocks:slab_stone_mossy_three_quarter" },
- { "moreblocks:panel_stone", "gloopblocks:panel_stone_mossy" },
- { "moreblocks:micro_stone", "gloopblocks:micro_stone_mossy" },
- { "moreblocks:stair_stone_alt", "gloopblocks:stair_stone_mossy_alt" },
- })
- end
-
-elseif minetest.get_modpath("stairs") then
-
- --stairs.register_stair(subname, recipeitem, groups, images, description, sounds)
-
- -- stairs:xxxx_stone_mossy ; xxxx = stair or slab
- stairs.register_stair_and_slab("stone_mossy", "gloopblocks:stone_mossy",
- {cracky=3},
- {"gloopblocks_stone_mossy.png"},
- S("Mossy Stone Stair"),
- S("Mossy Stone Slab"),
- default.node_sound_stone_defaults())
-
- -- stairs:xxxx_mossycobble
- stairs.register_stair_and_slab("mossycobble", "default:mossycobble",
- {cracky=3},
- {"default_mossycobble.png"},
- S("Mossy Cobble Stair"),
- S("Mossy Cobble Slab"),
- default.node_sound_stone_defaults())
-
- -- stairs:xxxx_stone_brick_mossy
- stairs.register_stair_and_slab("stone_brick_mossy", "gloopblocks:stone_brick_mossy",
- {cracky=3},
- {"gloopblocks_stone_brick_mossy.png"},
- S("Mossy Stone Brick Stair"),
- S("Mossy Stone Brick Slab"),
- default.node_sound_stone_defaults())
-
- -- stairs:xxxx_cobble_road
- stairs.register_stair_and_slab("cobble_road", "gloopblocks:cobble_road",
- {cracky=3},
- {"gloopblocks_cobble_road.png"},
- S("Cobble Roadbed Stair"),
- S("Cobble Roadbed Slab"),
- default.node_sound_stone_defaults())
-
- -- stairs:xxxx_cobble_road_mossy
- stairs.register_stair_and_slab("cobble_road_mossy", "gloopblocks:cobble_road_mossy",
- {cracky=3},
- {"gloopblocks_cobble_road_mossy.png"},
- S("Mossy Cobble Roadbed Stair"),
- S("Mossy Cobble Roadbed Slab"),
- default.node_sound_stone_defaults())
-
- -- stairs:xxxx_cement
- stairs.register_stair_and_slab("cement", "gloopblocks:cement",
- {cracky=2},
- {"gloopblocks_cement.png"},
- S("Cement Stair"),
- S("Cement Slab"),
- default.node_sound_stone_defaults())
-
- -- stairs:xxxx_pavement
- stairs.register_stair_and_slab("pavement", "gloopblocks:pavement",
- {cracky=3, oddly_breakable_by_hand=3},
- {"gloopblocks_pavement.png"},
- S("Pavement Stair"),
- S("Pavement Slab"),
- default.node_sound_stone_defaults())
-
- stairs.register_stair_and_slab("basalt", "gloopblocks:basalt",
- {cracky=2},
- {"gloopblocks_basalt.png"},
- S("Basalt Stair"),
- S("Basalt Slab"),
- default.node_sound_stone_defaults())
-
- stairs.register_stair_and_slab("pumice", "gloopblocks:pumice",
- {cracky=3},
- {"gloopblocks_pumice.png"},
- S("Pumice Stair"),
- S("Pumice Slab"),
- default.node_sound_stone_defaults())
-
- stairs.register_stair_and_slab("rainbow_block", "gloopblocks:rainbow_block",
- {cracky=3},
- {"gloopblocks_rainbow_block.png"},
- S("Rainbow Block Stair"),
- S("Rainbow Block Slab"),
- default.node_sound_defaults())
-
- if minetest.setting_getbool("gloopblocks_mossy_conversion") ~= false then
-
- gloopblocks_register_mossy_conversion({
- { "default:cobble", "default:mossycobble" },
- { "stairs:stair_cobble", "stairs:stair_mossycobble" },
- { "stairs:slab_cobble", "stairs:slab_mossycobble" },
- { "gloopblocks:cobble_road", "gloopblocks:cobble_road_mossy" },
- { "stairs:stair_cobble_road", "stairs:stair_cobble_road_mossy" },
- { "stairs:slab_cobble_road", "stairs:slab_cobble_road_mossy" },
- { "default:stonebrick", "gloopblocks:stone_brick_mossy" },
- { "stairs:stair_stonebrick", "stairs:stair_stone_brick_mossy" },
- { "stairs:slab_stonebrick", "stairs:slab_stone_brick_mossy" },
- { "default:stone", "gloopblocks:stone_mossy" },
- { "stairs:stair_stone", "stairs:stair_stone_mossy" },
- { "stairs:slab_stone", "stairs:slab_stone_mossy" },
- })
- end
-
- minetest.register_alias("default:stair_mossycobble", "stairs:stair_mossycobble")
- minetest.register_alias("default:slab_mossycobble", "stairs:slab_mossycobble")
- minetest.register_alias("gloopblocks:stair_cobble_road", "stairs:stair_cobble_road")
- minetest.register_alias("gloopblocks:slab_cobble_road", "stairs:slab_cobble_road")
- minetest.register_alias("gloopblocks:stair_cobble_road_mossy", "stairs:stair_cobble_road_mossy")
- minetest.register_alias("gloopblocks:slab_cobble_road_mossy", "stairs:slab_cobble_road_mossy")
- minetest.register_alias("gloopblocks:stair_stone_brick_mossy", "stairs:stair_stone_brick_mossy")
- minetest.register_alias("gloopblocks:slab_stone_brick_mossy", "stairs:slab_stone_brick_mossy")
- minetest.register_alias("gloopblocks:stair_stone_mossy", "stairs:stair_stone_mossy")
- minetest.register_alias("gloopblocks:slab_stone_mossy", "stairs:slab_stone_mossy")
- minetest.register_alias("gloopblocks:stair_cement", "stairs:stair_cement")
- minetest.register_alias("gloopblocks:slab_cement", "stairs:slab_cement")
- minetest.register_alias("gloopblocks:stair_pavement", "stairs:stair_pavement")
- minetest.register_alias("gloopblocks:slab_pavement", "stairs:slab_pavement")
- minetest.register_alias("gloopblocks:stair_pumice", "stairs:stair_pumice")
- minetest.register_alias("gloopblocks:slab_pumice", "stairs:slab_pumice")
- minetest.register_alias("gloopblocks:stair_basalt", "stairs:stair_basalt")
- minetest.register_alias("gloopblocks:slab_basalt", "stairs:slab_basalt")
- minetest.register_alias("gloopblocks:stair_rainbow_block", "stairs:stair_rainbow_block")
- minetest.register_alias("gloopblocks:slab_rainbow_block", "stairs:slab_rainbow_block")
-end
-
--- Tools
-
-minetest.register_tool("gloopblocks:pick_cement", {
- description = S("Cement Pickaxe"),
- inventory_image = "gloopblocks_cement_pick.png",
- tool_capabilities = {
- full_punch_interval = 1.0,
- max_drop_level=1,
- groupcaps={
- cracky={times={[1]=3.50, [2]=1.40, [3]=0.90}, uses=25, maxlevel=2}
- },
- damage_groups = {fleshy=4},
- },
-})
-
-minetest.register_tool("gloopblocks:shovel_cement", {
- description = S("Cement Shovel"),
- inventory_image = "gloopblocks_cement_shovel.png",
- tool_capabilities = {
- full_punch_interval = 1.0,
- max_drop_level=1,
- groupcaps={
- crumbly={times={[1]=1.50, [2]=0.60, [3]=0.45}, uses=25, maxlevel=2}
- },
- damage_groups = {fleshy=4},
- },
-})
-
-minetest.register_tool("gloopblocks:axe_cement", {
- description = S("Cement Axe"),
- inventory_image = "gloopblocks_cement_axe.png",
- tool_capabilities = {
- full_punch_interval = 1.0,
- max_drop_level=1,
- groupcaps={
- choppy={times={[1]=3.00, [2]=1.30, [3]=0.80}, uses=25, maxlevel=2},
- fleshy={times={[2]=1.20, [3]=0.65}, uses=30, maxlevel=1}
- },
- damage_groups = {fleshy=4},
- },
-})
-
-minetest.register_tool("gloopblocks:sword_cement", {
- description = S("Cement Sword"),
- inventory_image = "gloopblocks_cement_sword.png",
- tool_capabilities = {
- full_punch_interval = 1.0,
- max_drop_level=1,
- groupcaps={
- fleshy={times={[1]=1.60, [2]=0.80, [3]=0.40}, uses=15, maxlevel=2},
- snappy={times={[2]=0.75, [3]=0.35}, uses=30, maxlevel=1},
- choppy={times={[3]=0.80}, uses=30, maxlevel=0}
- },
- damage_groups = {fleshy=6},
- }
-})
-
-minetest.register_tool("gloopblocks:pick_evil", {
- description = S("Evil Pickaxe"),
- inventory_image = "gloopblocks_evil_pick.png",
- tool_capabilities = {
- full_punch_interval = 1.0,
- max_drop_level=3,
- groupcaps={
- cracky={times={[1]=0.10, [2]=0.10, [3]=0.10}, uses=10, maxlevel=2}
- },
- damage_groups = {fleshy=6},
- },
-})
-
-minetest.register_tool("gloopblocks:shovel_evil", {
- description = S("Evil Shovel"),
- inventory_image = "gloopblocks_evil_shovel.png",
- tool_capabilities = {
- full_punch_interval = 1.0,
- max_drop_level=3,
- groupcaps={
- crumbly={times={[1]=0.05, [2]=0.05, [3]=0.05}, uses=10, maxlevel=2}
- },
- damage_groups = {fleshy=6},
- },
-})
-
-minetest.register_tool("gloopblocks:axe_evil", {
- description = S("Evil Axe"),
- inventory_image = "gloopblocks_evil_axe.png",
- tool_capabilities = {
- full_punch_interval = 1.0,
- max_drop_level=3,
- groupcaps={
- choppy={times={[1]=0.15, [2]=0.15, [3]=0.15}, uses=10, maxlevel=2},
- fleshy={times={[1]=0.15, [2]=0.15, [3]=0.15}, uses=10, maxlevel=2}
- },
- damage_groups = {fleshy=6},
- },
-})
-
-minetest.register_tool("gloopblocks:sword_evil", {
- description = S("Evil Sword"),
- inventory_image = "gloopblocks_evil_sword.png",
- tool_capabilities = {
- full_punch_interval = 1.0,
- max_drop_level=3,
- groupcaps={
- fleshy={times={[1]=0.20, [2]=0.20, [3]=0.20}, uses=10, maxlevel=2},
- snappy={times={[1]=0.20, [2]=0.20, [3]=0.20}, uses=10, maxlevel=2},
- choppy={times={[1]=0.20, [2]=0.20, [3]=0.20}, uses=10, maxlevel=2}
- },
- damage_groups = {fleshy=8},
- }
-})
-
--- Other items
-
-minetest.register_craftitem("gloopblocks:evil_stick", {
- description = S("Evil Stick"),
- inventory_image = "gloopblocks_evil_stick.png",
-})
-
--- define lava-cooling-based nodes and hook into the default lavacooling
--- functions to generate basalt, pumice, and obsidian
-
-if minetest.setting_getbool("gloopblocks_lavacooling") ~= false then
-
- minetest.register_node("gloopblocks:obsidian_cooled", {
- description = S("Obsidian"),
- tiles = {"default_obsidian.png"},
- is_ground_content = true,
- sounds = default.node_sound_stone_defaults(),
- groups = {cracky=1, level=2, not_in_creative_inventory=1},
- drop = "default:obsidian",
- after_place_node = function(pos, placer, itemstack, pointed_thing)
- minetest.add_node(pos, {name = "default:obsidian"})
- end
- })
-
- minetest.register_node("gloopblocks:basalt_cooled", {
- description = S("Basalt"),
- tiles = {"gloopblocks_basalt.png"},
- groups = {cracky=2, not_in_creative_inventory=1},
- sounds = default.node_sound_stone_defaults(),
- drop = "gloopblocks:basalt",
- after_place_node = function(pos, placer, itemstack, pointed_thing)
- minetest.add_node(pos, {name = "gloopblocks:basalt"})
- end
- })
-
- minetest.register_node("gloopblocks:pumice_cooled", {
- description = S("Pumice"),
- tiles = {"gloopblocks_pumice.png"},
- groups = {cracky=3, not_in_creative_inventory=1},
- sounds = default.node_sound_stone_defaults(),
- drop = "gloopblocks:pumice",
- after_place_node = function(pos, placer, itemstack, pointed_thing)
- minetest.add_node(pos, {name = "gloopblocks:pumice"})
- end
- })
-
- local gloopblocks_search_nearby_nodes = function(pos, node)
- if minetest.get_node({x=pos.x-1, y=pos.y, z=pos.z}).name == node then return true end
- if minetest.get_node({x=pos.x+1, y=pos.y, z=pos.z}).name == node then return true end
- if minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z}).name == node then return true end
- if minetest.get_node({x=pos.x, y=pos.y+1, z=pos.z}).name == node then return true end
- if minetest.get_node({x=pos.x, y=pos.y, z=pos.z-1}).name == node then return true end
- if minetest.get_node({x=pos.x, y=pos.y, z=pos.z+1}).name == node then return true end
- return false
- end
-
- default.cool_lava = function(pos, node)
- if node.name == "default:lava_source" then
- if gloopblocks_search_nearby_nodes(pos,"default:water_source")
- or gloopblocks_search_nearby_nodes(pos,"default:water_flowing") then
- minetest.set_node(pos, {name="gloopblocks:obsidian_cooled"})
- end
- else -- Lava flowing
- if gloopblocks_search_nearby_nodes(pos,"default:water_source") then
- minetest.set_node(pos, {name="gloopblocks:basalt_cooled"})
- elseif gloopblocks_search_nearby_nodes(pos,"default:water_flowing") then
- minetest.set_node(pos, {name="gloopblocks:pumice_cooled"})
- end
- end
- end
-end
-
-local fence_texture =
- "default_fence_overlay.png^default_steel_block.png^default_fence_overlay.png^[makealpha:255,126,126"
-
-minetest.register_node("gloopblocks:fence_steel", {
- description = S("Steel Fence"),
- drawtype = "fencelike",
- tiles = {"default_steel_block.png"},
- inventory_image = fence_texture,
- wield_image = fence_texture,
- paramtype = "light",
- sunlight_propagates = true,
- is_ground_content = false,
- selection_box = {
- type = "fixed",
- fixed = {-1/7, -1/2, -1/7, 1/7, 1/2, 1/7},
- },
- groups = {choppy = 2, oddly_breakable_by_hand = 2 },
- sounds = default.node_sound_stone_defaults(),
-})
-
-dofile(minetest.get_modpath("gloopblocks").."/crafts.lua")
-
-print(S("Gloopblocks Loaded!"))
+--[[ +GloopBlocks +Originally written by GloopMaster + +Maintained by VanessaE. + +--]] + +-- Load support for intllib. +local MP = minetest.get_modpath(minetest.get_current_modname()) +local S, NS = dofile(MP.."/intllib.lua") + +-- Nodes + +minetest.register_node("gloopblocks:rainbow_block_diagonal", { + description = S("Diagonal Rainbow Block"), + tiles = {"gloopblocks_rainbow_block.png"}, + is_ground_content = true, + groups = {cracky=3}, + sounds = default.node_sound_defaults(), +}) +minetest.register_alias("gloopblocks:rainbow_block", "gloopblocks:rainbow_block_diagonal") + +minetest.register_node("gloopblocks:rainbow_block_horizontal", { + description = S("Horizontal Rainbow Block"), + tiles = { + "gloopblocks_rainbow_horizontal.png^[transformR90", + "gloopblocks_rainbow_horizontal.png^[transformR90", + "gloopblocks_rainbow_horizontal.png" + }, + paramtype = "light", + light_source = default.LIGHT_MAX, + paramtype2 = "facedir", + groups = {cracky = 2}, + is_ground_content = false, + sounds = default.node_sound_defaults(), +}) + +if not minetest.setting_getbool("pbj_pup_alias_nyancat") then + if not minetest.registered_nodes["nyancat:nyancat_rainbow"] then + minetest.register_alias("nyancat:nyancat_rainbow", "gloopblocks:rainbow_block_horizontal") + elseif not minetest.registered_nodes["default:nyancat_rainbow"] then + minetest.register_alias("default:nyancat_rainbow", "gloopblocks:rainbow_block_horizontal") + end +end + +minetest.register_node("gloopblocks:evil_block", { + description = S("Evil Block"), + tiles = {"gloopblocks_evil_block.png"}, + light_source = 5, + is_ground_content = true, + groups = {cracky=2}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("gloopblocks:basalt", { + description = S("Basalt"), + tiles = {"gloopblocks_basalt.png"}, + groups = {cracky=2}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("gloopblocks:pumice", { + description = S("Pumice"), + tiles = {"gloopblocks_pumice.png"}, + groups = {cracky=3}, + sounds = default.node_sound_stone_defaults(), +}) + + +minetest.register_node("gloopblocks:pavement", { + description = S("Pavement"), + tiles = {"gloopblocks_pavement.png"}, + groups = {cracky=3, oddly_breakable_by_hand=3}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("gloopblocks:oerkki_block", { + drawtype = "nodebox", + description = S("Oerkki Block"), + paramtype = "light", + paramtype2 = "facedir", + tiles = { + "gloopblocks_oerkkiblock_tb.png", + "gloopblocks_oerkkiblock_tb.png", + "gloopblocks_oerkkiblock_sides.png", + "gloopblocks_oerkkiblock_sides.png", + "gloopblocks_oerkkiblock_sides.png", + "gloopblocks_oerkkiblock_front.png" + }, + groups = {cracky=3, oddly_breakable_by_hand=3}, + sounds = default.node_sound_stone_defaults(), + selection_box = { + type = "fixed", + fixed = { -0.5, -0.5, -0.5, 0.5, 0.5, 0.5 } + }, + node_box = { + type = "fixed", + fixed = { + {-0.5, -0.5, -0.1875, 0.5, 0.5, 0.1875}, -- NodeBox1 + {-0.5, -0.5, -0.5, -0.4375, 0.5, 0.5}, -- NodeBox2 + {0.4375, -0.5, -0.5, 0.5, 0.5, 0.5}, -- NodeBox3 + {-0.5, 0.4375, -0.5, 0.5, 0.5, 0.5}, -- NodeBox4 + {-0.5, -0.5, -0.5, 0.5, -0.4375, 0.5}, -- NodeBox5 + {-0.5, -0.0625, -0.5, 0.5, 0.0625, 0.5}, -- NodeBox6 + } + } +}) + +minetest.register_node("gloopblocks:stone_brick_mossy", { + description = S("Mossy Stone Brick"), + tiles = {"gloopblocks_stone_brick_mossy.png"}, + groups = {cracky=3, stone=1}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("gloopblocks:stone_mossy", { + description = S("Mossy Stone"), + tiles = {"gloopblocks_stone_mossy.png"}, + groups = {cracky=3, stone=1}, + sounds = default.node_sound_stone_defaults(), + drop = "default:mossycobble" +}) + +minetest.register_node("gloopblocks:cobble_road", { + description = S("Cobblestone Road Bed"), + tiles = {"gloopblocks_cobble_road.png"}, + groups = {cracky=3, stone=1}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("gloopblocks:cobble_road_mossy", { + description = S("Mossy Cobblestone Road Bed"), + tiles = {"gloopblocks_cobble_road_mossy.png"}, + groups = {cracky=3, stone=1}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("gloopblocks:scaffolding", { + description = S("Wooden Scaffold"), + drawtype = "allfaces", + paramtype = "light", + sunlight_propagates = true, + tiles = {"gloopblocks_scaffold.png"}, + groups = {choppy=3, oddly_breakable_by_hand=3}, + sounds = default.node_sound_wood_defaults(), +}) + +minetest.register_alias("moreblocks:oerkkiblock", "gloopblocks:oerkki_block") +minetest.register_alias("gloopblocks:obsidian", "default:obsidian") + +-- Nodes imported from Usesdirt ================================================================================ + +if not minetest.get_modpath("usesdirt") then + + local dirt_brick_tex = "default_dirt.png^gloopblocks_dirt_brick_overlay.png" + local dirt_cobble_tex = "default_cobble.png^(default_dirt.png^[mask:gloopblocks_dirt_cobble_mask.png)" + local dirt_stone_tex = "default_stone.png^(default_dirt.png^[mask:gloopblocks_dirt_stone_mask.png)" + + local dirt_ladder_tex = "(default_dirt.png^[mask:gloopblocks_ladder_mask.png)^gloopblocks_ladder_overlay.png" + local dirt_brick_ladder_tex = "(("..dirt_brick_tex..")^[mask:gloopblocks_ladder_mask.png)^gloopblocks_ladder_overlay.png" + local dirt_cobble_ladder_tex = "(("..dirt_cobble_tex..")^[mask:gloopblocks_ladder_mask.png)^gloopblocks_ladder_overlay.png" + local dirt_stone_ladder_tex = "(("..dirt_stone_tex..")^[mask:gloopblocks_ladder_mask.png)^gloopblocks_ladder_overlay.png" + + minetest.register_node(":usesdirt:dirt_brick", { + tiles = { dirt_brick_tex }, + description = "Dirt Brick", + groups = {snappy=2,choppy=1,oddly_breakable_by_hand=2}, + }) + + minetest.register_node(":usesdirt:dirt_brick_ladder", { + description = "Dirt Brick Ladder", + drawtype = "signlike", + tiles = { dirt_brick_ladder_tex }, + inventory_image = dirt_brick_ladder_tex, + wield_image = dirt_brick_ladder_tex, + paramtype = "light", + paramtype2 = "wallmounted", + is_ground_content = true, + walkable = false, + climbable = true, + selection_box = { + type = "wallmounted", + --wall_top = = <default> + --wall_bottom = = <default> + --wall_side = = <default> + }, + groups = {cracky=3, stone=2}, + legacy_wallmounted = true, + }) + minetest.register_craft({ + output = 'usesdirt:dirt_brick_ladder 3', + recipe = { + {'usesdirt:dirt_brick', '', 'usesdirt:dirt_brick'}, + {'usesdirt:dirt_brick', 'usesdirt:dirt_brick','usesdirt:dirt_brick'}, + {'usesdirt:dirt_brick','','usesdirt:dirt_brick'}, + } + }) + + default.register_fence(":usesdirt:dirt_brick_fence", { + description = "Dirt Brick Fence", + texture = dirt_brick_tex, + inventory_image = "default_fence_overlay.png^("..dirt_brick_tex..")^default_fence_overlay.png^[makealpha:255,126,126", + wield_image = "default_fence_overlay.png^("..dirt_brick_tex..")^default_fence_overlay.png^[makealpha:255,126,126", + material = "usesdirt:dirt_brick", + groups = {cracky=3, stone=2}, + sounds = default.node_sound_stone_defaults() + }) + + if minetest.get_modpath("moreblocks") then + minetest.register_craft({ + output = 'usesdirt:dirt_brick 24', + recipe = { + {'moreblocks:dirt_compressed', 'moreblocks:dirt_compressed', '' }, + {'moreblocks:dirt_compressed', 'moreblocks:dirt_compressed', '' } + } + }) + else + minetest.register_craft({ + output = 'usesdirt:dirt_brick 6', + recipe = { + {'default:dirt', 'default:dirt', 'default:dirt'}, + {'default:dirt', 'default:dirt', 'default:dirt'}, + {'default:dirt', 'default:dirt', 'default:dirt'}, + } + }) + end + + minetest.register_node(":usesdirt:dirt_ladder", { + description = "Dirt Ladder", + drawtype = "signlike", + tiles = { dirt_ladder_tex }, + inventory_image = dirt_ladder_tex, + wield_image = dirt_ladder_tex, + paramtype = "light", + paramtype2 = "wallmounted", + is_ground_content = true, + walkable = false, + climbable = true, + selection_box = { + type = "wallmounted", + --wall_top = = <default> + --wall_bottom = = <default> + --wall_side = = <default> + }, + groups = {snappy=2,choppy=2,oddly_breakable_by_hand=3}, + legacy_wallmounted = true, + }) + minetest.register_craft({ + output = 'usesdirt:dirt_ladder 3', + recipe = { + {'usesdirt:dirt_brick', '', 'usesdirt:dirt_brick'}, + {'usesdirt:dirt_brick', 'usesdirt:dirt_brick','usesdirt:dirt_brick'}, + {'usesdirt:dirt_brick','','usesdirt:dirt_brick'}, + } + }) + + default.register_fence(":usesdirt:dirt_fence", { + description = "Dirt Fence", + texture = "default_dirt.png", + inventory_image = "default_fence_overlay.png^default_dirt.png^default_fence_overlay.png^[makealpha:255,126,126", + wield_image = "default_fence_overlay.png^default_dirt.png^default_fence_overlay.png^[makealpha:255,126,126", + material = "default:dirt", + groups = {snappy=2,choppy=1,oddly_breakable_by_hand=3}, + sounds = default.node_sound_dirt_defaults() + }) + +---- + + minetest.register_node(":usesdirt:dirt_cobble_stone", { + tiles = { dirt_cobble_tex }, + description = "Dirt Cobble Stone", + is_ground_content = true, + groups = {cracky=3, stone=2}, + }) + minetest.register_craft({ + output = '"usesdirt:dirt_cobble_stone" 3', + recipe = { + {'usesdirt:dirt_brick', 'usesdirt:dirt_brick', 'usesdirt:dirt_brick'}, + {'usesdirt:dirt_brick', 'usesdirt:dirt_brick', 'usesdirt:dirt_brick'}, + {'usesdirt:dirt_brick', 'usesdirt:dirt_brick', 'usesdirt:dirt_brick'}, + } + }) + + minetest.register_node(":usesdirt:dirt_cobble_stone_ladder", { + description = "Dirt Cobble Stone Ladder", + drawtype = "signlike", + tiles = { dirt_cobble_ladder_tex }, + inventory_image = dirt_cobble_ladder_tex, + wield_image = dirt_cobble_ladder_tex, + paramtype = "light", + paramtype2 = "wallmounted", + is_ground_content = true, + walkable = false, + climbable = true, + selection_box = { + type = "wallmounted", + --wall_top = = <default> + --wall_bottom = = <default> + --wall_side = = <default> + }, + groups = {cracky=3, stone=2}, + legacy_wallmounted = true, + }) + minetest.register_craft({ + output = 'usesdirt:dirt_cobble_stone_ladder 3', + recipe = { + {'usesdirt:dirt_cobble_stone', '', 'usesdirt:dirt_cobble_stone'}, + {'usesdirt:dirt_cobble_stone', 'usesdirt:dirt_cobble_stone','usesdirt:dirt_cobble_stone'}, + {'usesdirt:dirt_cobble_stone','','usesdirt:dirt_cobble_stone'}, + } + }) + + default.register_fence(":usesdirt:dirt_cobble_stone_fence", { + description = "Dirt Cobble Stone Fence", + texture = dirt_cobble_tex, + inventory_image = "default_fence_overlay.png^("..dirt_cobble_tex..")^default_fence_overlay.png^[makealpha:255,126,126", + wield_image = "default_fence_overlay.png^("..dirt_cobble_tex..")^default_fence_overlay.png^[makealpha:255,126,126", + material = "usesdirt:dirt_cobble_stone", + groups = {cracky=3, stone=2}, + sounds = default.node_sound_stone_defaults() + }) + +---- + + minetest.register_node(":usesdirt:dirt_stone", { + tiles = { dirt_stone_tex }, + description = "Dirt Stone", + is_ground_content = true, + groups = {cracky=3, stone=2}, + }) + + minetest.register_node(":usesdirt:dirt_stone_ladder", { + description = "Dirt Stone Ladder", + drawtype = "signlike", + tiles = { dirt_stone_ladder_tex }, + inventory_image = dirt_stone_ladder_tex, + wield_image = dirt_stone_ladder_tex, + paramtype = "light", + paramtype2 = "wallmounted", + is_ground_content = true, + walkable = false, + climbable = true, + selection_box = { + type = "wallmounted", + --wall_top = = <default> + --wall_bottom = = <default> + --wall_side = = <default> + }, + groups = {cracky=3, stone=2}, + legacy_wallmounted = true, + }) + minetest.register_craft({ + output = 'usesdirt:dirt_stone_ladder 3', + recipe = { + {'usesdirt:dirt_stone', '', 'usesdirt:dirt_stone'}, + {'usesdirt:dirt_stone', 'usesdirt:dirt_stone','usesdirt:dirt_stone'}, + {'usesdirt:dirt_stone','','usesdirt:dirt_stone'}, + } + }) + + default.register_fence(":usesdirt:dirt_stone_fence", { + description = "Dirt Stone Fence", + texture = dirt_stone_tex, + inventory_image = "default_fence_overlay.png^("..dirt_stone_tex..")^default_fence_overlay.png^[makealpha:255,126,126", + wield_image = "default_fence_overlay.png^("..dirt_stone_tex..")^default_fence_overlay.png^[makealpha:255,126,126", + material = "usesdirt:dirt_stone", + groups = {cracky=3, stone=2}, + sounds = default.node_sound_stone_defaults() + }) +end + +-- Stairs/slabs defs, conversion of normal -> mossy items + +if minetest.setting_getbool("gloopblocks_mossy_conversion") ~= false then + + function gloopblocks_register_mossy_conversion(mossyobjects) + for i in ipairs(mossyobjects) do + minetest.register_abm({ + nodenames = { mossyobjects[i][1] }, + neighbors = {"default:water_source", "default:water_flowing"}, + interval = 120, + chance = 50, + action = function(pos, node) + if minetest.find_node_near(pos, 2, "air") then + local fdir = node.param2 + minetest.add_node(pos, {name = mossyobjects[i][2], param2 = fdir}) + end + end, + }) + end + end +end + +if minetest.get_modpath("moreblocks") then + + stairsplus:register_all("gloopblocks", "oerkki_block", "gloopblocks:oerkki_block", { + description = S("Oerkki Block"), + tiles = { + "gloopblocks_oerkkiblock_tb.png", + "gloopblocks_oerkkiblock_tb.png", + "gloopblocks_oerkkiblock_sides.png", + "gloopblocks_oerkkiblock_sides.png", + "gloopblocks_oerkkiblock_sides.png", + "gloopblocks_oerkkiblock_front.png" + }, + groups = {cracky=2, not_in_creative_inventory=1}, + sounds = default.node_sound_stone_defaults(), + sunlight_propagates = true, + }) + + stairsplus:register_all("gloopblocks", "stone_brick_mossy", "gloopblocks:stone_brick_mossy", { + description = S("Mossy Stone Brick"), + tiles = {"gloopblocks_stone_brick_mossy.png"}, + groups = {cracky=1, not_in_creative_inventory=1}, + sounds = default.node_sound_stone_defaults(), + sunlight_propagates = true, + }) + + stairsplus:register_all("gloopblocks", "stone_mossy", "gloopblocks:stone_mossy", { + description = S("Mossy Stone"), + tiles = {"gloopblocks_stone_mossy.png"}, + groups = {cracky=1, not_in_creative_inventory=1}, + sounds = default.node_sound_stone_defaults(), + sunlight_propagates = true, + }) + + stairsplus:register_all("gloopblocks", "cobble_road", "gloopblocks:cobble_road", { + description = S("Cobblestone Roadbed"), + tiles = {"gloopblocks_cobble_road.png"}, + groups = {cracky=3, stone=1, not_in_creative_inventory=1}, + sounds = default.node_sound_stone_defaults(), + sunlight_propagates = true, + }) + + stairsplus:register_all("gloopblocks", "cobble_road_mossy", "gloopblocks:cobble_road_mossy", { + description = S("Mossy Cobblestone Roadbed"), + tiles = {"gloopblocks_cobble_road_mossy.png"}, + groups = {cracky=3, stone=1, not_in_creative_inventory=1}, + sounds = default.node_sound_stone_defaults(), + sunlight_propagates = true, + }) + + stairsplus:register_all("gloopblocks", "pavement", "gloopblocks:pavement", { + description = S("Pavement"), + tiles = {"gloopblocks_pavement.png"}, + groups = {cracky=2, not_in_creative_inventory=1}, + sounds = default.node_sound_stone_defaults(), + sunlight_propagates = true, + }) + + stairsplus:register_all("gloopblocks", "rainbow_block", "gloopblocks:rainbow_block", { + description = S("Rainbow Block"), + tiles = {"gloopblocks_rainbow_block.png"}, + groups = {cracky=3, not_in_creative_inventory=1}, + sounds = default.node_sound_defaults(), + sunlight_propagates = true, + }) + + stairsplus:register_all("gloopblocks", "evil_block", "gloopblocks:evil_block", { + description = S("Evil Block"), + tiles = {"gloopblocks_evil_block.png"}, + groups = {cracky=3, not_in_creative_inventory=1}, + sounds = default.node_sound_defaults(), + light_source = 5, + sunlight_propagates = true, + }) + + stairsplus:register_all("gloopblocks", "basalt", "gloopblocks:basalt", { + description = S("Basalt"), + tiles = {"gloopblocks_basalt.png"}, + groups = {cracky=2, not_in_creative_inventory=1}, + sounds = default.node_sound_stone_defaults(), + sunlight_propagates = true, + }) + + stairsplus:register_all("gloopblocks", "pumice", "gloopblocks:pumice", { + description = S("Pumice"), + tiles = {"gloopblocks_pumice.png"}, + groups = {cracky=3, not_in_creative_inventory=1}, + sounds = default.node_sound_stone_defaults(), + sunlight_propagates = true, + }) + + stairsplus:register_all("gloopblocks", "gravel", "default:gravel", { + description = S("Gravel"), + tiles = {"default_gravel.png"}, + groups = {crumbly = 2, falling_node = 1, not_in_creative_inventory=1}, + sounds = default.node_sound_stone_defaults(), + sunlight_propagates = false, + }) + + if minetest.get_modpath("caverealms") then + stairsplus:register_all("caverealms", "glow_crystal", "caverealms:glow_crystal", { + description = S("Glow Crystal"), + tiles = {"caverealms_glow_crystal.png"}, + groups = {cracky=3, not_in_creative_inventory=1}, + sounds = default.node_sound_glass_defaults(), + light_source = 12, + use_texture_alpha = true, + paramtype="light", + sunlight_propagates = true, + }) + + stairsplus:register_all("caverealms", "glow_emerald", "caverealms:glow_emerald", { + description = S("Glow Emerald"), + tiles = {"caverealms_glow_emerald.png"}, + groups = {cracky=3, not_in_creative_inventory=1}, + sounds = default.node_sound_glass_defaults(), + light_source = 12, + use_texture_alpha = true, + paramtype="light", + sunlight_propagates = true, + }) + + stairsplus:register_all("caverealms", "glow_mese", "caverealms:glow_mese", { + description = S("Glow Mese"), + tiles = {"caverealms_glow_mese.png"}, + groups = {cracky=3, not_in_creative_inventory=1}, + sounds = default.node_sound_glass_defaults(), + light_source = 12, + use_texture_alpha = true, + paramtype="light", + sunlight_propagates = true, + }) + end + + -- ABMs for mossy objects + + if minetest.setting_getbool("gloopblocks_mossy_conversion") ~= false then + + gloopblocks_register_mossy_conversion({ + { "moreblocks:stair_cobble", "moreblocks:stair_mossycobble" }, + { "moreblocks:stair_cobble_inner", "moreblocks:stair_mossycobble_inner" }, + { "moreblocks:stair_cobble_outer", "moreblocks:stair_mossycobble_outer" }, + { "moreblocks:stair_cobble_half", "moreblocks:stair_mossycobble_half" }, + { "moreblocks:slab_cobble_quarter", "moreblocks:slab_mossycobble_quarter" }, + { "moreblocks:slab_cobble", "moreblocks:slab_mossycobble" }, + { "moreblocks:slab_cobble_three_quarter", "moreblocks:slab_mossycobble_three_quarter" }, + { "moreblocks:panel_cobble", "moreblocks:panel_mossycobble" }, + { "moreblocks:micro_cobble", "moreblocks:micro_mossycobble" }, + { "moreblocks:stair_cobble_alt", "moreblocks:stair_mossycobble_alt" }, + + { "gloopblocks:cobble_road", "gloopblocks:cobble_road_mossy" }, + { "gloopblocks:stair_cobble_road", "gloopblocks:stair_cobble_road_mossy" }, + { "gloopblocks:slab_cobble_road", "gloopblocks:slab_cobble_road_mossy" }, + { "gloopblocks:stair_cobble_road", "gloopblocks:stair_cobble_road_mossy" }, + { "gloopblocks:stair_cobble_road_inner", "gloopblocks:stair_cobble_road_mossy_inner" }, + { "gloopblocks:stair_cobble_road_outer", "gloopblocks:stair_cobble_road_mossy_outer" }, + { "gloopblocks:stair_cobble_road_half", "gloopblocks:stair_cobble_road_mossy_half" }, + { "gloopblocks:slab_cobble_road_quarter", "gloopblocks:slab_cobble_road_mossy_quarter" }, + { "gloopblocks:slab_cobble_road", "gloopblocks:slab_cobble_road_mossy" }, + { "gloopblocks:slab_cobble_road_three_quarter", "gloopblocks:slab_cobble_road_mossy_three_quarter" }, + { "gloopblocks:panel_cobble_road", "gloopblocks:panel_cobble_road_mossy" }, + { "gloopblocks:micro_cobble_road", "gloopblocks:micro_cobble_road_mossy" }, + { "gloopblocks:stair_cobble_road_alt", "gloopblocks:stair_cobble_road_mossy_alt" }, + + { "default:stonebrick", "gloopblocks:stone_brick_mossy" }, + { "default:stair_stonebrick", "gloopblocks:stair_stone_brick_mossy" }, + { "default:slab_stonebrick", "gloopblocks:slab_stone_brick_mossy" }, + { "moreblocks:stair_stonebrick", "gloopblocks:stair_stone_brick_mossy" }, + { "moreblocks:stair_stonebrick_inner", "gloopblocks:stair_stone_brick_mossy_inner" }, + { "moreblocks:stair_stonebrick_outer", "gloopblocks:stair_stone_brick_mossy_outer" }, + { "moreblocks:stair_stonebrick_half", "gloopblocks:stair_stone_brick_mossy_half" }, + { "moreblocks:slab_stonebrick_quarter", "gloopblocks:slab_stone_brick_mossy_quarter" }, + { "moreblocks:slab_stonebrick", "gloopblocks:slab_stone_brick_mossy" }, + { "moreblocks:slab_stonebrick_three_quarter", "gloopblocks:slab_stone_brick_mossy_three_quarter" }, + { "moreblocks:panel_stonebrick", "gloopblocks:panel_stone_brick_mossy" }, + { "moreblocks:micro_stonebrick", "gloopblocks:micro_stone_brick_mossy" }, + { "moreblocks:stair_stonebrick_alt", "gloopblocks:stair_stone_brick_mossy_alt" }, + + { "default:stone", "gloopblocks:stone_mossy" }, + { "default:stair_stone", "gloopblocks:stair_stone_mossy" }, + { "default:slab_stone", "gloopblocks:slab_stone_mossy" }, + { "moreblocks:stair_stone", "gloopblocks:stair_stone_mossy" }, + { "moreblocks:stair_stone_inner", "gloopblocks:stair_stone_mossy_inner" }, + { "moreblocks:stair_stone_outer", "gloopblocks:stair_stone_mossy_outer" }, + { "moreblocks:stair_stone_half", "gloopblocks:stair_stone_mossy_half" }, + + { "moreblocks:slab_stone_quarter", "gloopblocks:slab_stone_mossy_quarter" }, + { "moreblocks:slab_stone", "gloopblocks:slab_stone_mossy" }, + { "moreblocks:slab_stone_three_quarter", "gloopblocks:slab_stone_mossy_three_quarter" }, + { "moreblocks:panel_stone", "gloopblocks:panel_stone_mossy" }, + { "moreblocks:micro_stone", "gloopblocks:micro_stone_mossy" }, + { "moreblocks:stair_stone_alt", "gloopblocks:stair_stone_mossy_alt" }, + }) + end + +elseif minetest.get_modpath("stairs") then + + --stairs.register_stair(subname, recipeitem, groups, images, description, sounds) + + -- stairs:xxxx_stone_mossy ; xxxx = stair or slab + stairs.register_stair_and_slab("stone_mossy", "gloopblocks:stone_mossy", + {cracky=3}, + {"gloopblocks_stone_mossy.png"}, + S("Mossy Stone Stair"), + S("Mossy Stone Slab"), + default.node_sound_stone_defaults()) + + -- stairs:xxxx_mossycobble + stairs.register_stair_and_slab("mossycobble", "default:mossycobble", + {cracky=3}, + {"default_mossycobble.png"}, + S("Mossy Cobble Stair"), + S("Mossy Cobble Slab"), + default.node_sound_stone_defaults()) + + -- stairs:xxxx_stone_brick_mossy + stairs.register_stair_and_slab("stone_brick_mossy", "gloopblocks:stone_brick_mossy", + {cracky=3}, + {"gloopblocks_stone_brick_mossy.png"}, + S("Mossy Stone Brick Stair"), + S("Mossy Stone Brick Slab"), + default.node_sound_stone_defaults()) + + -- stairs:xxxx_cobble_road + stairs.register_stair_and_slab("cobble_road", "gloopblocks:cobble_road", + {cracky=3}, + {"gloopblocks_cobble_road.png"}, + S("Cobble Roadbed Stair"), + S("Cobble Roadbed Slab"), + default.node_sound_stone_defaults()) + + -- stairs:xxxx_cobble_road_mossy + stairs.register_stair_and_slab("cobble_road_mossy", "gloopblocks:cobble_road_mossy", + {cracky=3}, + {"gloopblocks_cobble_road_mossy.png"}, + S("Mossy Cobble Roadbed Stair"), + S("Mossy Cobble Roadbed Slab"), + default.node_sound_stone_defaults()) + + -- stairs:xxxx_cement + stairs.register_stair_and_slab("cement", "gloopblocks:cement", + {cracky=2}, + {"basic_materials_cement_block.png"}, + S("Cement Stair"), + S("Cement Slab"), + default.node_sound_stone_defaults()) + + -- stairs:xxxx_pavement + stairs.register_stair_and_slab("pavement", "gloopblocks:pavement", + {cracky=3, oddly_breakable_by_hand=3}, + {"gloopblocks_pavement.png"}, + S("Pavement Stair"), + S("Pavement Slab"), + default.node_sound_stone_defaults()) + + stairs.register_stair_and_slab("basalt", "gloopblocks:basalt", + {cracky=2}, + {"gloopblocks_basalt.png"}, + S("Basalt Stair"), + S("Basalt Slab"), + default.node_sound_stone_defaults()) + + stairs.register_stair_and_slab("pumice", "gloopblocks:pumice", + {cracky=3}, + {"gloopblocks_pumice.png"}, + S("Pumice Stair"), + S("Pumice Slab"), + default.node_sound_stone_defaults()) + + stairs.register_stair_and_slab("rainbow_block", "gloopblocks:rainbow_block", + {cracky=3}, + {"gloopblocks_rainbow_block.png"}, + S("Rainbow Block Stair"), + S("Rainbow Block Slab"), + default.node_sound_defaults()) + + if minetest.setting_getbool("gloopblocks_mossy_conversion") ~= false then + + gloopblocks_register_mossy_conversion({ + { "default:cobble", "default:mossycobble" }, + { "stairs:stair_cobble", "stairs:stair_mossycobble" }, + { "stairs:slab_cobble", "stairs:slab_mossycobble" }, + { "gloopblocks:cobble_road", "gloopblocks:cobble_road_mossy" }, + { "stairs:stair_cobble_road", "stairs:stair_cobble_road_mossy" }, + { "stairs:slab_cobble_road", "stairs:slab_cobble_road_mossy" }, + { "default:stonebrick", "gloopblocks:stone_brick_mossy" }, + { "stairs:stair_stonebrick", "stairs:stair_stone_brick_mossy" }, + { "stairs:slab_stonebrick", "stairs:slab_stone_brick_mossy" }, + { "default:stone", "gloopblocks:stone_mossy" }, + { "stairs:stair_stone", "stairs:stair_stone_mossy" }, + { "stairs:slab_stone", "stairs:slab_stone_mossy" }, + }) + end + + minetest.register_alias("default:stair_mossycobble", "stairs:stair_mossycobble") + minetest.register_alias("default:slab_mossycobble", "stairs:slab_mossycobble") + minetest.register_alias("gloopblocks:stair_cobble_road", "stairs:stair_cobble_road") + minetest.register_alias("gloopblocks:slab_cobble_road", "stairs:slab_cobble_road") + minetest.register_alias("gloopblocks:stair_cobble_road_mossy", "stairs:stair_cobble_road_mossy") + minetest.register_alias("gloopblocks:slab_cobble_road_mossy", "stairs:slab_cobble_road_mossy") + minetest.register_alias("gloopblocks:stair_stone_brick_mossy", "stairs:stair_stone_brick_mossy") + minetest.register_alias("gloopblocks:slab_stone_brick_mossy", "stairs:slab_stone_brick_mossy") + minetest.register_alias("gloopblocks:stair_stone_mossy", "stairs:stair_stone_mossy") + minetest.register_alias("gloopblocks:slab_stone_mossy", "stairs:slab_stone_mossy") + minetest.register_alias("gloopblocks:stair_cement", "stairs:stair_cement") + minetest.register_alias("gloopblocks:slab_cement", "stairs:slab_cement") + minetest.register_alias("gloopblocks:stair_pavement", "stairs:stair_pavement") + minetest.register_alias("gloopblocks:slab_pavement", "stairs:slab_pavement") + minetest.register_alias("gloopblocks:stair_pumice", "stairs:stair_pumice") + minetest.register_alias("gloopblocks:slab_pumice", "stairs:slab_pumice") + minetest.register_alias("gloopblocks:stair_basalt", "stairs:stair_basalt") + minetest.register_alias("gloopblocks:slab_basalt", "stairs:slab_basalt") + minetest.register_alias("gloopblocks:stair_rainbow_block", "stairs:stair_rainbow_block") + minetest.register_alias("gloopblocks:slab_rainbow_block", "stairs:slab_rainbow_block") +end + +-- Tools + +minetest.register_tool("gloopblocks:pick_cement", { + description = S("Cement Pickaxe"), + inventory_image = "gloopblocks_cement_pick.png", + tool_capabilities = { + full_punch_interval = 1.0, + max_drop_level=1, + groupcaps={ + cracky={times={[1]=3.50, [2]=1.40, [3]=0.90}, uses=25, maxlevel=2} + }, + damage_groups = {fleshy=4}, + }, +}) + +minetest.register_tool("gloopblocks:shovel_cement", { + description = S("Cement Shovel"), + inventory_image = "gloopblocks_cement_shovel.png", + tool_capabilities = { + full_punch_interval = 1.0, + max_drop_level=1, + groupcaps={ + crumbly={times={[1]=1.50, [2]=0.60, [3]=0.45}, uses=25, maxlevel=2} + }, + damage_groups = {fleshy=4}, + }, +}) + +minetest.register_tool("gloopblocks:axe_cement", { + description = S("Cement Axe"), + inventory_image = "gloopblocks_cement_axe.png", + tool_capabilities = { + full_punch_interval = 1.0, + max_drop_level=1, + groupcaps={ + choppy={times={[1]=3.00, [2]=1.30, [3]=0.80}, uses=25, maxlevel=2}, + fleshy={times={[2]=1.20, [3]=0.65}, uses=30, maxlevel=1} + }, + damage_groups = {fleshy=4}, + }, +}) + +minetest.register_tool("gloopblocks:sword_cement", { + description = S("Cement Sword"), + inventory_image = "gloopblocks_cement_sword.png", + tool_capabilities = { + full_punch_interval = 1.0, + max_drop_level=1, + groupcaps={ + fleshy={times={[1]=1.60, [2]=0.80, [3]=0.40}, uses=15, maxlevel=2}, + snappy={times={[2]=0.75, [3]=0.35}, uses=30, maxlevel=1}, + choppy={times={[3]=0.80}, uses=30, maxlevel=0} + }, + damage_groups = {fleshy=6}, + } +}) + +minetest.register_tool("gloopblocks:pick_evil", { + description = S("Evil Pickaxe"), + inventory_image = "gloopblocks_evil_pick.png", + tool_capabilities = { + full_punch_interval = 1.0, + max_drop_level=3, + groupcaps={ + cracky={times={[1]=0.10, [2]=0.10, [3]=0.10}, uses=10, maxlevel=2} + }, + damage_groups = {fleshy=6}, + }, +}) + +minetest.register_tool("gloopblocks:shovel_evil", { + description = S("Evil Shovel"), + inventory_image = "gloopblocks_evil_shovel.png", + tool_capabilities = { + full_punch_interval = 1.0, + max_drop_level=3, + groupcaps={ + crumbly={times={[1]=0.05, [2]=0.05, [3]=0.05}, uses=10, maxlevel=2} + }, + damage_groups = {fleshy=6}, + }, +}) + +minetest.register_tool("gloopblocks:axe_evil", { + description = S("Evil Axe"), + inventory_image = "gloopblocks_evil_axe.png", + tool_capabilities = { + full_punch_interval = 1.0, + max_drop_level=3, + groupcaps={ + choppy={times={[1]=0.15, [2]=0.15, [3]=0.15}, uses=10, maxlevel=2}, + fleshy={times={[1]=0.15, [2]=0.15, [3]=0.15}, uses=10, maxlevel=2} + }, + damage_groups = {fleshy=6}, + }, +}) + +minetest.register_tool("gloopblocks:sword_evil", { + description = S("Evil Sword"), + inventory_image = "gloopblocks_evil_sword.png", + tool_capabilities = { + full_punch_interval = 1.0, + max_drop_level=3, + groupcaps={ + fleshy={times={[1]=0.20, [2]=0.20, [3]=0.20}, uses=10, maxlevel=2}, + snappy={times={[1]=0.20, [2]=0.20, [3]=0.20}, uses=10, maxlevel=2}, + choppy={times={[1]=0.20, [2]=0.20, [3]=0.20}, uses=10, maxlevel=2} + }, + damage_groups = {fleshy=8}, + } +}) + +-- Other items + +minetest.register_craftitem("gloopblocks:evil_stick", { + description = S("Evil Stick"), + inventory_image = "gloopblocks_evil_stick.png", +}) + +-- define lava-cooling-based nodes and hook into the default lavacooling +-- functions to generate basalt, pumice, and obsidian + +if minetest.setting_getbool("gloopblocks_lavacooling") ~= false then + + minetest.register_node("gloopblocks:obsidian_cooled", { + description = S("Obsidian"), + tiles = {"default_obsidian.png"}, + is_ground_content = true, + sounds = default.node_sound_stone_defaults(), + groups = {cracky=1, level=2, not_in_creative_inventory=1}, + drop = "default:obsidian", + after_place_node = function(pos, placer, itemstack, pointed_thing) + minetest.add_node(pos, {name = "default:obsidian"}) + end + }) + + minetest.register_node("gloopblocks:basalt_cooled", { + description = S("Basalt"), + tiles = {"gloopblocks_basalt.png"}, + groups = {cracky=2, not_in_creative_inventory=1}, + sounds = default.node_sound_stone_defaults(), + drop = "gloopblocks:basalt", + after_place_node = function(pos, placer, itemstack, pointed_thing) + minetest.add_node(pos, {name = "gloopblocks:basalt"}) + end + }) + + minetest.register_node("gloopblocks:pumice_cooled", { + description = S("Pumice"), + tiles = {"gloopblocks_pumice.png"}, + groups = {cracky=3, not_in_creative_inventory=1}, + sounds = default.node_sound_stone_defaults(), + drop = "gloopblocks:pumice", + after_place_node = function(pos, placer, itemstack, pointed_thing) + minetest.add_node(pos, {name = "gloopblocks:pumice"}) + end + }) + + local gloopblocks_search_nearby_nodes = function(pos, node) + if minetest.get_node({x=pos.x-1, y=pos.y, z=pos.z}).name == node then return true end + if minetest.get_node({x=pos.x+1, y=pos.y, z=pos.z}).name == node then return true end + if minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z}).name == node then return true end + if minetest.get_node({x=pos.x, y=pos.y+1, z=pos.z}).name == node then return true end + if minetest.get_node({x=pos.x, y=pos.y, z=pos.z-1}).name == node then return true end + if minetest.get_node({x=pos.x, y=pos.y, z=pos.z+1}).name == node then return true end + return false + end + + default.cool_lava = function(pos, node) + if node.name == "default:lava_source" then + if gloopblocks_search_nearby_nodes(pos,"default:water_source") + or gloopblocks_search_nearby_nodes(pos,"default:water_flowing") then + minetest.set_node(pos, {name="gloopblocks:obsidian_cooled"}) + end + else -- Lava flowing + if gloopblocks_search_nearby_nodes(pos,"default:water_source") then + minetest.set_node(pos, {name="gloopblocks:basalt_cooled"}) + elseif gloopblocks_search_nearby_nodes(pos,"default:water_flowing") then + minetest.set_node(pos, {name="gloopblocks:pumice_cooled"}) + end + end + end +end + +local fence_texture = + "default_fence_overlay.png^default_steel_block.png^default_fence_overlay.png^[makealpha:255,126,126" + +minetest.register_node("gloopblocks:fence_steel", { + description = S("Steel Fence"), + drawtype = "fencelike", + tiles = {"default_steel_block.png"}, + inventory_image = fence_texture, + wield_image = fence_texture, + paramtype = "light", + sunlight_propagates = true, + is_ground_content = false, + selection_box = { + type = "fixed", + fixed = {-1/7, -1/2, -1/7, 1/7, 1/2, 1/7}, + }, + groups = {choppy = 2, oddly_breakable_by_hand = 2 }, + sounds = default.node_sound_stone_defaults(), +}) + +dofile(minetest.get_modpath("gloopblocks").."/crafts.lua") + +print(S("Gloopblocks Loaded!")) diff --git a/homedecor/bathroom_sanitation.lua b/homedecor/bathroom_sanitation.lua index bd59218..eb4a58d 100644 --- a/homedecor/bathroom_sanitation.lua +++ b/homedecor/bathroom_sanitation.lua @@ -81,11 +81,22 @@ homedecor.register("toilet_paper", { --Sink -local sink_cbox = { +local sink_sbox = { type = "fixed", fixed = { -5/16, -8/16, 1/16, 5/16, 8/16, 8/16 } } +local sink_cbox = { + type = "fixed", + fixed = { + { -5/16, 5/16, 1/16, -4/16, 8/16, 8/16 }, + { 5/16, 5/16, 1/16, 4/16, 8/16, 8/16 }, + { -5/16, 5/16, 1/16, 5/16, 8/16, 2/16 }, + { -5/16, 5/16, 6/16, 5/16, 8/16, 8/16 }, + { -4/16, -8/16, 1/16, 4/16, 5/16, 6/16 } + } +} + homedecor.register("sink", { description = S("Bathroom Sink"), mesh = "homedecor_bathroom_sink.obj", @@ -95,19 +106,10 @@ homedecor.register("sink", { "default_water.png" }, inventory_image="homedecor_bathroom_sink_inv.png", - selection_box = sink_cbox, + selection_box = sink_sbox, + collision_box = sink_cbox, groups = {cracky=3}, sounds = default.node_sound_stone_defaults(), - node_box = { - type = "fixed", - fixed = { - { -5/16, 5/16, 1/16, -4/16, 8/16, 8/16 }, - { 5/16, 5/16, 1/16, 4/16, 8/16, 8/16 }, - { -5/16, 5/16, 1/16, 5/16, 8/16, 2/16 }, - { -5/16, 5/16, 6/16, 5/16, 8/16, 8/16 }, - { -4/16, -8/16, 1/16, 4/16, 5/16, 6/16 } - } - }, on_destruct = function(pos) homedecor.stop_particle_spawner({x=pos.x, y=pos.y+1, z=pos.z}) end @@ -127,7 +129,8 @@ local function taps_on_rightclick(pos, node, clicker, itemstack, pointed_thing) velocity_x = { min = -0.1, max = 0.1 }, velocity_y = -0.3, velocity_z = { min = -0.1, max = 0 }, - spread = 0 + spread = 0, + die_on_collision = true, } homedecor.start_particle_spawner(pos, node, particledef, "homedecor_faucet") end diff --git a/homedecor/handlers/water_particles.lua b/homedecor/handlers/water_particles.lua index d318d58..8042599 100644 --- a/homedecor/handlers/water_particles.lua +++ b/homedecor/handlers/water_particles.lua @@ -71,6 +71,7 @@ function homedecor.start_particle_spawner(pos, node, particledef, soundname) amount = 60, time = 0, collisiondetection = true, + collision_removal = particledef.die_on_collision, minpos = {x=pos.x - minx, y=pos.y + outlety, z=pos.z - minz}, maxpos = {x=pos.x - maxx, y=pos.y + outlety, z=pos.z - maxz}, minvel = {x = minvelx, y = velocityy, z = minvelz}, diff --git a/led_marquee/init.lua b/led_marquee/init.lua index cb52e66..d035f15 100644 --- a/led_marquee/init.lua +++ b/led_marquee/init.lua @@ -412,6 +412,11 @@ for i = 31, 255 do reset_meta(pos) end, on_receive_fields = function(pos, formname, fields, sender) + local name = sender:get_player_name() + if minetest.is_protected(pos, name) and not minetest.check_player_privs(name, {protection_bypass=true}) then + minetest.record_protection_violation(pos, name) + return + end if (fields.channel) then minetest.get_meta(pos):set_string("channel", fields.channel) end diff --git a/locks/shared_locked_xdoors2.lua b/locks/shared_locked_xdoors2.lua index eb96f5c..a57bc45 100644 --- a/locks/shared_locked_xdoors2.lua +++ b/locks/shared_locked_xdoors2.lua @@ -155,7 +155,7 @@ minetest.register_node("locks:door", { end
local fdir = 0
- local placer_pos = placer:getpos()
+ local placer_pos = placer:get_pos()
if placer_pos then
dir = {
x = above.x - placer_pos.x,
diff --git a/maptools/CHANGELOG.md b/maptools/CHANGELOG.md index 6e022a4..2892512 100644 --- a/maptools/CHANGELOG.md +++ b/maptools/CHANGELOG.md @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [Unreleased] +## [1.1.0] - 2019-03-23 + ### Changed - Increased the range of the Admin Pickaxe from 12 to 20 nodes. @@ -16,4 +18,5 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Initial versioned release. -[Unreleased]: https://github.com/minetest-mods/maptools/compare/v1.0.0...HEAD +[Unreleased]: https://github.com/minetest-mods/maptools/compare/v1.1.0...HEAD +[1.1.0]: https://github.com/minetest-mods/maptools/compare/v1.0.0...v1.1.0 diff --git a/maptools/NODES.md b/maptools/NODES.md deleted file mode 100644 index 5e0c079..0000000 --- a/maptools/NODES.md +++ /dev/null @@ -1,26 +0,0 @@ -# Item names for spawning the items using /give or /giveme - -## Items - -- `admin_pick`: magenta pickaxe, infinite durability, mines everything including unbreakable blocks instantly. No drops. Don't put this pickaxe in the hands of a griefer, of course. -- `admin_pick_with_drops`: same as admin pickaxe, but drops stuff. -- `infinite_fuel`: fuel lasting for a (near)-infinite time. Don't worry about the "near" * it lasts for about 50 in-real-life years. -- `super_apple`: a yellow apple which heals 20 HP. -- `copper_coin`, -- `silver_coin`, -- `gold_coin`: these have nothing to do with the More Ores mod; they can be used as a currency for trading, or as an universal currency for mods that add shops. - -## Blocks - -**[!]** denotes an unpointable, unbreakable block; be very careful with them, they cannot be removed by hand (they can only be removed with WorldEdit or similar). -- `(block)_u` : unbreakable, non-flammable, non-falling, non-decaying blocks, most common blocks have their unbreakable form (examples: maptools:stone or maptools:wood for unbreakable stone/wood). Examples: `stone_u`, `wood_u`, `glass_u`, … -- `full_grass`: unbreakable block with the grass texture on all sides. -- `player_clip`: **[!]** invisible block, not pointable. -- `full_clip`: invisible block, pointable. Also available as a thin face: full_clip_face. -- `smoke_block`: some smoke (does not harm players or entities). -- `no_build`: **[!]** very basic building prevention. -- `no_interact`: prevents interacting through the block (opening chests, furnaces, attacking entities, …). -- `damage_(1…5)`: **[!]** damaging blocks. The damage is in half hearts and ranges from 1 to 5 (0.5 to 2.5 hearts damage every second). -- `kill`: **[!]** instant kill (deals 10 heart damage) blocks. -- `light_block`: **[!]** invisible non-solid block, prevents light from passing through. -- `light_bulb`: **[!]** invisible non-solid block, emitting a good amount of light. diff --git a/maptools/NODES_ITEMS.md b/maptools/NODES_ITEMS.md new file mode 100644 index 0000000..3e0f1f0 --- /dev/null +++ b/maptools/NODES_ITEMS.md @@ -0,0 +1,39 @@ +# List of nodes/items + +To use an item, make sure you have the `give` privilege, then use +`/give <player> <item code> [amount]` or `/giveme <item code> [amount]`. + +**Tip:** To give yourself a large amount of items quickly (65535 as of writing), +use `-1` as the amount. + +## Nodes + +:warning: denotes an unpointable, unbreakable block; be very careful with them, +as they cannot be removed by hand (they can only be removed with WorldEdit or +similar). + +| Item code | Description | +| ----------------------: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `maptools:{block}_u` | Unbreakable, non-flammable, non-falling, non-decaying blocks. Most common default blocks have an unbreakable form available (`maptools:stone_u`, `maptools:wood_u`, …) | +| `maptools:full_grass` | Unbreakable block with the grass texture on all sides. | +| `maptools:player_clip` | :warning: Invisible, non-pointable block that blocks players and entities. | +| `maptools:full_clip` | Invisible, pointable block that blocks players and entities. Also available as a thin face (`maptools:full_clip_face`). | +| `maptools:smoke_block` | Some smoke (doesn't damage players or entities). | +| `maptools:no_build` | :warning: Very basic building prevention. | +| `maptools:no_interact` | Prevents interacting through the block (opening chests, furnaces, attacking entities, …), but can still be walked through. | +| `maptools:damage_{1…5}` | :warning: Damaging blocks which damage players by 1 to 5 HP per second. | +| `maptools:kill` | :warning: Instant kill blocks (damages players by 20 HP per second). | +| `maptools:light_block` | :warning: Invisible non-solid block, prevents light from passing through. | +| `maptools:light_bulb` | :warning: Invisible non-solid block, emitting the maximum amount of light. | + +## Items + +| Item code | Description | +| -------------------------------: | ------------------------------------------------------------------------------------------------------------------------------------------------- | +| `maptools:admin_pick` | A bright magenta pickaxe with infinite durability, digs everything including unbreakable blocks instantly. No drops are given when digging nodes. | +| `maptools:admin_pick_with_drops` | Same as the admin pickaxe, but drops are given when digging nodes. | +| `maptools:infinite_fuel` | Fuel lasting for a near-infinite time (about 50 real-life years). | +| `maptools:super_apple` | A yellow apple which heals the player by 20 HP when used. | +| `maptools:copper_coin` | Decorative item (can be used in mini-games). | +| `maptools:silver_coin` | Decorative item (can be used in mini-games). | +| `maptools:gold_coin` | Decorative item (can be used in mini-games). | diff --git a/maptools/README.md b/maptools/README.md index 9474ce5..3f89750 100644 --- a/maptools/README.md +++ b/maptools/README.md @@ -3,7 +3,10 @@ Map Tools for [Minetest](https://www.minetest.net/), a free and open source infinite world block sandbox game. -[**Forum topic**](https://forum.minetest.net/viewtopic.php?f=11&t=1882) +## Resources + +- [Forum topic](https://forum.minetest.net/viewtopic.php?f=11&t=1882) +- [List of nodes and items available](NODES_ITEMS.md) ## Installation @@ -60,13 +63,13 @@ on that line. ## Version compatibility -Map Tools is currently primarily tested with Minetest 0.4.16. +Map Tools is currently primarily tested with Minetest 0.4.17. It may or may not work with newer or older versions. Issues arising in older -versions than 0.4.16 will generally not be fixed. +versions than 0.4.17 will generally not be fixed. ## License -Copyright © 2012-2017 Hugo Locurcio and contributors +Copyright © 2012-2019 Hugo Locurcio and contributors - Map Tools code is licensed under the zlib license, see [`LICENSE.md`](LICENSE.md) for details. diff --git a/maptools/depends.txt b/maptools/depends.txt index 4ad96d5..9207dab 100644 --- a/maptools/depends.txt +++ b/maptools/depends.txt @@ -1 +1,2 @@ default +intllib? diff --git a/mesecons_mvps/init.lua b/mesecons_mvps/init.lua index b8abdd7..7b90c9f 100644 --- a/mesecons_mvps/init.lua +++ b/mesecons_mvps/init.lua @@ -217,7 +217,7 @@ function mesecon.mvps_move_objects(pos, dir, nodestack, movefactor) movefactor = movefactor or 1 dir = vector.multiply(dir, movefactor) for id, obj in pairs(minetest.object_refs) do - local obj_pos = obj:getpos() + local obj_pos = obj:get_pos() local cbox = obj:get_properties().collisionbox local min_pos = vector.add(obj_pos, vector.new(cbox[1], cbox[2], cbox[3])) local max_pos = vector.add(obj_pos, vector.new(cbox[4], cbox[5], cbox[6])) diff --git a/molehills/molehills_settings.txt b/molehills/molehills_settings.txt index 2079574..1afc592 100644 --- a/molehills/molehills_settings.txt +++ b/molehills/molehills_settings.txt @@ -2,5 +2,5 @@ Molehills_Max_Count = 320 -- absolute maximum number in an area of 80x80x80 nodes -Molehills_Rarity = 87 -- larger values make molehills more rare (100 means chance of 0 %) +Molehills_Rarity = 95 -- larger values make molehills more rare (100 means chance of 0 %) diff --git a/moreblocks/CHANGELOG.md b/moreblocks/CHANGELOG.md index aa9942c..0c94859 100644 --- a/moreblocks/CHANGELOG.md +++ b/moreblocks/CHANGELOG.md @@ -7,8 +7,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [Unreleased] +## [1.3.0] - 2019-03-23 + ### Changed +- Stairs+ are now displayed in the creative inventory by default. +- Localization files now use the gettext `.po` format. - Updated intllib support to avoid using deprecated functions. ### Fixed @@ -68,6 +72,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Initial versioned release. -[Unreleased]: https://github.com/minetest-mods/moreblocks/compare/v1.2.0...HEAD +[Unreleased]: https://github.com/minetest-mods/moreblocks/compare/v1.3.0...HEAD +[1.3.0]: https://github.com/minetest-mods/moreblocks/compare/v1.2.0...v1.3.0 [1.2.0]: https://github.com/minetest-mods/moreblocks/compare/v1.1.0...v1.2.0 [1.1.0]: https://github.com/minetest-mods/moreblocks/compare/v1.0.0...v1.1.0 diff --git a/moreblocks/README.md b/moreblocks/README.md index 4e58814..45b5af6 100644 --- a/moreblocks/README.md +++ b/moreblocks/README.md @@ -60,9 +60,9 @@ on that line. ## Version compatibility -More Blocks is currently primarily tested with Minetest 0.4.16. +More Blocks is currently primarily tested with Minetest 0.4.17. It may or may not work with newer or older versions. Issues arising in older -versions than 0.4.16 will generally not be fixed. +versions than 0.4.17 will generally not be fixed. ## License diff --git a/moreblocks/circular_saw.lua b/moreblocks/circular_saw.lua index 1dce479..9395a2e 100644 --- a/moreblocks/circular_saw.lua +++ b/moreblocks/circular_saw.lua @@ -6,6 +6,7 @@ Licensed under the zlib license. See LICENSE.md for more information. --]] local S = moreblocks.S +local F = minetest.formspec_escape circular_saw = {} @@ -126,15 +127,20 @@ end function circular_saw:reset(pos) local meta = minetest.get_meta(pos) local inv = meta:get_inventory() + local owned_by = meta:get_string("owner") + + if owned_by and owned_by ~= "" then + owned_by = (" (%s)"):format(S("owned by @1", meta:get_string("owner"))) + else + owned_by = "" + end inv:set_list("input", {}) inv:set_list("micro", {}) inv:set_list("output", {}) - meta:set_int("anz", 0) - meta:set_string("infotext", - S("Circular Saw is empty (owned by %s)") - :format(meta:get_string("owner") or "")) + meta:set_int("anz", 0) + meta:set_string("infotext", S("Circular Saw is empty") .. owned_by) end @@ -164,9 +170,17 @@ function circular_saw:update_inventory(pos, amount) end local node_name = stack:get_name() or "" + local node_def = stack:get_definition() local name_parts = circular_saw.known_nodes[node_name] or "" local modname = name_parts[1] or "" local material = name_parts[2] or "" + local owned_by = meta:get_string("owner") + + if owned_by and owned_by ~= "" then + owned_by = (" (%s)"):format(S("owned by @1", meta:get_string("owner"))) + else + owned_by = "" + end inv:set_list("input", { -- Display as many full blocks as possible: node_name.. " " .. math.floor(amount / 8) @@ -191,8 +205,10 @@ function circular_saw:update_inventory(pos, amount) meta:set_int("anz", amount) meta:set_string("infotext", - S("Circular Saw is working on %s (owned by %s)") - :format(material, meta:get_string("owner") or "")) + S("Circular Saw is working on @1", + node_def and node_def.description or material + ) .. owned_by + ) end @@ -351,14 +367,14 @@ function circular_saw.on_construct(pos) local fancy_inv = default.gui_bg..default.gui_bg_img..default.gui_slots meta:set_string( "formspec", "size[11,10]"..fancy_inv.. - "label[0,0;" ..S("Input\nmaterial").. "]" .. + "label[0,0;" ..F(S("Input\nmaterial")).. "]" .. "list[current_name;input;1.5,0;1,1;]" .. - "label[0,1;" ..S("Left-over").. "]" .. + "label[0,1;" ..F(S("Left-over")).. "]" .. "list[current_name;micro;1.5,1;1,1;]" .. - "label[0,2;" ..S("Recycle\noutput").. "]" .. + "label[0,2;" ..F(S("Recycle\noutput")).. "]" .. "list[current_name;recycle;1.5,2;1,1;]" .. - "field[0.3,3.5;1,1;max_offered;" ..S("Max").. ":;${max_offered}]" .. - "button[1,3.2;1,1;Set;" ..S("Set").. "]" .. + "field[0.3,3.5;1,1;max_offered;" ..F(S("Max")).. ":;${max_offered}]" .. + "button[1,3.2;1,1;Set;" ..F(S("Set")).. "]" .. "list[current_name;output;2.8,0;8,6;]" .. "list[current_player;main;1.5,6.25;8,4;]" .. "listring[current_name;output]" .. @@ -427,10 +443,14 @@ minetest.register_node("moreblocks:circular_saw", { after_place_node = function(pos, placer) local meta = minetest.get_meta(pos) local owner = placer and placer:get_player_name() or "" + local owned_by = owner + + if owner ~= "" then + owned_by = (" (%s)"):format(S("owned by @1", owner)) + end + meta:set_string("owner", owner) - meta:set_string("infotext", - S("Circular Saw is empty (owned by %s)") - :format(owner)) + meta:set_string("infotext", S("Circular Saw is empty") .. owned_by) end, -- The amount of items offered per shape can be configured: diff --git a/moreblocks/config.lua b/moreblocks/config.lua index a855d5c..3a7af49 100644 --- a/moreblocks/config.lua +++ b/moreblocks/config.lua @@ -26,4 +26,4 @@ local function setting(settingtype, name, default) end -- Show stairs/slabs/panels/microblocks in creative inventory (true or false): -setting("bool", "stairsplus_in_creative_inventory", false) +setting("bool", "stairsplus_in_creative_inventory", true) diff --git a/moreblocks/locale/de.po b/moreblocks/locale/de.po new file mode 100644 index 0000000..4de81bf --- /dev/null +++ b/moreblocks/locale/de.po @@ -0,0 +1,286 @@ +# German translation for More Blocks. +# Copyright © 2011-2019 Hugo Locurcio and contributors +# This file is distributed under the same license as the More Blocks package. +# Xanthin, 2014. +# CodeXP <codexp@gmx.net>, 2018. +msgid "" +msgstr "" +"Project-Id-Version: More Blocks\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-07-13 12:37+0200\n" +"PO-Revision-Date: \n" +"Last-Translator: CodeXP <codexp@gmx.net>\n" +"Language-Team: \n" +"Language: de\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: circular_saw.lua +msgid "Circular Saw" +msgstr "Kreissäge" + +#: circular_saw.lua +msgid "" +"Input\n" +"material" +msgstr "" +"Ausgangs-\n" +"material" + +#: circular_saw.lua +msgid "Left-over" +msgstr "Rest" + +#: circular_saw.lua +msgid "Max" +msgstr "Anzahl" + +#: circular_saw.lua +msgid "" +"Recycle\n" +"output" +msgstr "" +"Wiederver-\n" +"werten" + +#: circular_saw.lua +msgid "Set" +msgstr "Ok" + +#: circular_saw.lua +msgid "owned by @1" +msgstr "gehört @1" + +#: circular_saw.lua +msgid "Circular Saw is empty" +msgstr "Kreissäge ist leer" + +#: circular_saw.lua +msgid "Circular Saw is working on @1" +msgstr "Kreissäge arbeitet mit @1" + +#: init.lua +msgid "[moreblocks] loaded." +msgstr "[moreblocks] geladen." + +#: nodes.lua +msgid "Deprecated" +msgstr "veraltet" + +#: nodes.lua +msgid "All-faces Acacia Tree" +msgstr "allseitiger Akazienbaumstamm" + +#: nodes.lua +msgid "All-faces Aspen Tree" +msgstr "allseitiger Espenbaumstamm" + +#: nodes.lua +msgid "All-faces Jungle Tree" +msgstr "allseitiger Tropenbaumstamm" + +#: nodes.lua +msgid "All-faces Pine Tree" +msgstr "allseitiger Kieferbaumstamm" + +#: nodes.lua +msgid "All-faces Tree" +msgstr "allseitiger Baumstamm" + +#: nodes.lua +msgid "Cactus Brick" +msgstr "Kaktusziegel" + +#: nodes.lua +msgid "Cactus Checker" +msgstr "Kaktus-Mosaik" + +#: nodes.lua +msgid "Centered Wooden Tile" +msgstr "Holzfliese mittig" + +#: nodes.lua +msgid "Checker Stone Tile" +msgstr "Stein-Mosaik" + +#: nodes.lua +msgid "Circle Stone Bricks" +msgstr "Kreissteinziegel" + +#: nodes.lua +msgid "Clean Glass" +msgstr "Klares Glas" + +#: nodes.lua +msgid "Coal Checker" +msgstr "Kohlen-Mosaik" + +#: nodes.lua +msgid "Coal Glass" +msgstr "Kohleglas" + +#: nodes.lua +msgid "Coal Stone" +msgstr "Kohlestein" + +#: nodes.lua +msgid "Coal Stone Bricks" +msgstr "Kohlesteinziegel" + +#: nodes.lua +msgid "Compressed Cobblestone" +msgstr "Gepresster Kopfsteinpflaster" + +#: nodes.lua +msgid "Compressed Dirt" +msgstr "Gepresste Erde" + +#: nodes.lua +msgid "Copper Patina Block" +msgstr "Kupfer Edelrostblock" + +#: nodes.lua +msgid "Empty Shelf" +msgstr "Leeres Regal" + +#: nodes.lua +msgid "Full Wooden Tile" +msgstr "Vollholzfliese" + +#: nodes.lua +msgid "Glow Glass" +msgstr "Leuchtglas" + +#: nodes.lua +msgid "Iron Checker" +msgstr "Metall-Mosaik" + +#: nodes.lua +msgid "Iron Glass" +msgstr "metallisiertes Glas" + +#: nodes.lua +msgid "Iron Stone" +msgstr "Eisenstein" + +#: nodes.lua +msgid "Iron Stone Bricks" +msgstr "Eisensteinziegel" + +#: nodes.lua +msgid "Plankstone" +msgstr "Brettstein" + +#: nodes.lua +msgid "Rope" +msgstr "Seil" + +#: nodes.lua +msgid "Split Stone Tile" +msgstr "Geteilte Steinfliese" + +#: nodes.lua +msgid "Stone Bricks" +msgstr "Steinziegel" + +#: nodes.lua +msgid "Stone Tile" +msgstr "Steinfliese" + +#: nodes.lua +msgid "Super Glow Glass" +msgstr "Superleuchtglas" + +#: nodes.lua +msgid "Sweeper" +msgstr "Besen" + +#: nodes.lua +msgid "Tar" +msgstr "Teer" + +#: nodes.lua +msgid "Trap Desert Stone" +msgstr "Wüstensteinfalle" + +#: nodes.lua +msgid "Trap Glass" +msgstr "Glasfalle" + +#: nodes.lua +msgid "Trap Glow Glass" +msgstr "Leuchtglasfalle" + +#: nodes.lua +msgid "Trap Obsidian" +msgstr "Obsidianfalle" + +#: nodes.lua +msgid "Trap Obsidian Glass" +msgstr "Obsidianglasfalle" + +#: nodes.lua +msgid "Trap Sandstone" +msgstr "Sandsteinfalle" + +#: nodes.lua +msgid "Trap Stone" +msgstr "Steinfalle" + +#: nodes.lua +msgid "Trap Super Glow Glass" +msgstr "Superleuchtglasfalle" + +#: nodes.lua +msgid "Wooden Tile" +msgstr "Holzfliese" + +#: nodes.lua +msgid "Offset Wooden Tile" +msgstr "Holzfliese versetzt" + +#: nodes.lua +msgid "Downwards Wooden Tile" +msgstr "Holzfliese unten" + +#: nodes.lua +msgid "Leftwards Wooden Tile" +msgstr "Holzfliese links" + +#: nodes.lua +msgid "Rightwards Wooden Tile" +msgstr "Holzfliese rechts" + +#: ownership.lua +msgid "Sorry, @1 owns that spot." +msgstr "Tut mir leid, dieser Bereich gehört @1." + +#: ownership.lua +msgid "someone" +msgstr "jemand" + +#: stairsplus/common.lua +#, lua-format +msgid "%s Microblock" +msgstr "%smikroblock" + +#: stairsplus/common.lua stairsplus/slabs.lua +#, lua-format +msgid "%s Slab" +msgstr "%splatte" + +#: stairsplus/common.lua +#, lua-format +msgid "%s Slope" +msgstr "%sneigung" + +#: stairsplus/common.lua +#, lua-format +msgid "%s Panel" +msgstr "%spaneel" + +#: stairsplus/common.lua +#, lua-format +msgid "%s Stairs" +msgstr "%streppe" diff --git a/moreblocks/locale/de.txt b/moreblocks/locale/de.txt deleted file mode 100644 index 03b71f6..0000000 --- a/moreblocks/locale/de.txt +++ /dev/null @@ -1,66 +0,0 @@ -# Translation by Xanthin - -###init.lua### -[moreblocks] loaded. = [moreblocks] geladen. - -###nodes.lua### -Jungle Wood Fence = Tropenholzzaun -Empty Bookshelf = Leeres Buecherregal -Clean Glass = Klares Glas -Plankstone = Brettstein -Wooden Tile = Holzfliese -Full Wooden Tile = Vollholzfliese -Centered Wooden Tile = Holzfliese mittig -Up Wooden Tile = Holzfliese oben -Down Wooden Tile = Holzfliese unten -Left Wooden Tile = Holzfliese links -Right Wooden Tile = Holzfliese rechts -Circle Stone Bricks = Kreissteinziegel -Stone Tile = Steinfliese -Split Stone Tile = Geteilte Steinfliese -Glow Glass = Leuchtglas -Super Glow Glass = Superleuchtglas -Coal Glass = Kohleglas -Iron Glass = Eisenglas -Coal Checker = Karierte Kohle -Iron Checker = Kariertes Eisen -Trap Stone = Steinfalle -Trap Glass = Glasfalle -Trap Glow Glass = Leuchtglasfalle -Trap Super Glow Glass = Superleuchtglasfalle -Coal Stone = Kohlestein -Iron Stone = Eisenstein -Coal Stone Bricks = Kohlesteinziegel -Iron Stone Bricks = Eisensteinziegel -Cactus Checker = Karierter Kaktus -Cactus Brick = Kaktusziegel -Sweeper = Besen -Jungle Stick = Tropenholzstock -Rope = Seil -All-faces Tree = Baumscheibenstamm - -###circular_saw.lua### -Circular Saw = Kreissaege -Circular saw, empty (owned by %s) = Kreissaege, leer (gehoert %s) -Circular saw, working with %s (owned by %s) = Kreissaege, arbeitet mit %s (gehoert %s) -Circular saw, empty = Kreissaege, leer -Circular saw is empty (owned by %s) = Kreissaege ist leer (gehoert %s) - -Input\nmaterial = Ausgangs-\nmaterial -Left-over = Rest -Max = Anzahl -Set = Ok -Recycle\noutput = Wiederver-\nwerten - -###./stairsplus/*### -%s Stairs = %streppe -%s Slab = %sstufe -%s Panel = %spaneel -%s Microblock = %smikroblock - -%s Pane = %sscheibe -%s Fence = %szaun - -###ownership.lua### -someone = jemand -Sorry, %s owns that spot. = Tut mir leid, %s gehoert diese Stelle. diff --git a/moreblocks/locale/es.po b/moreblocks/locale/es.po new file mode 100644 index 0000000..0c3fd0e --- /dev/null +++ b/moreblocks/locale/es.po @@ -0,0 +1,282 @@ +# Spanish translation for More Blocks. +# Copyright © 2011-2019 Hugo Locurcio and contributors +# This file is distributed under the same license as the More Blocks package. +# kaeza, 2013. +# CodeXP <codexp@gmx.net>, 2018. +msgid "" +msgstr "" +"Project-Id-Version: More Blocks\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-07-13 12:37+0200\n" +"PO-Revision-Date: \n" +"Last-Translator: CodeXP <codexp@gmx.net>\n" +"Language-Team: \n" +"Language: es\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: circular_saw.lua +msgid "Circular Saw" +msgstr "" + +#: circular_saw.lua +msgid "" +"Input\n" +"material" +msgstr "" + +#: circular_saw.lua +msgid "Left-over" +msgstr "" + +#: circular_saw.lua +msgid "Max" +msgstr "" + +#: circular_saw.lua +msgid "" +"Recycle\n" +"output" +msgstr "" + +#: circular_saw.lua +msgid "Set" +msgstr "" + +#: circular_saw.lua +msgid "owned by @1" +msgstr "" + +#: circular_saw.lua +msgid "Circular Saw is empty" +msgstr "" + +#: circular_saw.lua +msgid "Circular Saw is working on @1" +msgstr "" + +#: init.lua +msgid "[moreblocks] loaded." +msgstr "[moreblocks] cargado." + +#: nodes.lua +msgid "Deprecated" +msgstr "" + +#: nodes.lua +msgid "All-faces Acacia Tree" +msgstr "" + +#: nodes.lua +msgid "All-faces Aspen Tree" +msgstr "" + +#: nodes.lua +msgid "All-faces Jungle Tree" +msgstr "" + +#: nodes.lua +msgid "All-faces Pine Tree" +msgstr "" + +#: nodes.lua +msgid "All-faces Tree" +msgstr "Tronco de Árbol" + +#: nodes.lua +msgid "Cactus Brick" +msgstr "Ladrillos de Cactus" + +#: nodes.lua +msgid "Cactus Checker" +msgstr "Cuadros de Cactus" + +#: nodes.lua +msgid "Centered Wooden Tile" +msgstr "Parquet Centrado" + +#: nodes.lua +msgid "Checker Stone Tile" +msgstr "" + +#: nodes.lua +msgid "Circle Stone Bricks" +msgstr "Bloques de Piedra Circulares" + +#: nodes.lua +msgid "Clean Glass" +msgstr "Cristal Limpio" + +#: nodes.lua +msgid "Coal Checker" +msgstr "Cuadros de Carbón" + +#: nodes.lua +msgid "Coal Glass" +msgstr "Cristal con Carbón" + +#: nodes.lua +msgid "Coal Stone" +msgstr "Carbón y Piedra" + +#: nodes.lua +msgid "Coal Stone Bricks" +msgstr "" + +#: nodes.lua +msgid "Compressed Cobblestone" +msgstr "" + +#: nodes.lua +msgid "Compressed Dirt" +msgstr "" + +#: nodes.lua +msgid "Copper Patina Block" +msgstr "" + +#: nodes.lua +msgid "Empty Shelf" +msgstr "" + +#: nodes.lua +msgid "Full Wooden Tile" +msgstr "Parquet Completo" + +#: nodes.lua +msgid "Glow Glass" +msgstr "Cristal Brillante" + +#: nodes.lua +msgid "Iron Checker" +msgstr "Cuadros de Hierro" + +#: nodes.lua +msgid "Iron Glass" +msgstr "Cristal con Hierro" + +#: nodes.lua +msgid "Iron Stone" +msgstr "Hierro y Piedra" + +#: nodes.lua +msgid "Iron Stone Bricks" +msgstr "" + +#: nodes.lua +msgid "Plankstone" +msgstr "Tablones de piedra" + +#: nodes.lua +msgid "Rope" +msgstr "Soga" + +#: nodes.lua +msgid "Split Stone Tile" +msgstr "Baldosas de Piedra Partida" + +#: nodes.lua +msgid "Stone Bricks" +msgstr "" + +#: nodes.lua +msgid "Stone Tile" +msgstr "Baldosa de Piedra" + +#: nodes.lua +msgid "Super Glow Glass" +msgstr "Cristal Súper Brillante" + +#: nodes.lua +msgid "Sweeper" +msgstr "Limpiador" + +#: nodes.lua +msgid "Tar" +msgstr "" + +#: nodes.lua +msgid "Trap Desert Stone" +msgstr "" + +#: nodes.lua +msgid "Trap Glass" +msgstr "Cristal Trampa" + +#: nodes.lua +msgid "Trap Glow Glass" +msgstr "" + +#: nodes.lua +msgid "Trap Obsidian" +msgstr "" + +#: nodes.lua +msgid "Trap Obsidian Glass" +msgstr "" + +#: nodes.lua +msgid "Trap Sandstone" +msgstr "" + +#: nodes.lua +msgid "Trap Stone" +msgstr "Piedra Trampa" + +#: nodes.lua +msgid "Trap Super Glow Glass" +msgstr "" + +#: nodes.lua +msgid "Wooden Tile" +msgstr "Parquet" + +#: nodes.lua +msgid "Offset Wooden Tile" +msgstr "" + +#: nodes.lua +msgid "Downwards Wooden Tile" +msgstr "" + +#: nodes.lua +msgid "Leftwards Wooden Tile" +msgstr "" + +#: nodes.lua +msgid "Rightwards Wooden Tile" +msgstr "" + +#: ownership.lua +msgid "Sorry, @1 owns that spot." +msgstr "" + +#: ownership.lua +msgid "someone" +msgstr "" + +#: stairsplus/common.lua +#, lua-format +msgid "%s Microblock" +msgstr "Microbloque de %s" + +#: stairsplus/common.lua stairsplus/slabs.lua +#, lua-format +msgid "%s Slab" +msgstr "Losa de %s" + +#: stairsplus/common.lua +#, lua-format +msgid "%s Slope" +msgstr "" + +#: stairsplus/common.lua +#, lua-format +msgid "%s Panel" +msgstr "Panel de %s" + +#: stairsplus/common.lua +#, lua-format +msgid "%s Stairs" +msgstr "Escalera de %s" diff --git a/moreblocks/locale/es.txt b/moreblocks/locale/es.txt deleted file mode 100644 index e3b1eab..0000000 --- a/moreblocks/locale/es.txt +++ /dev/null @@ -1,65 +0,0 @@ -###init.lua### -[moreblocks] loaded. = [moreblocks] cargado. - -###nodes.lua### -Jungle Wood Fence = Valla de madera tropical -Empty Bookshelf = Librería vacía -Clean Glass = Cristal límpido -Plankstone = Piedra en planchas -Wooden Tile = Caldosa de madera -Full Wooden Tile = Parquet completo -Centered Wooden Tile = Parquet centrado -Up Wooden Tile = Parquet superior -Down Wooden Tile = Parquet inferior -Left Wooden Tile = Parquet izquierdo -Right Wooden Tile = Parquet derecho -Circle Stone Bricks = Ladrillo de piedra circulares -Stone Tile = Baldosa de piedra -Split Stone Tile = Baldosa de piedra partida -Glow Glass = Cristal brillante -Super Glow Glass = Cristal súper brillante -Coal Glass = Cristal armado de carbón -Iron Glass = Cristal armado de hierro -Coal Checker = Mosaico de carbón -Iron Checker = Mosaico de hierro -Trap Stone = Trampa de piedra -Trap Glass = Trampa de cristal -Trap Glow Glass = Trampa de cristal brillante -Trap Super Glow Glass = Trampa de cristal súper brillante -Coal Stone = Piedra con carbón -Iron Stone = Piedra con hierro -Coal Stone Bricks = Ladrillos de piedra con carbón -Iron Stone Bricks = Ladrillos de piedra con hierro -Cactus Checker = Mosaico de cactus -Cactus Brick = Ladrillo de cactus -Sweeper = Limpiador -Jungle Stick = Palo de madera tropical -Rope = Cuerda -All-faces Tree = madera - -###circular_saw.lua### -Circular Saw = Sierra circular -Circular saw, empty (owned by %s) = Sierra circular, vacía (propiedad de %s) -Circular saw, working with %s (owned by %s) = Sierra circular, trabajando con %s (propiedad de %s) -Circular saw, empty = Sierra circular, vacía -Circular saw is empty (owned by %s) = La sierra circular está vacía (propiedad de %s) - -Input\nmaterial = Entrada de\nmaterial: -Left-over = Remanente: -Max = Máx. -Set = Guardar -Recycle\noutput = Salida de\nreciclaje: - -###ownership.lua### -someone = alguien -Sorry, %s owns that spot. = Lo siento, esto pertenece a %s. - -###./stairsplus/*### -%s Stairs = Escaleras de %s -%s Slab = Losa de %s -%s Panel = Panel de %s -%s Microblock = Microbloque de %s -%s Slope = Biselado de %s - -%s Pane = Panel de %s -%s Fence = Valla de %s diff --git a/moreblocks/locale/fr.po b/moreblocks/locale/fr.po new file mode 100644 index 0000000..3752604 --- /dev/null +++ b/moreblocks/locale/fr.po @@ -0,0 +1,287 @@ +# French translation for More Blocks. +# Copyright © 2011-2019 Hugo Locurcio and contributors +# This file is distributed under the same license as the More Blocks package. +# Hugo Locurcio <hugo.locurcio@hugo.pro>, 2013-2019. +# Jat15, 2013. +# CodeXP <codexp@gmx.net>, 2018. +msgid "" +msgstr "" +"Project-Id-Version: More Blocks\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-07-13 12:37+0200\n" +"PO-Revision-Date: 2019-03-20 21:10+0100\n" +"Last-Translator: Hugo Locurcio <hugo.locurcio@hugo.pro>\n" +"Language-Team: \n" +"Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: circular_saw.lua +msgid "Circular Saw" +msgstr "Scie circulaire" + +#: circular_saw.lua +msgid "" +"Input\n" +"material" +msgstr "" +"Matériau\n" +"d'entrée" + +#: circular_saw.lua +msgid "Left-over" +msgstr "Reste" + +#: circular_saw.lua +msgid "Max" +msgstr "Max" + +#: circular_saw.lua +msgid "" +"Recycle\n" +"output" +msgstr "" +"Sortie à\n" +"recycler" + +#: circular_saw.lua +msgid "Set" +msgstr "Définir" + +#: circular_saw.lua +msgid "owned by @1" +msgstr "propriété de @1" + +#: circular_saw.lua +msgid "Circular Saw is empty" +msgstr "Scie circulaire vide" + +#: circular_saw.lua +msgid "Circular Saw is working on @1" +msgstr "Scie circulaire manipulant @1" + +#: init.lua +msgid "[moreblocks] loaded." +msgstr "[moreblocks] a été chargé." + +#: nodes.lua +msgid "Deprecated" +msgstr "déprécié" + +#: nodes.lua +msgid "All-faces Acacia Tree" +msgstr "Tronc d'arbre d'acacia (toutes faces)" + +#: nodes.lua +msgid "All-faces Aspen Tree" +msgstr "Tronc d'arbre de peuplier (toutes faces)" + +#: nodes.lua +msgid "All-faces Jungle Tree" +msgstr "Tronc d'arbre de jungle (toutes faces)" + +#: nodes.lua +msgid "All-faces Pine Tree" +msgstr "Tronc d'arbre de pin (toutes faces)" + +#: nodes.lua +msgid "All-faces Tree" +msgstr "Tronc d'arbre (toutes faces)" + +#: nodes.lua +msgid "Cactus Brick" +msgstr "Briques de cactus" + +#: nodes.lua +msgid "Cactus Checker" +msgstr "Damier en cactus" + +#: nodes.lua +msgid "Centered Wooden Tile" +msgstr "Dalle en bois centrée" + +#: nodes.lua +msgid "Checker Stone Tile" +msgstr "Damier de dalle en pierre" + +#: nodes.lua +msgid "Circle Stone Bricks" +msgstr "Briques en pierre circulaires" + +#: nodes.lua +msgid "Clean Glass" +msgstr "Verre propre" + +#: nodes.lua +msgid "Coal Checker" +msgstr "Damier en charbon" + +#: nodes.lua +msgid "Coal Glass" +msgstr "Verre de charbon" + +#: nodes.lua +msgid "Coal Stone" +msgstr "Pierre de charbon" + +#: nodes.lua +msgid "Coal Stone Bricks" +msgstr "Briques en pierre de charbon" + +#: nodes.lua +msgid "Compressed Cobblestone" +msgstr "Pierre taillée compressée" + +#: nodes.lua +msgid "Compressed Dirt" +msgstr "Terre compressée" + +#: nodes.lua +msgid "Copper Patina Block" +msgstr "Bloc de patine de cuivre" + +#: nodes.lua +msgid "Empty Shelf" +msgstr "Étagère vide" + +#: nodes.lua +msgid "Full Wooden Tile" +msgstr "Dalle en bois complète" + +#: nodes.lua +msgid "Glow Glass" +msgstr "Verre brillant" + +#: nodes.lua +msgid "Iron Checker" +msgstr "Damier de fer" + +#: nodes.lua +msgid "Iron Glass" +msgstr "Verre de fer" + +#: nodes.lua +msgid "Iron Stone" +msgstr "Pierre de fer" + +#: nodes.lua +msgid "Iron Stone Bricks" +msgstr "Briques en pierre de fer" + +#: nodes.lua +msgid "Plankstone" +msgstr "Pierre-bois" + +#: nodes.lua +msgid "Rope" +msgstr "Corde" + +#: nodes.lua +msgid "Split Stone Tile" +msgstr "Dalle en pierre découpée" + +#: nodes.lua +msgid "Stone Bricks" +msgstr "Briques en pierre" + +#: nodes.lua +msgid "Stone Tile" +msgstr "Dalle en pierre" + +#: nodes.lua +msgid "Super Glow Glass" +msgstr "Verre très brillant" + +#: nodes.lua +msgid "Sweeper" +msgstr "Balai" + +#: nodes.lua +msgid "Tar" +msgstr "Bitume" + +#: nodes.lua +msgid "Trap Desert Stone" +msgstr "Pierre du désert traversable" + +#: nodes.lua +msgid "Trap Glass" +msgstr "Verre traversable" + +#: nodes.lua +msgid "Trap Glow Glass" +msgstr "Verre brillant traversable" + +#: nodes.lua +msgid "Trap Obsidian" +msgstr "Obsidienne traversable" + +#: nodes.lua +msgid "Trap Obsidian Glass" +msgstr "Verre d'obsidienne traversable" + +#: nodes.lua +msgid "Trap Sandstone" +msgstr "Grès traversable" + +#: nodes.lua +msgid "Trap Stone" +msgstr "Pierre traversable" + +#: nodes.lua +msgid "Trap Super Glow Glass" +msgstr "Verre très brillant traversable" + +#: nodes.lua +msgid "Wooden Tile" +msgstr "Dalle en bois" + +#: nodes.lua +msgid "Offset Wooden Tile" +msgstr "Dalle en bois décalée" + +#: nodes.lua +msgid "Downwards Wooden Tile" +msgstr "Dalle en bois vers le bas" + +#: nodes.lua +msgid "Leftwards Wooden Tile" +msgstr "Dalle en bois vers la gauche" + +#: nodes.lua +msgid "Rightwards Wooden Tile" +msgstr "Dalle en bois vers la droite" + +#: ownership.lua +msgid "Sorry, @1 owns that spot." +msgstr "Désolé, @1 possède cet endroit." + +#: ownership.lua +msgid "someone" +msgstr "quelqu'un" + +#: stairsplus/common.lua +#, lua-format +msgid "%s Microblock" +msgstr "Microbloc en %s" + +#: stairsplus/common.lua stairsplus/slabs.lua +#, lua-format +msgid "%s Slab" +msgstr "Demi-dalle en %s" + +#: stairsplus/common.lua +#, lua-format +msgid "%s Slope" +msgstr "Pente en %s" + +#: stairsplus/common.lua +#, lua-format +msgid "%s Panel" +msgstr "Barre en %s" + +#: stairsplus/common.lua +#, lua-format +msgid "%s Stairs" +msgstr "Escaliers en %s" diff --git a/moreblocks/locale/fr.txt b/moreblocks/locale/fr.txt deleted file mode 100644 index 72c09f5..0000000 --- a/moreblocks/locale/fr.txt +++ /dev/null @@ -1,72 +0,0 @@ -# Translation by Calinou - -###init.lua### -[moreblocks] loaded. = [moreblocks] a t charg. - -Jungle Wooden Planks = Planches de bois de jungle -Empty Bookshelf = tagre vide -Clean Glass = Verre propre -Plankstone = Pierre-bois -Wooden Tile = Dalle en bois -Full Wooden Tile = Dalle en bois complte -Centered Wooden Tile = Dalle en bois centre -Up Wooden Tile = Dalle en bois vers le haut -Down Wooden Tile = Dalle en bois vers le bas -Left Wooden Tile = Dalle en bois vers la gauche -Right Wooden Tile = Dalle en bois vers la droite -Circle Stone Bricks = Briques en pierre circulaires -Stone Tile = Dalle en pierre -Split Stone Tile = Dalle en pierre dcoupe -Glow Glass = Verre brillant -Super Glow Glass = Verre trs brillant -Coal Glass = Verre de charbon -Iron Glass = Verre de fer -Coal Checker = Damier en charbon -Iron Checker = Damier en fer -Trap Stone = Pierre traversable -Trap Glass = Verre traversable -Trap Glow Glass = Verre brillant traversable -Trap Super Glow Glass = Verre trs brillant traversable -Coal Stone = Pierre de charbon -Iron Stone = Pierre de fer -Coal Stone Bricks = Briques en pierre de charbon -Iron Stone Bricks = Briques en pierre de fer -Cactus Checker = Damier en cactus -Cactus Brick = Briques de cactus -Sweeper = Balai -Jungle Stick = Bton en bois de jungle -Horizontal Tree = Tronc d'arbre horizontal -Horizontal Jungle Tree = Tronc d'arbre de jungle horizontal -Rope = Corde -All-faces Tree = Tronc d'arbre - -###redefinition.lua### -Wooden = bois -Papyrus = Papyrus -Dry Shrub = Buisson mort -Sapling = Pousse d'arbre -Wooden Planks = Planches de bois -Ladder = chelle -Glass = Verre - -###circular_saw.lua### -Circular Saw = Scie circulaire -Circular saw, empty (owned by %s) = Scie circulaire, vide (proprit de %s) -Circular saw, working with %s (owned by %s) = Scie circulaire, manipule %s (proprit de %s) -Circular saw, empty = Scie circulaire, vide -Circular saw is empty (owned by %s) = Scie circulaire est vide (proprit de %s) - -Input material = Entre du matriel -Rest/microblocks = Reste/microbloc -Max: = Max: -Set = Fixer -Recycle output = Recyclage - -###./stairsplus/*### -%s Stairs = Escaliers en %s -%s Slab = Demi-dalle en %s -%s Panel = Barre en %s -%s Microblock = Microbloc en %s - -%s Pane = Panneau en %s -%s Fence = Barrire en %s diff --git a/moreblocks/locale/it.po b/moreblocks/locale/it.po new file mode 100644 index 0000000..04e3c0b --- /dev/null +++ b/moreblocks/locale/it.po @@ -0,0 +1,286 @@ +# Italian translation for More Blocks. +# Copyright © 2011-2019 Hugo Locurcio and contributors +# This file is distributed under the same license as the More Blocks package. +# Emon, 2016. +# CodeXP <codexp@gmx.net>, 2018. +msgid "" +msgstr "" +"Project-Id-Version: More Blocks\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-07-13 12:37+0200\n" +"PO-Revision-Date: \n" +"Last-Translator: CodeXP <codexp@gmx.net>\n" +"Language-Team: \n" +"Language: it\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: circular_saw.lua +msgid "Circular Saw" +msgstr "Sega circolare" + +#: circular_saw.lua +msgid "" +"Input\n" +"material" +msgstr "" +"Materiale\n" +"iniziale" + +#: circular_saw.lua +msgid "Left-over" +msgstr "Scarto" + +#: circular_saw.lua +msgid "Max" +msgstr "Max." + +#: circular_saw.lua +msgid "" +"Recycle\n" +"output" +msgstr "" +"Ricicla\n" +"finale" + +#: circular_saw.lua +msgid "Set" +msgstr "Imp." + +#: circular_saw.lua +msgid "owned by @1" +msgstr "" + +#: circular_saw.lua +msgid "Circular Saw is empty" +msgstr "Sega circolare, vuota" + +#: circular_saw.lua +msgid "Circular Saw is working on @1" +msgstr "Sega circolare, in funzione su @1" + +#: init.lua +msgid "[moreblocks] loaded." +msgstr "[moreblocks] caricato." + +#: nodes.lua +msgid "Deprecated" +msgstr "" + +#: nodes.lua +msgid "All-faces Acacia Tree" +msgstr "" + +#: nodes.lua +msgid "All-faces Aspen Tree" +msgstr "" + +#: nodes.lua +msgid "All-faces Jungle Tree" +msgstr "" + +#: nodes.lua +msgid "All-faces Pine Tree" +msgstr "" + +#: nodes.lua +msgid "All-faces Tree" +msgstr "Albero su ogni lato" + +#: nodes.lua +msgid "Cactus Brick" +msgstr "Mattoni di cactus" + +#: nodes.lua +msgid "Cactus Checker" +msgstr "Scacchiera in cactus" + +#: nodes.lua +msgid "Centered Wooden Tile" +msgstr "Mattonella in legno centrata" + +#: nodes.lua +msgid "Checker Stone Tile" +msgstr "" + +#: nodes.lua +msgid "Circle Stone Bricks" +msgstr "Mattoni concentrici in pietra" + +#: nodes.lua +msgid "Clean Glass" +msgstr "Vetro pulito" + +#: nodes.lua +msgid "Coal Checker" +msgstr "Scacchiera in carbone" + +#: nodes.lua +msgid "Coal Glass" +msgstr "Vetro e carbone" + +#: nodes.lua +msgid "Coal Stone" +msgstr "Pietra in carbone" + +#: nodes.lua +msgid "Coal Stone Bricks" +msgstr "Mattoni di pietra in carbone" + +#: nodes.lua +msgid "Compressed Cobblestone" +msgstr "" + +#: nodes.lua +msgid "Compressed Dirt" +msgstr "" + +#: nodes.lua +msgid "Copper Patina Block" +msgstr "" + +#: nodes.lua +msgid "Empty Shelf" +msgstr "Scaffale Vuoto" + +#: nodes.lua +msgid "Full Wooden Tile" +msgstr "Mattonella in legno pieno" + +#: nodes.lua +msgid "Glow Glass" +msgstr "Vetro luminoso" + +#: nodes.lua +msgid "Iron Checker" +msgstr "Scacchiera in ferro" + +#: nodes.lua +msgid "Iron Glass" +msgstr "Vetro e ferro" + +#: nodes.lua +msgid "Iron Stone" +msgstr "Pietra in ferro" + +#: nodes.lua +msgid "Iron Stone Bricks" +msgstr "Mattoni di pietra in ferro" + +#: nodes.lua +msgid "Plankstone" +msgstr "Pietra e legno" + +#: nodes.lua +msgid "Rope" +msgstr "Corda" + +#: nodes.lua +msgid "Split Stone Tile" +msgstr "Mattonella in pietra divisa" + +#: nodes.lua +msgid "Stone Bricks" +msgstr "" + +#: nodes.lua +msgid "Stone Tile" +msgstr "Mattonella in pietra" + +#: nodes.lua +msgid "Super Glow Glass" +msgstr "Super vetro luminoso" + +#: nodes.lua +msgid "Sweeper" +msgstr "Spazzola" + +#: nodes.lua +msgid "Tar" +msgstr "" + +#: nodes.lua +msgid "Trap Desert Stone" +msgstr "" + +#: nodes.lua +msgid "Trap Glass" +msgstr "Vetro trappola" + +#: nodes.lua +msgid "Trap Glow Glass" +msgstr "Vetro luminoso trappola" + +#: nodes.lua +msgid "Trap Obsidian" +msgstr "" + +#: nodes.lua +msgid "Trap Obsidian Glass" +msgstr "" + +#: nodes.lua +msgid "Trap Sandstone" +msgstr "" + +#: nodes.lua +msgid "Trap Stone" +msgstr "Pietra trappola" + +#: nodes.lua +msgid "Trap Super Glow Glass" +msgstr "Super vetro luminoso trappola" + +#: nodes.lua +msgid "Wooden Tile" +msgstr "Mattonella in legno" + +#: nodes.lua +msgid "Offset Wooden Tile" +msgstr "" + +#: nodes.lua +msgid "Downwards Wooden Tile" +msgstr "" + +#: nodes.lua +msgid "Leftwards Wooden Tile" +msgstr "" + +#: nodes.lua +msgid "Rightwards Wooden Tile" +msgstr "" + +#: ownership.lua +msgid "Sorry, @1 owns that spot." +msgstr "Spiacente, quel punto è di proprietà di @1" + +#: ownership.lua +msgid "someone" +msgstr "qualcuno" + +#: stairsplus/common.lua +#, lua-format +msgid "%s Microblock" +msgstr "Microblocco %s" + +#: stairsplus/common.lua stairsplus/slabs.lua +#, lua-format +msgid "%s Slab" +msgstr "Lastra - %s" + +#: stairsplus/common.lua +#, lua-format +msgid "%s Slope" +msgstr "" + +#: stairsplus/common.lua +#, lua-format +msgid "%s Panel" +msgstr "Pannello - %s" + +#: stairsplus/common.lua +#, lua-format +msgid "%s Stairs" +msgstr "Scale - %s" diff --git a/moreblocks/locale/it.txt b/moreblocks/locale/it.txt deleted file mode 100644 index 821ff36..0000000 --- a/moreblocks/locale/it.txt +++ /dev/null @@ -1,70 +0,0 @@ -# -# Italian translation -# Translator: Emon -# - - -###init.lua### -[moreblocks] loaded. = [moreblocks] caricato. - -###nodes.lua### -Jungle Wood Fence = Recinzione in legno della giungla -Empty Bookshelf = Libreria vuota -Clean Glass = Vetro pulito -Plankstone = Pietra e legno -Wooden Tile = Mattonella in legno -Full Wooden Tile = Mattonella in legno pieno -Centered Wooden Tile = Mattonella in legno centrata -Up Wooden Tile = Mattonella in legno verso l'alto -Down Wooden Tile = Mattonella in legno verso il basso -Left Wooden Tile = Mattonella in legno verso sinistra -Right Wooden Tile = Mattonella in legno verso destra -Circle Stone Bricks = Mattoni concentrici in pietra -Stone Tile = Mattonella in pietra -Split Stone Tile = Mattonella in pietra divisa -Glow Glass = Vetro luminoso -Super Glow Glass = Super vetro luminoso -Coal Glass = Vetro e carbone -Iron Glass = Vetro e ferro -Coal Checker = Scacchiera in carbone -Iron Checker = Scacchiera in ferro -Trap Stone = Pietra trappola -Trap Glass = Vetro trappola -Trap Glow Glass = Vetro luminoso trappola -Trap Super Glow Glass = Super vetro luminoso trappola -Coal Stone = Pietra in carbone -Iron Stone = Pietra in ferro -Coal Stone Bricks = Mattoni di pietra in carbone -Iron Stone Bricks = Mattoni di pietra in ferro -Cactus Checker = Scacchiera in cactus -Cactus Brick = Mattoni di cactus -Sweeper = Spazzola -Jungle Stick = Bastone in legno della giungla -Rope = Corda -All-faces Tree = Albero su ogni lato - -###circular_saw.lua### -Circular Saw = Sega circolare -Circular saw, empty (owned by %s) = Sega circolare, vuota (di proprietà di %s) -Circular saw, working with %s (owned by %s) = Sega circolare, in funzione su %s (di proprietà di %s) -Circular saw, empty = Sega circolare, vuota -Circular saw is empty (owned by %s) = La sega circolare è vuota (di proprietà di %s) - -Input\nmaterial = Materiale\niniziale -Left-over = Scarto -Max = Max. -Set = Imp. -Recycle\noutput = Ricicla\nfinale - -###ownership.lua### -someone = qualcuno -Sorry, %s owns that spot. = Spiacente, quel punto è di proprietà di %s - -###./stairsplus/*### -%s Stairs = Scale - %s -%s Slab = Lastra - %s -%s Panel = Pannello - %s -%s Microblock = Microblocco %s - -%s Pane = Pannello - %s -%s Fence = Recinzione - %s diff --git a/moreblocks/locale/ru.po b/moreblocks/locale/ru.po new file mode 100644 index 0000000..9b3b93e --- /dev/null +++ b/moreblocks/locale/ru.po @@ -0,0 +1,290 @@ +# Russian translation for MOREBLOCKS minetest mod. +# Copyright (C) 2018 Hugo Locurcio and contributors +# This file is distributed under the same license as the MOREBLOCKS package. +# CodeXP <codexp@gmx.net>, 2018. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: MOREBLOCKS MOD\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-07-13 23:30+0200\n" +"PO-Revision-Date: \n" +"Last-Translator: CodeXP <codexp@gmx.net>\n" +"Language-Team: \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: circular_saw.lua +msgid "Circular Saw" +msgstr "циркулярная пила" + +#: circular_saw.lua +msgid "" +"Input\n" +"material" +msgstr "" +"Входной\n" +"материал" + +#: circular_saw.lua +msgid "Left-over" +msgstr "Остатки" + +#: circular_saw.lua +msgid "Max" +msgstr "Кол." + +#: circular_saw.lua +msgid "" +"Recycle\n" +"output" +msgstr "" +"Пере-\n" +"обработка" + +#: circular_saw.lua +msgid "Set" +msgstr "ОК" + +#: circular_saw.lua +msgid "owned by @1" +msgstr "принадлежит @1" + +#: circular_saw.lua +msgid "Circular Saw is empty" +msgstr "циркулярная пила пустая" + +#: circular_saw.lua +msgid "Circular Saw is working on @1" +msgstr "циркулярная пила, @1 в обработке" + +#: init.lua +msgid "[MOD] moreblocks loaded." +msgstr "[MOD] moreblocks загружен." + +#: nodes.lua +msgid "Deprecated" +msgstr "устаревший" + +#: nodes.lua +msgid "All-faces Acacia Tree" +msgstr "всестороннее бревно акации" + +#: nodes.lua +msgid "All-faces Aspen Tree" +msgstr "всестороннее бревно осины" + +#: nodes.lua +msgid "All-faces Jungle Tree" +msgstr "всестороннее бревно дерева джунглей" + +#: nodes.lua +msgid "All-faces Pine Tree" +msgstr "всестороннее бревно сосновое" + +#: nodes.lua +msgid "All-faces Tree" +msgstr "всестороннее бревно дерева" + +#: nodes.lua +msgid "Cactus Brick" +msgstr "кирпич из кактуса" + +#: nodes.lua +msgid "Cactus Checker" +msgstr "мозаика из кактуса" + +#: nodes.lua +msgid "Centered Wooden Tile" +msgstr "деревянная мозаика (центр)" + +#: nodes.lua +msgid "Checker Stone Tile" +msgstr "каменная мозаика" + +#: nodes.lua +msgid "Circle Stone Bricks" +msgstr "кольцевой камень" + +#: nodes.lua +msgid "Clean Glass" +msgstr "чистое стекло" + +#: nodes.lua +msgid "Coal Checker" +msgstr "угольная мозаика" + +#: nodes.lua +msgid "Coal Glass" +msgstr "угольное стекло" + +#: nodes.lua +msgid "Coal Stone" +msgstr "угольный камень" + +#: nodes.lua +msgid "Coal Stone Bricks" +msgstr "угольно-каменный кирпич" + +#: nodes.lua +msgid "Compressed Cobblestone" +msgstr "прессованный булыжник" + +#: nodes.lua +msgid "Compressed Dirt" +msgstr "прессованная земля" + +#: nodes.lua +msgid "Copper Patina Block" +msgstr "медный патинированный блок" + +#: nodes.lua +msgid "Empty Shelf" +msgstr "пустые полки" + +#: nodes.lua +msgid "Full Wooden Tile" +msgstr "деревянная мозаика" + +#: nodes.lua +msgid "Glow Glass" +msgstr "светящееся стекло" + +#: nodes.lua +msgid "Iron Checker" +msgstr "стальная мозаика" + +#: nodes.lua +msgid "Iron Glass" +msgstr "металлизированное стекло" + +#: nodes.lua +msgid "Iron Stone" +msgstr "железный камень" + +#: nodes.lua +msgid "Iron Stone Bricks" +msgstr "железно-каменный кирпич" + +#: nodes.lua +msgid "Plankstone" +msgstr "дерево-каменная мозаика" + +#: nodes.lua +msgid "Rope" +msgstr "верёвка" + +#: nodes.lua +msgid "Split Stone Tile" +msgstr "каменная мозаика" + +#: nodes.lua +msgid "Stone Bricks" +msgstr "каменный кирпич" + +#: nodes.lua +msgid "Stone Tile" +msgstr "каменная плитка" + +#: nodes.lua +msgid "Super Glow Glass" +msgstr "супер светящееся стекло" + +#: nodes.lua +msgid "Sweeper" +msgstr "метёлка" + +#: nodes.lua +msgid "Tar" +msgstr "смола" + +#: nodes.lua +msgid "Trap Desert Stone" +msgstr "мнимый пустынный камень" + +#: nodes.lua +msgid "Trap Glass" +msgstr "мнимое стекло" + +#: nodes.lua +msgid "Trap Glow Glass" +msgstr "мнимое светящееся стекло" + +#: nodes.lua +msgid "Trap Obsidian" +msgstr "мнимый обсидиан" + +#: nodes.lua +msgid "Trap Obsidian Glass" +msgstr "мнимое обсидиановое стекло" + +#: nodes.lua +msgid "Trap Sandstone" +msgstr "мнимый песчаник" + +#: nodes.lua +msgid "Trap Stone" +msgstr "мнимый камень" + +#: nodes.lua +msgid "Trap Super Glow Glass" +msgstr "мнимое супер светящееся стекло" + +#: nodes.lua +msgid "Wooden Tile" +msgstr "деревянная мозаика" + +#: nodes.lua +msgid "Offset Wooden Tile" +msgstr "деревянная мозаика (сверху)" + +# @deprecated +#: nodes.lua +msgid "Downwards Wooden Tile" +msgstr "деревянная мозаика (снизу)" + +# @deprecated +#: nodes.lua +msgid "Leftwards Wooden Tile" +msgstr "деревянная мозаика (слева)" + +# @deprecated +#: nodes.lua +msgid "Rightwards Wooden Tile" +msgstr "деревянная мозаика (справа)" + +#: ownership.lua +msgid "Sorry, @1 owns that spot." +msgstr "Извините, это принадлежит @1." + +#: ownership.lua +msgid "someone" +msgstr "кому-то" + +#: stairsplus/common.lua +#, lua-format +msgid "%s Microblock" +msgstr "%s (микроблок)" + +#: stairsplus/common.lua stairsplus/slabs.lua +#, lua-format +msgid "%s Slab" +msgstr "%s (плита)" + +#: stairsplus/common.lua +#, lua-format +msgid "%s Slope" +msgstr "%s (наклон)" + +#: stairsplus/common.lua +#, lua-format +msgid "%s Panel" +msgstr "%s (панель)" + +#: stairsplus/common.lua +#, lua-format +msgid "%s Stairs" +msgstr "%s (лестница)" diff --git a/moreblocks/locale/template.pot b/moreblocks/locale/template.pot new file mode 100644 index 0000000..929569a --- /dev/null +++ b/moreblocks/locale/template.pot @@ -0,0 +1,284 @@ +# Template translation for More Blocks. +# Copyright © 2011-2019 Hugo Locurcio and contributors +# This file is distributed under the same license as the More Blocks package. +# CodeXP <codexp@gmx.net>, 2018. +msgid "" +msgstr "" +"Project-Id-Version: More Blocks\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-07-13 12:37+0200\n" +"PO-Revision-Date: \n" +"Last-Translator: CodeXP <codexp@gmx.net>\n" +"Language-Team: \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: circular_saw.lua +msgid "Circular Saw" +msgstr "" + +#: circular_saw.lua +msgid "" +"Input\n" +"material" +msgstr "" + +#: circular_saw.lua +msgid "Left-over" +msgstr "" + +#: circular_saw.lua +msgid "Max" +msgstr "" + +#: circular_saw.lua +msgid "" +"Recycle\n" +"output" +msgstr "" + +#: circular_saw.lua +msgid "Set" +msgstr "" + +#: circular_saw.lua +msgid "owned by @1" +msgstr "" + +#: circular_saw.lua +msgid "Circular Saw is empty" +msgstr "" + +#: circular_saw.lua +msgid "Circular Saw is working on @1" +msgstr "" + +#: init.lua +msgid "[moreblocks] loaded." +msgstr "" + +#: nodes.lua +msgid "Deprecated" +msgstr "" + +#: nodes.lua +msgid "All-faces Acacia Tree" +msgstr "" + +#: nodes.lua +msgid "All-faces Aspen Tree" +msgstr "" + +#: nodes.lua +msgid "All-faces Jungle Tree" +msgstr "" + +#: nodes.lua +msgid "All-faces Pine Tree" +msgstr "" + +#: nodes.lua +msgid "All-faces Tree" +msgstr "" + +#: nodes.lua +msgid "Cactus Brick" +msgstr "" + +#: nodes.lua +msgid "Cactus Checker" +msgstr "" + +#: nodes.lua +msgid "Centered Wooden Tile" +msgstr "" + +#: nodes.lua +msgid "Checker Stone Tile" +msgstr "" + +#: nodes.lua +msgid "Circle Stone Bricks" +msgstr "" + +#: nodes.lua +msgid "Clean Glass" +msgstr "" + +#: nodes.lua +msgid "Coal Checker" +msgstr "" + +#: nodes.lua +msgid "Coal Glass" +msgstr "" + +#: nodes.lua +msgid "Coal Stone" +msgstr "" + +#: nodes.lua +msgid "Coal Stone Bricks" +msgstr "" + +#: nodes.lua +msgid "Compressed Cobblestone" +msgstr "" + +#: nodes.lua +msgid "Compressed Dirt" +msgstr "" + +#: nodes.lua +msgid "Copper Patina Block" +msgstr "" + +#: nodes.lua +msgid "Empty Shelf" +msgstr "" + +#: nodes.lua +msgid "Full Wooden Tile" +msgstr "" + +#: nodes.lua +msgid "Glow Glass" +msgstr "" + +#: nodes.lua +msgid "Iron Checker" +msgstr "" + +#: nodes.lua +msgid "Iron Glass" +msgstr "" + +#: nodes.lua +msgid "Iron Stone" +msgstr "" + +#: nodes.lua +msgid "Iron Stone Bricks" +msgstr "" + +#: nodes.lua +msgid "Plankstone" +msgstr "" + +#: nodes.lua +msgid "Rope" +msgstr "" + +#: nodes.lua +msgid "Split Stone Tile" +msgstr "" + +#: nodes.lua +msgid "Stone Bricks" +msgstr "" + +#: nodes.lua +msgid "Stone Tile" +msgstr "" + +#: nodes.lua +msgid "Super Glow Glass" +msgstr "" + +#: nodes.lua +msgid "Sweeper" +msgstr "" + +#: nodes.lua +msgid "Tar" +msgstr "" + +#: nodes.lua +msgid "Trap Desert Stone" +msgstr "" + +#: nodes.lua +msgid "Trap Glass" +msgstr "" + +#: nodes.lua +msgid "Trap Glow Glass" +msgstr "" + +#: nodes.lua +msgid "Trap Obsidian" +msgstr "" + +#: nodes.lua +msgid "Trap Obsidian Glass" +msgstr "" + +#: nodes.lua +msgid "Trap Sandstone" +msgstr "" + +#: nodes.lua +msgid "Trap Stone" +msgstr "" + +#: nodes.lua +msgid "Trap Super Glow Glass" +msgstr "" + +#: nodes.lua +msgid "Wooden Tile" +msgstr "" + +#: nodes.lua +msgid "Offset Wooden Tile" +msgstr "" + +# @deprecated +#: nodes.lua +msgid "Downwards Wooden Tile" +msgstr "" + +# @deprecated +#: nodes.lua +msgid "Leftwards Wooden Tile" +msgstr "" + +# @deprecated +#: nodes.lua +msgid "Rightwards Wooden Tile" +msgstr "" + +#: ownership.lua +msgid "Sorry, @1 owns that spot." +msgstr "" + +#: ownership.lua +msgid "someone" +msgstr "" + +#: stairsplus/common.lua +#, lua-format +msgid "%s Microblock" +msgstr "" + +#: stairsplus/common.lua stairsplus/slabs.lua +#, lua-format +msgid "%s Slab" +msgstr "" + +#: stairsplus/common.lua +#, lua-format +msgid "%s Slope" +msgstr "" + +#: stairsplus/common.lua +#, lua-format +msgid "%s Panel" +msgstr "" + +#: stairsplus/common.lua +#, lua-format +msgid "%s Stairs" +msgstr "" diff --git a/moreblocks/locale/template.txt b/moreblocks/locale/template.txt deleted file mode 100644 index ea6f8ac..0000000 --- a/moreblocks/locale/template.txt +++ /dev/null @@ -1,64 +0,0 @@ -###init.lua### -[moreblocks] loaded. = - -###nodes.lua### -Jungle Wood Fence = -Empty Bookshelf = -Clean Glass = -Plankstone = -Wooden Tile = -Full Wooden Tile = -Centered Wooden Tile = -Up Wooden Tile = -Down Wooden Tile = -Left Wooden Tile = -Right Wooden Tile = -Circle Stone Bricks = -Stone Tile = -Split Stone Tile = -Glow Glass = -Super Glow Glass = -Coal Glass = -Iron Glass = -Coal Checker = -Iron Checker = -Trap Stone = -Trap Glass = -Trap Glow Glass = -Trap Super Glow Glass = -Coal Stone = -Iron Stone = -Coal Stone Bricks = -Iron Stone Bricks = -Cactus Checker = -Cactus Brick = -Sweeper = -Jungle Stick = -Rope = -All-faces Tree = - -###circular_saw.lua### -Circular Saw = -Circular saw, empty (owned by %s) = -Circular saw, working with %s (owned by %s) = -Circular saw, empty = -Circular saw is empty (owned by %s) = - -Input\nmaterial = -Left-over = -Max = -Set = -Recycle\noutput = - -###ownership.lua### -someone = -Sorry, %s owns that spot. = - -###./stairsplus/*### -%s Stairs = -%s Slab = -%s Panel = -%s Microblock = - -%s Pane = -%s Fence = diff --git a/moreblocks/nodes.lua b/moreblocks/nodes.lua index 047f59e..68edff9 100644 --- a/moreblocks/nodes.lua +++ b/moreblocks/nodes.lua @@ -36,6 +36,7 @@ local function wood_tile_replace(itemstack, placer, pointed_thing) return itemstack end +local deprecated = (" (%s)"):format(S('Deprecated')) local nodes = { ["wood_tile"] = { description = S("Wooden Tile"), @@ -52,7 +53,7 @@ local nodes = { sounds = sound_wood, }, ["wood_tile_flipped"] = { - description = S("Wooden Tile (Deprecated)"), + description = S("Wooden Tile") .. deprecated, tiles = {"default_wood.png^moreblocks_wood_tile.png^[transformR90", "default_wood.png^moreblocks_wood_tile.png^[transformR90", "default_wood.png^moreblocks_wood_tile.png^[transformR90", @@ -87,19 +88,19 @@ local nodes = { no_stairs = true, }, ["wood_tile_down"] = { - description = S("Downwards Wooden Tile (Deprecated)"), + description = S("Downwards Wooden Tile") .. deprecated, tiles = {"default_wood.png^[transformR180^moreblocks_wood_tile_offset.png^[transformR180"}, no_stairs = true, on_place = wood_tile_replace }, ["wood_tile_left"] = { - description = S("Leftwards Wooden Tile (Deprecated)"), + description = S("Leftwards Wooden Tile") .. deprecated, tiles = {"default_wood.png^[transformR270^moreblocks_wood_tile_offset.png^[transformR270"}, no_stairs = true, on_place = wood_tile_replace }, ["wood_tile_right"] = { - description = S("Rightwards Wooden Tile (Deprecated)"), + description = S("Rightwards Wooden Tile") .. deprecated, tiles = {"default_wood.png^[transformR90^moreblocks_wood_tile_offset.png^[transformR90"}, no_stairs = true, on_place = wood_tile_replace diff --git a/moreblocks/ownership.lua b/moreblocks/ownership.lua index 20f0fe1..8c8b4f1 100644 --- a/moreblocks/ownership.lua +++ b/moreblocks/ownership.lua @@ -33,7 +33,7 @@ function moreblocks.node_is_owned(pos, placer) end if ownername ~= false then - minetest.chat_send_player( placer:get_player_name(), S("Sorry, %s owns that spot."):format(ownername) ) + minetest.chat_send_player( placer:get_player_name(), S("Sorry, @1 owns that spot.", ownername) ) return true else return false diff --git a/moreblocks/stairsplus/common.lua b/moreblocks/stairsplus/common.lua index 7b86fad..d4cce64 100644 --- a/moreblocks/stairsplus/common.lua +++ b/moreblocks/stairsplus/common.lua @@ -7,27 +7,28 @@ Licensed under the zlib license. See LICENSE.md for more information. local S = moreblocks.S +local descriptions = { + ["micro"] = S("%s Microblock"), + ["slab"] = S("%s Slab"), + ["slope"] = S("%s Slope"), + ["panel"] = S("%s Panel"), + ["stair"] = S("%s Stairs"), +} stairsplus.register_single = function(category, alternate, info, modname, subname, recipeitem, fields) - local descriptions = { - ["micro"] = S("Microblock"), - ["slab"] = S("Slab"), - ["slope"] = S("Slope"), - ["panel"] = S("Panel"), - ["stair"] = S("Stairs"), - } + local desc_base = descriptions[category]:format(fields.description) local def = {} + if category ~= "slab" then def = table.copy(info) end + -- copy fields to def for k, v in pairs(fields) do def[k] = v end + def.drawtype = "nodebox" - if category == "slope" then - def.drawtype = "mesh" - end def.paramtype = "light" def.paramtype2 = def.paramtype2 or "facedir" @@ -35,10 +36,9 @@ stairsplus.register_single = function(category, alternate, info, modname, subnam def.place_param2 = nil def.on_place = minetest.rotate_node - if category ~= "slab" then - def.description = S("%s " .. descriptions[category]):format(fields.description) - else - local desc_base = S("%s " .. descriptions[category]):format(fields.description) + def.groups = stairsplus:prepare_groups(fields.groups) + + if category == "slab" then if type(info) ~= "table" then def.node_box = { type = "fixed", @@ -52,14 +52,19 @@ stairsplus.register_single = function(category, alternate, info, modname, subnam } def.description = desc_base .. alternate:gsub("_", " "):gsub("(%a)(%S*)", function(a, b) return a:upper() .. b end) end + else + def.description = desc_base + if category == "slope" then + def.drawtype = "mesh" + elseif category == "stair" and alternate == "" then + def.groups.stair = 1 + end end - def.groups = stairsplus:prepare_groups(fields.groups) - if category == "stair" and alternate == "" then - def.groups.stair = 1 - end + if fields.drop and not (type(fields.drop) == "table") then def.drop = modname.. ":" .. category .. "_" .. fields.drop .. alternate end + minetest.register_node(":" ..modname.. ":" .. category .. "_" .. subname .. alternate, def) stairsplus.register_recipes(category, alternate, modname, subname, recipeitem) end diff --git a/moreores/CHANGELOG.md b/moreores/CHANGELOG.md index cd7bd33..eec6244 100644 --- a/moreores/CHANGELOG.md +++ b/moreores/CHANGELOG.md @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [Unreleased] +## [1.1.0] - 2019-03-23 + ### Added - Brazilian and Dutch translations. @@ -34,4 +36,5 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Initial versioned release. -[Unreleased]: https://github.com/minetest-mods/moreblocks/compare/v1.0.0...HEAD +[Unreleased]: https://github.com/minetest-mods/moreores/compare/v1.1.0...HEAD +[1.1.0]: https://github.com/minetest-mods/moreores/compare/v1.0.0...v1.1.0 diff --git a/moreores/README.md b/moreores/README.md index 601001b..255ca60 100644 --- a/moreores/README.md +++ b/moreores/README.md @@ -60,13 +60,13 @@ on that line. ## Version compatibility -More Ores is currently primarily tested with Minetest 0.4.16. +More Ores is currently primarily tested with Minetest 0.4.17. It may or may not work with newer or older versions. Issues arising in older -versions than 0.4.16 will generally not be fixed. +versions than 0.4.17 will generally not be fixed. ## License -Copyright © 2011-2017 Hugo Locurcio and contributors +Copyright © 2011-2019 Hugo Locurcio and contributors - More Ores code is licensed under the zlib license, see [`LICENSE.md`](LICENSE.md) for details. diff --git a/moreores/depends.txt b/moreores/depends.txt index 0dc152f..6c8d8d7 100644 --- a/moreores/depends.txt +++ b/moreores/depends.txt @@ -1,3 +1,4 @@ default -mg? farming? +intllib? +mg? diff --git a/nixie_tubes/init.lua b/nixie_tubes/init.lua index 436b73a..3d71069 100644 --- a/nixie_tubes/init.lua +++ b/nixie_tubes/init.lua @@ -92,6 +92,7 @@ for _,tube in ipairs(nixie_types) do local light2 = LIGHT_MAX-5 local description = S("Nixie Tube ("..tube..")") local description2 = S("Decatron ("..tube..")") + local description3 = S("Numitron Tube") local cathode = "nixie_tube_cathode_off.png^nixie_tube_cathode_"..tube..".png" local cathode2 = "decatron_cathode_"..tube..".png" local cathode3 = "numitron_filaments.png^numitron_"..tube..".png" @@ -102,7 +103,6 @@ for _,tube in ipairs(nixie_types) do light2 = nil description = S("Nixie Tube") description2 = S("Decatron") - description3 = S("Numitron Tube") cathode = "nixie_tube_cathode_off.png" cathode2 = "nixie_tube_blank.png" cathode3 = "numitron_filaments.png" diff --git a/replacer/init.lua b/replacer/init.lua index ddb7478..e1f41b9 100644 --- a/replacer/init.lua +++ b/replacer/init.lua @@ -200,7 +200,7 @@ replacer.replace = function( itemstack, user, pointed_thing, mode ) -- in survival mode, the player has to provide the node he wants to place - if( not(minetest.setting_getbool("creative_mode") ) + if( not(minetest.settings:get_bool("creative_mode") ) and not( minetest.check_player_privs( name, {creative=true}))) then -- players usually don't carry dirt_with_grass around; it's safe to assume normal dirt here diff --git a/technic/locale/pl.txt b/technic/locale/pl.txt new file mode 100644 index 0000000..7fe29fb --- /dev/null +++ b/technic/locale/pl.txt @@ -0,0 +1,176 @@ +# Polish Translation for Technic mod +# Polskie tłumaczenie Technic mod +# by mat9117 + +## Misc +[Technic] Loaded in %f seconds = [Technic] Wczytany w %f sekund + +## Items +Silicon Wafer = Płytka krzemowa +Doped Silicon Wafer = Domieszkowana płytka krzemowa +Enriched Uranium = Wzbogacony uran +Uranium Fuel = Paliwo uranowe +Diamond Drill Head = Diamentowa głowica wiertła +Blue Energy Crystal = Niebieski kryształ energii +Green Energy Crystal = Zielony kryształ energii +Red Energy Crystal = Czerwony kryształ energii +Fine Copper Wire = Cienki miedziany drut +Copper Coil = Miedziana cewka +Electric Motor = Silnik elektryczny +Low Voltage Transformer = Transformator niskiego napięcia +Medium Voltage Transformer = Transformator średniego napięcia +High Voltage Transformer = Transformator wysokiego napięcia +Control Logic Unit = Jednostka sterująca +Mixed Metal Ingot = Sztabka zmieszanych metali +Composite Plate = Płytka kompozytowa +Copper Plate = Płytka miedziana +Carbon Plate = Płytka węglowa +Graphite = Grafit +Carbon Cloth = Włókno węglowe +Raw Latex = Lateks naturalny +Rubber Fiber = Włókno gumowe +%.1f%%-Fissile Uranium Ingot = %.1f%% Sztabka uranu +%.1f%%-Fissile Uranium Block = %.1f%% Blok uranu + +## Machine misc +Machine cannot be removed because it is not empty = Nie można usunąć maszyny, ponieważ nie jest pusta +Inventory move disallowed due to protection = Przenoszenie rzeczy z ekwipunku niemożliwe z powodu ochrony +# $1: Machine name (Includes tier) +@1 Active (@2 EU) = @1 Aktywny (@2 EU) +%s Active = %s Aktywny +%s Disabled = %s Wyłączony +%s Enabled = %s Włączony +%s Idle = %s Bezczynny +%s Improperly Placed = %s Ustawiony nieprawidłowo +%s is empty = %s jest pusty +%s Unpowered = %s brak zasilania +%s Out Of Fuel = %s brak paliwa +%s Has Bad Cabling = %s Źle podłączono kable +%s (Slave) = +%s Has No Network = %s Nie podłączony do sieci +%s Finished = %s Ukończony +Enable/Disable = Włącz/Wyłącz +Range = Zasięg +Upgrade Slots = Miejsca na ulepszenia +In: = Wejście +Out: = Wyjście +Slot %d = Otwór %d +Itemwise = Jeden przedmiot +Stackwise = Cały stack +Ignoring Mesecon Signal = Ignoruj sygnał Mesecon +Controlled by Mesecon Signal = Sterowany sygnałem Mesecon +Owner: = Właściciel: +Unlocked = Odblokowany +Locked = Zablokowany +Radius: = Promień: +Enabled = Włączony +Disabled = Wyłączony + +## Machine names +# $1: Tier +%s Alloy Furnace = %s Piec stopowy +%s Battery Box = %s Skrzynka baterii +%s Cable = %s Kabel +%s Centrifuge = %s Centryfuga +%s Compressor = %s Kompresor +%s Extractor = %s Ekstraktor +%s Forcefield Emitter = %s Emiter pola siłowego +%s Furnace = %s Piec +%s Grinder = %s Młynek +%s Music Player = %s Odtwarzacz muzyki +%s Quarry = %s Kamieniołom +%s Tool Workshop = %s Warsztat narzędzi +Arrayed Solar %s Generator = %s Szeregowy generator słoneczny +Fuel-Fired %s Generator = %s Generator zasilany paliwem +Geothermal %s Generator = %s Generator geotermalny +Hydro %s Generator = %s Hydrogenerator +Nuclear %s Generator Core = %s Reaktor atomowy +Small Solar %s Generator = %s Mały generator słoneczny +Wind %s Generator = %s Generator wiatrowy +Self-Contained Injector = Samowystarczalny wtryskiwacz +Constructor Mk%d = Konstruktor Mk%d +Frame = Klatka +Frame Motor = Silnik klatkowy +Template = Szablon +Template (replacing) = Szablon (zastępczy) +Template Motor =Szablon silnika +Template Tool = Szablon narzędzia +Battery Box = Skrzynka baterii +Supply Converter = Konwerter zasilania +Switching Station = Rozdzielnia +Fuel-Fired Alloy Furnace = Piec stopowy zasilany paliwem +Fuel-Fired Furnace = Piec zasilany paliwem +Wind Mill Frame = Klatka wiatraka +Forcefield = Pole siłowe +Nuclear Reactor Rod Compartment = Komora rdzenia reaktora atomowego +Administrative World Anchor = Administracyjna kotwica świata + +## Machine-specific +# $1: Pruduced EU +Charge = Ładuj +Discharge = Rozładuj +Power level = Poziom zasilania +# $1: Tier $2: current_charge $3: max_charge +@1 Battery Box: @2/@3 = @1 Skrzynka baterii: @2/@3 +# $1: Machine name $2: Supply $3: Demand +@1. Supply: @2 Demand: @3 = @1. Zapas: @2 Pobór: @3 +Production at %d%% = Produkowanie w %d%% +Choose Milling Program: = Wybierz program mielenia: +Slim Elements half / normal height: = Małe elementy połowa / normalna wysokość: +Current track %s = +Stopped = Zatrzymany +Keeping %d/%d map blocks loaded = Ciągle ładuję %d/%d bloki mapy +Digging not started = Nie rozpoczęto kopania +Digging finished = Kopanie skończone +Digging %d m above machine = Kopię %d m nad maszyną +Digging %d m below machine = Kopię %d m pod maszyną +@1 (@2 @3 -> @4 @5) = @1 (@2 @3 -> @4 @5) + + +## Grinder Recipes +# $1: Name +%s Dust = %s Pył +Akalin = Akalin +Alatro = Alatro +Arol = Arol +Brass = Mosiądz +Bronze = Brąz +Carbon Steel = Stal węglowa +Cast Iron = Żeliwo +Chromium = Chrom +Coal = Węgiel +Copper = Miedź +Gold = Złoto +Mithril = Mithril +Silver = Srebro +Stainless Steel = Stal nierdzewna +Talinite = Talinit +Tin = Cyna +Wrought Iron = Kute żelazo +Zinc = Cynk +%.1f%%-Fissile Uranium = %.1f%% Uran + +## Tools +RE Battery = Bateria ładowalna +Water Can = Kanister wody +Lava Can = Kanister lawy +Chainsaw = Piła łańcuchowa +Flashlight = Latarka +3 nodes deep. = Głęboki na 3 bloki. +3 nodes tall. = Wysoki na 3 bloki. +3 nodes wide. = Szeroki na 3 bloki. +3x3 nodes. = 3x3 bloki. +Use while sneaking to change Mining Drill Mk%d modes. = Użyj podczas skradania, aby zmienić tryby wiertła górniczego Mk%d +Mining Drill Mk%d Mode %d = Tryb wiertła górniczego Mk%d +Mining Drill Mk%d = Wiertła górniczego Mk%d +Mining Laser Mk%d = Laser górniczegy Mk%d +Single node. = Pojedynczy blok. +Sonic Screwdriver = Dźwiękowy śrubokręt +Tree Tap = Nacinak drzewny + +## Craft descriptions +Alloy cooking = Stapianie +Grinding = Mielenie +Compressing = Kompresowanie +Extracting = Ekstrakcja +Separating = Oddzielanie diff --git a/technic_chests/locale/pl.txt b/technic_chests/locale/pl.txt new file mode 100644 index 0000000..ae24b5d --- /dev/null +++ b/technic_chests/locale/pl.txt @@ -0,0 +1,41 @@ +# Polish Translation for technic_chests +# Polskie tłumaczenie technic_chests +# by mat9117 + +%s Chest = %s Skrzynia +%s Locked Chest = %s Zamknięta skrzynia +%s Locked Chest (owned by %s) = %s Zamknięta skrzynia (należy do %s) +Color Filter: %s = Filtr kolorów: %s +Edit chest description: = Edytuj opis skrzyni + +# Colors +Black = Czarny +Blue = Niebieski +Brown = Brązowy +Cyan = Cyan +Dark Green = Ciemnozielony +Dark Grey = Ciemnoszary +Green = Zielony +Grey = Szary +Magenta = Magenta +Orange = Pomarańczowy +Pink = Różowy +Red = Czerwony +Violet = Fioletowy +White = Biały +Yellow = Żółty +None = Żaden + +# Materials +Copper = Miedziana +Gold = Złota +Iron = Żelazna +Mithril = Mithrilowa +Silver = Srebrna +Wooden = Drewniana + +# Sorting +Sort = Sortuj +Auto-sort is %s = Autosortowanie jest %s +Off = Wyłaczone +On = Włączone diff --git a/technic_cnc/locale/pl.txt b/technic_cnc/locale/pl.txt new file mode 100644 index 0000000..76cc200 --- /dev/null +++ b/technic_cnc/locale/pl.txt @@ -0,0 +1,36 @@ +## CNC +CNC Machine = Obrabiarka CNC +%s CNC Machine = %s Obrabiarka CNC +Cylinder = Walec +Element Cross = Część krzyżowa +Element Cross Double = Podwójna część krzyżowa +Element Edge = Krawędź części +Element Edge Double = Podwójna krawędź części +Element End = Końcowa część +Element End Double = Podwójna końcowa część +Element Straight = Prosta część +Element Straight Double = Podwójna prosta część +Element T = Część T +Element T Double = Podwójna część T +Horizontal Cylinder = Poziomy walec +One Curved Edge Block = Blok z zagiętą krawędzią +Pyramid = Ostrosłup +Slope = Spad +Slope Edge = Krawędź spadu +Slope Inner Edge = Wewnętrzna krawędź spadu +Slope Lying = Leżący spad +Slope Upside Down = Odwrócony spad +Slope Upside Down Edge = Krawędź odwróconego spadu +Slope Upside Down Inner Edge = Wewnętrzna krawędz odwróconego spadu +Sphere = Kula +Spike = Kolec +Stick = Patyk +Two Curved Edge Block = Blok z dwoma zagiętymi krawędziami +Brick = Cegła +Cobble = Bruk +Dirt = Ziemia +Leaves = Liście +Sandstone = Piaskowiec +Stone = Kamień +Tree = Drzewo +Wooden = Drewniany diff --git a/technic_worldgen/locale/pl.txt b/technic_worldgen/locale/pl.txt new file mode 100644 index 0000000..76039ca --- /dev/null +++ b/technic_worldgen/locale/pl.txt @@ -0,0 +1,38 @@ +# Polish Translation for technic_worldgen +# Polskie tłumaczenie technic_worldgen +# by mat9117 + +###crafts.lua +Uranium Lump = Bryłka uranu +Uranium Ingot = Sztabka uranu +Chromium Lump = Bryłka chromu +Chromium Ingot = Sztabka chromu +Zinc Lump = Bryłka cynku +Zinc Ingot = Sztabka cynku +Brass Ingot = Sztabka mosiądzu +Wrought Iron Ingot = Sztabka kutego żelaza +Cast Iron Ingot = Sztabka żelaziwa +Carbon Steel Ingot = Sztabka stali węglowej +Stainless Steel Ingot = Sztabka nierdzewnej stali +Iron = Żelazo + +###nodes.lua +Uranium Ore = Ruda uranu +Chromium Ore = Ruda chromu +Zinc Ore = Ruda cynku +Granite = Granit +Marble = Marmur +Marble Bricks = Marmurowe cegły +Uranium Block = Blok uranu +Chromium Block = Blok chromu +Zinc Block = Blok cynku +Wrought Iron Block = Blok kutego żelaza +Cast Iron Block = Blok żelaziwa +Carbon Steel Block = Blok stali węglowej +Stainless Steel Block = Blok stali nierdzewnej +Brass Block = Blok mosiądzu +Wrought Iron = Kute żelazo + +###rubber.lua +Rubber Tree Sapling = Sadzonka kauczukowca +Rubber Tree = Kauczukowiec diff --git a/travelnet/init.lua b/travelnet/init.lua index b1ceb6b..edc083e 100644 --- a/travelnet/init.lua +++ b/travelnet/init.lua @@ -841,7 +841,7 @@ travelnet.on_receive_fields = function(pos, formname, fields, player) -- transport the player to the target location local target_pos = travelnet.targets[ owner_name ][ station_network ][ fields.target ].pos; - player:moveto( target_pos, false); + player:move_to( target_pos, false); if( travelnet.travelnet_effect_enabled ) then minetest.add_entity( {x=target_pos.x,y=target_pos.y+0.5,z=target_pos.z}, "travelnet:effect"); -- it self-destructs after 20 turns @@ -859,7 +859,7 @@ travelnet.on_receive_fields = function(pos, formname, fields, player) travelnet.remove_box( target_pos, nil, oldmetadata, player ); -- send the player back as there's no receiving travelnet - player:moveto( pos, false ); + player:move_to( pos, false ); else travelnet.rotate_player( target_pos, player, 0 ) @@ -1015,7 +1015,7 @@ if( travelnet.travelnet_effect_enabled ) then on_step = function( self, dtime ) -- this is supposed to be more flickering than smooth animation - self.object:setyaw( self.object:getyaw()+1); + self.object:set_yaw( self.object:get_yaw()+1); self.anz_rotations = self.anz_rotations + 1; -- eventually self-destruct if( self.anz_rotations > 15 ) then diff --git a/travelnet/locale/es.po b/travelnet/locale/es.po new file mode 100644 index 0000000..ad23bb1 --- /dev/null +++ b/travelnet/locale/es.po @@ -0,0 +1,401 @@ +# Spanish translation for the travelnet mod. +# Copyright (C) 2018 Sokomine +# This file is distributed under the same license as the travelnet package. +# +msgid "" +msgstr "" +"Project-Id-Version: travelnet\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-04-05 14:34+0200\n" +"PO-Revision-Date: 2018-04-05 14:34+0200\n" +"Last-Translator: Diego Martínez <lkaezadl3@yahoo.com>\n" +"Language-Team: none\n" +"Language: es\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: doors.lua +msgid "elevator door (open)" +msgstr "puerta de elevador (abierta)" + +#: doors.lua +msgid "elevator door (closed)" +msgstr "puerta de elevador (cerrada)" + +#: elevator.lua +msgid "" +"Congratulations! This is your first elevator.You can build an elevator " +"network by placing further elevators somewhere above or below this one. Just " +"make sure that the x and z coordinate are the same." +msgstr "" +"¡Felicidades! Éste es tu primer elevador. Puedes construir una red de " +"elevadores colocando más elevadores en algún lugar arriba o abajo de éste. " +"asegúrate de que las coordenadas X y Z sean las mismas." + +#: elevator.lua +msgid "" +"This elevator will automaticly connect to the other elevators you have " +"placed at diffrent heights. Just enter a station name and click on \"store\" " +"to set it up. Or just punch it to set the height as station name." +msgstr "" +"Éste elevador se conectará automáticamente a otros elevadores que hayas " +"colocado a diferentes alturas. Simplemente ingresa un nombre para la " +"estación y haz clic en \"Guardar\" para configurarlo, o golpéalo para usar " +"la altura como nombre." + +#: elevator.lua +msgid "Your nearest elevator network is located" +msgstr "La red de elevadores más cercana se ubica" + +#: elevator.lua +msgid "m behind this elevator and" +msgstr "m detrás de éste elevador y" + +#: elevator.lua +msgid "m in front of this elevator and" +msgstr "m delante de éste elevador y" + +#: elevator.lua +msgid " ERROR" +msgstr " ERROR" + +#: elevator.lua +msgid "m to the left" +msgstr "m a la izquierda" + +#: elevator.lua +msgid "m to the right" +msgstr "m a la derecha" + +#: elevator.lua +msgid ", located at x" +msgstr ", ubicado en x" + +#: elevator.lua +msgid "This elevator here will start a new shaft/network." +msgstr "Éste elevador comenzará una nueva red." + +#: elevator.lua +msgid "" +"This is your first elevator. It differs from travelnet networks by only " +"allowing movement in vertical direction (up or down). All further elevators " +"which you will place at the same x,z coordinates at differnt heights will be " +"able to connect to this elevator." +msgstr "" +"Éste es tu primer elevador. Se diferencia de las cabinas de viaje en que " +"solamente permite movimiento vertical (arriba o abajo). Los elevadores que " +"coloque en las mismas coordenadas X,Z se conectarán a éste elevador." + +#: elevator.lua +msgid "Elevator" +msgstr "Elevador" + +#: elevator.lua +msgid "Elevator (unconfigured)" +msgstr "Elevador (sin configurar)" + +#: elevator.lua init.lua +msgid "Name of this station:" +msgstr "Nombre de ésta estación:" + +#: elevator.lua +msgid "Store" +msgstr "Guardar" + +#: elevator.lua travelnet.lua +msgid "Not enough vertical space to place the travelnet box!" +msgstr "" +"¡No hay espacio vertical suficiente para colocar la cabina de viaje!" + +#: init.lua +msgid "allows to attach travelnet boxes to travelnets of other players" +msgstr "permite adjuntar cajas de viaje a redes de otros jugadores" + +#: init.lua +msgid "allows to dig travelnet boxes which belog to nets of other players" +msgstr "" +"permite cavar cabinas de viaje pertenecientes a redes de otros jugadores" + +#: init.lua +#, lua-format +msgid "[Mod travelnet] Error: Savefile '%s' could not be written." +msgstr "[Mod travelnet] Error: No se pudo escribir '%s'." + +#: init.lua +#, lua-format +msgid "[Mod travelnet] Error: Savefile '%s' not found." +msgstr "[Mod travelnet] Error: No se pudo encontrar '%s'." + +#: init.lua +msgid "Back" +msgstr "Atras" + +#: init.lua +msgid "Exit" +msgstr "Salir" + +#: init.lua +msgid "Travelnet-box (unconfigured)" +msgstr "Cabina de viaje (sin configurar)" + +#: init.lua +msgid "Configure this travelnet station" +msgstr "Configurar ésta estación" + +#: init.lua +msgid "Name of this station" +msgstr "Nombre de ésta estación" + +#: init.lua +msgid "" +"How do you call this place here? Example: \"my first house\", \"mine\", " +"\"shop\"..." +msgstr "" +"¿Cómo llamaras a éste lugar? Por ejemplo: \"mi casa\", \"mina\", " +"\"tienda\"..." + +#: init.lua +msgid "Assign to Network:" +msgstr "Asignar a la red:" + +#: init.lua +#, lua-format +msgid "You can have more than one network. If unsure, use \"%s\"" +msgstr "" +"Puedes tener más de una red. Si no estás seguro, usa \"%s\"" + +#: init.lua +msgid "Owned by:" +msgstr "Propiedad de:" + +#: init.lua +msgid "Unless you know what you are doing, leave this empty." +msgstr "Deja éste campo vacío a menos que sepas lo que haces." + +#: init.lua +msgid "Help" +msgstr "Ayuda" + +#: init.lua +msgid "Save" +msgstr "Guardar" + +#: init.lua +msgid "Update failed! Resetting this box on the travelnet." +msgstr "¡Actualización fallida! Reiniciando ésta cabina de viaje." + +#: init.lua +#, lua-format +msgid "Station '%s'" +msgstr "Estación '%s'" + +#: init.lua +#, lua-format +msgid " has been reattached to the network '%s'." +msgstr " ha sido reacoplado a la red '%s'." + +#: init.lua +msgid "Locked travelnet. Type /help for help:" +msgstr "Cabins de viaje bloqueada. Escriba /help para ver la ayuda:" + +#: init.lua travelnet.lua +msgid "Travelnet-Box" +msgstr "Cabina de viaje" + +#: init.lua +msgid "Punch box to update target list." +msgstr "Golpea la cabina para actualizar la lista de destinos." + +#: init.lua +msgid "Assigned to Network:" +msgstr "Asignado a la red:" + +#: init.lua +msgid "Click on target to travel there:" +msgstr "Has clic en un destino para viajar allí:" + +#: init.lua +msgid "G" +msgstr "G" + +#: init.lua +msgid "This station is already the first one on the list." +msgstr "Ésta estación ya es la primera en la lista." + +#: init.lua +msgid "This station is already the last one on the list." +msgstr "Ésta estación ya es la última en la lista." + +#: init.lua +msgid "Position in list:" +msgstr "Posición en la lista:" + +#: init.lua +msgid "move up" +msgstr "subir" + +#: init.lua +msgid "move down" +msgstr "bajar" + +#: init.lua +#, lua-format +msgid "on travelnet '%s'" +msgstr "en la red '%s'" + +#: init.lua +#, lua-format +msgid "(owned by %s)" +msgstr "(pertenece a %s)" + +#: init.lua +msgid "ready for usage. Right-click to travel, punch to update." +msgstr "" +"listo para usar. Haz clic derecho para viajar, golpea para actualizar." + +#: init.lua +#, lua-format +msgid "at %s m" +msgstr "a %s m" + +#: init.lua +msgid "Error" +msgstr "Error" + +#: init.lua +msgid "Please provide a name for this station." +msgstr "" + +#: init.lua +msgid "" +"Please provide the name of the network this station ought to be connected to." +msgstr "" +"Por favor especifique el nombre de la red a la cual conectarse." + +#: init.lua +#, lua-format +msgid "There is no player with interact privilege named '%s'. Aborting." +msgstr "" +"No hay un jugador llamado '%s' con privilegios de interacción. Abortando." + +#: init.lua +msgid "" +"You do not have the travelnet_attach priv which is required to attach your " +"box to the network of someone else. Aborting." +msgstr "" +"No tienes el privilegio 'travelnet_attach' requerido para acoplar tu " +"cabina a la red de otros. Abortando." + +#: init.lua +#, lua-format +msgid "" +"A station named '%s' already exists on this network. Please choose a " +"diffrent name!" +msgstr "" +"Yes existe una estación llamada '%s' en ésta red. Por favor, ¡elige un " +"nombre diferente!" + +#: init.lua +#, lua-format +msgid "Network '%s'," +msgstr "La red '%s'," + +#: init.lua +#, lua-format +msgid "" +"already contains the maximum number (=%s) of allowed stations per network. " +"Please choose a diffrent/new network name." +msgstr "" +"ya contiene la cantidad máxima (%s) de estaciones permitidas. Por favor " +"elige un nombre de red diferente/nuevo." + +#: init.lua +#, lua-format +msgid "has been added to the network '%s'" +msgstr "ha sido añadida a la red '%s'" + +#: init.lua +#, lua-format +msgid ", which now consists of %s station(s)." +msgstr ", la cual consta de %s estación(es)." + +#: init.lua +msgid "Station:" +msgstr "Estación:" + +#: init.lua +msgid "Network:" +msgstr "Red:" + +#: init.lua +msgid "No help available yet." +msgstr "No hay ayuda disponible aún." + +#: init.lua +msgid "Please click on the target you want to travel to." +msgstr "Por favor haz clic en el destino al cual quieres viajar." + +#: init.lua +msgid "There is something wrong with the configuration of this station." +msgstr "Excuse algún error en la configuración de ésta estación." + +#: init.lua +msgid "This travelnet is lacking data and/or improperly configured." +msgstr "" +"A ésta red le faltan datos y/o no ha sido configurada apropiadamente." + +#: init.lua +msgid "does not exist (anymore?) on this network." +msgstr "ya no existe (mas?) en ésta red." + +#: init.lua +#, lua-format +msgid "Initiating transfer to station '%s'." +msgstr "Iniciando transferencia a la estación '%s'." + +#: init.lua +msgid "Could not find information about the station that is to be removed." +msgstr "No se encontró información acerca de la estación a quitar." + +#: init.lua +msgid "Could not find the station that is to be removed." +msgstr "No se encontró la estación a quitar." + +#: init.lua +#, lua-format +msgid "has been REMOVED from the network '%s'." +msgstr "ha sido QUITADA de la red '%s'." + +#: init.lua +#, lua-format +msgid "" +"This %s has not been configured yet. Please set it up first to claim it. " +"Afterwards you can remove it because you are then the owner." +msgstr "" +"Éste %s aún no ha sido configurado. Por favor configurarlo para " +"reclamarlo. Luego de hacerlo serás el dueño y podrás quitarlo." + +#: init.lua +#, lua-format +msgid "This %s belongs to %s. You can't remove it." +msgstr "Éste %s pertenece a %s. No lo puedes quitar." + +#: init.lua +#, lua-format +msgid "Remove station" +msgstr "Quitar estación" + +#: init.lua +#, lua-format +msgid "You do not have enough room in your inventory." +msgstr "No tienes suficiente espacio en el inventario." + +#: init.lua +#, lua-format +msgid "" +"[Mod travelnet] Error: Savefile '%s' is damaged. Saved the backup as '%s'." +msgstr "" +"[Mod travelnet] Error: El fichero '%s' está dañado. Guardando copia de " +"respaldo en '%s'." diff --git a/unified_inventory/bags.lua b/unified_inventory/bags.lua index 6f07314..75ea13b 100644 --- a/unified_inventory/bags.lua +++ b/unified_inventory/bags.lua @@ -9,18 +9,19 @@ local F = minetest.formspec_escape unified_inventory.register_page("bags", { get_formspec = function(player) local player_name = player:get_player_name() - local formspec = "background[0.06,0.99;7.92,7.52;ui_bags_main_form.png]" - formspec = formspec.."label[0,0;"..F(S("Bags")).."]" - formspec = formspec.."button[0,2;2,0.5;bag1;"..F(S("Bag @1", 1)).."]" - formspec = formspec.."button[2,2;2,0.5;bag2;"..F(S("Bag @1", 2)).."]" - formspec = formspec.."button[4,2;2,0.5;bag3;"..F(S("Bag @1", 3)).."]" - formspec = formspec.."button[6,2;2,0.5;bag4;"..F(S("Bag @1", 4)).."]" - formspec = formspec.."listcolors[#00000000;#00000000]" - formspec = formspec.."list[detached:"..F(player_name).."_bags;bag1;0.5,1;1,1;]" - formspec = formspec.."list[detached:"..F(player_name).."_bags;bag2;2.5,1;1,1;]" - formspec = formspec.."list[detached:"..F(player_name).."_bags;bag3;4.5,1;1,1;]" - formspec = formspec.."list[detached:"..F(player_name).."_bags;bag4;6.5,1;1,1;]" - return {formspec=formspec} + return { formspec = table.concat({ + "background[0.06,0.99;7.92,7.52;ui_bags_main_form.png]", + "label[0,0;" .. F(S("Bags")) .. "]", + "button[0,2;2,0.5;bag1;" .. F(S("Bag @1", 1)) .. "]", + "button[2,2;2,0.5;bag2;" .. F(S("Bag @1", 2)) .. "]", + "button[4,2;2,0.5;bag3;" .. F(S("Bag @1", 3)) .. "]", + "button[6,2;2,0.5;bag4;" .. F(S("Bag @1", 4)) .. "]", + "listcolors[#00000000;#00000000]", + "list[detached:" .. F(player_name) .. "_bags;bag1;0.5,1;1,1;]", + "list[detached:" .. F(player_name) .. "_bags;bag2;2.5,1;1,1;]", + "list[detached:" .. F(player_name) .. "_bags;bag3;4.5,1;1,1;]", + "list[detached:" .. F(player_name) .. "_bags;bag4;6.5,1;1,1;]" + }) } end, }) @@ -38,37 +39,39 @@ local function get_player_bag_stack(player, i) }):get_stack("bag" .. i, 1) end -for i = 1, 4 do - local bi = i - unified_inventory.register_page("bag"..bi, { +for bag_i = 1, 4 do + unified_inventory.register_page("bag" .. bag_i, { get_formspec = function(player) - local stack = get_player_bag_stack(player, bi) + local stack = get_player_bag_stack(player, bag_i) local image = stack:get_definition().inventory_image - local formspec = ("image[7,0;1,1;"..image.."]" - .."label[0,0;"..F(S("Bag @1", bi)).."]" - .."listcolors[#00000000;#00000000]" - .."list[current_player;bag"..bi.."contents;0,1;8,3;]" - .."listring[current_name;bag"..bi.."contents]" - .."listring[current_player;main]") + local fs = { + "image[7,0;1,1;" .. image .. "]", + "label[0,0;" .. F(S("Bag @1", bag_i)) .. "]", + "listcolors[#00000000;#00000000]", + "list[current_player;bag" .. bag_i .. "contents;0,1;8,3;]", + "listring[current_name;bag" .. bag_i .. "contents]", + "listring[current_player;main]" + } local slots = stack:get_definition().groups.bagslots if slots == 8 then - formspec = formspec.."background[0.06,0.99;7.92,7.52;ui_bags_sm_form.png]" + fs[#fs + 1] = "background[0.06,0.99;7.92,7.52;ui_bags_sm_form.png]" elseif slots == 16 then - formspec = formspec.."background[0.06,0.99;7.92,7.52;ui_bags_med_form.png]" + fs[#fs + 1] = "background[0.06,0.99;7.92,7.52;ui_bags_med_form.png]" elseif slots == 24 then - formspec = formspec.."background[0.06,0.99;7.92,7.52;ui_bags_lg_form.png]" + fs[#fs + 1] = "background[0.06,0.99;7.92,7.52;ui_bags_lg_form.png]" end local player_name = player:get_player_name() -- For if statement. - if unified_inventory.trash_enabled or unified_inventory.is_creative(player_name) or minetest.get_player_privs(player_name).give then - formspec = (formspec.."background[6.06,0;0.92,0.92;ui_bags_trash.png]" - .."list[detached:trash;main;6,0.1;1,1;]") + if unified_inventory.trash_enabled + or unified_inventory.is_creative(player_name) + or minetest.get_player_privs(player_name).give then + fs[#fs + 1] = "background[6.06,0;0.92,0.92;ui_bags_trash.png]" + .. "list[detached:trash;main;6,0.1;1,1;]" end local inv = player:get_inventory() for i = 1, 4 do local def = get_player_bag_stack(player, i):get_definition() - local button if def.groups.bagslots then - local list_name = "bag"..i.."contents" + local list_name = "bag" .. i .. "contents" local size = inv:get_size(list_name) local used = 0 for si = 1, size do @@ -78,14 +81,12 @@ for i = 1, 4 do end end local img = def.inventory_image - local label = F(S("Bag @1", i)).."\n"..used.."/"..size - button = "image_button["..(i+1)..",0;1,1;"..img..";bag"..i..";"..label.."]" - else - button = "" + local label = F(S("Bag @1", i)) .. "\n" .. used .. "/" .. size + fs[#fs + 1] = string.format("image_button[%i,0;1,1;%s;bag%i;%s]", + i + 1, img, i, label) end - formspec = formspec..button end - return {formspec=formspec} + return { formspec = table.concat(fs) } end, }) end @@ -95,12 +96,12 @@ minetest.register_on_player_receive_fields(function(player, formname, fields) return end for i = 1, 4 do - if fields["bag"..i] then + if fields["bag" .. i] then local stack = get_player_bag_stack(player, i) if not stack:get_definition().groups.bagslots then return end - unified_inventory.set_inventory_formspec(player, "bag"..i) + unified_inventory.set_inventory_formspec(player, "bag" .. i) return end end @@ -110,7 +111,7 @@ local function save_bags_metadata(player, bags_inv) local is_empty = true local bags = {} for i = 1, 4 do - local bag = "bag"..i + local bag = "bag" .. i if not bags_inv:is_empty(bag) then -- Stack limit is 1, otherwise use stack:to_string() bags[i] = bags_inv:get_stack(bag, 1):get_name() @@ -133,7 +134,7 @@ local function load_bags_metadata(player, bags_inv) if not bags_meta then -- Backwards compatiblity for i = 1, 4 do - local bag = "bag"..i + local bag = "bag" .. i if not player_inv:is_empty(bag) then -- Stack limit is 1, otherwise use stack:to_string() bags[i] = player_inv:get_stack(bag, 1):get_name() @@ -143,7 +144,7 @@ local function load_bags_metadata(player, bags_inv) end -- Fill detached slots for i = 1, 4 do - local bag = "bag"..i + local bag = "bag" .. i bags_inv:set_size(bag, 1) bags_inv:set_stack(bag, 1, bags[i] or "") end @@ -155,7 +156,7 @@ local function load_bags_metadata(player, bags_inv) -- Clean up deprecated garbage after saving for i = 1, 4 do - local bag = "bag"..i + local bag = "bag" .. i player_inv:set_size(bag, 0) end end @@ -163,9 +164,9 @@ end minetest.register_on_joinplayer(function(player) local player_inv = player:get_inventory() local player_name = player:get_player_name() - local bags_inv = minetest.create_detached_inventory(player_name.."_bags",{ + local bags_inv = minetest.create_detached_inventory(player_name .. "_bags",{ on_put = function(inv, listname, index, stack, player) - player:get_inventory():set_size(listname.."contents", + player:get_inventory():set_size(listname .. "contents", stack:get_definition().groups.bagslots) save_bags_metadata(player, inv) end, @@ -175,14 +176,14 @@ minetest.register_on_joinplayer(function(player) return 0 end local player_inv = player:get_inventory() - local old_slots = player_inv:get_size(listname.."contents") + local old_slots = player_inv:get_size(listname .. "contents") if new_slots >= old_slots then return 1 end -- using a smaller bag, make sure it fits - local old_list = player_inv:get_list(listname.."contents") + local old_list = player_inv:get_list(listname .. "contents") local new_list = {} local slots_used = 0 local use_new_list = false @@ -196,7 +197,7 @@ minetest.register_on_joinplayer(function(player) end if new_slots >= slots_used then if use_new_list then - player_inv:set_list(listname.."contents", new_list) + player_inv:set_list(listname .. "contents", new_list) end return 1 end @@ -204,13 +205,13 @@ minetest.register_on_joinplayer(function(player) return 0 end, allow_take = function(inv, listname, index, stack, player) - if player:get_inventory():is_empty(listname.."contents") then + if player:get_inventory():is_empty(listname .. "contents") then return stack:get_count() end return 0 end, on_take = function(inv, listname, index, stack, player) - player:get_inventory():set_size(listname.."contents", 0) + player:get_inventory():set_size(listname .. "contents", 0) save_bags_metadata(player, inv) end, allow_move = function() diff --git a/unified_inventory/doc/mod_api.txt b/unified_inventory/doc/mod_api.txt new file mode 100644 index 0000000..c0be129 --- /dev/null +++ b/unified_inventory/doc/mod_api.txt @@ -0,0 +1,95 @@ +unified_inventory API +===================== + +This file provides information about the API of unified_inventory. + + +Misc functions +-------------- +Grouped by use-case, afterwards sorted alphabetically. + +* `unified_inventory.is_creative(name)` + * Checks whether creative is enabled or the player has `creative` + + +Pages +----- + +Register a new page: The callback inside this function is called on user input. + + unified_inventory.register_page("pagename", { + get_formspec = function(player) + -- ^ `player` is an `ObjectRef` + -- Compute the formspec string here + return { + formspec = "button[2,2;2,1;mybutton;Press me]", + -- ^ Final form of the formspec to display + draw_inventory = false, -- default `true` + -- ^ Optional. Hides the player's `main` inventory list + draw_item_list = false, -- default `true` + -- ^ Optional. Hides the item list on the right side + formspec_prepend = false, -- default `false` + -- ^ Optional. When `false`: Disables the formspec prepend + } + end, + }) + + +Buttons +------- + +Register a new button for the bottom row: + + unified_inventory.register_button("skins", { + type = "image", + image = "skins_skin_button.png", + tooltip = "Skins", + hide_lite = true + -- ^ Button is hidden when following two conditions are met: + -- Configuration line `unified_inventory_lite = true` + -- Player does not have the privilege `ui_full` + }) + + + +Crafting +-------- + +The code blocks below document each possible parameter using exemplary values. + +Provide information to display custom craft types: + + unified_inventory.register_craft_type("mytype", { + -- ^ Unique identifier for `register_craft` + description = "Sample Craft", + -- ^ Text shown below the crafting arrow + icon = "dummy.png", + -- ^ Image shown above the crafting arrow + width = 3, + height = 3, + -- ^ Maximal input dimensions of the recipes + dynamic_display_size = function(craft) + -- ^ `craft` is the definition from `register_craft` + return { + width = 2, + height = 3 + } + end, + -- ^ Optional callback to change the displayed recipe size + uses_crafting_grid = true, + }) + +Register a non-standard craft recipe: + + unified_inventory.register_craft({ + output = "default:foobar", + type = "mytype", + -- ^ Standard craft type or custom (see `register_craft_type`) + items = { + { "default:foo" }, + { "default:bar" } + }, + width = 3, + -- ^ Same as `minetest.register_recipe` + }) + diff --git a/unified_inventory/group.lua b/unified_inventory/group.lua index 23e2587..c7e09be 100644 --- a/unified_inventory/group.lua +++ b/unified_inventory/group.lua @@ -2,19 +2,21 @@ local S = unified_inventory.gettext function unified_inventory.canonical_item_spec_matcher(spec) local specname = ItemStack(spec):get_name() - if specname:sub(1, 6) == "group:" then - local group_names = specname:sub(7):split(",") + if specname:sub(1, 6) ~= "group:" then return function (itemname) - local itemdef = minetest.registered_items[itemname] - for _, group_name in ipairs(group_names) do - if (itemdef.groups[group_name] or 0) == 0 then - return false - end + return itemname == specname + end + end + + local group_names = specname:sub(7):split(",") + return function (itemname) + local itemdef = minetest.registered_items[itemname] + for _, group_name in ipairs(group_names) do + if (itemdef.groups[group_name] or 0) == 0 then + return false end - return true end - else - return function (itemname) return itemname == specname end + return true end end @@ -25,23 +27,11 @@ end function unified_inventory.extract_groupnames(groupname) local specname = ItemStack(groupname):get_name() - if specname:sub(1, 6) == "group:" then - local group_names = specname:sub(7):split(",") - if #group_names == 1 then - return group_names[1], 1 - end - local s = "" - for g=1,#group_names do - if g > 1 then - -- List connector - s = s .. S(" and ") - end - s = s .. group_names[g] - end - return s, #group_names - else + if specname:sub(1, 6) ~= "group:" then return nil, 0 end + local group_names = specname:sub(7):split(",") + return table.concat(group_names, S(" and ")), #group_names end unified_inventory.registered_group_items = { diff --git a/unified_inventory/internal.lua b/unified_inventory/internal.lua index 3fad275..aa7ce66 100644 --- a/unified_inventory/internal.lua +++ b/unified_inventory/internal.lua @@ -58,15 +58,20 @@ function unified_inventory.get_formspec(player, page) unified_inventory.current_page[player_name] = page local pagedef = unified_inventory.pages[page] + if not pagedef then + return "" -- Invalid page name + end + local formspec = { "size[14,10]", + pagedef.formspec_prepend and "" or "no_prepend[]", "background[-0.19,-0.25;14.4,10.75;ui_form_bg.png]" -- Background } - local n = 3 + local n = 4 if draw_lite_mode then formspec[1] = "size[11,7.7]" - formspec[2] = "background[-0.19,-0.2;11.4,8.4;ui_form_bg.png]" + formspec[3] = "background[-0.19,-0.2;11.4,8.4;ui_form_bg.png]" end if unified_inventory.is_creative(player_name) @@ -75,11 +80,6 @@ function unified_inventory.get_formspec(player, page) n = n+1 end - -- Current page - if not unified_inventory.pages[page] then - return "" -- Invalid page name - end - local perplayer_formspec = unified_inventory.get_per_player_formspec(player_name) local fsdata = pagedef.get_formspec(player, perplayer_formspec) diff --git a/unified_inventory/register.lua b/unified_inventory/register.lua index d065e82..6b4454c 100644 --- a/unified_inventory/register.lua +++ b/unified_inventory/register.lua @@ -266,64 +266,77 @@ unified_inventory.register_page("craftguide", { local player_name = player:get_player_name() local player_privs = minetest.get_player_privs(player_name) - local formspec = "" - formspec = formspec.."background[0,"..(formspecy + 3.5)..";8,4;ui_main_inventory.png]" - formspec = formspec.."label[0,"..formheadery..";" .. F(S("Crafting Guide")) .. "]" - formspec = formspec.."listcolors[#00000000;#00000000]" + local fs = { + "background[0,"..(formspecy + 3.5)..";8,4;ui_main_inventory.png]", + "label[0,"..formheadery..";" .. F(S("Crafting Guide")) .. "]", + "listcolors[#00000000;#00000000]" + } local item_name = unified_inventory.current_item[player_name] - if not item_name then return {formspec=formspec} end + if not item_name then + return { formspec = table.concat(fs) } + end + local item_name_shown - if minetest.registered_items[item_name] and minetest.registered_items[item_name].description then - item_name_shown = string.format(S("%s (%s)"), minetest.registered_items[item_name].description, item_name) + if minetest.registered_items[item_name] + and minetest.registered_items[item_name].description then + item_name_shown = string.format(S("%s (%s)"), + minetest.registered_items[item_name].description, item_name) else item_name_shown = item_name end local dir = unified_inventory.current_craft_direction[player_name] - local rdir - if dir == "recipe" then rdir = "usage" end - if dir == "usage" then rdir = "recipe" end + local rdir = dir == "recipe" and "usage" or "recipe" + local crafts = unified_inventory.crafts_for[dir][item_name] local alternate = unified_inventory.alternate[player_name] local alternates, craft - if crafts ~= nil and #crafts > 0 then + if crafts and #crafts > 0 then alternates = #crafts craft = crafts[alternate] end local has_give = player_privs.give or unified_inventory.is_creative(player_name) - formspec = formspec.."background[0.5,"..(formspecy + 0.2)..";8,3;ui_craftguide_form.png]" - formspec = formspec.."textarea["..craftresultx..","..craftresulty - ..";10,1;;"..F(role_text[dir])..": "..item_name_shown..";]" - formspec = formspec..stack_image_button(0, formspecy, 1.1, 1.1, "item_button_" - .. rdir .. "_", ItemStack(item_name)) + fs[#fs + 1] = "background[0.5,"..(formspecy + 0.2)..";8,3;ui_craftguide_form.png]" + fs[#fs + 1] = string.format("textarea[%f,%f;10,1;;%s: %s;]", + craftresultx, craftresulty, F(role_text[dir]), item_name_shown) + fs[#fs + 1] = stack_image_button(0, formspecy, 1.1, 1.1, + "item_button_" .. rdir .. "_", ItemStack(item_name)) if not craft then - formspec = formspec.."label[5.5,"..(formspecy + 2.35)..";" - ..F(no_recipe_text[dir]).."]" + -- No craft recipes available for this item. + fs[#fs + 1] = "label[5.5,"..(formspecy + 2.35)..";" + .. F(no_recipe_text[dir]) .. "]" local no_pos = dir == "recipe" and 4.5 or 6.5 local item_pos = dir == "recipe" and 6.5 or 4.5 - formspec = formspec.."image["..no_pos..","..formspecy..";1.1,1.1;ui_no.png]" - formspec = formspec..stack_image_button(item_pos, formspecy, 1.1, 1.1, "item_button_" - ..other_dir[dir].."_", ItemStack(item_name)) + fs[#fs + 1] = "image["..no_pos..","..formspecy..";1.1,1.1;ui_no.png]" + fs[#fs + 1] = stack_image_button(item_pos, formspecy, 1.1, 1.1, + "item_button_" .. other_dir[dir] .. "_", ItemStack(item_name)) if has_give then - formspec = formspec.."label[0,"..(formspecy + 2.10)..";" .. F(S("Give me:")) .. "]" - .."button[0, "..(formspecy + 2.7)..";0.6,0.5;craftguide_giveme_1;1]" - .."button[0.6,"..(formspecy + 2.7)..";0.7,0.5;craftguide_giveme_10;10]" - .."button[1.3,"..(formspecy + 2.7)..";0.8,0.5;craftguide_giveme_99;99]" + fs[#fs + 1] = "label[0," .. (formspecy + 2.10) .. ";" .. F(S("Give me:")) .. "]" + .. "button[0, " .. (formspecy + 2.7) .. ";0.6,0.5;craftguide_giveme_1;1]" + .. "button[0.6," .. (formspecy + 2.7) .. ";0.7,0.5;craftguide_giveme_10;10]" + .. "button[1.3," .. (formspecy + 2.7) .. ";0.8,0.5;craftguide_giveme_99;99]" end - return {formspec = formspec} + return { formspec = table.concat(fs) } end local craft_type = unified_inventory.registered_craft_types[craft.type] or unified_inventory.craft_type_defaults(craft.type, {}) if craft_type.icon then - formspec = formspec..string.format(" image[%f,%f;%f,%f;%s]",5.7,(formspecy + 0.05),0.5,0.5,craft_type.icon) + fs[#fs + 1] = string.format("image[%f,%f;%f,%f;%s]", + 5.7, (formspecy + 0.05), 0.5, 0.5, craft_type.icon) end - formspec = formspec.."label[5.5,"..(formspecy + 1)..";" .. F(craft_type.description).."]" - formspec = formspec..stack_image_button(6.5, formspecy, 1.1, 1.1, "item_button_usage_", ItemStack(craft.output)) - local display_size = craft_type.dynamic_display_size and craft_type.dynamic_display_size(craft) or { width = craft_type.width, height = craft_type.height } - local craft_width = craft_type.get_shaped_craft_width and craft_type.get_shaped_craft_width(craft) or display_size.width + fs[#fs + 1] = "label[5.5,"..(formspecy + 1)..";" .. F(craft_type.description).."]" + fs[#fs + 1] = stack_image_button(6.5, formspecy, 1.1, 1.1, + "item_button_usage_", ItemStack(craft.output)) + + local display_size = craft_type.dynamic_display_size + and craft_type.dynamic_display_size(craft) + or { width = craft_type.width, height = craft_type.height } + local craft_width = craft_type.get_shaped_craft_width + and craft_type.get_shaped_craft_width(craft) + or display_size.width -- This keeps recipes aligned to the right, -- so that they're close to the arrow. @@ -358,47 +371,45 @@ unified_inventory.register_page("craftguide", { local xof = (fx-1) * of + of local yof = (y-1) * of + 1 if item then - formspec = formspec..stack_image_button( + fs[#fs + 1] = stack_image_button( xoffset - xof, formspecy - 1 + yof, bsize_w, bsize_h, "item_button_recipe_", ItemStack(item)) else -- Fake buttons just to make grid - formspec = formspec.."image_button[" - ..tostring(xoffset - xof)..","..tostring(formspecy - 1 + yof) - ..";"..bsize_w..","..bsize_h..";ui_blank_image.png;;]" + fs[#fs + 1] = string.format("image_button[%f,%f;%f,%f;ui_blank_image.png;;]", + xoffset - xof, formspecy - 1 + yof, bsize_w, bsize_h) end end end else -- Error - formspec = formspec.."label[" - ..tostring(2)..","..tostring(formspecy) - ..";"..F(S("This recipe is too\nlarge to be displayed.")).."]" + fs[#fs + 1] = string.format("label[2,%f;%s]", + formspecy, F(S("This recipe is too\nlarge to be displayed."))) end if craft_type.uses_crafting_grid and display_size.width <= 3 then - formspec = formspec.."label[0,"..(formspecy + 0.9)..";" .. F(S("To craft grid:")) .. "]" - .."button[0, "..(formspecy + 1.5)..";0.6,0.5;craftguide_craft_1;1]" - .."button[0.6,"..(formspecy + 1.5)..";0.7,0.5;craftguide_craft_10;10]" - .."button[1.3,"..(formspecy + 1.5)..";0.8,0.5;craftguide_craft_max;" .. F(S("All")) .. "]" + fs[#fs + 1] = "label[0," .. (formspecy + 0.9) .. ";" .. F(S("To craft grid:")) .. "]" + .. "button[0, " .. (formspecy + 1.5) .. ";0.6,0.5;craftguide_craft_1;1]" + .. "button[0.6," .. (formspecy + 1.5) .. ";0.7,0.5;craftguide_craft_10;10]" + .. "button[1.3," .. (formspecy + 1.5) .. ";0.8,0.5;craftguide_craft_max;" .. F(S("All")) .. "]" end if has_give then - formspec = formspec.."label[0,"..(formspecy + 2.1)..";" .. F(S("Give me:")) .. "]" - .."button[0, "..(formspecy + 2.7)..";0.6,0.5;craftguide_giveme_1;1]" - .."button[0.6,"..(formspecy + 2.7)..";0.7,0.5;craftguide_giveme_10;10]" - .."button[1.3,"..(formspecy + 2.7)..";0.8,0.5;craftguide_giveme_99;99]" + fs[#fs + 1] = "label[0," .. (formspecy + 2.1) .. ";" .. F(S("Give me:")) .. "]" + .. "button[0, " .. (formspecy + 2.7) .. ";0.6,0.5;craftguide_giveme_1;1]" + .. "button[0.6," .. (formspecy + 2.7) .. ";0.7,0.5;craftguide_giveme_10;10]" + .. "button[1.3," .. (formspecy + 2.7) .. ";0.8,0.5;craftguide_giveme_99;99]" end if alternates and alternates > 1 then - formspec = formspec.."label[5.5,"..(formspecy + 1.6)..";" - ..string.format(F(recipe_text[dir]), alternate, alternates).."]" - .."image_button[5.5,"..(formspecy + 2)..";1,1;ui_left_icon.png;alternate_prev;]" - .."image_button[6.5,"..(formspecy + 2)..";1,1;ui_right_icon.png;alternate;]" - .."tooltip[alternate_prev;"..F(prev_alt_text[dir]).."]" - .."tooltip[alternate;"..F(next_alt_text[dir]).."]" + fs[#fs + 1] = "label[5.5," .. (formspecy + 1.6) .. ";" + .. string.format(F(recipe_text[dir]), alternate, alternates) .. "]" + .. "image_button[5.5," .. (formspecy + 2) .. ";1,1;ui_left_icon.png;alternate_prev;]" + .. "image_button[6.5," .. (formspecy + 2) .. ";1,1;ui_right_icon.png;alternate;]" + .. "tooltip[alternate_prev;" .. F(prev_alt_text[dir]) .. "]" + .. "tooltip[alternate;" .. F(next_alt_text[dir]) .. "]" end - return {formspec = formspec} + return { formspec = table.concat(fs) } end, }) @@ -429,78 +440,63 @@ local function craftguide_giveme(player, formname, fields) player_inv:add_item("main", {name = output, count = amount}) end --- tells if an item can be moved and returns an index if so -local function item_fits(player_inv, craft_item, needed_item) - local need_group = string.sub(needed_item, 1, 6) == "group:" - if need_group then - need_group = string.sub(needed_item, 7) +-- Takes any stack from "main" where the `amount` of `needed_item` may fit +-- into the given crafting stack (`craft_item`) +local function craftguide_move_stacks(inv, craft_item, needed_item, amount) + if craft_item:get_count() >= amount then + return end - if craft_item - and not craft_item:is_empty() then - local ciname = craft_item:get_name() - -- abort if the item there isn't usable - if ciname ~= needed_item - and not need_group then - return - end - - -- abort if no item fits onto it - if craft_item:get_count() >= craft_item:get_definition().stack_max then - return - end - - -- use the item there if it's in the right group and a group item is needed - if need_group then - if minetest.get_item_group(ciname, need_group) == 0 then + local get_item_group = minetest.get_item_group + local group = needed_item:match("^group:(.+)") + if group then + if not craft_item:is_empty() then + -- Source item must be the same to fill + if get_item_group(craft_item:get_name(), group) ~= 0 then + needed_item = craft_item:get_name() + else + -- TODO: Maybe swap unmatching "craft" items + -- !! Would conflict with recursive function call return end - needed_item = ciname - need_group = false - end - end - - if need_group then - -- search an item of the specific group - for i,item in pairs(player_inv:get_list("main")) do - if not item:is_empty() - and minetest.get_item_group(item:get_name(), need_group) > 0 then - return i + else + -- Take matching group from the inventory (biggest stack) + local main = inv:get_list("main") + local max_found = 0 + for i, stack in ipairs(main) do + if stack:get_count() > max_found and + get_item_group(stack:get_name(), group) ~= 0 then + needed_item = stack:get_name() + max_found = stack:get_count() + if max_found >= amount then + break + end + end end end - - -- no index found - return - end - - -- search an item with a the name needed_item - for i,item in pairs(player_inv:get_list("main")) do - if not item:is_empty() - and item:get_name() == needed_item then - return i + else + if not craft_item:is_empty() and + craft_item:get_name() ~= needed_item then + return -- Item must be identical end end - -- no index found -end - --- modifies the player inventory and returns the changed craft_item if possible -local function move_item(player_inv, craft_item, needed_item) - local stackid = item_fits(player_inv, craft_item, needed_item) - if not stackid then - return + needed_item = ItemStack(needed_item) + local to_take = math.min(amount, needed_item:get_stack_max()) + to_take = to_take - craft_item:get_count() + if to_take <= 0 then + return -- Nothing to do end - local wanted_stack = player_inv:get_stack("main", stackid) - local taken_item = wanted_stack:take_item() - player_inv:set_stack("main", stackid, wanted_stack) - - if not craft_item - or craft_item:is_empty() then - return taken_item + needed_item:set_count(to_take) + + local taken = inv:remove_item("main", needed_item) + local leftover = taken:add_item(craft_item) + if not leftover:is_empty() then + -- Somehow failed to add the existing "craft" item. Undo the action. + inv:add_item("main", leftover) + return taken end - - craft_item:add_item(taken_item) - return craft_item + return taken end local function craftguide_craft(player, formname, fields) @@ -510,15 +506,21 @@ local function craftguide_craft(player, formname, fields) if amount then break end end if not amount then return end + + amount = tonumber(amount) or 99 -- fallback for "all" + if amount <= 0 or amount > 99 then return end + local player_name = player:get_player_name() - local output = unified_inventory.current_item[player_name] - if (not output) or (output == "") then return end + local output = unified_inventory.current_item[player_name] or "" + if output == "" then return end local player_inv = player:get_inventory() + local craft_list = player_inv:get_list("craft") - local crafts = unified_inventory.crafts_for[unified_inventory.current_craft_direction[player_name]][output] - if (not crafts) or (#crafts == 0) then return end + local crafts = unified_inventory.crafts_for[ + unified_inventory.current_craft_direction[player_name]][output] or {} + if #crafts == 0 then return end local alternate = unified_inventory.alternate[player_name] @@ -526,24 +528,17 @@ local function craftguide_craft(player, formname, fields) if craft.width > 3 then return end local needed = craft.items - - local craft_list = player_inv:get_list("craft") - local width = craft.width if width == 0 then -- Shapeless recipe width = 3 end - amount = tonumber(amount) or 99 - --[[ - if amount == "max" then - amount = 99 -- Arbitrary; need better way to do this. - else - amount = tonumber(amount) - end--]] - - for iter = 1, amount do + -- To spread the items evenly + local STEPSIZE = math.ceil(math.sqrt(amount) / 5) * 5 + local current_count = 0 + repeat + current_count = math.min(current_count + STEPSIZE, amount) local index = 1 for y = 1, 3 do for x = 1, width do @@ -551,7 +546,9 @@ local function craftguide_craft(player, formname, fields) if needed_item then local craft_index = ((y - 1) * 3) + x local craft_item = craft_list[craft_index] - local newitem = move_item(player_inv, craft_item, needed_item) + local newitem = craftguide_move_stacks(player_inv, + craft_item, needed_item, current_count) + if newitem then craft_list[craft_index] = newitem end @@ -559,7 +556,7 @@ local function craftguide_craft(player, formname, fields) index = index + 1 end end - end + until current_count == amount player_inv:set_list("craft", craft_list) |