Compare commits

..

No commits in common. "master" and "master" have entirely different histories.

4 changed files with 190 additions and 208 deletions

3
depends.txt Executable file
View File

@ -0,0 +1,3 @@
default
stairs
wool

View File

@ -55,5 +55,3 @@ minetest.register_tool("multitest:scraper", {
} }
} }
}) })
minetest.log("action", "[multitest] loaded.")

View File

@ -1,5 +0,0 @@
name = multitest
title = Multitest
description = Adds various nodes
depends = default,stairs,wool
optional_depends = moreblocks

388
nodes.lua
View File

@ -1,201 +1,187 @@
-- nodes -- nodes
minetest.register_node("multitest:rubberblock", { minetest.register_node("multitest:rubberblock", {
description = "Rubber Block", description = "Rubber Block",
tiles = {"multitest_rubberblock.png"}, tiles = {"multitest_rubberblock.png"},
groups = {oddly_breakable_by_hand=5,crumbly=3}, groups = {oddly_breakable_by_hand=5,crumbly=3},
}) })
minetest.register_node("multitest:blackstone", { minetest.register_node("multitest:blackstone", {
description = "Blackstone", description = "Blackstone",
tiles = {"multitest_blackstone.png"}, tiles = {"multitest_blackstone.png"},
groups = {cracky=3, stone=1}, groups = {cracky=3, stone=1},
drop = 'multitest:blackcobble', drop = 'multitest:blackcobble',
sounds = default.node_sound_stone_defaults(), sounds = default.node_sound_stone_defaults(),
}) })
minetest.register_node("multitest:blackcobble", { minetest.register_node("multitest:blackcobble", {
description = "Black Cobblestone", description = "Black Cobblestone",
tiles = {"multitest_blackcobble.png"}, tiles = {"multitest_blackcobble.png"},
groups = {cracky=2, stone=2}, groups = {cracky=2, stone=2},
sounds = default.node_sound_stone_defaults(), sounds = default.node_sound_stone_defaults(),
}) })
minetest.register_node("multitest:blackstone_paved", { minetest.register_node("multitest:blackstone_paved", {
description = "Paved Blackstone", description = "Paved Blackstone",
tiles = {"multitest_blackstone_paved.png"}, tiles = {"multitest_blackstone_paved.png"},
groups = {cracky=2, stone=1}, groups = {cracky=2, stone=1},
sounds = default.node_sound_stone_defaults(), sounds = default.node_sound_stone_defaults(),
}) })
minetest.register_node("multitest:blackstone_paved", { minetest.register_node("multitest:blackstone_paved", {
description = "Paved Blackstone", description = "Paved Blackstone",
tiles = {"multitest_blackstone_paved.png"}, tiles = {"multitest_blackstone_paved.png"},
groups = {cracky=2, stone=1}, groups = {cracky=2, stone=1},
sounds = default.node_sound_stone_defaults(), sounds = default.node_sound_stone_defaults(),
}) })
minetest.register_node("multitest:blackstone_brick", { minetest.register_node("multitest:blackstone_brick", {
description = "Blackstone Bricks", description = "Blackstone Bricks",
tiles = {"multitest_blackstone_brick.png"}, tiles = {"multitest_blackstone_brick.png"},
groups = {cracky=2, stone=1}, groups = {cracky=2, stone=1},
sounds = default.node_sound_stone_defaults(), sounds = default.node_sound_stone_defaults(),
}) })
--[[ maintenant dans farming redo --[[ maintenant dans farming redo
minetest.register_node("multitest:hayblock", { minetest.register_node("multitest:hayblock", {
description = "Hay Bale", description = "Hay Bale",
tiles = {"multitest_hayblock_top.png", "multitest_hayblock_top.png", "multitest_hayblock.png"}, tiles = {"multitest_hayblock_top.png", "multitest_hayblock_top.png", "multitest_hayblock.png"},
paramtype2 = "facedir", paramtype2 = "facedir",
groups = {snappy=1,flammable=2,crumbly=1,cracky=4,oddly_breakable_by_hand=2}, groups = {snappy=1,flammable=2,crumbly=1,cracky=4,oddly_breakable_by_hand=2},
sounds = default.node_sound_sand_defaults(), sounds = default.node_sound_sand_defaults(),
on_place = minetest.rotate_node on_place = minetest.rotate_node
}) })
--]] --]]
minetest.register_node("multitest:checkered_floor", { minetest.register_node("multitest:checkered_floor", {
description = "Checkered Floor", description = "Checkered Floor",
tiles = {"multitest_checkered_floor.png"}, tiles = {"multitest_checkered_floor.png"},
groups = {cracky=2, oddly_breakable_by_hand=4}, groups = {cracky=2, oddly_breakable_by_hand=4},
sounds = default.node_sound_stone_defaults(), sounds = default.node_sound_stone_defaults(),
}) })
--[[ --[[
minetest.register_node("multitest:lamp", { minetest.register_node("multitest:lamp", {
description = "Lamp", description = "Lamp",
tiles = {"multitest_lamp.png"}, tiles = {"multitest_lamp.png"},
paramtype = "light", paramtype = "light",
sunlight_propagates = true, sunlight_propagates = true,
light_source = LIGHT_MAX-1, light_source = LIGHT_MAX-1,
groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3}, groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3},
sounds = default.node_sound_glass_defaults(), sounds = default.node_sound_glass_defaults(),
}) })
]] ]]
minetest.register_alias("multitest:lamp", "lantern:lantern")
minetest.register_alias("multitest:lamp", "lantern:lantern")
minetest.register_node("multitest:andesite", {
minetest.register_node("multitest:andesite", { description = "Andesite",
description = "Andesite", tiles = {"multitest_andesite.png"},
tiles = {"multitest_andesite.png"}, groups = {cracky=3,},
groups = {cracky=3,}, sounds = default.node_sound_stone_defaults(),
sounds = default.node_sound_stone_defaults(), })
})
minetest.register_node("multitest:diorite", {
minetest.register_node("multitest:diorite", { description = "Diorite",
description = "Diorite", tiles = {"multitest_diorite.png"},
tiles = {"multitest_diorite.png"}, groups = {cracky=3,},
groups = {cracky=3,}, sounds = default.node_sound_stone_defaults(),
sounds = default.node_sound_stone_defaults(), })
})
minetest.register_node("multitest:granite", {
minetest.register_node("multitest:granite", { description = "Granite",
description = "Granite", tiles = {"multitest_granite.png"},
tiles = {"multitest_granite.png"}, groups = {cracky=3,},
groups = {cracky=3,}, sounds = default.node_sound_stone_defaults(),
sounds = default.node_sound_stone_defaults(), })
})
minetest.register_node("multitest:andesite_smooth", {
minetest.register_node("multitest:andesite_smooth", { description = "Smooth Andesite",
description = "Smooth Andesite", tiles = {"multitest_andesite_smooth.png"},
tiles = {"multitest_andesite_smooth.png"}, groups = {cracky=3,},
groups = {cracky=3,}, sounds = default.node_sound_stone_defaults(),
sounds = default.node_sound_stone_defaults(), })
})
minetest.register_node("multitest:diorite_smooth", {
minetest.register_node("multitest:diorite_smooth", { description = "Smooth Diorite",
description = "Smooth Diorite", tiles = {"multitest_diorite_smooth.png"},
tiles = {"multitest_diorite_smooth.png"}, groups = {cracky=3,},
groups = {cracky=3,}, sounds = default.node_sound_stone_defaults(),
sounds = default.node_sound_stone_defaults(), })
})
minetest.register_node("multitest:granite_smooth", {
minetest.register_node("multitest:granite_smooth", { description = "Smooth Granite",
description = "Smooth Granite", tiles = {"multitest_granite_smooth.png"},
tiles = {"multitest_granite_smooth.png"}, groups = {cracky=3,},
groups = {cracky=3,}, sounds = default.node_sound_stone_defaults(),
sounds = default.node_sound_stone_defaults(), })
})
minetest.register_node("multitest:sandstone_carved", {
minetest.register_node("multitest:sandstone_carved", { description = "Carved Sandstone",
description = "Carved Sandstone", tiles = {"multitest_sandstone_carved_top.png", "multitest_sandstone_carved_top.png", "multitest_sandstone_carved.png"},
tiles = {"multitest_sandstone_carved_top.png", "multitest_sandstone_carved_top.png", "multitest_sandstone_carved.png"}, groups = {crumbly=2,cracky=4,},
groups = {crumbly=2,cracky=4,}, sounds = default.node_sound_sand_defaults(),
sounds = default.node_sound_sand_defaults(), })
})
-- stairs:stair_blackstone
if minetest.get_modpath("moreblocks") then stairs.register_stair_and_slab("blackstone", "multitest:blackstone",
local modname = "multitest" {cracky=3, stone=1},
local names = {"blackstone", "blackcobble", "blackstone_brick", "blackstone_paved"} {"multitest_blackstone.png"},
"Blackstone Stairs",
for _,name in ipairs(names) do "Blackstone Slab", nil)
local nodename = modname..":"..name
local ndef = table.copy(minetest.registered_nodes[nodename]) stairs.register_stair_and_slab("blackcobble", "multitest:blackcobble",
ndef.sunlight_propagates = true {cracky=3, stone=1},
ndef.place_param2 = nil {"multitest_blackcobble.png"},
stairsplus:register_all(modname, name, nodename, ndef) "Black Cobble Stairs",
end "Black Cobble Slab", nil)
else
-- stairs:stair_blackstone stairs.register_stair_and_slab("blackstone_bricks", "multitest:blackstone_brick",
stairs.register_stair_and_slab("blackstone", "multitest:blackstone", {cracky=3, stone=1},
{cracky=3, stone=1}, {"multitest_blackstone_brick.png"},
{"multitest_blackstone.png"}, "Blackstonestone brick Stairs",
"Blackstone Stairs", "Blackstone Brick Slab", nil)
"Blackstone Slab", nil)
stairs.register_stair_and_slab("blackstone_paved", "multitest:blackstone_paved",
stairs.register_stair_and_slab("blackcobble", "multitest:blackcobble", {cracky=3, stone=1},
{cracky=3, stone=1}, {"multitest_blackstone_paved.png"},
{"multitest_blackcobble.png"}, "Paved Blackstone Stairs",
"Black Cobble Stairs", "Paved Blackstone Slab", nil)
"Black Cobble Slab", nil)
-- others
stairs.register_stair_and_slab("blackstone_bricks", "multitest:blackstone_brick", for i, v in ipairs(multitest.colors) do
{cracky=3, stone=1}, minetest.register_node("multitest:carpet_"..v, {
{"multitest_blackstone_brick.png"}, tiles = {"wool_"..v..".png"},
"Blackstonestone brick Stairs", description = multitest.colornames[i].."Carpet",
"Blackstone Brick Slab", nil) groups = {oddly_breakable_by_hand=2,flammable=3},
drawtype="nodebox",
stairs.register_stair_and_slab("blackstone_paved", "multitest:blackstone_paved", paramtype = "light",
{cracky=3, stone=1}, node_box = {
{"multitest_blackstone_paved.png"}, type = "fixed",
"Paved Blackstone Stairs", fixed = {
"Paved Blackstone Slab", nil) {-0.5, -0.5, -0.5, 0.5, -0.4, 0.5},
end }
}
-- others })
for i, v in ipairs(multitest.colors) do end
minetest.register_node("multitest:carpet_"..v, {
tiles = {"wool_"..v..".png"}, minetest.register_node("multitest:door_mat", {
description = multitest.colornames[i].."Carpet", description = "Door Mat",
groups = {oddly_breakable_by_hand=2,flammable=3}, tiles = {"multitest_door_mat.png"},
drawtype="nodebox", inventory_image = "multitest_door_mat.png",
paramtype = "light", wield_image = "multitest_door_mat.png",
node_box = { groups = {oddly_breakable_by_hand=2,flammable=3},
type = "fixed", drawtype = "nodebox",
fixed = { paramtype = "light",
{-0.5, -0.5, -0.5, 0.5, -0.4, 0.5}, paramtype2 = "facedir",
} node_box = {
} type = "fixed",
}) fixed = {
end {-0.5, -0.5, -0.363675, 0.5, -0.454674, 0.426703},
}
minetest.register_node("multitest:door_mat", { }
description = "Door Mat", })
tiles = {"multitest_door_mat.png"},
inventory_image = "multitest_door_mat.png", minetest.register_node("multitest:sponge_block", {
wield_image = "multitest_door_mat.png", description = "Sponge Block (Decorative)",
groups = {oddly_breakable_by_hand=2,flammable=3}, tiles = {"multitest_sponge_block.png"},
drawtype = "nodebox", groups = {oddly_breakable_by_hand=3,},
paramtype = "light", })
paramtype2 = "facedir",
node_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.363675, 0.5, -0.454674, 0.426703},
}
}
})
minetest.register_node("multitest:sponge_block", {
description = "Sponge Block (Decorative)",
tiles = {"multitest_sponge_block.png"},
groups = {oddly_breakable_by_hand=3,},
})