Added realtest.register_stone
@ -43,4 +43,8 @@ minetest.register_alias("trees:mapple_planks_slab", "trees:maple_planks_slab")
|
||||
minetest.register_alias("trees:mapple_planks_slab_r", "trees:maple_planks_slab_r")
|
||||
minetest.register_alias("trees:mapple_planks_stair", "trees:maple_planks_stair")
|
||||
minetest.register_alias("trees:mapple_planks_stair_upside_down", "trees:maple_planks_stair_upside_down")
|
||||
minetest.register_alias("default:clay_lump", "grounds:clay_lump")
|
||||
minetest.register_alias("default:clay_lump", "grounds:clay_lump")
|
||||
minetest.register_alias("default:cobble", "default:stone_small_rock")
|
||||
minetest.register_alias("default:cobbleblock", "default:stone_macadam")
|
||||
minetest.register_alias("default:cobbleblock_flat", "default:stone_bricks")
|
||||
minetest.register_alias("default:cobble_node", "default:stone_small_rock_node")
|
@ -237,82 +237,6 @@ function default.node_sound_glass_defaults(table)
|
||||
return table
|
||||
end
|
||||
|
||||
--
|
||||
|
||||
minetest.register_node("default:stone", {
|
||||
description = "Stone",
|
||||
tiles = {"default_stone.png"},
|
||||
particle_image = {"default_cobble.png"},
|
||||
is_ground_content = true,
|
||||
groups = {cracky=3,drop_on_dig=1},
|
||||
drop = {
|
||||
max_items = 1,
|
||||
items = {
|
||||
{
|
||||
items = {"default:cobble", "minerals:borax"},
|
||||
rarity = 50,
|
||||
},
|
||||
{
|
||||
items = {"default:cobble", "default:cobble", "default:cobble"},
|
||||
rarity = 5
|
||||
},
|
||||
{
|
||||
items = {"default:cobble", "default:cobble"}
|
||||
},
|
||||
{
|
||||
items = {"default:cobble"},
|
||||
rarity = 5
|
||||
},
|
||||
},
|
||||
},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("default:desert_stone", {
|
||||
description = "Desert Stone",
|
||||
tiles = {"default_desert_stone.png"},
|
||||
particle_image = {"default_desert_stone.png"},
|
||||
is_ground_content = true,
|
||||
groups = {cracky=3,drop_on_dig=1},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("default:stone_flat", {
|
||||
description = "Flat Stone",
|
||||
tiles = {"default_stone_flat.png"},
|
||||
particle_image = {"default_stone_flat.png"},
|
||||
is_ground_content = true,
|
||||
groups = {cracky=3,drop_on_dig=1},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("default:desert_stone_flat", {
|
||||
description = "Desert Flat Stone",
|
||||
tiles = {"default_desert_stone_flat.png"},
|
||||
particle_image = {"default_desert_stone_flat.png"},
|
||||
is_ground_content = true,
|
||||
groups = {cracky=3,drop_on_dig=1},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("default:desert_stone_bricks", {
|
||||
description = "Desert Stone Bricks",
|
||||
tiles = {"default_desert_stone_bricks.png"},
|
||||
particle_image = {"default_desert_stone_bricks.png"},
|
||||
is_ground_content = true,
|
||||
groups = {cracky=3,drop_on_dig=1},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("default:cobbleblock_flat", {
|
||||
description = "Stone Bricks",
|
||||
tiles = {"default_cobbleblock_flat.png"},
|
||||
particle_image = {"default_cobble.png"},
|
||||
is_ground_content = true,
|
||||
groups = {cracky=3,drop_on_dig=1},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("default:sand", {
|
||||
description = "Sand",
|
||||
tiles = {"default_sand.png"},
|
||||
@ -690,49 +614,6 @@ minetest.register_node("default:sign_wall", {
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_node("default:cobbleblock", {
|
||||
description = "Block of Cobble",
|
||||
tiles = {"default_cobbleblock.png"},
|
||||
particle_image = {"default_cobble.png"},
|
||||
is_ground_content = true,
|
||||
drop = "default:cobble 9",
|
||||
groups = {crumbly=2, oddly_breakable_by_hand=1, falling_node=1, drop_on_dig=1},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_craftitem("default:cobble", {
|
||||
description = "Stone",
|
||||
inventory_image = "default_cobble.png",
|
||||
})
|
||||
|
||||
minetest.register_node("default:cobble_node", {
|
||||
tiles = {"default_stone.png"},
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
drawtype = "nodebox",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5+9/32, -0.5, -0.5+12/32, 0.5-9/32, -0.5+1/8, 0.5-12/32},
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5+9/32, -0.5, -0.5+12/32, 0.5-9/32, -0.5+1/8, 0.5-12/32},
|
||||
},
|
||||
drop = "default:cobble",
|
||||
groups = {dig_immediate=2,dropping_node=1,drop_on_dig=1},
|
||||
buildable_to = true,
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "default:cobbleblock",
|
||||
recipe = {
|
||||
{"default:cobble","default:cobble","default:cobble"},
|
||||
{"default:cobble","default:cobble","default:cobble"},
|
||||
{"default:cobble","default:cobble","default:cobble"},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_node("default:dry_shrub", {
|
||||
description = "Dry Shrub",
|
||||
drawtype = "plantlike",
|
||||
|
BIN
mods/default/textures/default_desert_stone_macadam.png
Normal file
After Width: | Height: | Size: 864 B |
BIN
mods/default/textures/default_desert_stone_small_rock.png
Normal file
After Width: | Height: | Size: 767 B |
Before Width: | Height: | Size: 824 B After Width: | Height: | Size: 824 B |
Before Width: | Height: | Size: 817 B After Width: | Height: | Size: 817 B |
Before Width: | Height: | Size: 695 B After Width: | Height: | Size: 695 B |
@ -1,2 +1,4 @@
|
||||
core
|
||||
default
|
||||
default
|
||||
joiner_table
|
||||
instruments
|
@ -9,4 +9,5 @@ minetest.register_craft({
|
||||
recipe = "grounds:clay_lump",
|
||||
})
|
||||
|
||||
dofile(minetest.get_modpath("grounds").."/dirt.lua")
|
||||
dofile(minetest.get_modpath("grounds").."/dirt.lua")
|
||||
dofile(minetest.get_modpath("grounds").."/stone.lua")
|
183
mods/grounds/stone.lua
Normal file
@ -0,0 +1,183 @@
|
||||
realtest.registered_stones = {}
|
||||
realtest.registered_stones_list = {}
|
||||
|
||||
function realtest.register_stone(name, StoneRef)
|
||||
if not StoneRef then
|
||||
StoneRef = {}
|
||||
end
|
||||
local stone = {
|
||||
name = name,
|
||||
description = StoneRef.description or "Stone",
|
||||
}
|
||||
realtest.registered_stones[name] = stone
|
||||
table.insert(realtest.registered_stones_list, name)
|
||||
|
||||
local name_ = name:get_modname_prefix().."_"..name:remove_modname_prefix()
|
||||
|
||||
minetest.register_craftitem(":"..name.."_small_rock", {
|
||||
description = stone.description .. " Small Rock",
|
||||
inventory_image = name_.."_small_rock.png"
|
||||
})
|
||||
|
||||
minetest.register_node(":"..name, {
|
||||
description = stone.description,
|
||||
tiles = {name_..".png"},
|
||||
particle_image = {name_.."_small_rock.png"},
|
||||
groups = {cracky=3, drop_on_dig=1, stone=1},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
drop = {
|
||||
max_items = 1,
|
||||
items = {
|
||||
{
|
||||
items = {name.."_small_rock"},
|
||||
rarity = 50,
|
||||
},
|
||||
{
|
||||
items = {name.."_small_rock", name.."_small_rock", name.."_small_rock"},
|
||||
rarity = 5
|
||||
},
|
||||
{
|
||||
items = {name.."_small_rock", name.."_small_rock"}
|
||||
},
|
||||
{
|
||||
items = {name.."_small_rock"},
|
||||
rarity = 5
|
||||
},
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_node(":"..name.."_flat", {
|
||||
description = "Flat "..stone.description,
|
||||
tiles = {name_.."_flat.png"},
|
||||
particle_image = {name_.."_small_rock.png"},
|
||||
groups = {cracky=3, drop_on_dig=1, stone=1, flat=1},
|
||||
sounds = default.node_sound_stone_defaults()
|
||||
})
|
||||
|
||||
minetest.register_node(":"..name.."_bricks", {
|
||||
description = stone.description.." Bricks",
|
||||
tiles = {name_.."_bricks.png"},
|
||||
particle_image = {name_.."_small_rock.png"},
|
||||
groups = {cracky=3, drop_on_dig=1, stone=1, bricks=1},
|
||||
sounds = default.node_sound_stone_defaults()
|
||||
})
|
||||
|
||||
minetest.register_node(":"..name.."_macadam", {
|
||||
description = stone.description.." Macadam",
|
||||
tiles = {name_.."_macadam.png"},
|
||||
particle_image = {name_.."_small_rock.png"},
|
||||
groups = {crumbly=2, drop_on_dig=1, stone=1, macadam=1},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
drop = name.."_small_rock 4"
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
recipe = {
|
||||
{name.."_small_rock", name.."_small_rock"},
|
||||
{name.."_small_rock", name.."_small_rock"}
|
||||
},
|
||||
output = name.."_macadam"
|
||||
})
|
||||
|
||||
realtest.register_joiner_table_recipe({
|
||||
item1 = name,
|
||||
output = name.."_flat",
|
||||
instrument = "chisel"
|
||||
})
|
||||
|
||||
realtest.register_joiner_table_recipe({
|
||||
item1 = name.."_slab",
|
||||
output = name.."_flat_slab",
|
||||
instrument = "chisel"
|
||||
})
|
||||
|
||||
realtest.register_joiner_table_recipe({
|
||||
item1 = name.."_stair",
|
||||
output = name.."_flat_stair",
|
||||
instrument = "chisel"
|
||||
})
|
||||
|
||||
realtest.register_joiner_table_recipe({
|
||||
item1 = name.."_flat",
|
||||
item2 = "scribing_table:stonebricks",
|
||||
output = name.."_bricks",
|
||||
rmitem2 = false,
|
||||
instrument = "chisel"
|
||||
})
|
||||
|
||||
realtest.register_joiner_table_recipe({
|
||||
item1 = name.."_flat_slab",
|
||||
item2 = "scribing_table:stonebricks",
|
||||
output = name.."_bricks_slab",
|
||||
rmitem2 = false,
|
||||
instrument = "chisel"
|
||||
})
|
||||
|
||||
realtest.register_joiner_table_recipe({
|
||||
item1 = name.."_flat_stair",
|
||||
item2 = "scribing_table:stonebricks",
|
||||
output = name.."_bricks_stair",
|
||||
rmitem2 = false,
|
||||
instrument = "chisel"
|
||||
})
|
||||
|
||||
minetest.register_node(":"..name.."_small_rock_node", {
|
||||
tiles = {name_..".png"},
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
drawtype = "nodebox",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5+9/32, -0.5, -0.5+12/32, 0.5-9/32, -0.5+1/8, 0.5-12/32},
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5+9/32, -0.5, -0.5+12/32, 0.5-9/32, -0.5+1/8, 0.5-12/32},
|
||||
},
|
||||
drop = name.."_small_rock",
|
||||
groups = {dig_immediate=2,dropping_node=1,drop_on_dig=1},
|
||||
buildable_to = true,
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
realtest.register_stair_and_slab(name)
|
||||
realtest.register_stair_and_slab(name.."_flat")
|
||||
realtest.register_stair_and_slab(name.."_bricks")
|
||||
|
||||
instruments.chisel_pairs[name] = name.."_flat"
|
||||
instruments.chisel_pairs[name.."_slab"] = name.."_flat_slab"
|
||||
instruments.chisel_pairs[name.."_slab_r"] = name.."_flat_slab_r"
|
||||
instruments.chisel_pairs[name.."_stair"] = name.."_flat_stair"
|
||||
instruments.chisel_pairs[name.."_stair_r"] = name.."_flat_stair_r"
|
||||
end
|
||||
|
||||
realtest.register_stone("default:stone")
|
||||
realtest.register_stone("default:desert_stone", {description = "Desert Stone"})
|
||||
minetest.register_node(":default:stone", {
|
||||
description = "Stone",
|
||||
tiles = {"default_stone.png"},
|
||||
particle_image = {"default_stone_small_rock.png"},
|
||||
groups = {cracky=3, drop_on_dig=1, stone=1},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
drop = {
|
||||
max_items = 1,
|
||||
items = {
|
||||
{
|
||||
items = {"default:stone_small_rock", "minerals:borax"},
|
||||
rarity = 50,
|
||||
},
|
||||
{
|
||||
items = {"default:stone_small_rock", "default:stone_small_rock", "default:stone_small_rock"},
|
||||
rarity = 5
|
||||
},
|
||||
{
|
||||
items = {"default:stone_small_rock", "default:stone_small_rock"}
|
||||
},
|
||||
{
|
||||
items = {"default:stone_small_rock"},
|
||||
rarity = 5
|
||||
},
|
||||
}
|
||||
}
|
||||
})
|
@ -1,6 +1,8 @@
|
||||
instruments = {}
|
||||
instruments.spear = {}
|
||||
|
||||
instruments.chisel_pairs = {}
|
||||
|
||||
instruments.spear.damage = 10
|
||||
instruments.spear.gravity = 9
|
||||
instruments.spear.velocity = 19
|
||||
@ -126,26 +128,8 @@ for i, material in ipairs(instruments.materials) do
|
||||
return
|
||||
end
|
||||
local n = minetest.env:get_node(pointed_thing.under)
|
||||
if n.name == "default:stone" then
|
||||
minetest.env:add_node(pointed_thing.under, {name="default:stone_flat"})
|
||||
elseif n.name == "default:desert_stone" then
|
||||
minetest.env:add_node(pointed_thing.under, {name="default:desert_stone_flat"})
|
||||
elseif n.name == "default:stone_slab_r" then
|
||||
minetest.env:add_node(pointed_thing.under, {name="default:stone_flat_slab_r", param2=n.param2})
|
||||
elseif n.name == "default:stone_slab" then
|
||||
minetest.env:add_node(pointed_thing.under, {name="default:stone_flat_slab_r", param2=1})
|
||||
elseif n.name == "default:desert_stone_slab_r" then
|
||||
minetest.env:add_node(pointed_thing.under, {name="default:desert_stone_flat_slab_r", param2=n.param2})
|
||||
elseif n.name == "default:desert_stone_slab" then
|
||||
minetest.env:add_node(pointed_thing.under, {name="default:desert_stone_flat_slab_r", param2=1})
|
||||
elseif n.name == "default:stone_stair" then
|
||||
minetest.env:add_node(pointed_thing.under, {name="default:stone_flat_stair", param2=n.param2})
|
||||
elseif n.name == "default:stone_stair_upside_down" then
|
||||
minetest.env:add_node(pointed_thing.under, {name="default:stone_flat_stair_upside_down", param2=n.param2})
|
||||
elseif n.name == "default:desert_stone_stair" then
|
||||
minetest.env:add_node(pointed_thing.under, {name="default:desert_stone_flat_stair", param2=n.param2})
|
||||
elseif n.name == "default:desert_stone_stair_upside_down" then
|
||||
minetest.env:add_node(pointed_thing.under, {name="default:desert_stone_flat_stair_upside_down", param2=n.param2})
|
||||
if instruments.chisel_pairs[n.name] then
|
||||
minetest.env:add_node(pointed_thing.under, {name=instruments.chisel_pairs[n.name], param2=n.param2})
|
||||
end
|
||||
item:add_wear(65535/instruments.durability[i]/4)
|
||||
return item
|
||||
|
@ -32,58 +32,6 @@ for _, tree in pairs(realtest.registered_trees_list) do
|
||||
})
|
||||
end
|
||||
|
||||
realtest.register_joiner_table_recipe({
|
||||
item1 = "default:stone",
|
||||
output = "default:stone_flat",
|
||||
instrument = "chisel"
|
||||
})
|
||||
|
||||
realtest.register_joiner_table_recipe({
|
||||
item1 = "default:stone_slab",
|
||||
output = "default:stone_flat_slab",
|
||||
instrument = "chisel"
|
||||
})
|
||||
|
||||
realtest.register_joiner_table_recipe({
|
||||
item1 = "default:stone_stair",
|
||||
output = "default:stone_flat_stair",
|
||||
instrument = "chisel"
|
||||
})
|
||||
|
||||
realtest.register_joiner_table_recipe({
|
||||
item1 = "default:desert_stone",
|
||||
output = "default:desert_stone_flat",
|
||||
instrument = "chisel"
|
||||
})
|
||||
|
||||
realtest.register_joiner_table_recipe({
|
||||
item1 = "default:desert_stone_slab",
|
||||
output = "default:desert_stone_flat_slab",
|
||||
instrument = "chisel"
|
||||
})
|
||||
|
||||
realtest.register_joiner_table_recipe({
|
||||
item1 = "default:desert_stone_stair",
|
||||
output = "default:desert_stone_flat_stair",
|
||||
instrument = "chisel"
|
||||
})
|
||||
|
||||
realtest.register_joiner_table_recipe({
|
||||
item1 = "default:stone_flat",
|
||||
item2 = "scribing_table:stonebricks",
|
||||
output = "default:cobbleblock_flat",
|
||||
rmitem2 = false,
|
||||
instrument = "chisel"
|
||||
})
|
||||
|
||||
realtest.register_joiner_table_recipe({
|
||||
item1 = "default:desert_stone_flat",
|
||||
item2 = "scribing_table:stonebricks",
|
||||
output = "default:desert_stone_bricks",
|
||||
rmitem2 = false,
|
||||
instrument = "chisel"
|
||||
})
|
||||
|
||||
for _, tree in pairs(realtest.registered_trees) do
|
||||
local planks = tree.textures.planks
|
||||
minetest.register_node("joiner_table:joiner_table_"..tree.name:remove_modname_prefix(), {
|
||||
|