1
0
mirror of https://github.com/minetest/minetest_game.git synced 2025-06-28 20:56:02 +02:00

34 Commits
0.4.4 ... 0.4.5

Author SHA1 Message Date
90aaa1fb62 Fixe digging times of axes 2013-03-03 11:15:05 +01:00
6c70e0295a Dont place doors if node under it has on_rightclick 2013-03-01 17:40:26 +01:00
230747c748 Update README 2013-02-24 19:01:10 +01:00
86cff038a4 makes wood doors craftable from wood group 2013-02-12 15:46:03 -05:00
0823f16acb Merge pull request #119 from HybridDog/patch-1
Update mods/default/init.lua
2013-02-08 06:08:47 -08:00
e1d17b1747 Update mods/default/init.lua
how did this line get there?
2013-02-08 15:03:14 +01:00
Jat
2817db19d4 Fix duplicate in default 2013-02-06 02:43:48 +01:00
716397819d Update mods/doors/init.lua
Fix door's glitch in creative mode
2013-01-26 17:00:15 +01:00
67fa74ac01 Fix texture glitch when digging junglegrass 2013-01-15 20:30:55 +01:00
d5cc51a396 Update minetest.show_formspec() 2013-01-07 20:42:31 +01:00
cd604fa9c8 Better lump & ingot textures 2013-01-06 12:07:19 +04:00
686c0d087c Open/close doors with rightclick 2013-01-05 17:25:19 +01:00
c27afe7ee8 Add junglegrass to mapgen 2013-01-05 00:46:46 +01:00
9e23e9ecbf Wool group
For better crafting and modding.
2013-01-04 23:47:27 +01:00
97db50a2fe Expose generate_ore 2013-01-04 21:55:31 +01:00
a0ba7cf973 Show the contents of the locked chest only to the owner 2013-01-04 21:25:37 +01:00
c1b1f2aa49 Add a selection box for stairs that fit the nodebox 2013-01-04 19:45:10 +01:00
0beabfc755 Fix a glitch where the player gets liquids in his inventory when the server lags 2013-01-04 16:47:29 +01:00
5fa8852115 Make fire buildable to 2012-12-31 13:24:05 +01:00
0eb46a01ff Remove old unused texture 2012-12-29 00:29:52 +01:00
de8726a9f7 new mese pick texture 2012-12-28 21:34:10 +00:00
33ec25caed Convert old mese to the new mese block and generate it deep underground 2012-12-28 20:05:40 +01:00
deb39ddcd4 Run nodeupdate() after burning nodes. 2012-12-28 02:30:52 +01:00
2d1e7463d3 Run nodeupdate after decay. 2012-12-28 02:30:52 +01:00
7505fbce51 add new texture with shading this time around.
also, license follows the default one since thats how the textures for
minetest_game usually work.
2012-12-27 21:58:57 +00:00
9232734a48 Removed significant details from default_dirt.png to make it look less repetative
Fixed default_grass_side.png
2012-12-22 20:08:56 +04:00
1bf62bbad4 Changed Mese to act like an object cut out of a block of stone, rather than an
object found *among* the stone.

That is, mese should behave such that you get something potentially useful out
of the aggregate block you just broke, rather than just collecting the whole
block when mined.

Mese crystals in stone give a single Mese Crystal when mines. Craft three of
those + 2 sticks for Mese Pickaxe, or 9 for a Mese block. Craft one Mese
Crystal by itself to get 9 Mese Crystal fragments, which all mods should use
when a full Mese Crystal is too much.

This includes new textures for the above objects, tweaks to the sounds used for
them, and naming tweaks for the textures used for default mese in stone, so
that old texture packs don't use the "wrong" image.

This represents my best effort to match C55's suggestions.
2012-12-18 17:56:23 +01:00
95cbfc50d8 Fix incorrect slabs to full block transformation by changing the modname to 'stairs' for all stairs and slabs 2012-12-17 21:03:25 +01:00
61e60724f6 Use infinite stacks in creative mode and make the hand break anything 2012-12-17 20:27:01 +01:00
8c977451a8 Fix modname prefix in stairs and slab functions 2012-12-16 19:52:13 +01:00
73d078fd27 Damage tweaks 2012-12-15 18:05:14 +01:00
0636d574af Add upside down slabs and stairs 2012-12-15 15:01:49 +01:00
c4f2bee9a6 Add sounds to stairs and slabs 2012-12-12 20:37:33 +01:00
4763fa635a Fix glass step sound 2012-12-10 18:43:12 +01:00
24 changed files with 342 additions and 107 deletions

View File

@ -6,7 +6,7 @@ To build the wholeness of the Minetest project, insert this repository as
in the Minetest Engine.
The Minetest Engine can be found in:
https://github.com/celeron55/minetest/
https://github.com/minetest/minetest/
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.
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,
this is not a "real" git repository. (Package maintainers please note!)

View File

@ -0,0 +1 @@
default

View File

@ -44,15 +44,7 @@ minetest.after(0, function()
table.sort(creative_list)
inv:set_size("main", #creative_list)
for _,itemstring in ipairs(creative_list) do
local stack = 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)
inv:add_item("main", ItemStack(itemstring))
end
creative_inventory.creative_inventory_size = #creative_list
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)
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

View File

@ -26,13 +26,13 @@ minetest.register_item(":", {
wield_image = "wieldhand.png",
wield_scale = {x=1,y=1,z=2.5},
tool_capabilities = {
full_punch_interval = 1.0,
full_punch_interval = 0.9,
max_drop_level = 0,
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},
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",
inventory_image = "default_tool_woodpick.png",
tool_capabilities = {
full_punch_interval = 1.2,
max_drop_level=0,
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",
inventory_image = "default_tool_stonepick.png",
tool_capabilities = {
full_punch_interval = 1.3,
max_drop_level=0,
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",
inventory_image = "default_tool_steelpick.png",
tool_capabilities = {
full_punch_interval = 1.0,
max_drop_level=1,
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",
inventory_image = "default_tool_mesepick.png",
tool_capabilities = {
full_punch_interval = 1.0,
full_punch_interval = 0.65,
max_drop_level=3,
groupcaps={
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},
snappy={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},
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",
wield_image = "default_tool_woodshovel.png^[transformR90",
tool_capabilities = {
full_punch_interval = 1.2,
max_drop_level=0,
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",
wield_image = "default_tool_stoneshovel.png^[transformR90",
tool_capabilities = {
full_punch_interval = 1.4,
max_drop_level=0,
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",
wield_image = "default_tool_steelshovel.png^[transformR90",
tool_capabilities = {
full_punch_interval = 1.1,
max_drop_level=1,
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",
inventory_image = "default_tool_woodaxe.png",
tool_capabilities = {
full_punch_interval = 1.0,
max_drop_level=0,
groupcaps={
choppy={times={[2]=1.40, [3]=0.80}, uses=10, maxlevel=1},
fleshy={times={[2]=1.50, [3]=0.80}, uses=10, maxlevel=1}
choppy = {times={[2]=1.60, [3]=1.20}, 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",
inventory_image = "default_tool_stoneaxe.png",
tool_capabilities = {
full_punch_interval = 1.2,
max_drop_level=0,
groupcaps={
choppy={times={[1]=3.00, [2]=1.00, [3]=0.60}, uses=20, maxlevel=1},
fleshy={times={[2]=1.30, [3]=0.70}, uses=20, maxlevel=1}
choppy={times={[1]=3.00, [2]=1.40, [3]=1.00}, 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",
inventory_image = "default_tool_steelaxe.png",
tool_capabilities = {
full_punch_interval = 0.9,
max_drop_level=1,
groupcaps={
choppy={times={[1]=3.00, [2]=1.60, [3]=1.00}, uses=30, maxlevel=2},
fleshy={times={[2]=1.10, [3]=0.60}, uses=40, maxlevel=1}
choppy={times={[1]=2.60, [2]=1.00, [3]=0.60}, uses=30, maxlevel=2},
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",
inventory_image = "default_tool_woodsword.png",
tool_capabilities = {
full_punch_interval = 1.0,
full_punch_interval = 0.9,
max_drop_level=0,
groupcaps={
fleshy={times={[2]=1.10, [3]=0.60}, uses=10, maxlevel=1},
snappy={times={[2]=1.00, [3]=0.50}, uses=10, maxlevel=1},
choppy={times={[3]=1.00}, uses=20, maxlevel=0}
snappy={times={[2]=0.9, [3]=0.45}, uses=10, maxlevel=1},
choppy={times={[3]=0.90}, uses=20, maxlevel=0}
}
}
})
@ -163,12 +179,12 @@ minetest.register_tool("default:sword_stone", {
description = "Stone Sword",
inventory_image = "default_tool_stonesword.png",
tool_capabilities = {
full_punch_interval = 1.0,
full_punch_interval = 1.1,
max_drop_level=0,
groupcaps={
fleshy={times={[2]=0.80, [3]=0.40}, uses=20, maxlevel=1},
snappy={times={[2]=0.80, [3]=0.40}, uses=20, maxlevel=1},
choppy={times={[3]=0.90}, uses=20, maxlevel=0}
snappy={times={[2]=0.75, [3]=0.35}, uses=20, maxlevel=1},
choppy={times={[3]=0.70}, uses=20, maxlevel=0}
}
}
})
@ -176,12 +192,12 @@ minetest.register_tool("default:sword_steel", {
description = "Steel Sword",
inventory_image = "default_tool_steelsword.png",
tool_capabilities = {
full_punch_interval = 1.0,
full_punch_interval = 0.8,
max_drop_level=1,
groupcaps={
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},
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({
output = 'default:pick_mese',
recipe = {
{'default:mese', 'default:mese', 'default:mese'},
{'default:mese_crystal', 'default:mese_crystal', 'default:mese_crystal'},
{'', '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)
--
@ -564,12 +603,6 @@ minetest.register_craft({
burntime = 7,
})
minetest.register_craft({
type = "fuel",
recipe = "default:mese",
burntime = 30,
})
minetest.register_craft({
type = "fuel",
recipe = "default:lava_source",
@ -698,7 +731,7 @@ end
function default.node_sound_glass_defaults(table)
table = table 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
{name="default_break_glass", gain=1.0}
default.node_sound_defaults(table)
@ -745,6 +778,15 @@ minetest.register_node("default:stone_with_iron", {
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", {
description = "Dirt with Grass",
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",
tiles = {"default_desert_sand.png"},
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(),
})
@ -990,14 +1032,6 @@ minetest.register_node("default:wood", {
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", {
description = "Cloud",
tiles = {"default_cloud.png"},
@ -1029,6 +1063,7 @@ minetest.register_node("default:water_flowing", {
pointable = false,
diggable = false,
buildable_to = true,
drop = "",
liquidtype = "flowing",
liquid_alternative_flowing = "default:water_flowing",
liquid_alternative_source = "default:water_source",
@ -1054,6 +1089,7 @@ minetest.register_node("default:water_source", {
pointable = false,
diggable = false,
buildable_to = true,
drop = "",
liquidtype = "source",
liquid_alternative_flowing = "default:water_flowing",
liquid_alternative_source = "default:water_source",
@ -1085,6 +1121,7 @@ minetest.register_node("default:lava_flowing", {
pointable = false,
diggable = false,
buildable_to = true,
drop = "",
liquidtype = "flowing",
liquid_alternative_flowing = "default:lava_flowing",
liquid_alternative_source = "default:lava_source",
@ -1111,6 +1148,7 @@ minetest.register_node("default:lava_source", {
pointable = false,
diggable = false,
buildable_to = true,
drop = "",
liquidtype = "source",
liquid_alternative_flowing = "default:lava_flowing",
liquid_alternative_source = "default:lava_source",
@ -1243,10 +1281,6 @@ minetest.register_node("default:chest_locked", {
end,
on_construct = function(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("owner", "")
local inv = meta:get_inventory()
@ -1302,6 +1336,16 @@ minetest.register_node("default:chest_locked", {
minetest.log("action", player:get_player_name()..
" takes stuff from locked chest at "..minetest.pos_to_string(pos))
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 =
@ -1515,6 +1559,15 @@ minetest.register_node("default:steelblock", {
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", {
description = "Nyan Cat",
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",
})
minetest.register_craftitem("default:mese_crystal", {
description = "Mese Crystal",
inventory_image = "default_mese_crystal.png",
})
minetest.register_craftitem("default:clay_lump", {
description = "Clay Lump",
inventory_image = "default_clay_lump.png",
@ -1623,9 +1681,13 @@ minetest.register_craftitem("default:steel_ingot", {
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", {
description = "Clay Brick",
inventory_image = "default_steel_ingot.png",
inventory_image = "default_clay_brick.png",
})

View File

@ -86,6 +86,7 @@ minetest.register_abm({
end
-- Remove node
minetest.env:remove_node(p0)
nodeupdate(p0)
end
end
})

View File

@ -29,7 +29,7 @@ minetest.register_alias("mapgen_desert_stone", "default:desert_stone")
-- 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
return
end
@ -142,15 +142,17 @@ end
minetest.register_on_generated(function(minp, maxp, seed)
-- Generate regular ores
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)
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)
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)
default.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_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+2, 1/9/9/9, 3, 5, -63, -16)
default.generate_ore("default:stone_with_iron", "default:stone", minp, maxp, seed+3, 1/7/7/7, 3, 5, -31000, -64)
generate_ore("default:stone_with_coal", "default:stone", minp, maxp, seed+7, 1/24/24/24, 6,27, -31000, 0)
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+4, 1/16/16/16, 2, 3, -127, -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
-- Generate clay
@ -246,7 +248,7 @@ minetest.register_on_generated(function(minp, maxp, seed)
end
end
end
-- Generate dry shrubs
-- Generate grass
local perlin1 = minetest.env:get_perlin(329, 3, 0.6, 100)
-- Assume X and Z lengths are equal
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 x1 = minp.x + math.floor((divx+1)*divlen)
local z1 = minp.z + math.floor((divz+1)*divlen)
-- Determine dry shrubs amount from perlin noise
local shrub_amount = math.floor(perlin1:get2d({x=x0, y=z0}) * 5 + 0)
-- Find random positions for dry shrubs based on this random
-- Determine grass amount from perlin noise
local grass_amount = math.floor(perlin1:get2d({x=x0, y=z0}) * 5 + 0)
-- Find random positions for grass based on this random
local pr = PseudoRandom(seed+1)
for i=0,shrub_amount do
for i=0,grass_amount do
local x = pr:next(x0, x1)
local z = pr:next(z0, z1)
-- Find ground level (0...15)
@ -272,15 +274,25 @@ minetest.register_on_generated(function(minp, maxp, seed)
break
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 nn = minetest.env:get_node(p).name
-- Check if the node can be replaced
if minetest.registered_nodes[nn] and
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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 210 B

After

Width:  |  Height:  |  Size: 339 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 933 B

After

Width:  |  Height:  |  Size: 255 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 888 B

After

Width:  |  Height:  |  Size: 962 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 925 B

After

Width:  |  Height:  |  Size: 567 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 936 B

After

Width:  |  Height:  |  Size: 237 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 672 B

After

Width:  |  Height:  |  Size: 554 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 203 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 482 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 417 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 212 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 488 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 207 B

After

Width:  |  Height:  |  Size: 199 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 341 B

After

Width:  |  Height:  |  Size: 352 B

View File

@ -41,6 +41,13 @@ function doors:register_door(name, def)
if not pointed_thing.type == "node" then
return itemstack
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 pt2 = {x=pt.x, y=pt.y, z=pt.z}
pt2.y = pt2.y+1
@ -82,7 +89,9 @@ function doors:register_door(name, def)
meta:set_string("infotext", "Owned by "..pn)
end
itemstack:take_item()
if not minetest.setting_getbool("creative_mode") then
itemstack:take_item()
end
return itemstack
end,
})
@ -96,7 +105,7 @@ function doors:register_door(name, def)
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
if not minetest.env:get_node(pos).name == check_name then
return
@ -144,9 +153,9 @@ function doors:register_door(name, def)
after_dig_node(pos, name.."_t_1")
end,
on_punch = function(pos, node, puncher)
if check_player_priv(pos, puncher) then
on_punch(pos, 1, name.."_t_1", name.."_b_2", name.."_t_2", {1,2,3,0})
on_rightclick = function(pos, node, clicker)
if check_player_priv(pos, clicker) then
on_rightclick(pos, 1, name.."_t_1", name.."_b_2", name.."_t_2", {1,2,3,0})
end
end,
@ -174,9 +183,9 @@ function doors:register_door(name, def)
after_dig_node(pos, name.."_b_1")
end,
on_punch = function(pos, node, puncher)
if check_player_priv(pos, puncher) then
on_punch(pos, -1, name.."_b_1", name.."_t_2", name.."_b_2", {1,2,3,0})
on_rightclick = function(pos, node, clicker)
if check_player_priv(pos, clicker) then
on_rightclick(pos, -1, name.."_b_1", name.."_t_2", name.."_b_2", {1,2,3,0})
end
end,
@ -204,9 +213,9 @@ function doors:register_door(name, def)
after_dig_node(pos, name.."_t_2")
end,
on_punch = function(pos, node, puncher)
if check_player_priv(pos, puncher) then
on_punch(pos, 1, name.."_t_2", name.."_b_1", name.."_t_1", {3,0,1,2})
on_rightclick = function(pos, node, clicker)
if check_player_priv(pos, clicker) then
on_rightclick(pos, 1, name.."_t_2", name.."_b_1", name.."_t_1", {3,0,1,2})
end
end,
@ -234,9 +243,9 @@ function doors:register_door(name, def)
after_dig_node(pos, name.."_b_2")
end,
on_punch = function(pos, node, puncher)
if check_player_priv(pos, puncher) then
on_punch(pos, -1, name.."_b_2", name.."_t_1", name.."_b_1", {3,0,1,2})
on_rightclick = function(pos, node, clicker)
if check_player_priv(pos, clicker) then
on_rightclick(pos, -1, name.."_b_2", name.."_t_1", name.."_b_1", {3,0,1,2})
end
end,
@ -256,9 +265,9 @@ doors:register_door("doors:door_wood", {
minetest.register_craft({
output = "doors:door_wood",
recipe = {
{"default:wood", "default:wood"},
{"default:wood", "default:wood"},
{"default:wood", "default:wood"}
{"group:wood", "group:wood"},
{"group:wood", "group:wood"},
{"group:wood", "group:wood"}
}
})

View File

@ -12,6 +12,7 @@ minetest.register_node("fire:basic_flame", {
groups = {igniter=2,dig_immediate=3},
drop = '',
walkable = false,
buildable_to = true,
damage_per_second = 4,
after_place_node = function(pos, placer)
@ -178,6 +179,7 @@ minetest.register_abm({
return
end
minetest.env:remove_node(p)
nodeupdate(p)
end
else
-- remove flame

View File

@ -4,8 +4,8 @@
stairs = {}
-- Node will be called stairs:stair_<subname>
function stairs.register_stair(subname, recipeitem, groups, images, description)
minetest.register_node("stairs:stair_" .. subname, {
function stairs.register_stair(subname, recipeitem, groups, images, description, sounds)
minetest.register_node(":stairs:stair_" .. subname, {
description = description,
drawtype = "nodebox",
tiles = images,
@ -13,6 +13,7 @@ function stairs.register_stair(subname, recipeitem, groups, images, description)
paramtype2 = "facedir",
is_ground_content = true,
groups = groups,
sounds = sounds,
node_box = {
type = "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},
},
},
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({
@ -43,14 +95,15 @@ function stairs.register_stair(subname, recipeitem, groups, images, description)
end
-- Node will be called stairs:slab_<subname>
function stairs.register_slab(subname, recipeitem, groups, images, description)
minetest.register_node("stairs:slab_" .. subname, {
function stairs.register_slab(subname, recipeitem, groups, images, description, sounds)
minetest.register_node(":stairs:slab_" .. subname, {
description = description,
drawtype = "nodebox",
tiles = images,
paramtype = "light",
is_ground_content = true,
groups = groups,
sounds = sounds,
node_box = {
type = "fixed",
fixed = {-0.5, -0.5, -0.5, 0.5, 0, 0.5},
@ -93,11 +146,70 @@ function stairs.register_slab(subname, recipeitem, groups, images, description)
return itemstack
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
return minetest.item_place(itemstack, placer, pointed_thing)
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({
output = 'stairs:slab_' .. subname .. ' 3',
recipe = {
@ -107,37 +219,42 @@ function stairs.register_slab(subname, recipeitem, groups, images, description)
end
-- Nodes will be called stairs:{stair,slab}_<subname>
function stairs.register_stair_and_slab(subname, recipeitem, groups, images, desc_stair, desc_slab)
stairs.register_stair(subname, recipeitem, groups, images, desc_stair)
stairs.register_slab(subname, recipeitem, groups, images, 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, sounds)
stairs.register_slab(subname, recipeitem, groups, images, desc_slab, sounds)
end
stairs.register_stair_and_slab("wood", "default:wood",
{snappy=2,choppy=2,oddly_breakable_by_hand=2},
{"default_wood.png"},
"Wooden stair",
"Wooden slab")
"Wooden slab",
default.node_sound_wood_defaults())
stairs.register_stair_and_slab("stone", "default:stone",
{cracky=3},
{"default_stone.png"},
"Stone stair",
"Stone slab")
"Stone slab",
default.node_sound_stone_defaults())
stairs.register_stair_and_slab("cobble", "default:cobble",
{cracky=3},
{"default_cobble.png"},
"Cobble stair",
"Cobble slab")
"Cobble slab",
default.node_sound_stone_defaults())
stairs.register_stair_and_slab("brick", "default:brick",
{cracky=3},
{"default_brick.png"},
"Brick stair",
"Brick slab")
"Brick slab",
default.node_sound_stone_defaults())
stairs.register_stair_and_slab("sandstone", "default:sandstone",
{crumbly=2,cracky=2},
{"default_sandstone.png"},
"Sandstone stair",
"Sandstone slab")
"Sandstone slab",
default.node_sound_stone_defaults())

View File

@ -34,7 +34,7 @@ for _, row in ipairs(wool.dyes) do
minetest.register_node("wool:"..name, {
description = desc.." Wool",
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
-- Crafting from dye and white wool