lib_materials/lib_materials_utils.lua

209 lines
3.7 KiB
Lua
Raw Normal View History

2018-01-19 21:24:59 +01:00
2019-06-13 21:20:42 +02:00
local S = lib_materials.intllib
2018-01-19 21:24:59 +01:00
2019-08-30 23:05:56 +02:00
minetest.register_node("lib_materials:litter_rock", {
description = S("Litter - Rock"),
2019-06-13 21:20:42 +02:00
drawtype = "nodebox",
2019-08-30 23:05:56 +02:00
tiles = {"lib_materials_litter_rock.png"},
2019-06-13 21:20:42 +02:00
sunlight_propagates = true,
paramtype = "light",
paramtype2 = "facedir",
walkable = false,
buildable_to = true,
floodable = true,
2019-08-30 23:05:56 +02:00
groups = {chippy = 1, flakey = 1, knappy = 1, oddly_breakable_by_hand = 1},
2019-06-13 21:20:42 +02:00
sounds = lib_materials.node_sound_stone_defaults(),
drop = {
max_items = 1,
items = {
2019-08-30 23:05:56 +02:00
{items = {"lib_materials:litter_rock"}},
{items = {"lib_materials:tool_rock"}, rarity = 20},
}
2019-06-13 21:20:42 +02:00
},
node_box = {
type = "fixed",
fixed = {
{-0.5,-0.5,-0.5,0.5,-0.49,0.5}
}
},
})
2019-08-30 23:05:56 +02:00
minetest.register_node("lib_materials:litter_rocks", {
description = S("Litter - Rocks"),
2019-06-13 21:20:42 +02:00
drawtype = "nodebox",
2019-08-30 23:05:56 +02:00
tiles = {"lib_materials_litter_rocks.png"},
2019-06-13 21:20:42 +02:00
sunlight_propagates = true,
paramtype = "light",
paramtype2 = "facedir",
2019-08-30 23:05:56 +02:00
visual_scale = 2.0,
2019-06-13 21:20:42 +02:00
walkable = false,
buildable_to = true,
floodable = true,
2019-08-30 23:05:56 +02:00
groups = {chippy = 1, flakey = 1, knappy = 1, oddly_breakable_by_hand = 1},
2019-06-13 21:20:42 +02:00
sounds = lib_materials.node_sound_stone_defaults(),
drop = {
max_items = 1,
items = {
2019-08-30 23:05:56 +02:00
{items = {"lib_materials:litter_rocks"}},
{items = {"lib_materials:tool_rock"}, rarity = 20},
}
},
node_box = {
type = "fixed",
fixed = {
{-0.5,-0.5,-0.5,0.5,-0.49,0.5}
}
},
})
minetest.register_node("lib_materials:litter_tool_rock", {
description = S("Litter - Rock Tool"),
drawtype = "nodebox",
tiles = {"lib_materials_litter_rock.png"},
sunlight_propagates = true,
paramtype = "light",
paramtype2 = "facedir",
walkable = false,
buildable_to = true,
floodable = true,
groups = {chippy = 1, flakey = 1, knappy = 1, oddly_breakable_by_hand = 1},
sounds = lib_materials.node_sound_stone_defaults(),
drop = {
max_items = 1,
items = {
{items = {"lib_materials:tool_rock"}},
{items = {"lib_materials:tool_rock_chipper"}, rarity = 10},
{items = {"lib_materials:tool_rock_biface"}, rarity = 10},
2019-06-13 21:20:42 +02:00
}
},
node_box = {
type = "fixed",
fixed = {
{-0.5,-0.5,-0.5,0.5,-0.49,0.5}
}
},
})
2019-08-30 23:05:56 +02:00
minetest.register_node("lib_materials:litter_stick", {
description = S("Litter - Stick"),
drawtype = "nodebox",
tiles = {"lib_materials_litter_stick.png"},
sunlight_propagates = true,
paramtype = "light",
paramtype2 = "facedir",
visual_scale = 2.0,
walkable = false,
buildable_to = true,
floodable = true,
groups = {choppy = 1, snappy = 1, oddly_breakable_by_hand = 1},
sounds = lib_materials.node_sound_wood_defaults(),
drop = {
max_items = 1,
items = {
{items = {"lib_materials:litter_stick"}},
{items = {"lib_materials:tool_stick"}, rarity = 20},
{items = {"lib_materials:tool_rod_wood"}, rarity = 20},
}
},
node_box = {
type = "fixed",
fixed = {
{-0.5,-0.5,-0.5,0.5,-0.49,0.5}
}
},
})
2019-06-13 21:20:42 +02:00
minetest.register_decoration({
deco_type = "simple",
2019-08-30 23:05:56 +02:00
decoration = "lib_materials:litter_rock",
2019-06-13 21:20:42 +02:00
sidelen = 80,
place_on = {"group:soil", "group:sand", "group:stone"},
fill_ratio = 0.002,
flags = "place_center_x, place_center_z",
rotation = "random",
})
minetest.register_decoration({
deco_type = "simple",
2019-08-30 23:05:56 +02:00
decoration = "lib_materials:litter_rocks",
2019-06-13 21:20:42 +02:00
sidelen = 80,
place_on = {"group:soil", "group:sand", "group:stone"},
fill_ratio = 0.002,
flags = "place_center_x, place_center_z",
rotation = "random",
})
2019-08-30 23:05:56 +02:00
minetest.register_decoration({
deco_type = "simple",
decoration = "lib_materials:litter_stick",
sidelen = 80,
place_on = {"group:soil", "group:leaves", "group:wood"},
fill_ratio = 0.002,
flags = "place_center_x, place_center_z",
rotation = "random",
})