Update Minetest Game core
|
@ -5,3 +5,5 @@
|
|||
tags
|
||||
*.vim
|
||||
|
||||
|
||||
Thumbs.db
|
||||
|
|
|
@ -1,115 +1,115 @@
|
|||
[submodule "mods/pipeworks"]
|
||||
path = mods/pipeworks
|
||||
url = https://github.com/VanessaE/pipeworks.git
|
||||
branch = master
|
||||
[submodule "mods/WorldEdit"]
|
||||
path = mods/WorldEdit
|
||||
url = https://github.com/Uberi/Minetest-WorldEdit.git
|
||||
branch = master
|
||||
[submodule "mods/moreores"]
|
||||
path = mods/moreores
|
||||
url = https://github.com/Calinou/moreores.git
|
||||
branch = master
|
||||
[submodule "mods/3d_armor"]
|
||||
path = mods/3d_armor
|
||||
url = https://github.com/stujones11/minetest-3d_armor.git
|
||||
branch = master
|
||||
[submodule "mods/cannons"]
|
||||
path = mods/cannons
|
||||
branch = master
|
||||
url = https://bitbucket.org/kingarthursteam/cannons.git
|
||||
[submodule "mods/locks"]
|
||||
path = mods/locks
|
||||
url = https://github.com/Sokomine/locks
|
||||
branch = master
|
||||
[submodule "mods/teleporter"]
|
||||
path = mods/teleporter
|
||||
url = https://bitbucket.org/kingarthursteam/teleporter
|
||||
branch = master
|
||||
[submodule "mods/maptools"]
|
||||
path = mods/maptools
|
||||
url = https://github.com/Calinou/maptools.git
|
||||
branch = master
|
||||
[submodule "mods/steel"]
|
||||
path = mods/steel
|
||||
url = https://bitbucket.org/kingarthursteam/steel.git
|
||||
branch = master
|
||||
[submodule "mods/db"]
|
||||
path = mods/db
|
||||
url = https://bitbucket.org/adrido/db.git
|
||||
branch = master
|
||||
[submodule "mods/bell"]
|
||||
path = mods/bell
|
||||
url = https://bitbucket.org/kingarthursteam/bell-mod.git
|
||||
branch = master
|
||||
[submodule "mods/3d_torch"]
|
||||
path = mods/3d_torch
|
||||
url = https://bitbucket.org/kingarthursteam/3d-torches.git
|
||||
branch = master
|
||||
[submodule "mods/3dforniture"]
|
||||
path = mods/3dforniture
|
||||
url = https://bitbucket.org/adrido/3dforniture.git
|
||||
branch = master
|
||||
[submodule "mods/arrow_signs"]
|
||||
path = mods/arrow_signs
|
||||
url = https://bitbucket.org/adrido/arrow_signs.git
|
||||
branch = master
|
||||
[submodule "mods/mesecons"]
|
||||
path = mods/mesecons
|
||||
url = https://github.com/Jeija/minetest-mod-mesecons.git
|
||||
branch = master
|
||||
[submodule "mods/fake_fire"]
|
||||
path = mods/fake_fire
|
||||
url = https://bitbucket.org/kingarthursteam/fakefire.git
|
||||
branch = master
|
||||
[submodule "mods/scaffolding"]
|
||||
path = mods/scaffolding
|
||||
url = https://bitbucket.org/Infinatum/scaffolding.git
|
||||
branch = master
|
||||
[submodule "mods/christmas_craft"]
|
||||
path = mods/christmas_craft
|
||||
url = https://bitbucket.org/kingarthursteam/christmas_craft.git
|
||||
branch = master
|
||||
[submodule "mods/darkage"]
|
||||
path = mods/darkage
|
||||
url = https://bitbucket.org/adrido/darkage.git
|
||||
branch = master
|
||||
[submodule "mods/farming_plus"]
|
||||
path = mods/farming_plus
|
||||
url=https://bitbucket.org/kingarthursteam/farming_plus.git
|
||||
branch = master
|
||||
[submodule "mods/beer_test"]
|
||||
path = mods/beer_test
|
||||
url = https://bitbucket.org/kingarthursteam/beer-test.git
|
||||
branch = master
|
||||
[submodule "mods/gates"]
|
||||
path = mods/gates
|
||||
url = https://bitbucket.org/kingarthursteam/gates.git
|
||||
branch = master
|
||||
[submodule "mods/moreblocks"]
|
||||
path = mods/moreblocks
|
||||
url = https://github.com/Calinou/moreblocks.git
|
||||
branch = master
|
||||
[submodule "mods/unified_inventory"]
|
||||
path = mods/unified_inventory
|
||||
url = https://bitbucket.org/kingarthursteam/unified_inventory.git
|
||||
branch = master
|
||||
[submodule "mods/technic"]
|
||||
path = mods/technic
|
||||
url = https://github.com/minetest-technic/technic.git
|
||||
branch = master
|
||||
[submodule "mods/lights"]
|
||||
path = mods/lights
|
||||
url = https://bitbucket.org/kingarthursteam/lights
|
||||
branch = master
|
||||
[submodule "mods/castle"]
|
||||
path = mods/castle
|
||||
url = https://github.com/minetest-mods/castle.git
|
||||
branch = master
|
||||
[submodule "mods/xdecor"]
|
||||
path = mods/xdecor
|
||||
[submodule "mods/pipeworks"]
|
||||
path = mods/pipeworks
|
||||
url = https://github.com/VanessaE/pipeworks.git
|
||||
branch = master
|
||||
[submodule "mods/WorldEdit"]
|
||||
path = mods/WorldEdit
|
||||
url = https://github.com/Uberi/Minetest-WorldEdit.git
|
||||
branch = master
|
||||
[submodule "mods/moreores"]
|
||||
path = mods/moreores
|
||||
url = https://github.com/Calinou/moreores.git
|
||||
branch = master
|
||||
[submodule "mods/3d_armor"]
|
||||
path = mods/3d_armor
|
||||
url = https://github.com/stujones11/minetest-3d_armor.git
|
||||
branch = master
|
||||
[submodule "mods/cannons"]
|
||||
path = mods/cannons
|
||||
branch = master
|
||||
url = https://bitbucket.org/kingarthursteam/cannons.git
|
||||
[submodule "mods/locks"]
|
||||
path = mods/locks
|
||||
url = https://github.com/Sokomine/locks
|
||||
branch = master
|
||||
[submodule "mods/teleporter"]
|
||||
path = mods/teleporter
|
||||
url = https://bitbucket.org/kingarthursteam/teleporter
|
||||
branch = master
|
||||
[submodule "mods/maptools"]
|
||||
path = mods/maptools
|
||||
url = https://github.com/Calinou/maptools.git
|
||||
branch = master
|
||||
[submodule "mods/steel"]
|
||||
path = mods/steel
|
||||
url = https://bitbucket.org/kingarthursteam/steel.git
|
||||
branch = master
|
||||
[submodule "mods/db"]
|
||||
path = mods/db
|
||||
url = https://bitbucket.org/adrido/db.git
|
||||
branch = master
|
||||
[submodule "mods/bell"]
|
||||
path = mods/bell
|
||||
url = https://bitbucket.org/kingarthursteam/bell-mod.git
|
||||
branch = master
|
||||
[submodule "mods/3d_torch"]
|
||||
path = mods/3d_torch
|
||||
url = https://bitbucket.org/kingarthursteam/3d-torches.git
|
||||
branch = master
|
||||
[submodule "mods/3dforniture"]
|
||||
path = mods/3dforniture
|
||||
url = https://bitbucket.org/adrido/3dforniture.git
|
||||
branch = master
|
||||
[submodule "mods/arrow_signs"]
|
||||
path = mods/arrow_signs
|
||||
url = https://bitbucket.org/adrido/arrow_signs.git
|
||||
branch = master
|
||||
[submodule "mods/mesecons"]
|
||||
path = mods/mesecons
|
||||
url = https://github.com/Jeija/minetest-mod-mesecons.git
|
||||
branch = master
|
||||
[submodule "mods/fake_fire"]
|
||||
path = mods/fake_fire
|
||||
url = https://bitbucket.org/kingarthursteam/fakefire.git
|
||||
branch = master
|
||||
[submodule "mods/scaffolding"]
|
||||
path = mods/scaffolding
|
||||
url = https://bitbucket.org/Infinatum/scaffolding.git
|
||||
branch = master
|
||||
[submodule "mods/christmas_craft"]
|
||||
path = mods/christmas_craft
|
||||
url = https://bitbucket.org/kingarthursteam/christmas_craft.git
|
||||
branch = master
|
||||
[submodule "mods/darkage"]
|
||||
path = mods/darkage
|
||||
url = https://bitbucket.org/adrido/darkage.git
|
||||
branch = master
|
||||
[submodule "mods/farming_plus"]
|
||||
path = mods/farming_plus
|
||||
url=https://bitbucket.org/kingarthursteam/farming_plus.git
|
||||
branch = master
|
||||
[submodule "mods/beer_test"]
|
||||
path = mods/beer_test
|
||||
url = https://bitbucket.org/kingarthursteam/beer-test.git
|
||||
branch = master
|
||||
[submodule "mods/gates"]
|
||||
path = mods/gates
|
||||
url = https://bitbucket.org/kingarthursteam/gates.git
|
||||
branch = master
|
||||
[submodule "mods/moreblocks"]
|
||||
path = mods/moreblocks
|
||||
url = https://github.com/Calinou/moreblocks.git
|
||||
branch = master
|
||||
[submodule "mods/unified_inventory"]
|
||||
path = mods/unified_inventory
|
||||
url = https://bitbucket.org/kingarthursteam/unified_inventory.git
|
||||
branch = master
|
||||
[submodule "mods/technic"]
|
||||
path = mods/technic
|
||||
url = https://github.com/minetest-technic/technic.git
|
||||
branch = master
|
||||
[submodule "mods/lights"]
|
||||
path = mods/lights
|
||||
url = https://bitbucket.org/kingarthursteam/lights
|
||||
branch = master
|
||||
[submodule "mods/castle"]
|
||||
path = mods/castle
|
||||
url = https://github.com/minetest-mods/castle.git
|
||||
branch = master
|
||||
[submodule "mods/xdecor"]
|
||||
path = mods/xdecor
|
||||
url = https://bitbucket.org/kingarthursteam/xsdecor
|
||||
branch = master
|
||||
branch = master
|
||||
[submodule "mods/medieval"]
|
||||
path = mods/medieval
|
||||
url = https://bitbucket.org/Infinatum/medieval.git
|
||||
|
|
|
@ -0,0 +1,43 @@
|
|||
The king-arthur main game for the Minetest game engine `king_arthurs_game`
|
||||
==========================================================================
|
||||
|
||||
To use this game with Minetest, insert this repository as
|
||||
/games/minetest_game
|
||||
in the Minetest Engine.
|
||||
|
||||
The Minetest Engine can be found in:
|
||||
https://github.com/minetest/minetest/
|
||||
|
||||
Compatibility
|
||||
--------------
|
||||
The game should be compatible with minetest game.
|
||||
|
||||
License of source code
|
||||
----------------------
|
||||
Copyright (C) 2010-2012 celeron55, Perttu Ahola <celeron55@gmail.com>
|
||||
See README.txt in each mod directory for information about other authors.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation; either version 2.1 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public License along
|
||||
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
License of media (textures and sounds)
|
||||
--------------------------------------
|
||||
Copyright (C) 2010-2012 celeron55, Perttu Ahola <celeron55@gmail.com>
|
||||
See README.txt in each mod directory for information about other authors.
|
||||
|
||||
Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0)
|
||||
http://creativecommons.org/licenses/by-sa/3.0/
|
||||
|
||||
License of `menu/header.png`
|
||||
Copyright (C) 2016 Semmett9
|
|
@ -1 +1 @@
|
|||
Subproject commit abb52397264c437ee358e32c9160ba92802a6ca9
|
||||
Subproject commit dec935530778cdc10858e08ba10af259b4cc721a
|
|
@ -1 +1 @@
|
|||
Subproject commit a0c263962ffa311a72a9da22c76d53003bb9df6b
|
||||
Subproject commit 28d3401f63491350edc2bc3b88c6db8538ab51ca
|
|
@ -1,16 +1,16 @@
|
|||
--[[
|
||||
add compatibility with the old nodes of king arthurs land
|
||||
|
||||
minetest.register_alias("name", "convert_to")
|
||||
|
||||
name is converted to convert_to by the engine. This means that if the engine finds nodes with the name name in the world the node with the name convert_to is used instead.
|
||||
This is useful to maintain backwards compatibility.
|
||||
There are also other cases like map generation where aliases are used. The /giveme command also looks for aliases when adding the item to the players inventory.
|
||||
]]
|
||||
|
||||
-- Added at 10.07.2016
|
||||
minetest.register_alias("moreores:mineral_copper", "default:stone_with_copper")
|
||||
minetest.register_alias("moreores:mineral_gold", "default:stone_with_gold")
|
||||
|
||||
-- Added at 11.09.2016
|
||||
minetest.register_alias("titanium:titanium_in_ground", "default:diamondblock")
|
||||
--[[
|
||||
add compatibility with the old nodes of king arthurs land
|
||||
|
||||
minetest.register_alias("name", "convert_to")
|
||||
|
||||
name is converted to convert_to by the engine. This means that if the engine finds nodes with the name name in the world the node with the name convert_to is used instead.
|
||||
This is useful to maintain backwards compatibility.
|
||||
There are also other cases like map generation where aliases are used. The /giveme command also looks for aliases when adding the item to the players inventory.
|
||||
]]
|
||||
|
||||
-- Added at 10.07.2016
|
||||
minetest.register_alias("moreores:mineral_copper", "default:stone_with_copper")
|
||||
minetest.register_alias("moreores:mineral_gold", "default:stone_with_gold")
|
||||
|
||||
-- Added at 11.09.2016
|
||||
minetest.register_alias("titanium:titanium_in_ground", "default:diamondblock")
|
||||
|
|
|
@ -1,25 +1,25 @@
|
|||
-- Clean mod 2.1
|
||||
--
|
||||
-- (c) 2016 King Arthurs Team
|
||||
|
||||
local old_nodes = {}
|
||||
|
||||
local MODNAME = minetest.get_current_modname()
|
||||
local MODPATH = minetest.get_modpath(MODNAME)
|
||||
local file = MODPATH..DIR_DELIM.."unknown-nodes.txt"
|
||||
for node_name in io.lines(file) do
|
||||
table.insert(old_nodes, node_name:trim())
|
||||
end
|
||||
|
||||
minetest.register_lbm({
|
||||
name = MODNAME..":old_nodes",
|
||||
nodenames = old_nodes,
|
||||
-- ^ List of node names to trigger the LBM on.
|
||||
-- Also non-registered nodes will work.
|
||||
-- Groups (as of group:groupname) will work as well.
|
||||
run_at_every_load = true,
|
||||
-- ^ Whether to run the LBM's action every time a block gets loaded,
|
||||
-- and not just for blocks that were saved last time before LBMs were
|
||||
-- introduced to the world.
|
||||
action = minetest.remove_node
|
||||
})
|
||||
-- Clean mod 2.1
|
||||
--
|
||||
-- (c) 2016 King Arthurs Team
|
||||
|
||||
local old_nodes = {}
|
||||
|
||||
local MODNAME = minetest.get_current_modname()
|
||||
local MODPATH = minetest.get_modpath(MODNAME)
|
||||
local file = MODPATH..DIR_DELIM.."unknown-nodes.txt"
|
||||
for node_name in io.lines(file) do
|
||||
table.insert(old_nodes, node_name:trim())
|
||||
end
|
||||
|
||||
minetest.register_lbm({
|
||||
name = MODNAME..":old_nodes",
|
||||
nodenames = old_nodes,
|
||||
-- ^ List of node names to trigger the LBM on.
|
||||
-- Also non-registered nodes will work.
|
||||
-- Groups (as of group:groupname) will work as well.
|
||||
run_at_every_load = true,
|
||||
-- ^ Whether to run the LBM's action every time a block gets loaded,
|
||||
-- and not just for blocks that were saved last time before LBMs were
|
||||
-- introduced to the world.
|
||||
action = minetest.remove_node
|
||||
})
|
||||
|
|
|
@ -13,7 +13,7 @@ darkage:stair_desert_stone_cobble
|
|||
darkage:stair_sandstone_cobble
|
||||
farming_plus:rubber_leaves
|
||||
farming_plus:rubber_tree_full
|
||||
flowers:flower_seaweed
|
||||
flowers:flower_seaweed
|
||||
junglegrass:medium
|
||||
junglegrass:short
|
||||
junglegrass:shortest
|
||||
|
|
|
@ -34,7 +34,7 @@ function beds.register_bed(name, def)
|
|||
is_ground_content = false,
|
||||
stack_max = 1,
|
||||
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 3, bed = 1},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
sounds = def.sounds or default.node_sound_wood_defaults(),
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = def.nodebox.bottom,
|
||||
|
@ -46,6 +46,14 @@ function beds.register_bed(name, def)
|
|||
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
local under = pointed_thing.under
|
||||
local node = minetest.get_node(under)
|
||||
local udef = minetest.registered_nodes[node.name]
|
||||
if udef and udef.on_rightclick and
|
||||
not (placer and placer:get_player_control().sneak) then
|
||||
return udef.on_rightclick(under, node, placer, itemstack,
|
||||
pointed_thing) or itemstack
|
||||
end
|
||||
|
||||
local pos
|
||||
if minetest.registered_items[minetest.get_node(under).name].buildable_to then
|
||||
pos = under
|
||||
|
@ -138,7 +146,7 @@ function beds.register_bed(name, def)
|
|||
is_ground_content = false,
|
||||
pointable = false,
|
||||
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 3, bed = 2},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
sounds = def.sounds or default.node_sound_wood_defaults(),
|
||||
drop = name .. "_bottom",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
|
|
Before Width: | Height: | Size: 491 B After Width: | Height: | Size: 540 B |
Before Width: | Height: | Size: 487 B After Width: | Height: | Size: 537 B |
Before Width: | Height: | Size: 340 B After Width: | Height: | Size: 390 B |
Before Width: | Height: | Size: 343 B After Width: | Height: | Size: 387 B |
Before Width: | Height: | Size: 248 B After Width: | Height: | Size: 296 B |
Before Width: | Height: | Size: 265 B After Width: | Height: | Size: 316 B |
Before Width: | Height: | Size: 431 B After Width: | Height: | Size: 561 B |
Before Width: | Height: | Size: 427 B After Width: | Height: | Size: 537 B |
Before Width: | Height: | Size: 465 B After Width: | Height: | Size: 611 B |
Before Width: | Height: | Size: 449 B After Width: | Height: | Size: 596 B |
Before Width: | Height: | Size: 474 B After Width: | Height: | Size: 583 B |
Before Width: | Height: | Size: 548 B After Width: | Height: | Size: 616 B |
Before Width: | Height: | Size: 425 B After Width: | Height: | Size: 495 B |
Before Width: | Height: | Size: 490 B After Width: | Height: | Size: 556 B |
Before Width: | Height: | Size: 75 B After Width: | Height: | Size: 143 B |
|
@ -225,6 +225,15 @@ minetest.register_craftitem("boats:boat", {
|
|||
groups = {flammable = 2},
|
||||
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
local under = pointed_thing.under
|
||||
local node = minetest.get_node(under)
|
||||
local udef = minetest.registered_nodes[node.name]
|
||||
if udef and udef.on_rightclick and
|
||||
not (placer and placer:get_player_control().sneak) then
|
||||
return udef.on_rightclick(under, node, placer, itemstack,
|
||||
pointed_thing) or itemstack
|
||||
end
|
||||
|
||||
if pointed_thing.type ~= "node" then
|
||||
return itemstack
|
||||
end
|
||||
|
|
Before Width: | Height: | Size: 854 B After Width: | Height: | Size: 851 B |
Before Width: | Height: | Size: 549 B After Width: | Height: | Size: 546 B |
Before Width: | Height: | Size: 207 B After Width: | Height: | Size: 205 B |
Before Width: | Height: | Size: 223 B After Width: | Height: | Size: 221 B |
Before Width: | Height: | Size: 223 B After Width: | Height: | Size: 221 B |
Before Width: | Height: | Size: 223 B After Width: | Height: | Size: 221 B |
|
@ -362,6 +362,15 @@ minetest.register_craftitem("carts:cart", {
|
|||
inventory_image = minetest.inventorycube("carts_cart_top.png", "carts_cart_side.png", "carts_cart_side.png"),
|
||||
wield_image = "carts_cart_side.png",
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
local under = pointed_thing.under
|
||||
local node = minetest.get_node(under)
|
||||
local udef = minetest.registered_nodes[node.name]
|
||||
if udef and udef.on_rightclick and
|
||||
not (placer and placer:get_player_control().sneak) then
|
||||
return udef.on_rightclick(under, node, placer, itemstack,
|
||||
pointed_thing) or itemstack
|
||||
end
|
||||
|
||||
if not pointed_thing.type == "node" then
|
||||
return
|
||||
end
|
||||
|
|
|
@ -181,8 +181,8 @@ function carts:pathfinder(pos_, old_pos, old_dir, ctrl, pf_switch, railtype)
|
|||
return false
|
||||
end
|
||||
|
||||
function carts:register_rail(name, def, railparams)
|
||||
local def_default = {
|
||||
function carts:register_rail(name, def_overwrite, railparams)
|
||||
local def = {
|
||||
drawtype = "raillike",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
|
@ -194,7 +194,7 @@ function carts:register_rail(name, def, railparams)
|
|||
},
|
||||
sounds = default.node_sound_metal_defaults()
|
||||
}
|
||||
for k, v in pairs(def_default) do
|
||||
for k, v in pairs(def_overwrite) do
|
||||
def[k] = v
|
||||
end
|
||||
if not def.inventory_image then
|
||||
|
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 379 B After Width: | Height: | Size: 459 B |
Before Width: | Height: | Size: 404 B After Width: | Height: | Size: 486 B |
Before Width: | Height: | Size: 414 B After Width: | Height: | Size: 522 B |
Before Width: | Height: | Size: 302 B After Width: | Height: | Size: 612 B |
Before Width: | Height: | Size: 426 B After Width: | Height: | Size: 684 B |
Before Width: | Height: | Size: 423 B After Width: | Height: | Size: 676 B |
Before Width: | Height: | Size: 287 B After Width: | Height: | Size: 580 B |
Before Width: | Height: | Size: 408 B After Width: | Height: | Size: 618 B |
Before Width: | Height: | Size: 407 B After Width: | Height: | Size: 614 B |
Before Width: | Height: | Size: 304 B After Width: | Height: | Size: 602 B |
Before Width: | Height: | Size: 456 B After Width: | Height: | Size: 660 B |
Before Width: | Height: | Size: 457 B After Width: | Height: | Size: 661 B |
Before Width: | Height: | Size: 452 B After Width: | Height: | Size: 707 B |
Before Width: | Height: | Size: 446 B After Width: | Height: | Size: 698 B |
Before Width: | Height: | Size: 446 B After Width: | Height: | Size: 697 B |
|
@ -115,6 +115,9 @@ paramat (CC BY-SA 3.0):
|
|||
default_grass_side.png
|
||||
default_mese_block.png
|
||||
default_silver_sand.png
|
||||
default_mese_post_light_side.png
|
||||
default_mese_post_light_side_dark.png
|
||||
default_mese_post_light_top.png
|
||||
|
||||
brunob.santos (CC BY-SA 4.0):
|
||||
default_desert_cobble.png
|
||||
|
@ -195,6 +198,10 @@ Ferk (CC0 1.0)
|
|||
default_item_smoke.png
|
||||
default_item_smoke.ogg, based on sound by http://opengameart.org/users/bart
|
||||
|
||||
npx (CC BY-SA 3.0)
|
||||
default_rainforest_litter.png
|
||||
default_rainforest_litter_side.png
|
||||
|
||||
Glass breaking sounds (CC BY 3.0):
|
||||
1: http://www.freesound.org/people/cmusounddesign/sounds/71947/
|
||||
2: http://www.freesound.org/people/Tomlija/sounds/97669/
|
||||
|
|
|
@ -639,6 +639,15 @@ minetest.register_craft({
|
|||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "default:mese_post_light 3",
|
||||
recipe = {
|
||||
{"", "default:glass", ""},
|
||||
{"default:mese_crystal", "default:mese_crystal", "default:mese_crystal"},
|
||||
{"", "group:wood", ""},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'default:obsidian_shard 9',
|
||||
recipe = {
|
||||
|
|
|
@ -15,11 +15,19 @@ minetest.register_craftitem("default:paper", {
|
|||
local lpp = 14 -- Lines per book's page
|
||||
local function book_on_use(itemstack, user)
|
||||
local player_name = user:get_player_name()
|
||||
local data = minetest.deserialize(itemstack:get_metadata())
|
||||
local meta = itemstack:get_meta()
|
||||
local title, text, owner = "", "", player_name
|
||||
local page, page_max, lines, string = 1, 1, {}, ""
|
||||
|
||||
if data then
|
||||
-- Backwards compatibility
|
||||
local old_data = minetest.deserialize(itemstack:get_metadata())
|
||||
if old_data then
|
||||
meta:from_table({ fields = old_data })
|
||||
end
|
||||
|
||||
local data = meta:to_table().fields
|
||||
|
||||
if data.owner then
|
||||
title = data.title
|
||||
text = data.text
|
||||
owner = data.owner
|
||||
|
@ -81,35 +89,38 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
|
|||
new_stack = ItemStack("default:book_written")
|
||||
end
|
||||
else
|
||||
data = minetest.deserialize(stack:get_metadata())
|
||||
data = stack:get_meta():to_table().fields
|
||||
end
|
||||
|
||||
if not data then data = {} end
|
||||
data.title = fields.title
|
||||
data.owner = player:get_player_name()
|
||||
data.description = "\""..fields.title.."\" by "..data.owner
|
||||
data.text = fields.text
|
||||
data.text_len = #data.text
|
||||
data.page = 1
|
||||
data.page_max = math.ceil((#data.text:gsub("[^\n]", "") + 1) / lpp)
|
||||
data.owner = player:get_player_name()
|
||||
local data_str = minetest.serialize(data)
|
||||
|
||||
if new_stack then
|
||||
new_stack:set_metadata(data_str)
|
||||
new_stack:get_meta():from_table({ fields = data })
|
||||
if inv:room_for_item("main", new_stack) then
|
||||
inv:add_item("main", new_stack)
|
||||
else
|
||||
minetest.add_item(player:getpos(), new_stack)
|
||||
end
|
||||
else
|
||||
stack:set_metadata(data_str)
|
||||
stack:get_meta():from_table({ fields = data })
|
||||
end
|
||||
|
||||
elseif fields.book_next or fields.book_prev then
|
||||
local data = minetest.deserialize(stack:get_metadata())
|
||||
local data = stack:get_meta():to_table().fields
|
||||
if not data or not data.page then
|
||||
return
|
||||
end
|
||||
|
||||
data.page = tonumber(data.page)
|
||||
data.page_max = tonumber(data.page_max)
|
||||
|
||||
if fields.book_next then
|
||||
data.page = data.page + 1
|
||||
if data.page > data.page_max then
|
||||
|
@ -249,4 +260,3 @@ minetest.register_craftitem("default:flint", {
|
|||
description = "Flint",
|
||||
inventory_image = "default_flint.png"
|
||||
})
|
||||
|
||||
|
|
|
@ -77,8 +77,6 @@ function default.node_sound_leaves_defaults(table)
|
|||
{name = "default_grass_footstep", gain = 0.45}
|
||||
table.dug = table.dug or
|
||||
{name = "default_grass_footstep", gain = 0.7}
|
||||
table.dig = table.dig or
|
||||
{name = "default_dig_crumbly", gain = 0.4}
|
||||
table.place = table.place or
|
||||
{name = "default_place_node", gain = 1.0}
|
||||
default.node_sound_defaults(table)
|
||||
|
@ -138,7 +136,7 @@ minetest.register_abm({
|
|||
nodenames = {"default:lava_source", "default:lava_flowing"},
|
||||
neighbors = {"group:cools_lava", "group:water"},
|
||||
interval = 1,
|
||||
chance = 1,
|
||||
chance = 2,
|
||||
catch_up = false,
|
||||
action = function(...)
|
||||
default.cool_lava(...)
|
||||
|
@ -327,47 +325,64 @@ default.after_place_leaves = function(pos, placer, itemstack, pointed_thing)
|
|||
end
|
||||
end
|
||||
|
||||
-- Leafdecay ABM
|
||||
|
||||
minetest.register_abm({
|
||||
label = "Leaf decay",
|
||||
nodenames = {"group:leafdecay"},
|
||||
neighbors = {"air"},
|
||||
interval = 2,
|
||||
chance = 10,
|
||||
catch_up = false,
|
||||
|
||||
action = function(pos, node, _, _)
|
||||
-- Check if leaf is placed
|
||||
if node.param2 ~= 0 then
|
||||
return
|
||||
-- Leafdecay
|
||||
local function leafdecay_after_destruct(pos, oldnode, def)
|
||||
for _, v in pairs(minetest.find_nodes_in_area(vector.subtract(pos, def.radius),
|
||||
vector.add(pos, def.radius), def.leaves)) do
|
||||
local node = minetest.get_node(v)
|
||||
if node.param2 == 0 then
|
||||
minetest.get_node_timer(v):start(math.random(20, 120) / 10)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local rad = minetest.registered_nodes[node.name].groups.leafdecay
|
||||
-- Assume ignore is a trunk, to make this
|
||||
-- work at the border of a loaded area
|
||||
if minetest.find_node_near(pos, rad, {"ignore", "group:tree"}) then
|
||||
return
|
||||
end
|
||||
-- Drop stuff
|
||||
local itemstacks = minetest.get_node_drops(node.name)
|
||||
for _, itemname in ipairs(itemstacks) do
|
||||
if itemname ~= node.name or
|
||||
minetest.get_item_group(node.name, "leafdecay_drop") ~= 0 then
|
||||
local p_drop = {
|
||||
x = pos.x - 0.5 + math.random(),
|
||||
y = pos.y - 0.5 + math.random(),
|
||||
z = pos.z - 0.5 + math.random(),
|
||||
}
|
||||
minetest.add_item(p_drop, itemname)
|
||||
local function leafdecay_on_timer(pos, def)
|
||||
if minetest.find_node_near(pos, def.radius, def.trunks) then
|
||||
return false
|
||||
end
|
||||
|
||||
local node = minetest.get_node(pos)
|
||||
local drops = minetest.get_node_drops(node.name)
|
||||
for _, item in ipairs(drops) do
|
||||
local is_leaf
|
||||
for _, v in pairs(def.leaves) do
|
||||
if v == item then
|
||||
is_leaf = true
|
||||
end
|
||||
end
|
||||
-- Remove node
|
||||
minetest.remove_node(pos)
|
||||
minetest.check_for_falling(pos)
|
||||
if minetest.get_item_group(item, "leafdecay_drop") ~= 0 or
|
||||
not is_leaf then
|
||||
minetest.add_item({
|
||||
x = pos.x - 0.5 + math.random(),
|
||||
y = pos.y - 0.5 + math.random(),
|
||||
z = pos.z - 0.5 + math.random(),
|
||||
}, item)
|
||||
end
|
||||
end
|
||||
})
|
||||
|
||||
minetest.remove_node(pos)
|
||||
minetest.check_for_falling(pos)
|
||||
end
|
||||
|
||||
function default.register_leafdecay(def)
|
||||
assert(def.leaves)
|
||||
assert(def.trunks)
|
||||
assert(def.radius)
|
||||
for _, v in pairs(def.trunks) do
|
||||
minetest.override_item(v, {
|
||||
after_destruct = function(pos, oldnode)
|
||||
leafdecay_after_destruct(pos, oldnode, def)
|
||||
end,
|
||||
})
|
||||
end
|
||||
for _, v in pairs(def.leaves) do
|
||||
minetest.override_item(v, {
|
||||
on_timer = function(pos)
|
||||
leafdecay_on_timer(pos, def)
|
||||
end,
|
||||
})
|
||||
end
|
||||
end
|
||||
|
||||
--
|
||||
-- Convert dirt to something that fits the environment
|
||||
|
@ -518,3 +533,39 @@ minetest.register_abm({
|
|||
minetest.set_node(pos, {name = "default:coral_skeleton"})
|
||||
end,
|
||||
})
|
||||
|
||||
|
||||
--
|
||||
-- NOTICE: This method is not an official part of the API yet!
|
||||
-- This method may change in future.
|
||||
--
|
||||
|
||||
function default.can_interact_with_node(player, pos)
|
||||
if player then
|
||||
if minetest.check_player_privs(player, "protection_bypass") then
|
||||
return true
|
||||
end
|
||||
else
|
||||
return false
|
||||
end
|
||||
|
||||
local meta = minetest.get_meta(pos)
|
||||
|
||||
-- is player wielding the right key?
|
||||
local item = player:get_wielded_item()
|
||||
if item:get_name() == "default:key" then
|
||||
local key_meta = minetest.parse_json(item:get_metadata())
|
||||
local secret = meta:get_string("key_lock_secret")
|
||||
if secret ~= key_meta.secret then
|
||||
return false
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
if player:get_player_name() ~= meta:get_string("owner") then
|
||||
return false
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
|
@ -1,5 +1,5 @@
|
|||
--
|
||||
-- Aliases for map generator outputs
|
||||
-- Aliases for map generators
|
||||
--
|
||||
|
||||
minetest.register_alias("mapgen_stone", "default:stone")
|
||||
|
@ -34,6 +34,7 @@ minetest.register_alias("mapgen_pine_needles", "default:pine_needles")
|
|||
minetest.register_alias("mapgen_cobble", "default:cobble")
|
||||
minetest.register_alias("mapgen_stair_cobble", "stairs:stair_cobble")
|
||||
minetest.register_alias("mapgen_mossycobble", "default:mossycobble")
|
||||
minetest.register_alias("mapgen_stair_desert_stone", "stairs:stair_desert_stone")
|
||||
minetest.register_alias("mapgen_sandstonebrick", "default:sandstonebrick")
|
||||
minetest.register_alias("mapgen_stair_sandstonebrick", "stairs:stair_sandstonebrick")
|
||||
|
||||
|
@ -42,10 +43,12 @@ minetest.register_alias("mapgen_stair_sandstonebrick", "stairs:stair_sandstonebr
|
|||
-- Register ores
|
||||
--
|
||||
|
||||
function default.register_ores()
|
||||
minetest.clear_registered_ores()
|
||||
-- Blob ores
|
||||
-- These first to avoid other ores in blobs
|
||||
-- Blob ores
|
||||
-- These first to avoid other ores in blobs
|
||||
|
||||
-- Mgv6
|
||||
|
||||
function default.register_mgv6_blob_ores()
|
||||
|
||||
-- Clay
|
||||
-- This first to avoid clay in sand blobs
|
||||
|
@ -74,8 +77,7 @@ function default.register_ores()
|
|||
minetest.register_ore({
|
||||
ore_type = "blob",
|
||||
ore = "default:sand",
|
||||
wherein = {"default:stone", "default:sandstone",
|
||||
"default:desert_stone"},
|
||||
wherein = {"default:stone", "default:desert_stone"},
|
||||
clust_scarcity = 16 * 16 * 16,
|
||||
clust_size = 5,
|
||||
y_min = -31,
|
||||
|
@ -110,8 +112,6 @@ function default.register_ores()
|
|||
octaves = 1,
|
||||
persist = 0.0
|
||||
},
|
||||
biomes = {"taiga", "snowy_grassland", "grassland", "coniferous_forest",
|
||||
"deciduous_forest", "savanna", "rainforest"}
|
||||
})
|
||||
|
||||
-- Gravel
|
||||
|
@ -134,8 +134,120 @@ function default.register_ores()
|
|||
persist = 0.0
|
||||
},
|
||||
})
|
||||
end
|
||||
|
||||
-- Scatter ores
|
||||
|
||||
-- All mapgens except mgv6
|
||||
|
||||
function default.register_blob_ores()
|
||||
|
||||
-- Clay
|
||||
|
||||
minetest.register_ore({
|
||||
ore_type = "blob",
|
||||
ore = "default:clay",
|
||||
wherein = {"default:sand"},
|
||||
clust_scarcity = 16 * 16 * 16,
|
||||
clust_size = 5,
|
||||
y_min = -15,
|
||||
y_max = 0,
|
||||
noise_threshold = 0.0,
|
||||
noise_params = {
|
||||
offset = 0.5,
|
||||
scale = 0.2,
|
||||
spread = {x = 5, y = 5, z = 5},
|
||||
seed = -316,
|
||||
octaves = 1,
|
||||
persist = 0.0
|
||||
},
|
||||
})
|
||||
|
||||
-- Silver sand
|
||||
|
||||
minetest.register_ore({
|
||||
ore_type = "blob",
|
||||
ore = "default:silver_sand",
|
||||
wherein = {"default:stone"},
|
||||
clust_scarcity = 16 * 16 * 16,
|
||||
clust_size = 5,
|
||||
y_min = -31000,
|
||||
y_max = 31000,
|
||||
noise_threshold = 0.0,
|
||||
noise_params = {
|
||||
offset = 0.5,
|
||||
scale = 0.2,
|
||||
spread = {x = 5, y = 5, z = 5},
|
||||
seed = 2316,
|
||||
octaves = 1,
|
||||
persist = 0.0
|
||||
},
|
||||
biomes = {"icesheet_ocean", "tundra", "tundra_beach", "tundra_ocean",
|
||||
"taiga", "taiga_ocean", "snowy_grassland", "snowy_grassland_ocean",
|
||||
"grassland", "grassland_dunes", "grassland_ocean", "coniferous_forest",
|
||||
"coniferous_forest_dunes", "coniferous_forest_ocean", "deciduous_forest",
|
||||
"deciduous_forest_shore", "deciduous_forest_ocean", "cold_desert",
|
||||
"cold_desert_ocean", "savanna", "savanna_shore", "savanna_ocean",
|
||||
"rainforest", "rainforest_swamp", "rainforest_ocean", "underground"}
|
||||
})
|
||||
|
||||
-- Dirt
|
||||
|
||||
minetest.register_ore({
|
||||
ore_type = "blob",
|
||||
ore = "default:dirt",
|
||||
wherein = {"default:stone"},
|
||||
clust_scarcity = 16 * 16 * 16,
|
||||
clust_size = 5,
|
||||
y_min = -31,
|
||||
y_max = 31000,
|
||||
noise_threshold = 0.0,
|
||||
noise_params = {
|
||||
offset = 0.5,
|
||||
scale = 0.2,
|
||||
spread = {x = 5, y = 5, z = 5},
|
||||
seed = 17676,
|
||||
octaves = 1,
|
||||
persist = 0.0
|
||||
},
|
||||
biomes = {"taiga", "snowy_grassland", "grassland", "coniferous_forest",
|
||||
"deciduous_forest", "deciduous_forest_shore", "savanna", "savanna_shore",
|
||||
"rainforest", "rainforest_swamp"}
|
||||
})
|
||||
|
||||
-- Gravel
|
||||
|
||||
minetest.register_ore({
|
||||
ore_type = "blob",
|
||||
ore = "default:gravel",
|
||||
wherein = {"default:stone"},
|
||||
clust_scarcity = 16 * 16 * 16,
|
||||
clust_size = 5,
|
||||
y_min = -31000,
|
||||
y_max = 31000,
|
||||
noise_threshold = 0.0,
|
||||
noise_params = {
|
||||
offset = 0.5,
|
||||
scale = 0.2,
|
||||
spread = {x = 5, y = 5, z = 5},
|
||||
seed = 766,
|
||||
octaves = 1,
|
||||
persist = 0.0
|
||||
},
|
||||
biomes = {"icesheet_ocean", "tundra", "tundra_beach", "tundra_ocean",
|
||||
"taiga", "taiga_ocean", "snowy_grassland", "snowy_grassland_ocean",
|
||||
"grassland", "grassland_dunes", "grassland_ocean", "coniferous_forest",
|
||||
"coniferous_forest_dunes", "coniferous_forest_ocean", "deciduous_forest",
|
||||
"deciduous_forest_shore", "deciduous_forest_ocean", "cold_desert",
|
||||
"cold_desert_ocean", "savanna", "savanna_shore", "savanna_ocean",
|
||||
"rainforest", "rainforest_swamp", "rainforest_ocean", "underground"}
|
||||
})
|
||||
end
|
||||
|
||||
|
||||
-- Scatter ores
|
||||
-- All mapgens
|
||||
|
||||
function default.register_ores()
|
||||
|
||||
-- Coal
|
||||
|
||||
|
@ -377,10 +489,9 @@ end
|
|||
-- Register biomes
|
||||
--
|
||||
|
||||
-- All mapgens except mgv6 and singlenode
|
||||
-- All mapgens except mgv6
|
||||
|
||||
function default.register_biomes()
|
||||
minetest.clear_registered_biomes()
|
||||
|
||||
-- Icesheet
|
||||
|
||||
|
@ -947,7 +1058,7 @@ function default.register_biomes()
|
|||
minetest.register_biome({
|
||||
name = "rainforest",
|
||||
--node_dust = "",
|
||||
node_top = "default:dirt_with_grass",
|
||||
node_top = "default:dirt_with_rainforest_litter",
|
||||
depth_top = 1,
|
||||
node_filler = "default:dirt",
|
||||
depth_filler = 3,
|
||||
|
@ -1033,7 +1144,6 @@ end
|
|||
-- Mgv6
|
||||
|
||||
function default.register_mgv6_decorations()
|
||||
minetest.clear_registered_decorations()
|
||||
|
||||
-- Papyrus
|
||||
|
||||
|
@ -1166,7 +1276,6 @@ end
|
|||
|
||||
|
||||
function default.register_decorations()
|
||||
minetest.clear_registered_decorations()
|
||||
|
||||
-- Apple tree and log
|
||||
|
||||
|
@ -1204,20 +1313,7 @@ function default.register_decorations()
|
|||
biomes = {"deciduous_forest"},
|
||||
y_min = 1,
|
||||
y_max = 31000,
|
||||
schematic = {
|
||||
size = {x = 3, y = 3, z = 1},
|
||||
data = {
|
||||
{name = "air", prob = 0},
|
||||
{name = "air", prob = 0},
|
||||
{name = "air", prob = 0},
|
||||
{name = "default:tree", param2 = 12, prob = 191},
|
||||
{name = "default:tree", param2 = 12},
|
||||
{name = "default:tree", param2 = 12, prob = 127},
|
||||
{name = "air", prob = 0},
|
||||
{name = "flowers:mushroom_brown", prob = 63},
|
||||
{name = "air", prob = 0},
|
||||
},
|
||||
},
|
||||
schematic = minetest.get_modpath("default") .. "/schematics/apple_log.mts",
|
||||
flags = "place_center_x",
|
||||
rotation = "random",
|
||||
})
|
||||
|
@ -1226,7 +1322,7 @@ function default.register_decorations()
|
|||
|
||||
minetest.register_decoration({
|
||||
deco_type = "schematic",
|
||||
place_on = {"default:dirt_with_grass", "default:dirt"},
|
||||
place_on = {"default:dirt_with_rainforest_litter", "default:dirt"},
|
||||
sidelen = 80,
|
||||
fill_ratio = 0.1,
|
||||
biomes = {"rainforest", "rainforest_swamp"},
|
||||
|
@ -1239,26 +1335,13 @@ function default.register_decorations()
|
|||
|
||||
minetest.register_decoration({
|
||||
deco_type = "schematic",
|
||||
place_on = {"default:dirt_with_grass", "default:dirt"},
|
||||
place_on = {"default:dirt_with_rainforest_litter", "default:dirt"},
|
||||
sidelen = 80,
|
||||
fill_ratio = 0.005,
|
||||
biomes = {"rainforest", "rainforest_swamp"},
|
||||
y_min = 1,
|
||||
y_max = 31000,
|
||||
schematic = {
|
||||
size = {x = 3, y = 3, z = 1},
|
||||
data = {
|
||||
{name = "air", prob = 0},
|
||||
{name = "air", prob = 0},
|
||||
{name = "air", prob = 0},
|
||||
{name = "default:jungletree", param2 = 12, prob = 191},
|
||||
{name = "default:jungletree", param2 = 12},
|
||||
{name = "default:jungletree", param2 = 12, prob = 127},
|
||||
{name = "air", prob = 0},
|
||||
{name = "flowers:mushroom_brown", prob = 127},
|
||||
{name = "air", prob = 0},
|
||||
},
|
||||
},
|
||||
schematic = minetest.get_modpath("default") .. "/schematics/jungle_log.mts",
|
||||
flags = "place_center_x",
|
||||
rotation = "random",
|
||||
})
|
||||
|
@ -1299,20 +1382,7 @@ function default.register_decorations()
|
|||
biomes = {"taiga", "coniferous_forest"},
|
||||
y_min = 1,
|
||||
y_max = 31000,
|
||||
schematic = {
|
||||
size = {x = 3, y = 3, z = 1},
|
||||
data = {
|
||||
{name = "air", prob = 0},
|
||||
{name = "air", prob = 0},
|
||||
{name = "air", prob = 0},
|
||||
{name = "default:pine_tree", param2 = 12, prob = 191},
|
||||
{name = "default:pine_tree", param2 = 12},
|
||||
{name = "default:pine_tree", param2 = 12, prob = 127},
|
||||
{name = "air", prob = 0},
|
||||
{name = "flowers:mushroom_red", prob = 63},
|
||||
{name = "air", prob = 0},
|
||||
},
|
||||
},
|
||||
schematic = minetest.get_modpath("default") .. "/schematics/pine_log.mts",
|
||||
flags = "place_center_x",
|
||||
rotation = "random",
|
||||
})
|
||||
|
@ -1354,17 +1424,7 @@ function default.register_decorations()
|
|||
biomes = {"savanna"},
|
||||
y_min = 1,
|
||||
y_max = 31000,
|
||||
schematic = {
|
||||
size = {x = 3, y = 2, z = 1},
|
||||
data = {
|
||||
{name = "air", prob = 0},
|
||||
{name = "air", prob = 0},
|
||||
{name = "air", prob = 0},
|
||||
{name = "default:acacia_tree", param2 = 12, prob = 191},
|
||||
{name = "default:acacia_tree", param2 = 12},
|
||||
{name = "default:acacia_tree", param2 = 12, prob = 127},
|
||||
},
|
||||
},
|
||||
schematic = minetest.get_modpath("default") .. "/schematics/acacia_log.mts",
|
||||
flags = "place_center_x",
|
||||
rotation = "random",
|
||||
})
|
||||
|
@ -1405,20 +1465,7 @@ function default.register_decorations()
|
|||
biomes = {"deciduous_forest"},
|
||||
y_min = 1,
|
||||
y_max = 31000,
|
||||
schematic = {
|
||||
size = {x = 3, y = 3, z = 1},
|
||||
data = {
|
||||
{name = "air", prob = 0},
|
||||
{name = "air", prob = 0},
|
||||
{name = "air", prob = 0},
|
||||
{name = "default:aspen_tree", param2 = 12},
|
||||
{name = "default:aspen_tree", param2 = 12},
|
||||
{name = "default:aspen_tree", param2 = 12, prob = 127},
|
||||
{name = "flowers:mushroom_red", prob = 63},
|
||||
{name = "flowers:mushroom_brown", prob = 63},
|
||||
{name = "air", prob = 0},
|
||||
},
|
||||
},
|
||||
schematic = minetest.get_modpath("default") .. "/schematics/aspen_log.mts",
|
||||
flags = "place_center_x",
|
||||
rotation = "random",
|
||||
})
|
||||
|
@ -1549,7 +1596,7 @@ function default.register_decorations()
|
|||
|
||||
minetest.register_decoration({
|
||||
deco_type = "simple",
|
||||
place_on = {"default:dirt_with_grass"},
|
||||
place_on = {"default:dirt_with_rainforest_litter"},
|
||||
sidelen = 80,
|
||||
fill_ratio = 0.1,
|
||||
biomes = {"rainforest"},
|
||||
|
@ -1585,9 +1632,9 @@ function default.register_decorations()
|
|||
deco_type = "schematic",
|
||||
place_on = {"default:sand"},
|
||||
noise_params = {
|
||||
offset = -0.1,
|
||||
offset = -0.15,
|
||||
scale = 0.1,
|
||||
spread = {x = 200, y = 200, z = 200},
|
||||
spread = {x = 100, y = 100, z = 100},
|
||||
seed = 7013,
|
||||
octaves = 3,
|
||||
persist = 1,
|
||||
|
@ -1610,12 +1657,18 @@ end
|
|||
-- Detect mapgen to select functions
|
||||
--
|
||||
|
||||
minetest.clear_registered_biomes()
|
||||
minetest.clear_registered_ores()
|
||||
minetest.clear_registered_decorations()
|
||||
|
||||
local mg_name = minetest.get_mapgen_setting("mg_name")
|
||||
if mg_name == "v6" then
|
||||
default.register_mgv6_blob_ores()
|
||||
default.register_ores()
|
||||
default.register_mgv6_decorations()
|
||||
else
|
||||
default.register_biomes()
|
||||
default.register_blob_ores()
|
||||
default.register_ores()
|
||||
default.register_decorations()
|
||||
end
|
||||
|
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.7 KiB |
|
@ -44,6 +44,7 @@ default:dirt_with_grass
|
|||
default:dirt_with_grass_footsteps
|
||||
default:dirt_with_dry_grass
|
||||
default:dirt_with_snow
|
||||
default:dirt_with_rainforest_litter
|
||||
|
||||
default:sand
|
||||
default:desert_sand
|
||||
|
@ -182,6 +183,7 @@ default:obsidian_glass
|
|||
default:brick
|
||||
|
||||
default:meselamp
|
||||
default:mese_post_light
|
||||
|
||||
Misc
|
||||
----
|
||||
|
@ -378,13 +380,28 @@ minetest.register_node("default:dirt_with_snow", {
|
|||
tiles = {"default_snow.png", "default_dirt.png",
|
||||
{name = "default_dirt.png^default_snow_side.png",
|
||||
tileable_vertical = false}},
|
||||
groups = {crumbly = 3, soil = 1, spreading_dirt_type = 1},
|
||||
groups = {crumbly = 3, soil = 1, spreading_dirt_type = 1, snowy = 1},
|
||||
drop = 'default:dirt',
|
||||
sounds = default.node_sound_dirt_defaults({
|
||||
footstep = {name = "default_snow_footstep", gain = 0.15},
|
||||
}),
|
||||
})
|
||||
|
||||
minetest.register_node("default:dirt_with_rainforest_litter", {
|
||||
description = "Dirt with Rainforest Litter",
|
||||
tiles = {
|
||||
"default_rainforest_litter.png",
|
||||
"default_dirt.png",
|
||||
{name = "default_dirt.png^default_rainforest_litter_side.png",
|
||||
tileable_vertical = false}
|
||||
},
|
||||
groups = {crumbly = 3, soil = 1, spreading_dirt_type = 1},
|
||||
drop = "default:dirt",
|
||||
sounds = default.node_sound_dirt_defaults({
|
||||
footstep = {name = "default_grass_footstep", gain = 0.4},
|
||||
}),
|
||||
})
|
||||
|
||||
minetest.register_node("default:sand", {
|
||||
description = "Sand",
|
||||
tiles = {"default_sand.png"},
|
||||
|
@ -445,7 +462,7 @@ minetest.register_node("default:snow", {
|
|||
{-0.5, -0.5, -0.5, 0.5, -0.25, 0.5},
|
||||
},
|
||||
},
|
||||
groups = {crumbly = 3, falling_node = 1, puts_out_fire = 1},
|
||||
groups = {crumbly = 3, falling_node = 1, puts_out_fire = 1, snowy = 1},
|
||||
sounds = default.node_sound_dirt_defaults({
|
||||
footstep = {name = "default_snow_footstep", gain = 0.15},
|
||||
dug = {name = "default_snow_footstep", gain = 0.2},
|
||||
|
@ -463,7 +480,7 @@ minetest.register_node("default:snow", {
|
|||
minetest.register_node("default:snowblock", {
|
||||
description = "Snow Block",
|
||||
tiles = {"default_snow.png"},
|
||||
groups = {crumbly = 3, puts_out_fire = 1, cools_lava = 1},
|
||||
groups = {crumbly = 3, puts_out_fire = 1, cools_lava = 1, snowy = 1},
|
||||
sounds = default.node_sound_dirt_defaults({
|
||||
footstep = {name = "default_snow_footstep", gain = 0.15},
|
||||
dug = {name = "default_snow_footstep", gain = 0.2},
|
||||
|
@ -515,7 +532,6 @@ minetest.register_node("default:wood", {
|
|||
minetest.register_node("default:sapling", {
|
||||
description = "Sapling",
|
||||
drawtype = "plantlike",
|
||||
visual_scale = 1.0,
|
||||
tiles = {"default_sapling.png"},
|
||||
inventory_image = "default_sapling.png",
|
||||
wield_image = "default_sapling.png",
|
||||
|
@ -581,7 +597,6 @@ minetest.register_node("default:leaves", {
|
|||
minetest.register_node("default:apple", {
|
||||
description = "Apple",
|
||||
drawtype = "plantlike",
|
||||
visual_scale = 1.0,
|
||||
tiles = {"default_apple.png"},
|
||||
inventory_image = "default_apple.png",
|
||||
paramtype = "light",
|
||||
|
@ -651,7 +666,6 @@ minetest.register_node("default:jungleleaves", {
|
|||
minetest.register_node("default:junglesapling", {
|
||||
description = "Jungle Sapling",
|
||||
drawtype = "plantlike",
|
||||
visual_scale = 1.0,
|
||||
tiles = {"default_junglesapling.png"},
|
||||
inventory_image = "default_junglesapling.png",
|
||||
wield_image = "default_junglesapling.png",
|
||||
|
@ -731,7 +745,6 @@ minetest.register_node("default:pine_needles",{
|
|||
minetest.register_node("default:pine_sapling", {
|
||||
description = "Pine Sapling",
|
||||
drawtype = "plantlike",
|
||||
visual_scale = 1.0,
|
||||
tiles = {"default_pine_sapling.png"},
|
||||
inventory_image = "default_pine_sapling.png",
|
||||
wield_image = "default_pine_sapling.png",
|
||||
|
@ -812,7 +825,6 @@ minetest.register_node("default:acacia_leaves", {
|
|||
minetest.register_node("default:acacia_sapling", {
|
||||
description = "Acacia Tree Sapling",
|
||||
drawtype = "plantlike",
|
||||
visual_scale = 1.0,
|
||||
tiles = {"default_acacia_sapling.png"},
|
||||
inventory_image = "default_acacia_sapling.png",
|
||||
wield_image = "default_acacia_sapling.png",
|
||||
|
@ -891,7 +903,6 @@ minetest.register_node("default:aspen_leaves", {
|
|||
minetest.register_node("default:aspen_sapling", {
|
||||
description = "Aspen Tree Sapling",
|
||||
drawtype = "plantlike",
|
||||
visual_scale = 1.0,
|
||||
tiles = {"default_aspen_sapling.png"},
|
||||
inventory_image = "default_aspen_sapling.png",
|
||||
wield_image = "default_aspen_sapling.png",
|
||||
|
@ -1078,7 +1089,6 @@ minetest.register_node("default:dry_shrub", {
|
|||
description = "Dry Shrub",
|
||||
drawtype = "plantlike",
|
||||
waving = 1,
|
||||
visual_scale = 1.0,
|
||||
tiles = {"default_dry_shrub.png"},
|
||||
inventory_image = "default_dry_shrub.png",
|
||||
wield_image = "default_dry_shrub.png",
|
||||
|
@ -1098,7 +1108,7 @@ minetest.register_node("default:junglegrass", {
|
|||
description = "Jungle Grass",
|
||||
drawtype = "plantlike",
|
||||
waving = 1,
|
||||
visual_scale = 1.3,
|
||||
visual_scale = 1.69,
|
||||
tiles = {"default_junglegrass.png"},
|
||||
inventory_image = "default_junglegrass.png",
|
||||
wield_image = "default_junglegrass.png",
|
||||
|
@ -1222,7 +1232,7 @@ end
|
|||
minetest.register_node("default:bush_stem", {
|
||||
description = "Bush Stem",
|
||||
drawtype = "plantlike",
|
||||
visual_scale = 1.18,
|
||||
visual_scale = 1.41,
|
||||
tiles = {"default_bush_stem.png"},
|
||||
inventory_image = "default_bush_stem.png",
|
||||
wield_image = "default_bush_stem.png",
|
||||
|
@ -1249,7 +1259,7 @@ minetest.register_node("default:bush_leaves", {
|
|||
minetest.register_node("default:acacia_bush_stem", {
|
||||
description = "Acacia Bush Stem",
|
||||
drawtype = "plantlike",
|
||||
visual_scale = 1.18,
|
||||
visual_scale = 1.41,
|
||||
tiles = {"default_acacia_bush_stem.png"},
|
||||
inventory_image = "default_acacia_bush_stem.png",
|
||||
wield_image = "default_acacia_bush_stem.png",
|
||||
|
@ -1618,34 +1628,6 @@ local function get_locked_chest_formspec(pos)
|
|||
return formspec
|
||||
end
|
||||
|
||||
local function has_locked_chest_privilege(meta, player)
|
||||
if player then
|
||||
if minetest.check_player_privs(player, "protection_bypass") then
|
||||
return true
|
||||
end
|
||||
else
|
||||
return false
|
||||
end
|
||||
|
||||
-- is player wielding the right key?
|
||||
local item = player:get_wielded_item()
|
||||
if item:get_name() == "default:key" then
|
||||
local key_meta = minetest.parse_json(item:get_metadata())
|
||||
local secret = meta:get_string("key_lock_secret")
|
||||
if secret ~= key_meta.secret then
|
||||
return false
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
if player:get_player_name() ~= meta:get_string("owner") then
|
||||
return false
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
minetest.register_node("default:chest", {
|
||||
description = "Chest",
|
||||
tiles = {"default_chest_top.png", "default_chest_top.png", "default_chest_side.png",
|
||||
|
@ -1716,26 +1698,23 @@ minetest.register_node("default:chest_locked", {
|
|||
can_dig = function(pos,player)
|
||||
local meta = minetest.get_meta(pos);
|
||||
local inv = meta:get_inventory()
|
||||
return inv:is_empty("main") and has_locked_chest_privilege(meta, player)
|
||||
return inv:is_empty("main") and default.can_interact_with_node(player, pos)
|
||||
end,
|
||||
allow_metadata_inventory_move = function(pos, from_list, from_index,
|
||||
to_list, to_index, count, player)
|
||||
local meta = minetest.get_meta(pos)
|
||||
if not has_locked_chest_privilege(meta, player) then
|
||||
if not default.can_interact_with_node(player, pos) then
|
||||
return 0
|
||||
end
|
||||
return count
|
||||
end,
|
||||
allow_metadata_inventory_put = function(pos, listname, index, stack, player)
|
||||
local meta = minetest.get_meta(pos)
|
||||
if not has_locked_chest_privilege(meta, player) then
|
||||
if not default.can_interact_with_node(player, pos) then
|
||||
return 0
|
||||
end
|
||||
return stack:get_count()
|
||||
end,
|
||||
allow_metadata_inventory_take = function(pos, listname, index, stack, player)
|
||||
local meta = minetest.get_meta(pos)
|
||||
if not has_locked_chest_privilege(meta, player) then
|
||||
if not default.can_interact_with_node(player, pos) then
|
||||
return 0
|
||||
end
|
||||
return stack:get_count()
|
||||
|
@ -1751,8 +1730,7 @@ minetest.register_node("default:chest_locked", {
|
|||
" from locked chest at " .. minetest.pos_to_string(pos))
|
||||
end,
|
||||
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
||||
local meta = minetest.get_meta(pos)
|
||||
if has_locked_chest_privilege(meta, clicker) then
|
||||
if default.can_interact_with_node(clicker, pos) then
|
||||
minetest.show_formspec(
|
||||
clicker:get_player_name(),
|
||||
"default:chest_locked",
|
||||
|
@ -1765,9 +1743,13 @@ minetest.register_node("default:chest_locked", {
|
|||
on_key_use = function(pos, player)
|
||||
local secret = minetest.get_meta(pos):get_string("key_lock_secret")
|
||||
local itemstack = player:get_wielded_item()
|
||||
local key_meta = minetest.parse_json(itemstack:get_metadata())
|
||||
local key_meta = itemstack:get_meta()
|
||||
|
||||
if secret ~= key_meta.secret then
|
||||
if key_meta:get_string("secret") == "" then
|
||||
key_meta:set_string("secret", minetest.parse_json(itemstack:get_metadata()).secret)
|
||||
end
|
||||
|
||||
if secret ~= key_meta:get_string("secret") then
|
||||
return
|
||||
end
|
||||
|
||||
|
@ -2078,6 +2060,27 @@ minetest.register_node("default:meselamp", {
|
|||
light_source = default.LIGHT_MAX,
|
||||
})
|
||||
|
||||
minetest.register_node("default:mese_post_light", {
|
||||
description = "Mese Post Light",
|
||||
tiles = {"default_mese_post_light_top.png", "default_mese_post_light_top.png",
|
||||
"default_mese_post_light_side_dark.png", "default_mese_post_light_side_dark.png",
|
||||
"default_mese_post_light_side.png", "default_mese_post_light_side.png"},
|
||||
wield_image = "default_mese_post_light_side.png",
|
||||
drawtype = "nodebox",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-2 / 16, -8 / 16, -2 / 16, 2 / 16, 8 / 16, 2 / 16},
|
||||
},
|
||||
},
|
||||
paramtype = "light",
|
||||
light_source = default.LIGHT_MAX,
|
||||
sunlight_propagates = true,
|
||||
is_ground_content = false,
|
||||
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
})
|
||||
|
||||
--
|
||||
-- Misc
|
||||
--
|
||||
|
@ -2089,3 +2092,57 @@ minetest.register_node("default:cloud", {
|
|||
sounds = default.node_sound_defaults(),
|
||||
groups = {not_in_creative_inventory = 1},
|
||||
})
|
||||
|
||||
--
|
||||
-- register trees for leafdecay
|
||||
--
|
||||
|
||||
if minetest.get_mapgen_setting("mg_name") == "v6" then
|
||||
default.register_leafdecay({
|
||||
trunks = {"default:tree"},
|
||||
leaves = {"default:apple", "default:leaves"},
|
||||
radius = 2,
|
||||
})
|
||||
|
||||
default.register_leafdecay({
|
||||
trunks = {"default:jungletree"},
|
||||
leaves = {"default:jungleleaves"},
|
||||
radius = 3,
|
||||
})
|
||||
|
||||
default.register_leafdecay({
|
||||
trunks = {"default:pine_tree"},
|
||||
leaves = {"default:pine_needles"},
|
||||
radius = 3,
|
||||
})
|
||||
else
|
||||
default.register_leafdecay({
|
||||
trunks = {"default:tree"},
|
||||
leaves = {"default:apple", "default:leaves"},
|
||||
radius = 3,
|
||||
})
|
||||
|
||||
default.register_leafdecay({
|
||||
trunks = {"default:jungletree"},
|
||||
leaves = {"default:jungleleaves"},
|
||||
radius = 2,
|
||||
})
|
||||
|
||||
default.register_leafdecay({
|
||||
trunks = {"default:pine_tree"},
|
||||
leaves = {"default:pine_needles"},
|
||||
radius = 2,
|
||||
})
|
||||
end
|
||||
|
||||
default.register_leafdecay({
|
||||
trunks = {"default:acacia_tree"},
|
||||
leaves = {"default:acacia_leaves"},
|
||||
radius = 2,
|
||||
})
|
||||
|
||||
default.register_leafdecay({
|
||||
trunks = {"default:aspen_tree"},
|
||||
leaves = {"default:aspen_leaves"},
|
||||
radius = 3,
|
||||
})
|
||||
|
|
Before Width: | Height: | Size: 461 B After Width: | Height: | Size: 459 B |
Before Width: | Height: | Size: 349 B After Width: | Height: | Size: 348 B |
Before Width: | Height: | Size: 288 B After Width: | Height: | Size: 476 B |
Before Width: | Height: | Size: 249 B After Width: | Height: | Size: 444 B |
Before Width: | Height: | Size: 327 B After Width: | Height: | Size: 688 B |
Before Width: | Height: | Size: 209 B After Width: | Height: | Size: 359 B |
Before Width: | Height: | Size: 533 B After Width: | Height: | Size: 579 B |
Before Width: | Height: | Size: 690 B After Width: | Height: | Size: 4.9 KiB |
Before Width: | Height: | Size: 218 B After Width: | Height: | Size: 261 B |
Before Width: | Height: | Size: 252 B After Width: | Height: | Size: 251 B |
Before Width: | Height: | Size: 520 B After Width: | Height: | Size: 761 B |
Before Width: | Height: | Size: 275 B After Width: | Height: | Size: 320 B |
Before Width: | Height: | Size: 526 B After Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 650 B After Width: | Height: | Size: 656 B |
Before Width: | Height: | Size: 222 B After Width: | Height: | Size: 3.9 KiB |
Before Width: | Height: | Size: 202 B After Width: | Height: | Size: 201 B |
Before Width: | Height: | Size: 229 B After Width: | Height: | Size: 228 B |
Before Width: | Height: | Size: 473 B After Width: | Height: | Size: 471 B |
Before Width: | Height: | Size: 149 B After Width: | Height: | Size: 216 B |
Before Width: | Height: | Size: 346 B After Width: | Height: | Size: 351 B |
Before Width: | Height: | Size: 354 B After Width: | Height: | Size: 356 B |
Before Width: | Height: | Size: 227 B After Width: | Height: | Size: 224 B |
Before Width: | Height: | Size: 245 B After Width: | Height: | Size: 428 B |
Before Width: | Height: | Size: 309 B After Width: | Height: | Size: 314 B |
Before Width: | Height: | Size: 267 B After Width: | Height: | Size: 267 B |
Before Width: | Height: | Size: 425 B After Width: | Height: | Size: 423 B |
Before Width: | Height: | Size: 466 B After Width: | Height: | Size: 469 B |
Before Width: | Height: | Size: 377 B After Width: | Height: | Size: 375 B |
Before Width: | Height: | Size: 421 B After Width: | Height: | Size: 422 B |
Before Width: | Height: | Size: 272 B After Width: | Height: | Size: 272 B |
Before Width: | Height: | Size: 160 B After Width: | Height: | Size: 158 B |
Before Width: | Height: | Size: 168 B After Width: | Height: | Size: 167 B |
Before Width: | Height: | Size: 84 B After Width: | Height: | Size: 83 B |
Before Width: | Height: | Size: 236 B After Width: | Height: | Size: 240 B |
Before Width: | Height: | Size: 158 B After Width: | Height: | Size: 157 B |
Before Width: | Height: | Size: 269 B After Width: | Height: | Size: 268 B |
Before Width: | Height: | Size: 357 B After Width: | Height: | Size: 359 B |
Before Width: | Height: | Size: 228 B After Width: | Height: | Size: 225 B |
Before Width: | Height: | Size: 178 B After Width: | Height: | Size: 177 B |