Compare commits
34 Commits
Author | SHA1 | Date | |
---|---|---|---|
90aaa1fb62 | |||
6c70e0295a | |||
230747c748 | |||
86cff038a4 | |||
0823f16acb | |||
e1d17b1747 | |||
2817db19d4 | |||
716397819d | |||
67fa74ac01 | |||
d5cc51a396 | |||
cd604fa9c8 | |||
686c0d087c | |||
c27afe7ee8 | |||
9e23e9ecbf | |||
97db50a2fe | |||
a0ba7cf973 | |||
c1b1f2aa49 | |||
0beabfc755 | |||
5fa8852115 | |||
0eb46a01ff | |||
de8726a9f7 | |||
33ec25caed | |||
deb39ddcd4 | |||
2d1e7463d3 | |||
7505fbce51 | |||
9232734a48 | |||
1bf62bbad4 | |||
95cbfc50d8 | |||
61e60724f6 | |||
8c977451a8 | |||
73d078fd27 | |||
0636d574af | |||
c4f2bee9a6 | |||
4763fa635a |
@ -6,7 +6,7 @@ To build the wholeness of the Minetest project, insert this repository as
|
|||||||
in the Minetest Engine.
|
in the Minetest Engine.
|
||||||
|
|
||||||
The Minetest Engine can be found in:
|
The Minetest Engine can be found in:
|
||||||
https://github.com/celeron55/minetest/
|
https://github.com/minetest/minetest/
|
||||||
|
|
||||||
Compatibility
|
Compatibility
|
||||||
--------------
|
--------------
|
||||||
@ -17,7 +17,7 @@ Additionally, when the minetest engine is tagged to be a certain version (eg.
|
|||||||
0.4.dev-20120326), minetest_game is tagged with the version too.
|
0.4.dev-20120326), minetest_game is tagged with the version too.
|
||||||
|
|
||||||
When stable releases are made, minetest_game is packaged and made available in
|
When stable releases are made, minetest_game is packaged and made available in
|
||||||
https://github.com/celeron55/minetest_game/downloads
|
http://minetest.net/download.php
|
||||||
and in case the repository has grown too much, it may be reset. In that sense,
|
and in case the repository has grown too much, it may be reset. In that sense,
|
||||||
this is not a "real" git repository. (Package maintainers please note!)
|
this is not a "real" git repository. (Package maintainers please note!)
|
||||||
|
|
||||||
|
1
mods/creative/depends.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
default
|
@ -44,15 +44,7 @@ minetest.after(0, function()
|
|||||||
table.sort(creative_list)
|
table.sort(creative_list)
|
||||||
inv:set_size("main", #creative_list)
|
inv:set_size("main", #creative_list)
|
||||||
for _,itemstring in ipairs(creative_list) do
|
for _,itemstring in ipairs(creative_list) do
|
||||||
local stack = ItemStack(itemstring)
|
inv:add_item("main", ItemStack(itemstring))
|
||||||
-- Make a stack of the right number of items
|
|
||||||
local stack2 = nil
|
|
||||||
if stack:get_stack_max() == 1 then
|
|
||||||
stack2 = ItemStack(stack:get_name())
|
|
||||||
else
|
|
||||||
stack2 = ItemStack(stack:get_name().." "..stack:get_stack_max())
|
|
||||||
end
|
|
||||||
inv:add_item("main", stack2)
|
|
||||||
end
|
end
|
||||||
creative_inventory.creative_inventory_size = #creative_list
|
creative_inventory.creative_inventory_size = #creative_list
|
||||||
print("creative inventory size: "..dump(creative_inventory.creative_inventory_size))
|
print("creative inventory size: "..dump(creative_inventory.creative_inventory_size))
|
||||||
@ -129,3 +121,42 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
|
|||||||
creative_inventory.set_creative_formspec(player, start_i, start_i / (6*4) + 1)
|
creative_inventory.set_creative_formspec(player, start_i, start_i / (6*4) + 1)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
if minetest.setting_getbool("creative_mode") then
|
||||||
|
|
||||||
|
minetest.register_item(":", {
|
||||||
|
type = "none",
|
||||||
|
wield_image = "wieldhand.png",
|
||||||
|
wield_scale = {x=1,y=1,z=2.5},
|
||||||
|
tool_capabilities = {
|
||||||
|
full_punch_interval = 0.5,
|
||||||
|
max_drop_level = 3,
|
||||||
|
groupcaps = {
|
||||||
|
crumbly = {times={[1]=0.5, [2]=0.5, [3]=0.5}, uses=0, maxlevel=3},
|
||||||
|
cracky = {times={[1]=0.5, [2]=0.5, [3]=0.5}, uses=0, maxlevel=3},
|
||||||
|
snappy = {times={[1]=0.5, [2]=0.5, [3]=0.5}, uses=0, maxlevel=3},
|
||||||
|
choppy = {times={[1]=0.5, [2]=0.5, [3]=0.5}, uses=0, maxlevel=3},
|
||||||
|
oddly_breakable_by_hand = {times={[1]=0.5, [2]=0.5, [3]=0.5}, uses=0, maxlevel=3},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_on_placenode(function(pos, newnode, placer, oldnode, itemstack)
|
||||||
|
return true
|
||||||
|
end)
|
||||||
|
|
||||||
|
function minetest.handle_node_drops(pos, drops, digger)
|
||||||
|
if not digger or not digger:is_player() then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
local inv = digger:get_inventory()
|
||||||
|
if inv then
|
||||||
|
for _,item in ipairs(drops) do
|
||||||
|
item = ItemStack(item):get_name()
|
||||||
|
if not inv:contains_item("main", item) then
|
||||||
|
inv:add_item("main", item)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
@ -26,13 +26,13 @@ minetest.register_item(":", {
|
|||||||
wield_image = "wieldhand.png",
|
wield_image = "wieldhand.png",
|
||||||
wield_scale = {x=1,y=1,z=2.5},
|
wield_scale = {x=1,y=1,z=2.5},
|
||||||
tool_capabilities = {
|
tool_capabilities = {
|
||||||
full_punch_interval = 1.0,
|
full_punch_interval = 0.9,
|
||||||
max_drop_level = 0,
|
max_drop_level = 0,
|
||||||
groupcaps = {
|
groupcaps = {
|
||||||
fleshy = {times={[2]=2.00, [3]=1.00}, uses=0, maxlevel=1},
|
fleshy = {times={[2]=0.75, [3]=0.6}, uses=0, maxlevel=1},
|
||||||
crumbly = {times={[2]=3.00, [3]=0.70}, uses=0, maxlevel=1},
|
crumbly = {times={[2]=3.00, [3]=0.70}, uses=0, maxlevel=1},
|
||||||
snappy = {times={[3]=0.40}, uses=0, maxlevel=1},
|
snappy = {times={[3]=0.40}, uses=0, maxlevel=1},
|
||||||
oddly_breakable_by_hand = {times={[1]=7.00,[2]=4.00,[3]=1.40}, uses=0, maxlevel=3},
|
oddly_breakable_by_hand = {times={[1]=7.00,[2]=4.00,[3]=1.40}, uses=0, maxlevel=3}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@ -41,9 +41,11 @@ minetest.register_tool("default:pick_wood", {
|
|||||||
description = "Wooden Pickaxe",
|
description = "Wooden Pickaxe",
|
||||||
inventory_image = "default_tool_woodpick.png",
|
inventory_image = "default_tool_woodpick.png",
|
||||||
tool_capabilities = {
|
tool_capabilities = {
|
||||||
|
full_punch_interval = 1.2,
|
||||||
max_drop_level=0,
|
max_drop_level=0,
|
||||||
groupcaps={
|
groupcaps={
|
||||||
cracky={times={[2]=2.00, [3]=1.20}, uses=10, maxlevel=1}
|
cracky = {times={[2]=2.00, [3]=1.20}, uses=10, maxlevel=1},
|
||||||
|
fleshy = {times={[2]=0.95, [3]=0.6}, uses=15, maxlevel=1}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
@ -51,9 +53,11 @@ minetest.register_tool("default:pick_stone", {
|
|||||||
description = "Stone Pickaxe",
|
description = "Stone Pickaxe",
|
||||||
inventory_image = "default_tool_stonepick.png",
|
inventory_image = "default_tool_stonepick.png",
|
||||||
tool_capabilities = {
|
tool_capabilities = {
|
||||||
|
full_punch_interval = 1.3,
|
||||||
max_drop_level=0,
|
max_drop_level=0,
|
||||||
groupcaps={
|
groupcaps={
|
||||||
cracky={times={[1]=3.00, [2]=1.20, [3]=0.80}, uses=20, maxlevel=1}
|
cracky = {times={[1]=3.00, [2]=1.20, [3]=0.80}, uses=20, maxlevel=1},
|
||||||
|
fleshy = {times={[2]=0.7, [3]=0.5}, uses=25, maxlevel=1}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
@ -61,9 +65,11 @@ minetest.register_tool("default:pick_steel", {
|
|||||||
description = "Steel Pickaxe",
|
description = "Steel Pickaxe",
|
||||||
inventory_image = "default_tool_steelpick.png",
|
inventory_image = "default_tool_steelpick.png",
|
||||||
tool_capabilities = {
|
tool_capabilities = {
|
||||||
|
full_punch_interval = 1.0,
|
||||||
max_drop_level=1,
|
max_drop_level=1,
|
||||||
groupcaps={
|
groupcaps={
|
||||||
cracky={times={[1]=4.00, [2]=1.60, [3]=1.00}, uses=30, maxlevel=2}
|
cracky = {times={[1]=4.00, [2]=1.60, [3]=1.00}, uses=30, maxlevel=2},
|
||||||
|
fleshy = {times={[2]=0.6, [3]=0.35}, uses=35, maxlevel=1}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
@ -71,12 +77,13 @@ minetest.register_tool("default:pick_mese", {
|
|||||||
description = "Mese Pickaxe",
|
description = "Mese Pickaxe",
|
||||||
inventory_image = "default_tool_mesepick.png",
|
inventory_image = "default_tool_mesepick.png",
|
||||||
tool_capabilities = {
|
tool_capabilities = {
|
||||||
full_punch_interval = 1.0,
|
full_punch_interval = 0.65,
|
||||||
max_drop_level=3,
|
max_drop_level=3,
|
||||||
groupcaps={
|
groupcaps={
|
||||||
cracky={times={[1]=2.0, [2]=1.0, [3]=0.5}, uses=20, maxlevel=3},
|
cracky = {times={[1]=2.0, [2]=1.0, [3]=0.5}, uses=20, maxlevel=3},
|
||||||
crumbly={times={[1]=2.0, [2]=1.0, [3]=0.5}, uses=20, maxlevel=3},
|
crumbly = {times={[1]=2.0, [2]=1.0, [3]=0.5}, uses=20, maxlevel=3},
|
||||||
snappy={times={[1]=2.0, [2]=1.0, [3]=0.5}, uses=20, maxlevel=3}
|
snappy = {times={[1]=2.0, [2]=1.0, [3]=0.5}, uses=20, maxlevel=3},
|
||||||
|
fleshy = {times={[2]=0.6, [3]=0.5}, uses=80, maxlevel=1}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
@ -85,9 +92,11 @@ minetest.register_tool("default:shovel_wood", {
|
|||||||
inventory_image = "default_tool_woodshovel.png",
|
inventory_image = "default_tool_woodshovel.png",
|
||||||
wield_image = "default_tool_woodshovel.png^[transformR90",
|
wield_image = "default_tool_woodshovel.png^[transformR90",
|
||||||
tool_capabilities = {
|
tool_capabilities = {
|
||||||
|
full_punch_interval = 1.2,
|
||||||
max_drop_level=0,
|
max_drop_level=0,
|
||||||
groupcaps={
|
groupcaps={
|
||||||
crumbly={times={[1]=3.00, [2]=0.80, [3]=0.50}, uses=10, maxlevel=1}
|
crumbly = {times={[1]=3.00, [2]=0.80, [3]=0.50}, uses=10, maxlevel=1},
|
||||||
|
fleshy = {times={[2]=1.05, [3]=0.70}, uses=25, maxlevel=1}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
@ -96,9 +105,11 @@ minetest.register_tool("default:shovel_stone", {
|
|||||||
inventory_image = "default_tool_stoneshovel.png",
|
inventory_image = "default_tool_stoneshovel.png",
|
||||||
wield_image = "default_tool_stoneshovel.png^[transformR90",
|
wield_image = "default_tool_stoneshovel.png^[transformR90",
|
||||||
tool_capabilities = {
|
tool_capabilities = {
|
||||||
|
full_punch_interval = 1.4,
|
||||||
max_drop_level=0,
|
max_drop_level=0,
|
||||||
groupcaps={
|
groupcaps={
|
||||||
crumbly={times={[1]=1.50, [2]=0.50, [3]=0.30}, uses=20, maxlevel=1}
|
crumbly = {times={[1]=1.50, [2]=0.50, [3]=0.30}, uses=20, maxlevel=1},
|
||||||
|
fleshy = {times={[2]=0.75, [3]=0.50}, uses=40, maxlevel=1}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
@ -107,9 +118,11 @@ minetest.register_tool("default:shovel_steel", {
|
|||||||
inventory_image = "default_tool_steelshovel.png",
|
inventory_image = "default_tool_steelshovel.png",
|
||||||
wield_image = "default_tool_steelshovel.png^[transformR90",
|
wield_image = "default_tool_steelshovel.png^[transformR90",
|
||||||
tool_capabilities = {
|
tool_capabilities = {
|
||||||
|
full_punch_interval = 1.1,
|
||||||
max_drop_level=1,
|
max_drop_level=1,
|
||||||
groupcaps={
|
groupcaps={
|
||||||
crumbly={times={[1]=1.50, [2]=0.70, [3]=0.60}, uses=30, maxlevel=2}
|
crumbly = {times={[1]=1.50, [2]=0.70, [3]=0.60}, uses=30, maxlevel=2},
|
||||||
|
fleshy = {times={[2]=0.45, [3]=0.30}, uses=50, maxlevel=1}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
@ -117,10 +130,11 @@ minetest.register_tool("default:axe_wood", {
|
|||||||
description = "Wooden Axe",
|
description = "Wooden Axe",
|
||||||
inventory_image = "default_tool_woodaxe.png",
|
inventory_image = "default_tool_woodaxe.png",
|
||||||
tool_capabilities = {
|
tool_capabilities = {
|
||||||
|
full_punch_interval = 1.0,
|
||||||
max_drop_level=0,
|
max_drop_level=0,
|
||||||
groupcaps={
|
groupcaps={
|
||||||
choppy={times={[2]=1.40, [3]=0.80}, uses=10, maxlevel=1},
|
choppy = {times={[2]=1.60, [3]=1.20}, uses=10, maxlevel=1},
|
||||||
fleshy={times={[2]=1.50, [3]=0.80}, uses=10, maxlevel=1}
|
fleshy = {times={[2]=0.70, [3]=0.50}, uses=5, maxlevel=1}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
@ -128,10 +142,11 @@ minetest.register_tool("default:axe_stone", {
|
|||||||
description = "Stone Axe",
|
description = "Stone Axe",
|
||||||
inventory_image = "default_tool_stoneaxe.png",
|
inventory_image = "default_tool_stoneaxe.png",
|
||||||
tool_capabilities = {
|
tool_capabilities = {
|
||||||
|
full_punch_interval = 1.2,
|
||||||
max_drop_level=0,
|
max_drop_level=0,
|
||||||
groupcaps={
|
groupcaps={
|
||||||
choppy={times={[1]=3.00, [2]=1.00, [3]=0.60}, uses=20, maxlevel=1},
|
choppy={times={[1]=3.00, [2]=1.40, [3]=1.00}, uses=20, maxlevel=1},
|
||||||
fleshy={times={[2]=1.30, [3]=0.70}, uses=20, maxlevel=1}
|
fleshy={times={[2]=0.60, [3]=0.40}, uses=15, maxlevel=1}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
@ -139,10 +154,11 @@ minetest.register_tool("default:axe_steel", {
|
|||||||
description = "Steel Axe",
|
description = "Steel Axe",
|
||||||
inventory_image = "default_tool_steelaxe.png",
|
inventory_image = "default_tool_steelaxe.png",
|
||||||
tool_capabilities = {
|
tool_capabilities = {
|
||||||
|
full_punch_interval = 0.9,
|
||||||
max_drop_level=1,
|
max_drop_level=1,
|
||||||
groupcaps={
|
groupcaps={
|
||||||
choppy={times={[1]=3.00, [2]=1.60, [3]=1.00}, uses=30, maxlevel=2},
|
choppy={times={[1]=2.60, [2]=1.00, [3]=0.60}, uses=30, maxlevel=2},
|
||||||
fleshy={times={[2]=1.10, [3]=0.60}, uses=40, maxlevel=1}
|
fleshy={times={[2]=0.40, [3]=0.25}, uses=25, maxlevel=1}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
@ -150,12 +166,12 @@ minetest.register_tool("default:sword_wood", {
|
|||||||
description = "Wooden Sword",
|
description = "Wooden Sword",
|
||||||
inventory_image = "default_tool_woodsword.png",
|
inventory_image = "default_tool_woodsword.png",
|
||||||
tool_capabilities = {
|
tool_capabilities = {
|
||||||
full_punch_interval = 1.0,
|
full_punch_interval = 0.9,
|
||||||
max_drop_level=0,
|
max_drop_level=0,
|
||||||
groupcaps={
|
groupcaps={
|
||||||
fleshy={times={[2]=1.10, [3]=0.60}, uses=10, maxlevel=1},
|
fleshy={times={[2]=1.10, [3]=0.60}, uses=10, maxlevel=1},
|
||||||
snappy={times={[2]=1.00, [3]=0.50}, uses=10, maxlevel=1},
|
snappy={times={[2]=0.9, [3]=0.45}, uses=10, maxlevel=1},
|
||||||
choppy={times={[3]=1.00}, uses=20, maxlevel=0}
|
choppy={times={[3]=0.90}, uses=20, maxlevel=0}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@ -163,12 +179,12 @@ minetest.register_tool("default:sword_stone", {
|
|||||||
description = "Stone Sword",
|
description = "Stone Sword",
|
||||||
inventory_image = "default_tool_stonesword.png",
|
inventory_image = "default_tool_stonesword.png",
|
||||||
tool_capabilities = {
|
tool_capabilities = {
|
||||||
full_punch_interval = 1.0,
|
full_punch_interval = 1.1,
|
||||||
max_drop_level=0,
|
max_drop_level=0,
|
||||||
groupcaps={
|
groupcaps={
|
||||||
fleshy={times={[2]=0.80, [3]=0.40}, uses=20, maxlevel=1},
|
fleshy={times={[2]=0.80, [3]=0.40}, uses=20, maxlevel=1},
|
||||||
snappy={times={[2]=0.80, [3]=0.40}, uses=20, maxlevel=1},
|
snappy={times={[2]=0.75, [3]=0.35}, uses=20, maxlevel=1},
|
||||||
choppy={times={[3]=0.90}, uses=20, maxlevel=0}
|
choppy={times={[3]=0.70}, uses=20, maxlevel=0}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@ -176,12 +192,12 @@ minetest.register_tool("default:sword_steel", {
|
|||||||
description = "Steel Sword",
|
description = "Steel Sword",
|
||||||
inventory_image = "default_tool_steelsword.png",
|
inventory_image = "default_tool_steelsword.png",
|
||||||
tool_capabilities = {
|
tool_capabilities = {
|
||||||
full_punch_interval = 1.0,
|
full_punch_interval = 0.8,
|
||||||
max_drop_level=1,
|
max_drop_level=1,
|
||||||
groupcaps={
|
groupcaps={
|
||||||
fleshy={times={[1]=2.00, [2]=0.80, [3]=0.40}, uses=10, maxlevel=2},
|
fleshy={times={[1]=2.00, [2]=0.80, [3]=0.40}, uses=10, maxlevel=2},
|
||||||
snappy={times={[2]=0.70, [3]=0.30}, uses=40, maxlevel=1},
|
snappy={times={[2]=0.70, [3]=0.30}, uses=40, maxlevel=1},
|
||||||
choppy={times={[3]=0.70}, uses=40, maxlevel=0}
|
choppy={times={[3]=0.65}, uses=40, maxlevel=0}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@ -259,7 +275,7 @@ minetest.register_craft({
|
|||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = 'default:pick_mese',
|
output = 'default:pick_mese',
|
||||||
recipe = {
|
recipe = {
|
||||||
{'default:mese', 'default:mese', 'default:mese'},
|
{'default:mese_crystal', 'default:mese_crystal', 'default:mese_crystal'},
|
||||||
{'', 'default:stick', ''},
|
{'', 'default:stick', ''},
|
||||||
{'', 'default:stick', ''},
|
{'', 'default:stick', ''},
|
||||||
}
|
}
|
||||||
@ -470,6 +486,29 @@ minetest.register_craft({
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = 'default:mese',
|
||||||
|
recipe = {
|
||||||
|
{'default:mese_crystal', 'default:mese_crystal', 'default:mese_crystal'},
|
||||||
|
{'default:mese_crystal', 'default:mese_crystal', 'default:mese_crystal'},
|
||||||
|
{'default:mese_crystal', 'default:mese_crystal', 'default:mese_crystal'},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = 'default:mese_crystal 9',
|
||||||
|
recipe = {
|
||||||
|
{'default:mese'},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = 'default:mese_crystal_fragment 9',
|
||||||
|
recipe = {
|
||||||
|
{'default:mese_crystal'},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Crafting (tool repair)
|
-- Crafting (tool repair)
|
||||||
--
|
--
|
||||||
@ -564,12 +603,6 @@ minetest.register_craft({
|
|||||||
burntime = 7,
|
burntime = 7,
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
type = "fuel",
|
|
||||||
recipe = "default:mese",
|
|
||||||
burntime = 30,
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
type = "fuel",
|
type = "fuel",
|
||||||
recipe = "default:lava_source",
|
recipe = "default:lava_source",
|
||||||
@ -698,7 +731,7 @@ end
|
|||||||
function default.node_sound_glass_defaults(table)
|
function default.node_sound_glass_defaults(table)
|
||||||
table = table or {}
|
table = table or {}
|
||||||
table.footstep = table.footstep or
|
table.footstep = table.footstep or
|
||||||
{name="default_stone_footstep", gain=0.25}
|
{name="default_hard_footstep", gain=0.25}
|
||||||
table.dug = table.dug or
|
table.dug = table.dug or
|
||||||
{name="default_break_glass", gain=1.0}
|
{name="default_break_glass", gain=1.0}
|
||||||
default.node_sound_defaults(table)
|
default.node_sound_defaults(table)
|
||||||
@ -745,6 +778,15 @@ minetest.register_node("default:stone_with_iron", {
|
|||||||
sounds = default.node_sound_stone_defaults(),
|
sounds = default.node_sound_stone_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
|
minetest.register_node("default:stone_with_mese", {
|
||||||
|
description = "Mese Crystals in Stone",
|
||||||
|
tiles = {"default_stone.png^default_mineral_mese.png"},
|
||||||
|
is_ground_content = true,
|
||||||
|
groups = {cracky=1},
|
||||||
|
drop = "default:mese_crystal",
|
||||||
|
sounds = default.node_sound_stone_defaults(),
|
||||||
|
})
|
||||||
|
|
||||||
minetest.register_node("default:dirt_with_grass", {
|
minetest.register_node("default:dirt_with_grass", {
|
||||||
description = "Dirt with Grass",
|
description = "Dirt with Grass",
|
||||||
tiles = {"default_grass.png", "default_dirt.png", "default_dirt.png^default_grass_side.png"},
|
tiles = {"default_grass.png", "default_dirt.png", "default_dirt.png^default_grass_side.png"},
|
||||||
@ -787,7 +829,7 @@ minetest.register_node("default:desert_sand", {
|
|||||||
description = "Desert Sand",
|
description = "Desert Sand",
|
||||||
tiles = {"default_desert_sand.png"},
|
tiles = {"default_desert_sand.png"},
|
||||||
is_ground_content = true,
|
is_ground_content = true,
|
||||||
groups = {sand=1, crumbly=3, falling_node=1, sand=1},
|
groups = {crumbly=3, falling_node=1, sand=1},
|
||||||
sounds = default.node_sound_sand_defaults(),
|
sounds = default.node_sound_sand_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -990,14 +1032,6 @@ minetest.register_node("default:wood", {
|
|||||||
sounds = default.node_sound_wood_defaults(),
|
sounds = default.node_sound_wood_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("default:mese", {
|
|
||||||
description = "Mese",
|
|
||||||
tiles = {"default_mese.png"},
|
|
||||||
is_ground_content = true,
|
|
||||||
groups = {cracky=1},
|
|
||||||
sounds = default.node_sound_defaults(),
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_node("default:cloud", {
|
minetest.register_node("default:cloud", {
|
||||||
description = "Cloud",
|
description = "Cloud",
|
||||||
tiles = {"default_cloud.png"},
|
tiles = {"default_cloud.png"},
|
||||||
@ -1029,6 +1063,7 @@ minetest.register_node("default:water_flowing", {
|
|||||||
pointable = false,
|
pointable = false,
|
||||||
diggable = false,
|
diggable = false,
|
||||||
buildable_to = true,
|
buildable_to = true,
|
||||||
|
drop = "",
|
||||||
liquidtype = "flowing",
|
liquidtype = "flowing",
|
||||||
liquid_alternative_flowing = "default:water_flowing",
|
liquid_alternative_flowing = "default:water_flowing",
|
||||||
liquid_alternative_source = "default:water_source",
|
liquid_alternative_source = "default:water_source",
|
||||||
@ -1054,6 +1089,7 @@ minetest.register_node("default:water_source", {
|
|||||||
pointable = false,
|
pointable = false,
|
||||||
diggable = false,
|
diggable = false,
|
||||||
buildable_to = true,
|
buildable_to = true,
|
||||||
|
drop = "",
|
||||||
liquidtype = "source",
|
liquidtype = "source",
|
||||||
liquid_alternative_flowing = "default:water_flowing",
|
liquid_alternative_flowing = "default:water_flowing",
|
||||||
liquid_alternative_source = "default:water_source",
|
liquid_alternative_source = "default:water_source",
|
||||||
@ -1085,6 +1121,7 @@ minetest.register_node("default:lava_flowing", {
|
|||||||
pointable = false,
|
pointable = false,
|
||||||
diggable = false,
|
diggable = false,
|
||||||
buildable_to = true,
|
buildable_to = true,
|
||||||
|
drop = "",
|
||||||
liquidtype = "flowing",
|
liquidtype = "flowing",
|
||||||
liquid_alternative_flowing = "default:lava_flowing",
|
liquid_alternative_flowing = "default:lava_flowing",
|
||||||
liquid_alternative_source = "default:lava_source",
|
liquid_alternative_source = "default:lava_source",
|
||||||
@ -1111,6 +1148,7 @@ minetest.register_node("default:lava_source", {
|
|||||||
pointable = false,
|
pointable = false,
|
||||||
diggable = false,
|
diggable = false,
|
||||||
buildable_to = true,
|
buildable_to = true,
|
||||||
|
drop = "",
|
||||||
liquidtype = "source",
|
liquidtype = "source",
|
||||||
liquid_alternative_flowing = "default:lava_flowing",
|
liquid_alternative_flowing = "default:lava_flowing",
|
||||||
liquid_alternative_source = "default:lava_source",
|
liquid_alternative_source = "default:lava_source",
|
||||||
@ -1243,10 +1281,6 @@ minetest.register_node("default:chest_locked", {
|
|||||||
end,
|
end,
|
||||||
on_construct = function(pos)
|
on_construct = function(pos)
|
||||||
local meta = minetest.env:get_meta(pos)
|
local meta = minetest.env:get_meta(pos)
|
||||||
meta:set_string("formspec",
|
|
||||||
"size[8,9]"..
|
|
||||||
"list[current_name;main;0,0;8,4;]"..
|
|
||||||
"list[current_player;main;0,5;8,4;]")
|
|
||||||
meta:set_string("infotext", "Locked Chest")
|
meta:set_string("infotext", "Locked Chest")
|
||||||
meta:set_string("owner", "")
|
meta:set_string("owner", "")
|
||||||
local inv = meta:get_inventory()
|
local inv = meta:get_inventory()
|
||||||
@ -1302,6 +1336,16 @@ minetest.register_node("default:chest_locked", {
|
|||||||
minetest.log("action", player:get_player_name()..
|
minetest.log("action", player:get_player_name()..
|
||||||
" takes stuff from locked chest at "..minetest.pos_to_string(pos))
|
" takes stuff from locked chest at "..minetest.pos_to_string(pos))
|
||||||
end,
|
end,
|
||||||
|
on_rightclick = function(pos, node, clicker)
|
||||||
|
local meta = minetest.env:get_meta(pos)
|
||||||
|
if has_locked_chest_privilege(meta, clicker) then
|
||||||
|
local pos = pos.x .. "," .. pos.y .. "," ..pos.z
|
||||||
|
minetest.show_formspec(clicker:get_player_name(), "default:chest_locked",
|
||||||
|
"size[8,9]"..
|
||||||
|
"list[nodemeta:".. pos .. ";main;0,0;8,4;]"..
|
||||||
|
"list[current_player;main;0,5;8,4;]")
|
||||||
|
end
|
||||||
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
default.furnace_inactive_formspec =
|
default.furnace_inactive_formspec =
|
||||||
@ -1515,6 +1559,15 @@ minetest.register_node("default:steelblock", {
|
|||||||
sounds = default.node_sound_stone_defaults(),
|
sounds = default.node_sound_stone_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
|
minetest.register_node("default:mese", {
|
||||||
|
description = "Mese Block",
|
||||||
|
tiles = {"default_mese_block.png"},
|
||||||
|
is_ground_content = true,
|
||||||
|
groups = {cracky=1},
|
||||||
|
sounds = default.node_sound_stone_defaults(),
|
||||||
|
})
|
||||||
|
minetest.register_alias("default:mese_block", "default:mese")
|
||||||
|
|
||||||
minetest.register_node("default:nyancat", {
|
minetest.register_node("default:nyancat", {
|
||||||
description = "Nyan Cat",
|
description = "Nyan Cat",
|
||||||
tiles = {"default_nc_side.png", "default_nc_side.png", "default_nc_side.png",
|
tiles = {"default_nc_side.png", "default_nc_side.png", "default_nc_side.png",
|
||||||
@ -1613,6 +1666,11 @@ minetest.register_craftitem("default:iron_lump", {
|
|||||||
inventory_image = "default_iron_lump.png",
|
inventory_image = "default_iron_lump.png",
|
||||||
})
|
})
|
||||||
|
|
||||||
|
minetest.register_craftitem("default:mese_crystal", {
|
||||||
|
description = "Mese Crystal",
|
||||||
|
inventory_image = "default_mese_crystal.png",
|
||||||
|
})
|
||||||
|
|
||||||
minetest.register_craftitem("default:clay_lump", {
|
minetest.register_craftitem("default:clay_lump", {
|
||||||
description = "Clay Lump",
|
description = "Clay Lump",
|
||||||
inventory_image = "default_clay_lump.png",
|
inventory_image = "default_clay_lump.png",
|
||||||
@ -1623,9 +1681,13 @@ minetest.register_craftitem("default:steel_ingot", {
|
|||||||
inventory_image = "default_steel_ingot.png",
|
inventory_image = "default_steel_ingot.png",
|
||||||
})
|
})
|
||||||
|
|
||||||
|
minetest.register_craftitem("default:mese_crystal_fragment", {
|
||||||
|
description = "Mese Crystal Fragment",
|
||||||
|
inventory_image = "default_mese_crystal_fragment.png",
|
||||||
|
})
|
||||||
|
|
||||||
minetest.register_craftitem("default:clay_brick", {
|
minetest.register_craftitem("default:clay_brick", {
|
||||||
description = "Clay Brick",
|
description = "Clay Brick",
|
||||||
inventory_image = "default_steel_ingot.png",
|
|
||||||
inventory_image = "default_clay_brick.png",
|
inventory_image = "default_clay_brick.png",
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -86,6 +86,7 @@ minetest.register_abm({
|
|||||||
end
|
end
|
||||||
-- Remove node
|
-- Remove node
|
||||||
minetest.env:remove_node(p0)
|
minetest.env:remove_node(p0)
|
||||||
|
nodeupdate(p0)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
@ -29,7 +29,7 @@ minetest.register_alias("mapgen_desert_stone", "default:desert_stone")
|
|||||||
-- Ore generation
|
-- Ore generation
|
||||||
--
|
--
|
||||||
|
|
||||||
local function generate_ore(name, wherein, minp, maxp, seed, chunks_per_volume, chunk_size, ore_per_chunk, height_min, height_max)
|
function default.generate_ore(name, wherein, minp, maxp, seed, chunks_per_volume, chunk_size, ore_per_chunk, height_min, height_max)
|
||||||
if maxp.y < height_min or minp.y > height_max then
|
if maxp.y < height_min or minp.y > height_max then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
@ -142,15 +142,17 @@ end
|
|||||||
|
|
||||||
minetest.register_on_generated(function(minp, maxp, seed)
|
minetest.register_on_generated(function(minp, maxp, seed)
|
||||||
-- Generate regular ores
|
-- Generate regular ores
|
||||||
generate_ore("default:stone_with_coal", "default:stone", minp, maxp, seed+0, 1/8/8/8, 3, 8, -31000, 64)
|
default.generate_ore("default:stone_with_coal", "default:stone", minp, maxp, seed+0, 1/8/8/8, 3, 8, -31000, 64)
|
||||||
generate_ore("default:stone_with_iron", "default:stone", minp, maxp, seed+1, 1/12/12/12, 2, 3, -15, 2)
|
default.generate_ore("default:stone_with_iron", "default:stone", minp, maxp, seed+1, 1/12/12/12, 2, 3, -15, 2)
|
||||||
generate_ore("default:stone_with_iron", "default:stone", minp, maxp, seed+2, 1/9/9/9, 3, 5, -63, -16)
|
default.generate_ore("default:stone_with_iron", "default:stone", minp, maxp, seed+2, 1/9/9/9, 3, 5, -63, -16)
|
||||||
generate_ore("default:stone_with_iron", "default:stone", minp, maxp, seed+3, 1/7/7/7, 3, 5, -31000, -64)
|
default.generate_ore("default:stone_with_iron", "default:stone", minp, maxp, seed+3, 1/7/7/7, 3, 5, -31000, -64)
|
||||||
generate_ore("default:mese", "default:stone", minp, maxp, seed+4, 1/16/16/16, 2, 3, -127, -64)
|
|
||||||
generate_ore("default:mese", "default:stone", minp, maxp, seed+5, 1/9/9/9, 3, 5, -31000,-128)
|
|
||||||
|
|
||||||
generate_ore("default:stone_with_coal", "default:stone", minp, maxp, seed+7, 1/24/24/24, 6,27, -31000, 0)
|
default.generate_ore("default:stone_with_mese", "default:stone", minp, maxp, seed+4, 1/16/16/16, 2, 3, -127, -64)
|
||||||
generate_ore("default:stone_with_iron", "default:stone", minp, maxp, seed+6, 1/24/24/24, 6,27, -31000, -64)
|
default.generate_ore("default:stone_with_mese", "default:stone", minp, maxp, seed+5, 1/9/9/9, 3, 5, -31000, -128)
|
||||||
|
default.generate_ore("default:mese", "default:stone", minp, maxp, seed+8, 1/16/16/16, 2, 3, -31000,-1024)
|
||||||
|
|
||||||
|
default.generate_ore("default:stone_with_coal", "default:stone", minp, maxp, seed+7, 1/24/24/24, 6,27, -31000, 0)
|
||||||
|
default.generate_ore("default:stone_with_iron", "default:stone", minp, maxp, seed+6, 1/24/24/24, 6,27, -31000, -64)
|
||||||
|
|
||||||
if maxp.y >= 2 and minp.y <= 0 then
|
if maxp.y >= 2 and minp.y <= 0 then
|
||||||
-- Generate clay
|
-- Generate clay
|
||||||
@ -246,7 +248,7 @@ minetest.register_on_generated(function(minp, maxp, seed)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
-- Generate dry shrubs
|
-- Generate grass
|
||||||
local perlin1 = minetest.env:get_perlin(329, 3, 0.6, 100)
|
local perlin1 = minetest.env:get_perlin(329, 3, 0.6, 100)
|
||||||
-- Assume X and Z lengths are equal
|
-- Assume X and Z lengths are equal
|
||||||
local divlen = 16
|
local divlen = 16
|
||||||
@ -257,11 +259,11 @@ minetest.register_on_generated(function(minp, maxp, seed)
|
|||||||
local z0 = minp.z + math.floor((divz+0)*divlen)
|
local z0 = minp.z + math.floor((divz+0)*divlen)
|
||||||
local x1 = minp.x + math.floor((divx+1)*divlen)
|
local x1 = minp.x + math.floor((divx+1)*divlen)
|
||||||
local z1 = minp.z + math.floor((divz+1)*divlen)
|
local z1 = minp.z + math.floor((divz+1)*divlen)
|
||||||
-- Determine dry shrubs amount from perlin noise
|
-- Determine grass amount from perlin noise
|
||||||
local shrub_amount = math.floor(perlin1:get2d({x=x0, y=z0}) * 5 + 0)
|
local grass_amount = math.floor(perlin1:get2d({x=x0, y=z0}) * 5 + 0)
|
||||||
-- Find random positions for dry shrubs based on this random
|
-- Find random positions for grass based on this random
|
||||||
local pr = PseudoRandom(seed+1)
|
local pr = PseudoRandom(seed+1)
|
||||||
for i=0,shrub_amount do
|
for i=0,grass_amount do
|
||||||
local x = pr:next(x0, x1)
|
local x = pr:next(x0, x1)
|
||||||
local z = pr:next(z0, z1)
|
local z = pr:next(z0, z1)
|
||||||
-- Find ground level (0...15)
|
-- Find ground level (0...15)
|
||||||
@ -272,15 +274,25 @@ minetest.register_on_generated(function(minp, maxp, seed)
|
|||||||
break
|
break
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
-- If desert sand, make dry shrub
|
|
||||||
if ground_y and minetest.env:get_node({x=x,y=ground_y,z=z}).name == "default:desert_sand" then
|
if ground_y then
|
||||||
local p = {x=x,y=ground_y+1,z=z}
|
local p = {x=x,y=ground_y+1,z=z}
|
||||||
local nn = minetest.env:get_node(p).name
|
local nn = minetest.env:get_node(p).name
|
||||||
|
-- Check if the node can be replaced
|
||||||
if minetest.registered_nodes[nn] and
|
if minetest.registered_nodes[nn] and
|
||||||
minetest.registered_nodes[nn].buildable_to then
|
minetest.registered_nodes[nn].buildable_to then
|
||||||
minetest.env:set_node(p, {name="default:dry_shrub"})
|
nn = minetest.env:get_node({x=x,y=ground_y,z=z}).name
|
||||||
|
-- If desert sand, make dry shrub
|
||||||
|
if nn == "default:desert_sand" then
|
||||||
|
minetest.env:set_node(p,{name="default:dry_shrub"})
|
||||||
|
|
||||||
|
-- If grass, make junglegrass
|
||||||
|
elseif nn == "default:dirt_with_grass" then
|
||||||
|
minetest.env:set_node(p,{name="default:junglegrass"})
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 3.2 KiB |
Before Width: | Height: | Size: 210 B After Width: | Height: | Size: 339 B |
Before Width: | Height: | Size: 933 B After Width: | Height: | Size: 255 B |
Before Width: | Height: | Size: 888 B After Width: | Height: | Size: 962 B |
Before Width: | Height: | Size: 925 B After Width: | Height: | Size: 567 B |
Before Width: | Height: | Size: 936 B After Width: | Height: | Size: 237 B |
Before Width: | Height: | Size: 672 B After Width: | Height: | Size: 554 B |
Before Width: | Height: | Size: 203 B |
BIN
mods/default/textures/default_mese_block.png
Normal file
After Width: | Height: | Size: 482 B |
BIN
mods/default/textures/default_mese_crystal.png
Normal file
After Width: | Height: | Size: 417 B |
BIN
mods/default/textures/default_mese_crystal_fragment.png
Normal file
After Width: | Height: | Size: 212 B |
BIN
mods/default/textures/default_mineral_mese.png
Normal file
After Width: | Height: | Size: 488 B |
Before Width: | Height: | Size: 207 B After Width: | Height: | Size: 199 B |
Before Width: | Height: | Size: 341 B After Width: | Height: | Size: 352 B |
@ -41,6 +41,13 @@ function doors:register_door(name, def)
|
|||||||
if not pointed_thing.type == "node" then
|
if not pointed_thing.type == "node" then
|
||||||
return itemstack
|
return itemstack
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local ptu = pointed_thing.under
|
||||||
|
local nu = minetest.env:get_node(ptu)
|
||||||
|
if minetest.registered_nodes[nu.name].on_rightclick then
|
||||||
|
return minetest.registered_nodes[nu.name].on_rightclick(ptu, nu, placer, itemstack)
|
||||||
|
end
|
||||||
|
|
||||||
local pt = pointed_thing.above
|
local pt = pointed_thing.above
|
||||||
local pt2 = {x=pt.x, y=pt.y, z=pt.z}
|
local pt2 = {x=pt.x, y=pt.y, z=pt.z}
|
||||||
pt2.y = pt2.y+1
|
pt2.y = pt2.y+1
|
||||||
@ -82,7 +89,9 @@ function doors:register_door(name, def)
|
|||||||
meta:set_string("infotext", "Owned by "..pn)
|
meta:set_string("infotext", "Owned by "..pn)
|
||||||
end
|
end
|
||||||
|
|
||||||
itemstack:take_item()
|
if not minetest.setting_getbool("creative_mode") then
|
||||||
|
itemstack:take_item()
|
||||||
|
end
|
||||||
return itemstack
|
return itemstack
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
@ -96,7 +105,7 @@ function doors:register_door(name, def)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local function on_punch(pos, dir, check_name, replace, replace_dir, params)
|
local function on_rightclick(pos, dir, check_name, replace, replace_dir, params)
|
||||||
pos.y = pos.y+dir
|
pos.y = pos.y+dir
|
||||||
if not minetest.env:get_node(pos).name == check_name then
|
if not minetest.env:get_node(pos).name == check_name then
|
||||||
return
|
return
|
||||||
@ -144,9 +153,9 @@ function doors:register_door(name, def)
|
|||||||
after_dig_node(pos, name.."_t_1")
|
after_dig_node(pos, name.."_t_1")
|
||||||
end,
|
end,
|
||||||
|
|
||||||
on_punch = function(pos, node, puncher)
|
on_rightclick = function(pos, node, clicker)
|
||||||
if check_player_priv(pos, puncher) then
|
if check_player_priv(pos, clicker) then
|
||||||
on_punch(pos, 1, name.."_t_1", name.."_b_2", name.."_t_2", {1,2,3,0})
|
on_rightclick(pos, 1, name.."_t_1", name.."_b_2", name.."_t_2", {1,2,3,0})
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
|
|
||||||
@ -174,9 +183,9 @@ function doors:register_door(name, def)
|
|||||||
after_dig_node(pos, name.."_b_1")
|
after_dig_node(pos, name.."_b_1")
|
||||||
end,
|
end,
|
||||||
|
|
||||||
on_punch = function(pos, node, puncher)
|
on_rightclick = function(pos, node, clicker)
|
||||||
if check_player_priv(pos, puncher) then
|
if check_player_priv(pos, clicker) then
|
||||||
on_punch(pos, -1, name.."_b_1", name.."_t_2", name.."_b_2", {1,2,3,0})
|
on_rightclick(pos, -1, name.."_b_1", name.."_t_2", name.."_b_2", {1,2,3,0})
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
|
|
||||||
@ -204,9 +213,9 @@ function doors:register_door(name, def)
|
|||||||
after_dig_node(pos, name.."_t_2")
|
after_dig_node(pos, name.."_t_2")
|
||||||
end,
|
end,
|
||||||
|
|
||||||
on_punch = function(pos, node, puncher)
|
on_rightclick = function(pos, node, clicker)
|
||||||
if check_player_priv(pos, puncher) then
|
if check_player_priv(pos, clicker) then
|
||||||
on_punch(pos, 1, name.."_t_2", name.."_b_1", name.."_t_1", {3,0,1,2})
|
on_rightclick(pos, 1, name.."_t_2", name.."_b_1", name.."_t_1", {3,0,1,2})
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
|
|
||||||
@ -234,9 +243,9 @@ function doors:register_door(name, def)
|
|||||||
after_dig_node(pos, name.."_b_2")
|
after_dig_node(pos, name.."_b_2")
|
||||||
end,
|
end,
|
||||||
|
|
||||||
on_punch = function(pos, node, puncher)
|
on_rightclick = function(pos, node, clicker)
|
||||||
if check_player_priv(pos, puncher) then
|
if check_player_priv(pos, clicker) then
|
||||||
on_punch(pos, -1, name.."_b_2", name.."_t_1", name.."_b_1", {3,0,1,2})
|
on_rightclick(pos, -1, name.."_b_2", name.."_t_1", name.."_b_1", {3,0,1,2})
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
|
|
||||||
@ -256,9 +265,9 @@ doors:register_door("doors:door_wood", {
|
|||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "doors:door_wood",
|
output = "doors:door_wood",
|
||||||
recipe = {
|
recipe = {
|
||||||
{"default:wood", "default:wood"},
|
{"group:wood", "group:wood"},
|
||||||
{"default:wood", "default:wood"},
|
{"group:wood", "group:wood"},
|
||||||
{"default:wood", "default:wood"}
|
{"group:wood", "group:wood"}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -12,6 +12,7 @@ minetest.register_node("fire:basic_flame", {
|
|||||||
groups = {igniter=2,dig_immediate=3},
|
groups = {igniter=2,dig_immediate=3},
|
||||||
drop = '',
|
drop = '',
|
||||||
walkable = false,
|
walkable = false,
|
||||||
|
buildable_to = true,
|
||||||
damage_per_second = 4,
|
damage_per_second = 4,
|
||||||
|
|
||||||
after_place_node = function(pos, placer)
|
after_place_node = function(pos, placer)
|
||||||
@ -178,6 +179,7 @@ minetest.register_abm({
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
minetest.env:remove_node(p)
|
minetest.env:remove_node(p)
|
||||||
|
nodeupdate(p)
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
-- remove flame
|
-- remove flame
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
stairs = {}
|
stairs = {}
|
||||||
|
|
||||||
-- Node will be called stairs:stair_<subname>
|
-- Node will be called stairs:stair_<subname>
|
||||||
function stairs.register_stair(subname, recipeitem, groups, images, description)
|
function stairs.register_stair(subname, recipeitem, groups, images, description, sounds)
|
||||||
minetest.register_node("stairs:stair_" .. subname, {
|
minetest.register_node(":stairs:stair_" .. subname, {
|
||||||
description = description,
|
description = description,
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
tiles = images,
|
tiles = images,
|
||||||
@ -13,6 +13,7 @@ function stairs.register_stair(subname, recipeitem, groups, images, description)
|
|||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
is_ground_content = true,
|
is_ground_content = true,
|
||||||
groups = groups,
|
groups = groups,
|
||||||
|
sounds = sounds,
|
||||||
node_box = {
|
node_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = {
|
fixed = {
|
||||||
@ -20,6 +21,57 @@ function stairs.register_stair(subname, recipeitem, groups, images, description)
|
|||||||
{-0.5, 0, 0, 0.5, 0.5, 0.5},
|
{-0.5, 0, 0, 0.5, 0.5, 0.5},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
selection_box = {
|
||||||
|
type = "fixed",
|
||||||
|
fixed = {
|
||||||
|
{-0.5, -0.5, -0.5, 0.5, 0, 0.5},
|
||||||
|
{-0.5, 0, 0, 0.5, 0.5, 0.5},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
on_place = function(itemstack, placer, pointed_thing)
|
||||||
|
if pointed_thing.type ~= "node" then
|
||||||
|
return itemstack
|
||||||
|
end
|
||||||
|
|
||||||
|
local p0 = pointed_thing.under
|
||||||
|
local p1 = pointed_thing.above
|
||||||
|
if p0.y-1 == p1.y then
|
||||||
|
local fakestack = ItemStack("stairs:stair_" .. subname.."upside_down")
|
||||||
|
local ret = minetest.item_place(fakestack, placer, pointed_thing)
|
||||||
|
if ret:is_empty() then
|
||||||
|
itemstack:take_item()
|
||||||
|
return itemstack
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Otherwise place regularly
|
||||||
|
return minetest.item_place(itemstack, placer, pointed_thing)
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_node(":stairs:stair_" .. subname.."upside_down", {
|
||||||
|
drop = "stairs:stair_" .. subname,
|
||||||
|
drawtype = "nodebox",
|
||||||
|
tiles = images,
|
||||||
|
paramtype = "light",
|
||||||
|
paramtype2 = "facedir",
|
||||||
|
is_ground_content = true,
|
||||||
|
groups = groups,
|
||||||
|
sounds = sounds,
|
||||||
|
node_box = {
|
||||||
|
type = "fixed",
|
||||||
|
fixed = {
|
||||||
|
{-0.5, 0, -0.5, 0.5, 0.5, 0.5},
|
||||||
|
{-0.5, -0.5, 0, 0.5, 0, 0.5},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
selection_box = {
|
||||||
|
type = "fixed",
|
||||||
|
fixed = {
|
||||||
|
{-0.5, 0, -0.5, 0.5, 0.5, 0.5},
|
||||||
|
{-0.5, -0.5, 0, 0.5, 0, 0.5},
|
||||||
|
},
|
||||||
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
@ -43,14 +95,15 @@ function stairs.register_stair(subname, recipeitem, groups, images, description)
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- Node will be called stairs:slab_<subname>
|
-- Node will be called stairs:slab_<subname>
|
||||||
function stairs.register_slab(subname, recipeitem, groups, images, description)
|
function stairs.register_slab(subname, recipeitem, groups, images, description, sounds)
|
||||||
minetest.register_node("stairs:slab_" .. subname, {
|
minetest.register_node(":stairs:slab_" .. subname, {
|
||||||
description = description,
|
description = description,
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
tiles = images,
|
tiles = images,
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
is_ground_content = true,
|
is_ground_content = true,
|
||||||
groups = groups,
|
groups = groups,
|
||||||
|
sounds = sounds,
|
||||||
node_box = {
|
node_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = {-0.5, -0.5, -0.5, 0.5, 0, 0.5},
|
fixed = {-0.5, -0.5, -0.5, 0.5, 0, 0.5},
|
||||||
@ -93,10 +146,69 @@ function stairs.register_slab(subname, recipeitem, groups, images, description)
|
|||||||
return itemstack
|
return itemstack
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Upside down slabs
|
||||||
|
if p0.y-1 == p1.y then
|
||||||
|
-- Turn into full block if pointing at a existing slab
|
||||||
|
if n0.name == "stairs:slab_" .. subname.."upside_down" then
|
||||||
|
-- Remove the slab at the position of the slab
|
||||||
|
minetest.env:remove_node(p0)
|
||||||
|
-- Make a fake stack of a single item and try to place it
|
||||||
|
local fakestack = ItemStack(recipeitem)
|
||||||
|
pointed_thing.above = p0
|
||||||
|
fakestack = minetest.item_place(fakestack, placer, pointed_thing)
|
||||||
|
-- If the item was taken from the fake stack, decrement original
|
||||||
|
if not fakestack or fakestack:is_empty() then
|
||||||
|
itemstack:take_item(1)
|
||||||
|
-- Else put old node back
|
||||||
|
else
|
||||||
|
minetest.env:set_node(p0, n0)
|
||||||
|
end
|
||||||
|
return itemstack
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Place upside down slab
|
||||||
|
local fakestack = ItemStack("stairs:slab_" .. subname.."upside_down")
|
||||||
|
local ret = minetest.item_place(fakestack, placer, pointed_thing)
|
||||||
|
if ret:is_empty() then
|
||||||
|
itemstack:take_item()
|
||||||
|
return itemstack
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- If pointing at the side of a upside down slab
|
||||||
|
if n0.name == "stairs:slab_" .. subname.."upside_down" and
|
||||||
|
p0.y+1 ~= p1.y then
|
||||||
|
-- Place upside down slab
|
||||||
|
local fakestack = ItemStack("stairs:slab_" .. subname.."upside_down")
|
||||||
|
local ret = minetest.item_place(fakestack, placer, pointed_thing)
|
||||||
|
if ret:is_empty() then
|
||||||
|
itemstack:take_item()
|
||||||
|
return itemstack
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
-- Otherwise place regularly
|
-- Otherwise place regularly
|
||||||
return minetest.item_place(itemstack, placer, pointed_thing)
|
return minetest.item_place(itemstack, placer, pointed_thing)
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
minetest.register_node(":stairs:slab_" .. subname.."upside_down", {
|
||||||
|
drop = "stairs:slab_"..subname,
|
||||||
|
drawtype = "nodebox",
|
||||||
|
tiles = images,
|
||||||
|
paramtype = "light",
|
||||||
|
is_ground_content = true,
|
||||||
|
groups = groups,
|
||||||
|
sounds = sounds,
|
||||||
|
node_box = {
|
||||||
|
type = "fixed",
|
||||||
|
fixed = {-0.5, 0, -0.5, 0.5, 0.5, 0.5},
|
||||||
|
},
|
||||||
|
selection_box = {
|
||||||
|
type = "fixed",
|
||||||
|
fixed = {-0.5, 0, -0.5, 0.5, 0.5, 0.5},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = 'stairs:slab_' .. subname .. ' 3',
|
output = 'stairs:slab_' .. subname .. ' 3',
|
||||||
@ -107,37 +219,42 @@ function stairs.register_slab(subname, recipeitem, groups, images, description)
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- Nodes will be called stairs:{stair,slab}_<subname>
|
-- Nodes will be called stairs:{stair,slab}_<subname>
|
||||||
function stairs.register_stair_and_slab(subname, recipeitem, groups, images, desc_stair, desc_slab)
|
function stairs.register_stair_and_slab(subname, recipeitem, groups, images, desc_stair, desc_slab, sounds)
|
||||||
stairs.register_stair(subname, recipeitem, groups, images, desc_stair)
|
stairs.register_stair(subname, recipeitem, groups, images, desc_stair, sounds)
|
||||||
stairs.register_slab(subname, recipeitem, groups, images, desc_slab)
|
stairs.register_slab(subname, recipeitem, groups, images, desc_slab, sounds)
|
||||||
end
|
end
|
||||||
|
|
||||||
stairs.register_stair_and_slab("wood", "default:wood",
|
stairs.register_stair_and_slab("wood", "default:wood",
|
||||||
{snappy=2,choppy=2,oddly_breakable_by_hand=2},
|
{snappy=2,choppy=2,oddly_breakable_by_hand=2},
|
||||||
{"default_wood.png"},
|
{"default_wood.png"},
|
||||||
"Wooden stair",
|
"Wooden stair",
|
||||||
"Wooden slab")
|
"Wooden slab",
|
||||||
|
default.node_sound_wood_defaults())
|
||||||
|
|
||||||
stairs.register_stair_and_slab("stone", "default:stone",
|
stairs.register_stair_and_slab("stone", "default:stone",
|
||||||
{cracky=3},
|
{cracky=3},
|
||||||
{"default_stone.png"},
|
{"default_stone.png"},
|
||||||
"Stone stair",
|
"Stone stair",
|
||||||
"Stone slab")
|
"Stone slab",
|
||||||
|
default.node_sound_stone_defaults())
|
||||||
|
|
||||||
stairs.register_stair_and_slab("cobble", "default:cobble",
|
stairs.register_stair_and_slab("cobble", "default:cobble",
|
||||||
{cracky=3},
|
{cracky=3},
|
||||||
{"default_cobble.png"},
|
{"default_cobble.png"},
|
||||||
"Cobble stair",
|
"Cobble stair",
|
||||||
"Cobble slab")
|
"Cobble slab",
|
||||||
|
default.node_sound_stone_defaults())
|
||||||
|
|
||||||
stairs.register_stair_and_slab("brick", "default:brick",
|
stairs.register_stair_and_slab("brick", "default:brick",
|
||||||
{cracky=3},
|
{cracky=3},
|
||||||
{"default_brick.png"},
|
{"default_brick.png"},
|
||||||
"Brick stair",
|
"Brick stair",
|
||||||
"Brick slab")
|
"Brick slab",
|
||||||
|
default.node_sound_stone_defaults())
|
||||||
|
|
||||||
stairs.register_stair_and_slab("sandstone", "default:sandstone",
|
stairs.register_stair_and_slab("sandstone", "default:sandstone",
|
||||||
{crumbly=2,cracky=2},
|
{crumbly=2,cracky=2},
|
||||||
{"default_sandstone.png"},
|
{"default_sandstone.png"},
|
||||||
"Sandstone stair",
|
"Sandstone stair",
|
||||||
"Sandstone slab")
|
"Sandstone slab",
|
||||||
|
default.node_sound_stone_defaults())
|
||||||
|
@ -34,7 +34,7 @@ for _, row in ipairs(wool.dyes) do
|
|||||||
minetest.register_node("wool:"..name, {
|
minetest.register_node("wool:"..name, {
|
||||||
description = desc.." Wool",
|
description = desc.." Wool",
|
||||||
tiles = {"wool_"..name..".png"},
|
tiles = {"wool_"..name..".png"},
|
||||||
groups = {snappy=2,choppy=2,oddly_breakable_by_hand=3,flammable=3},
|
groups = {snappy=2,choppy=2,oddly_breakable_by_hand=3,flammable=3,wool=1},
|
||||||
})
|
})
|
||||||
if craft_color_group then
|
if craft_color_group then
|
||||||
-- Crafting from dye and white wool
|
-- Crafting from dye and white wool
|
||||||
|