1
0
mirror of https://github.com/sys4-fr/server-nalc.git synced 2025-06-28 06:11:47 +02:00

Update minetestforfun_game, fix maptools

This commit is contained in:
LeMagnesium
2016-11-10 00:01:34 +01:00
parent 783cb0e3d9
commit d40a65244b
92 changed files with 3202 additions and 1803 deletions

View File

@ -1,28 +1,18 @@
Minetest Game mod: default
==========================
See license.txt for license information.
License of source code:
-----------------------
Copyright (C) 2011-2012 celeron55, Perttu Ahola <celeron55@gmail.com>
Authors of source code
----------------------
Originally by celeron55, Perttu Ahola <celeron55@gmail.com> (LGPL 2.1)
Various Minetest developers and contributors (LGPL 2.1)
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.
http://www.gnu.org/licenses/lgpl-2.1.html
License of media (textures and sounds)
--------------------------------------
Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0)
http://creativecommons.org/licenses/by-sa/3.0/
Authors of media files
-----------------------
Authors of media (textures, models and sounds)
----------------------------------------------
Everything not listed in here:
Copyright (C) 2010-2012 celeron55, Perttu Ahola <celeron55@gmail.com>
celeron55, Perttu Ahola <celeron55@gmail.com> (CC BY-SA 3.0)
Cisoun's WTFPL texture pack:
Cisoun's texture pack (CC BY-SA 3.0):
default_jungletree.png
default_lava.png
default_leaves.png
@ -32,49 +22,45 @@ Cisoun's WTFPL texture pack:
default_tree_top.png
default_water.png
Cisoun's conifers mod (WTFPL):
Cisoun's conifers mod (CC BY-SA 3.0):
default_pine_needles.png
Originating from G4JC's Almost MC Texture Pack:
Originating from G4JC's Almost MC Texture Pack (CC BY-SA 3.0):
default_torch.png
default_torch_on_ceiling.png
default_torch_on_floor.png
VanessaE's animated torches (WTFPL):
VanessaE's animated torches (CC BY-SA 3.0):
default_torch_animated.png
default_torch_on_ceiling_animated.png
default_torch_on_floor_animated.png
default_torch_on_floor.png
RealBadAngel's animated water (WTFPL):
RealBadAngel's animated water (CC BY-SA 3.0):
default_water_source_animated.png
default_water_flowing_animated.png
VanessaE (WTFPL):
default_nc_back.png
default_nc_front.png
default_nc_rb.png
default_nc_side.png
VanessaE (CC BY-SA 3.0):
default_desert_sand.png
default_desert_stone.png
default_sand.png
default_mese_crystal.png
default_mese_crystal_fragment.png
Calinou (CC BY-SA):
Calinou (CC BY-SA 3.0):
default_brick.png
default_papyrus.png
default_mineral_copper.png
default_glass_detail.png
default_tool_goldsword.png
MirceaKitsune (WTFPL):
MirceaKitsune (CC BY-SA 3.0):
character.x
Jordach (CC BY-SA 3.0):
character.png
PilzAdam (WTFPL):
PilzAdam (CC BY-SA 3.0):
default_jungleleaves.png
default_junglesapling.png
default_obsidian_glass.png
@ -82,10 +68,10 @@ PilzAdam (WTFPL):
default_mineral_gold.png
default_snowball.png
jojoa1997 (WTFPL):
jojoa1997 (CC BY-SA 3.0):
default_obsidian.png
InfinityProject (WTFPL):
InfinityProject (CC BY-SA 3.0):
default_mineral_diamond.png
Splizard (CC BY-SA 3.0):
@ -106,10 +92,13 @@ paramat (CC BY-SA 3.0):
default_pinetree_top.png
default_pinewood.png
default_acacia_leaves.png
default_acacia_leaves_simple.png
default_acacia_sapling.png
default_acacia_tree.png
default_acacia_tree_top.png
default_acacia_wood.png
default_acacia_bush_stem.png
default_bush_stem.png
default_junglewood.png
default_jungletree_top.png
default_sandstone_brick.png
@ -130,6 +119,7 @@ paramat (CC BY-SA 3.0):
default_grass_side.png
default_snow_side.png
default_mese_block.png
default_silver_sand.png
brunob.santos (CC BY-SA 4.0):
default_desert_cobble.png
@ -156,6 +146,9 @@ BlockMen (CC BY-SA 3.0):
heart.png
gui_*.png
Wuzzy (CC BY-SA 3.0):
default_bookshelf_slot.png (based on default_book.png)
sofar (CC BY-SA 3.0):
default_book_written.png, based on default_book.png
default_aspen_sapling
@ -170,11 +163,12 @@ sofar (WTFPL):
Neuromancer (CC BY-SA 2.0):
default_cobble.png, based on texture by Brane praefect
default_mossycobble.png, based on texture by Brane praefect
Neuromancer (CC BY-SA 3.0):
default_dirt.png
default_furnace_*.png
Gambit (WTFPL):
Gambit (CC BY-SA 3.0):
default_bronze_ingot.png
default_copper_ingot.png
default_copper_lump.png
@ -188,19 +182,35 @@ Gambit (WTFPL):
default_ladder_steel.png
default_sign_wall_wood.png
default_flint.png
default_snow.png
default_snow_side.png
default_snowball.png
asl97 (WTFPL):
asl97 (CC BY-SA 3.0):
default_ice.png
KevDoy (CC BY-SA 3.0)
heart.png
Pithydon (CC BY-SA 3.0)
default_coral_brown.png
default_coral_orange.png
default_coral_skeleton.png
Ferk (CC0 1.0)
default_item_smoke.png
default_item_smoke.ogg, based on sound by http://opengameart.org/users/bart
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/
3: http://www.freesound.org/people/lsprice/sounds/88808/
Mito551 (sounds) (CC BY-SA):
sonictechtonic (CC BY 3.0):
https://www.freesound.org/people/sonictechtonic/sounds/241872/
player_damage.ogg
Mito551 (sounds) (CC BY-SA 3.0):
default_dig_choppy.ogg
default_dig_cracky.ogg
default_dig_crumbly.1.ogg

View File

@ -39,8 +39,6 @@ minetest.register_alias("locked_chest", "default:chest_locked")
minetest.register_alias("cobble", "default:cobble")
minetest.register_alias("mossycobble", "default:mossycobble")
minetest.register_alias("steelblock", "default:steelblock")
minetest.register_alias("nyancat", "default:nyancat")
minetest.register_alias("nyancat_rainbow", "default:nyancat_rainbow")
minetest.register_alias("sapling", "default:sapling")
minetest.register_alias("apple", "default:apple")

View File

@ -42,6 +42,20 @@ minetest.register_craft({
}
})
minetest.register_craft({
output = 'default:wood',
recipe = {
{'default:bush_stem'},
}
})
minetest.register_craft({
output = 'default:acacia_wood',
recipe = {
{'default:acacia_bush_stem'},
}
})
minetest.register_craft({
output = 'default:stick 9',
recipe = {
@ -784,6 +798,15 @@ minetest.register_craft({
}
})
minetest.register_craft({
output = 'default:sandstone_block 9',
recipe = {
{'default:sandstone', 'default:sandstone', 'default:sandstone'},
{'default:sandstone', 'default:sandstone', 'default:sandstone'},
{'default:sandstone', 'default:sandstone', 'default:sandstone'},
}
})
minetest.register_craft({
output = "default:cactus 2",
recipe = {
@ -894,6 +917,15 @@ minetest.register_craft({
}
})
minetest.register_craft({
output = "default:mese_crystal",
recipe = {
{"default:mese_crystal_fragment", "default:mese_crystal_fragment", "default:mese_crystal_fragment"},
{"default:mese_crystal_fragment", "default:mese_crystal_fragment", "default:mese_crystal_fragment"},
{"default:mese_crystal_fragment", "default:mese_crystal_fragment", "default:mese_crystal_fragment"},
}
})
minetest.register_craft({
output = "default:sand",
recipe = {
@ -955,6 +987,15 @@ minetest.register_craft({
}
})
minetest.register_craft({
output = 'default:obsidian_block 9',
recipe = {
{'default:obsidian', 'default:obsidian', 'default:obsidian'},
{'default:obsidian', 'default:obsidian', 'default:obsidian'},
{'default:obsidian', 'default:obsidian', 'default:obsidian'},
}
})
minetest.register_craft({
output = "default:ladder_obsidian 4",
recipe = {
@ -1092,6 +1133,22 @@ minetest.register_craft({
recipe = "default:gold_lump",
})
--
-- Fuels
--
-- Support use of group:tree
minetest.register_craft({
type = "cooking",
output = "default:gold_ingot",
recipe = "default:gold_lump",
})
-- Burn time for all woods are in order of wood density,
-- which is also the order of wood colour darkness:
-- aspen, pine, apple, acacia, jungle
minetest.register_craft({
type = "cooking",
output = "default:mithril_ingot",
@ -1121,6 +1178,8 @@ minetest.register_craft({
burntime = 40,
})
-- Support use of group:wood
minetest.register_craft({
type = "fuel",
recipe = "group:stick",
@ -1157,6 +1216,8 @@ minetest.register_craft({
burntime = 50,
})
-- Support use of group:sapling
minetest.register_craft({
type = "fuel",
recipe = "default:fence_wood",
@ -1181,6 +1242,19 @@ minetest.register_craft({
burntime = 15,
})
minetest.register_craft({
type = "fuel",
recipe = "default:acacia_sapling",
burntime = 11,
})
minetest.register_craft({
type = "fuel",
recipe = "default:junglesapling",
burntime = 12,
})
minetest.register_craft({
type = "fuel",
recipe = "default:fence_aspen_wood",
@ -1211,12 +1285,25 @@ minetest.register_craft({
burntime = 5,
})
minetest.register_craft({
type = "fuel",
recipe = "default:sign_wall_wood",
burntime = 15,
})
minetest.register_craft({
type = "fuel",
recipe = "default:bush_stem",
burntime = 7,
})
minetest.register_craft({
type = "fuel",
recipe = "default:acacia_bush_stem",
burntime = 8,
})
minetest.register_craft({
type = "fuel",
recipe = "default:chest",
@ -1247,6 +1334,18 @@ minetest.register_craft({
burntime = 10,
})
minetest.register_craft({
type = "fuel",
recipe = "default:chest",
burntime = 30,
})
minetest.register_craft({
type = "fuel",
recipe = "default:chest_locked",
burntime = 30,
})
minetest.register_craft({
type = "fuel",
recipe = "default:apple",

View File

@ -4,12 +4,13 @@ minetest.register_craftitem("default:stick", {
description = "Stick",
stack_max = 1000,
inventory_image = "default_stick.png",
groups = {stick = 1},
groups = {stick = 1, flammable = 2},
})
minetest.register_craftitem("default:paper", {
description = "Paper",
inventory_image = "default_paper.png",
groups = {flammable = 3},
})
local lpp = 14 -- Lines per book's page
@ -106,7 +107,9 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
elseif fields.book_next or fields.book_prev then
local data = minetest.deserialize(stack:get_metadata())
if not data.page then return end
if not data or not data.page then
return
end
if fields.book_next then
data.page = data.page + 1
@ -131,14 +134,14 @@ end)
minetest.register_craftitem("default:book", {
description = "Book",
inventory_image = "default_book.png",
groups = {book = 1},
groups = {book = 1, flammable = 3},
on_use = book_on_use,
})
minetest.register_craftitem("default:book_written", {
description = "Book With Text",
inventory_image = "default_book_written.png",
groups = {book = 1, not_in_creative_inventory = 1},
groups = {book = 1, not_in_creative_inventory = 1, flammable = 3},
stack_max = 1,
on_use = book_on_use,
})
@ -175,7 +178,7 @@ end)
minetest.register_craftitem("default:coal_lump", {
description = "Coal Lump",
inventory_image = "default_coal_lump.png",
groups = {coal = 1}
groups = {coal = 1, flammable = 1}
})
minetest.register_craftitem("default:iron_lump", {

View File

@ -95,6 +95,19 @@ function default.node_sound_glass_defaults(table)
return table
end
function default.node_sound_metal_defaults(table)
table = table or {}
table.footstep = table.footstep or
{name = "default_metal_footstep", gain = 0.5}
table.dig = table.dig or
{name = "default_dig_metal", gain = 0.5}
table.dug = table.dug or
{name = "default_dug_metal", gain = 0.5}
table.place = table.place or
{name = "default_place_node_metal", gain = 0.5}
default.node_sound_defaults(table)
return table
end
--
-- Lavacooling
@ -126,6 +139,7 @@ minetest.register_abm({
--
-- optimized helper to put all items in an inventory into a drops list
--
function default.get_inventory_drops(pos, inventory, drops)
local inv = minetest.get_meta(pos):get_inventory()
local n = #drops
@ -230,6 +244,7 @@ end
--
-- Fence registration helper
--
function default.register_fence(name, def)
minetest.register_craft({
output = name .. " 4",
@ -287,16 +302,7 @@ end
-- Leafdecay
--
default.leafdecay_trunk_cache = {}
default.leafdecay_enable_cache = true
-- Spread the load of finding trunks
default.leafdecay_trunk_find_allow_accumulator = 0
minetest.register_globalstep(function(dtime)
local finds_per_second = 5000
default.leafdecay_trunk_find_allow_accumulator =
math.floor(dtime * finds_per_second)
end)
-- Prevent decay of placed leaves
default.after_place_leaves = function(pos, placer, itemstack, pointed_thing)
if placer and not placer:get_player_control().sneak then
@ -306,85 +312,44 @@ 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", "group:liquid"},
-- A low interval and a high inverse chance spreads the load
neighbors = {"air"},
interval = 2,
chance = 5,
chance = 10,
catch_up = false,
action = function(p0, node, _, _)
--print("leafdecay ABM at "..p0.x..", "..p0.y..", "..p0.z..")")
local do_preserve = false
local d = minetest.registered_nodes[node.name].groups.leafdecay
if not d or d == 0 then
--print("not groups.leafdecay")
action = function(pos, node, _, _)
-- Check if leaf is placed
if node.param2 ~= 0 then
return
end
local n0 = minetest.get_node(p0)
if n0.param2 ~= 0 then
--print("param2 ~= 0")
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
local p0_hash = nil
if default.leafdecay_enable_cache then
p0_hash = minetest.hash_node_position(p0)
local trunkp = default.leafdecay_trunk_cache[p0_hash]
if trunkp then
local n = minetest.get_node(trunkp)
local reg = minetest.registered_nodes[n.name]
-- Assume ignore is a trunk, to make the thing
-- work at the border of the active area
if n.name == "ignore" or (reg and reg.groups.tree and
reg.groups.tree ~= 0) then
--print("cached trunk still exists")
return
end
--print("cached trunk is invalid")
-- Cache is invalid
table.remove(default.leafdecay_trunk_cache, p0_hash)
-- 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)
end
end
if default.leafdecay_trunk_find_allow_accumulator <= 0 then
return
end
default.leafdecay_trunk_find_allow_accumulator =
default.leafdecay_trunk_find_allow_accumulator - 1
-- Assume ignore is a trunk, to make the thing
-- work at the border of the active area
local p1
if n0.name == "moretrees:palm_leaves" then
p1 = minetest.find_node_near(p0, d, {"ignore", "moretrees:palm_trunk"})
else
p1 = minetest.find_node_near(p0, d, {"ignore", "group:tree"})
end
if p1 then
do_preserve = true
if default.leafdecay_enable_cache then
--print("caching trunk")
-- Cache the trunk
default.leafdecay_trunk_cache[p0_hash] = p1
end
end
if not do_preserve then
-- Drop stuff other than the node itself
local itemstacks = minetest.get_node_drops(n0.name)
for _, itemname in ipairs(itemstacks) do
if minetest.get_item_group(n0.name, "leafdecay_drop") ~= 0 or
itemname ~= n0.name then
local p_drop = {
x = p0.x - 0.5 + math.random(),
y = p0.y - 0.5 + math.random(),
z = p0.z - 0.5 + math.random(),
}
minetest.add_item(p_drop, itemname)
end
end
-- Remove node
minetest.remove_node(p0)
nodeupdate(p0)
end
-- Remove node
minetest.remove_node(pos)
nodeupdate(pos)
end
})
@ -405,39 +370,30 @@ minetest.register_abm({
"default:snow",
},
interval = 6,
chance = 67,
chance = 50,
catch_up = false,
action = function(pos, node)
-- Most likely case, half the time it's too dark for this.
-- Check for darkness: night, shadow or under a light-blocking node
-- Returns if ignore above
local above = {x = pos.x, y = pos.y + 1, z = pos.z}
if (minetest.get_node_light(above) or 0) < 13 then
return
end
-- Look for likely neighbors.
local p2 = minetest.find_node_near(pos, 1, {"default:dirt_with_grass",
"default:dirt_with_dry_grass", "default:dirt_with_snow"})
-- Look for spreading dirt-type neighbours
local p2 = minetest.find_node_near(pos, 1, "group:spreading_dirt_type")
if p2 then
-- But the node needs to be under air in this case.
local n2 = minetest.get_node(above)
if n2 and n2.name == "air" then
local n3 = minetest.get_node(p2)
minetest.set_node(pos, {name = n3.name})
return
end
end
-- Anything on top?
local n2 = minetest.get_node(above)
if not n2 then
local n3 = minetest.get_node(p2)
minetest.set_node(pos, {name = n3.name})
return
end
local name = n2.name
-- Snow check is cheapest, so comes first.
-- Else, any seeding nodes on top?
local name = minetest.get_node(above).name
-- Snow check is cheapest, so comes first
if name == "default:snow" then
minetest.set_node(pos, {name = "default:dirt_with_snow"})
-- Most likely case first.
-- Most likely case first
elseif minetest.get_item_group(name, "grass") ~= 0 then
minetest.set_node(pos, {name = "default:dirt_with_grass"})
elseif minetest.get_item_group(name, "dry_grass") ~= 0 then
@ -446,17 +402,14 @@ minetest.register_abm({
end
})
--
-- Grass and dry grass removed in darkness
--
minetest.register_abm({
label = "Grass covered",
nodenames = {
"default:dirt_with_grass",
"default:dirt_with_dry_grass",
"default:dirt_with_snow",
},
nodenames = {"group:spreading_dirt_type"},
interval = 8,
chance = 50,
catch_up = false,

View File

@ -22,6 +22,8 @@ local function active_formspec(fuel_percent, item_percent)
"listring[current_player;main]"..
"listring[current_name;src]"..
"listring[current_player;main]"..
"listring[current_name;fuel]"..
"listring[current_player;main]"..
default.get_hotbar_bg(0, 4.25)
return formspec
end
@ -42,6 +44,8 @@ local inactive_formspec =
"listring[current_player;main]"..
"listring[current_name;src]"..
"listring[current_player;main]"..
"listring[current_name;fuel]"..
"listring[current_player;main]"..
default.get_hotbar_bg(0, 4.25)
--
@ -175,7 +179,11 @@ local function furnace_node_timer(pos, elapsed)
local item_percent = 0
if cookable then
item_percent = math.floor(src_time / cooked.time * 100)
item_state = item_percent .. "%"
if item_percent > 100 then
item_state = "100% (output full)"
else
item_state = item_percent .. "%"
end
else
if srclist[1]:is_empty() then
item_state = "Empty"

View File

@ -35,14 +35,17 @@ default.gui_survival_form = "size[8,8.5]"..
default.get_hotbar_bg(0,4.25)
-- Load files
dofile(minetest.get_modpath("default").."/functions.lua")
dofile(minetest.get_modpath("default").."/trees.lua")
dofile(minetest.get_modpath("default").."/nodes.lua")
dofile(minetest.get_modpath("default").."/furnace.lua")
dofile(minetest.get_modpath("default").."/tools.lua")
dofile(minetest.get_modpath("default").."/craftitems.lua")
dofile(minetest.get_modpath("default").."/crafting.lua")
dofile(minetest.get_modpath("default").."/mapgen.lua")
dofile(minetest.get_modpath("default").."/player.lua")
dofile(minetest.get_modpath("default").."/aliases.lua")
dofile(minetest.get_modpath("default").."/legacy.lua")
local default_path = minetest.get_modpath("default")
dofile(default_path.."/functions.lua")
dofile(default_path.."/trees.lua")
dofile(default_path.."/nodes.lua")
dofile(default_path.."/furnace.lua")
dofile(default_path.."/tools.lua")
dofile(default_path.."/item_entity.lua")
dofile(default_path.."/craftitems.lua")
dofile(default_path.."/crafting.lua")
dofile(default_path.."/mapgen.lua")
dofile(default_path.."/player.lua")
dofile(default_path.."/aliases.lua")
dofile(default_path.."/legacy.lua")

View File

@ -0,0 +1,74 @@
-- mods/default/item_entity.lua
local builtin_item = minetest.registered_entities["__builtin:item"]
local item = {
set_item = function(self, itemstring)
builtin_item.set_item(self, itemstring)
local stack = ItemStack(itemstring)
local itemdef = minetest.registered_items[stack:get_name()]
if itemdef and itemdef.groups.flammable ~= 0 then
self.flammable = itemdef.groups.flammable
end
end,
burn_up = function(self)
-- disappear in a smoke puff
self.object:remove()
local p = self.object:getpos()
minetest.sound_play("default_item_smoke", {
pos = p,
max_hear_distance = 8,
})
minetest.add_particlespawner({
amount = 3,
time = 0.1,
minpos = {x = p.x - 0.1, y = p.y + 0.1, z = p.z - 0.1 },
maxpos = {x = p.x + 0.1, y = p.y + 0.2, z = p.z + 0.1 },
minvel = {x = 0, y = 2.5, z = 0},
maxvel = {x = 0, y = 2.5, z = 0},
minacc = {x = -0.15, y = -0.02, z = -0.15},
maxacc = {x = 0.15, y = -0.01, z = 0.15},
minexptime = 4,
maxexptime = 6,
minsize = 5,
maxsize = 5,
collisiondetection = true,
texture = "default_item_smoke.png"
})
end,
on_step = function(self, dtime)
builtin_item.on_step(self, dtime)
if self.flammable then
-- flammable, check for igniters
self.ignite_timer = (self.ignite_timer or 0) + dtime
if self.ignite_timer > 10 then
self.ignite_timer = 0
local node = minetest.get_node_or_nil(self.object:getpos())
if not node then
return
end
-- Immediately burn up flammable items in lava
if minetest.get_item_group(node.name, "lava") > 0 then
self:burn_up()
else
-- otherwise there'll be a chance based on its igniter value
local burn_chance = self.flammable
* minetest.get_item_group(node.name, "igniter")
if burn_chance > 0 and math.random(0, burn_chance) ~= 0 then
self:burn_up()
end
end
end
end
end,
}
-- set defined item as new __builtin:item, with the old one as fallback table
setmetatable(item, builtin_item)
minetest.register_entity(":__builtin:item", item)

View File

@ -1,6 +1,6 @@
-- mods/default/legacy.lua
-- Horrible crap to support old code registering falling nodes
-- Horrible stuff to support old code registering falling nodes
-- Don't use this and never do what this does, it's completely wrong!
-- (More specifically, the client and the C++ code doesn't get the group)
function default.register_falling_node(nodename, texture)

View File

@ -0,0 +1,171 @@
License of source code
----------------------
GNU Lesser General Public License, version 2.1
Copyright (C) 2011-2016 celeron55, Perttu Ahola <celeron55@gmail.com>
Copyright (C) 2011-2016 Various Minetest developers and contributors
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:
https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html
Licenses of media (textures, models and sounds)
-----------------------------------------------
Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0)
Copyright (C) 2010-2016:
celeron55, Perttu Ahola <celeron55@gmail.com>
Cisoun
G4JC
VanessaE
RealBadAngel
Calinou
MirceaKitsune
Jordach
PilzAdam
jojoa1997
InfinityProject
Splizard
Zeg9
paramat
BlockMen
sofar
Neuromancer
Gambit
asl97
KevDoy
Mito551
You are free to:
Share — copy and redistribute the material in any medium or format.
Adapt — remix, transform, and build upon the material for any purpose, even commercially.
The licensor cannot revoke these freedoms as long as you follow the license terms.
Under the following terms:
Attribution — You must give appropriate credit, provide a link to the license, and
indicate if changes were made. You may do so in any reasonable manner, but not in any way
that suggests the licensor endorses you or your use.
ShareAlike — If you remix, transform, or build upon the material, you must distribute
your contributions under the same license as the original.
No additional restrictions — You may not apply legal terms or technological measures that
legally restrict others from doing anything the license permits.
Notices:
You do not have to comply with the license for elements of the material in the public
domain or where your use is permitted by an applicable exception or limitation.
No warranties are given. The license may not give you all of the permissions necessary
for your intended use. For example, other rights such as publicity, privacy, or moral
rights may limit how you use the material.
For more details:
http://creativecommons.org/licenses/by-sa/3.0/
-----------------------
Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)
Copyright (C) 2014-2016 brunob.santos
You are free to:
Share — copy and redistribute the material in any medium or format.
Adapt — remix, transform, and build upon the material for any purpose, even commercially.
The licensor cannot revoke these freedoms as long as you follow the license terms.
Under the following terms:
Attribution — You must give appropriate credit, provide a link to the license, and
indicate if changes were made. You may do so in any reasonable manner, but not in any way
that suggests the licensor endorses you or your use.
ShareAlike — If you remix, transform, or build upon the material, you must distribute
your contributions under the same license as the original.
No additional restrictions — You may not apply legal terms or technological measures that
legally restrict others from doing anything the license permits.
Notices:
You do not have to comply with the license for elements of the material in the public
domain or where your use is permitted by an applicable exception or limitation.
No warranties are given. The license may not give you all of the permissions necessary
for your intended use. For example, other rights such as publicity, privacy, or moral
rights may limit how you use the material.
For more details:
http://creativecommons.org/licenses/by-sa/4.0/
-----------------------
Attribution-ShareAlike 2.0 Generic (CC BY-SA 2.0)
Copyright (C) 2014-2016 Neuromancer
You are free to:
Share — copy and redistribute the material in any medium or format.
Adapt — remix, transform, and build upon the material for any purpose, even commercially.
The licensor cannot revoke these freedoms as long as you follow the license terms.
Under the following terms:
Attribution — You must give appropriate credit, provide a link to the license, and
indicate if changes were made. You may do so in any reasonable manner, but not in any way
that suggests the licensor endorses you or your use.
ShareAlike — If you remix, transform, or build upon the material, you must distribute
your contributions under the same license as the original.
No additional restrictions — You may not apply legal terms or technological measures that
legally restrict others from doing anything the license permits.
Notices:
You do not have to comply with the license for elements of the material in the public
domain or where your use is permitted by an applicable exception or limitation.
No warranties are given. The license may not give you all of the permissions necessary
for your intended use. For example, other rights such as publicity, privacy, or moral
rights may limit how you use the material.
For more details:
http://creativecommons.org/licenses/by-sa/2.0/
-----------------------
Attribution 3.0 Unported (CC BY 3.0)
Copyright (C) 2009 cmusounddesign
Copyright (C) 2010 Tomlija
Copyright (C) 2010 lsprice
Copyright (C) 2014 sonictechtonic
You are free to:
Share — copy and redistribute the material in any medium or format.
Adapt — remix, transform, and build upon the material for any purpose, even commercially.
The licensor cannot revoke these freedoms as long as you follow the license terms.
Under the following terms:
Attribution — You must give appropriate credit, provide a link to the license, and
indicate if changes were made. You may do so in any reasonable manner, but not in any way
that suggests the licensor endorses you or your use.
No additional restrictions — You may not apply legal terms or technological measures that
legally restrict others from doing anything the license permits.
Notices:
You do not have to comply with the license for elements of the material in the public
domain or where your use is permitted by an applicable exception or limitation.
No warranties are given. The license may not give you all of the permissions necessary
for your intended use. For example, other rights such as publicity, privacy, or moral
rights may limit how you use the material.
For more details:
http://creativecommons.org/licenses/by/3.0/

View File

@ -240,8 +240,6 @@ function default.register_ores()
y_min = -30000,
})
-- Mese
minetest.register_ore({
ore_type = "scatter",
ore = "default:stone_with_mese",
@ -1824,73 +1822,16 @@ function default.register_decorations()
end
--
-- Generate nyan cats
--
-- All mapgens except singlenode
function default.make_nyancat(pos, facedir, length)
local tailvec = {x = 0, y = 0, z = 0}
if facedir == 0 then
tailvec.z = 1
elseif facedir == 1 then
tailvec.x = 1
elseif facedir == 2 then
tailvec.z = -1
elseif facedir == 3 then
tailvec.x = -1
else
facedir = 0
tailvec.z = 1
end
local p = {x = pos.x, y = pos.y, z = pos.z}
minetest.set_node(p, {name = "default:nyancat", param2 = facedir})
for i = 1, length do
p.x = p.x + tailvec.x
p.z = p.z + tailvec.z
minetest.set_node(p, {name = "default:nyancat_rainbow", param2 = facedir})
end
end
function default.generate_nyancats(minp, maxp, seed)
local height_min = -19600
local height_max = 30000
if maxp.y < height_min or minp.y > height_max then
return
end
local y_min = math.max(minp.y, height_min)
local y_max = math.min(maxp.y, height_max)
local volume = (maxp.x - minp.x + 1) * (y_max - y_min + 1) * (maxp.z - minp.z + 1)
local pr = PseudoRandom(seed + 9324342)
local max_num_nyancats = math.floor(volume / (16 * 16 * 16))
for i = 1, max_num_nyancats do
if pr:next(0, 1000) == 0 then
local x0 = pr:next(minp.x, maxp.x)
local y0 = pr:next(minp.y, maxp.y)
local z0 = pr:next(minp.z, maxp.z)
local p0 = {x = x0, y = y0, z = z0}
default.make_nyancat(p0, pr:next(0, 3), pr:next(10, 15))
end
end
end
--
-- Detect mapgen to select functions
--
-- Mods using singlenode mapgen can call these functions to enable
-- the use of minetest.generate_ores or minetest.generate_decorations
local mg_params = minetest.get_mapgen_params()
if mg_params.mgname == "v6" then
local mg_name = minetest.get_mapgen_setting("mg_name")
if mg_name == "v6" then
default.register_ores()
default.register_mgv6_decorations()
minetest.register_on_generated(default.generate_nyancats)
elseif mg_params.mgname ~= "singlenode" then
else
default.register_biomes()
default.register_ores()
default.register_decorations()
minetest.register_on_generated(default.generate_nyancats)
end

View File

@ -48,6 +48,7 @@ default:dirt_with_snow
default:sand
default:desert_sand
default:silver_sand
default:gravel
@ -135,8 +136,8 @@ default:diamondblock
default:stone_with_coin
Plantlife (non-cubic)
---------------------
Plantlife
---------
default:cactus
default:papyrus
@ -155,6 +156,18 @@ default:dry_grass_3
default:dry_grass_4
default:dry_grass_5
default:bush_stem
default:bush_leaves
default:acacia_bush_stem
default:acacia_bush_leaves
Corals
------
default:coral_brown
default:coral_orange
default:coral_skeleton
Liquids
-------
(1. Source 2. Flowing)
@ -214,8 +227,6 @@ Misc
----
default:cloud
default:nyancat
default:nyancat_rainbow
--]]
@ -272,12 +283,6 @@ minetest.register_node("default:mossycobble", {
tiles = {"default_mossycobble.png"},
is_ground_content = false,
groups = {cracky = 3, stone = 1},
drop = {
items = {
{items = {"default:mossycobble"}},
--{items = {"maptools:silver_coin"}, rarity = 64},
},
},
sounds = default.node_sound_stone_defaults(),
})
@ -407,7 +412,7 @@ minetest.register_node("default:dirt_with_grass", {
tiles = {"default_grass.png", "default_dirt.png",
{name = "default_dirt.png^default_grass_side.png",
tileable_vertical = false}},
groups = {crumbly = 3, soil = 1},
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.25},
@ -432,7 +437,7 @@ minetest.register_node("default:dirt_with_dry_grass", {
"default_dirt.png",
{name = "default_dirt.png^default_dry_grass_side.png",
tileable_vertical = false}},
groups = {crumbly = 3, soil = 1},
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},
@ -444,7 +449,7 @@ 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},
groups = {crumbly = 3, soil = 1, spreading_dirt_type = 1},
drop = {
items = {
{items = {"default:dirt"}},
@ -460,23 +465,19 @@ minetest.register_node("default:sand", {
description = "Sand",
tiles = {"default_sand.png"},
groups = {crumbly = 3, falling_node = 1, sand = 1},
is_ground_content = true,
drop = {
items = {
{items = {"default:sand"}},
},
},
sounds = default.node_sound_sand_defaults(),
})
minetest.register_node("default:desert_sand", {
description = "Desert Sand",
tiles = {"default_desert_sand.png"},
drop = {
items = {
{items = {"default:desert_sand"}},
},
},
groups = {crumbly = 3, falling_node = 1, sand = 1},
sounds = default.node_sound_sand_defaults(),
})
minetest.register_node("default:silver_sand", {
description = "Silver Sand",
tiles = {"default_silver_sand.png"},
groups = {crumbly = 3, falling_node = 1, sand = 1},
sounds = default.node_sound_sand_defaults(),
})
@ -560,6 +561,13 @@ minetest.register_node("default:snowblock", {
dug = {name = "default_snow_footstep", gain = 0.2},
dig = {name = "default_snow_footstep", gain = 0.2}
}),
on_construct = function(pos)
pos.y = pos.y - 1
if minetest.get_node(pos).name == "default:dirt_with_grass" then
minetest.set_node(pos, {name = "default:dirt_with_snow"})
end
end,
})
minetest.register_node("default:ice", {
@ -592,7 +600,7 @@ minetest.register_node("default:wood", {
place_param2 = 0,
tiles = {"default_wood.png"},
is_ground_content = false,
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 3, wood = 1},
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2, wood = 1},
sounds = default.node_sound_wood_defaults(),
})
@ -609,7 +617,7 @@ minetest.register_node("default:sapling", {
on_timer = default.grow_sapling,
selection_box = {
type = "fixed",
fixed = {-0.3, -0.5, -0.3, 0.3, 0.35, 0.3}
fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 7 / 16, 4 / 16}
},
groups = {snappy = 2, dig_immediate = 3, flammable = 2,
attached_node = 1, sapling = 1},
@ -637,7 +645,6 @@ minetest.register_node("default:leaves", {
description = "Leaves",
drawtype = "allfaces_optional",
waving = 1,
visual_scale = 1.3,
tiles = {"default_leaves.png"},
special_tiles = {"default_leaves_simple.png"},
paramtype = "light",
@ -675,7 +682,7 @@ minetest.register_node("default:apple", {
is_ground_content = false,
selection_box = {
type = "fixed",
fixed = {-0.2, -0.5, -0.2, 0.2, 0, 0.2}
fixed = {-3 / 16, -7 / 16, -3 / 16, 3 / 16, 4 / 16, 3 / 16}
},
groups = {fleshy = 3, dig_immediate = 3, flammable = 2,
leafdecay = 3, leafdecay_drop = 1},
@ -708,7 +715,7 @@ minetest.register_node("default:junglewood", {
place_param2 = 0,
tiles = {"default_junglewood.png"},
is_ground_content = false,
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 3, wood = 1},
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2, wood = 1},
sounds = default.node_sound_wood_defaults(),
})
@ -716,7 +723,6 @@ minetest.register_node("default:jungleleaves", {
description = "Jungle Leaves",
drawtype = "allfaces_optional",
waving = 1,
visual_scale = 1.3,
tiles = {"default_jungleleaves.png"},
special_tiles = {"default_jungleleaves_simple.png"},
paramtype = "light",
@ -747,7 +753,7 @@ minetest.register_node("default:junglesapling", {
on_timer = default.grow_sapling,
selection_box = {
type = "fixed",
fixed = {-0.3, -0.5, -0.3, 0.3, 0.35, 0.3}
fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 7 / 16, 4 / 16}
},
groups = {snappy = 2, dig_immediate = 3, flammable = 2,
attached_node = 1, sapling = 1},
@ -778,7 +784,7 @@ minetest.register_node("default:pine_tree", {
"default_pine_tree.png"},
paramtype2 = "facedir",
is_ground_content = false,
groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
groups = {tree = 1, choppy = 3, oddly_breakable_by_hand = 1, flammable = 3},
sounds = default.node_sound_wood_defaults(),
on_place = minetest.rotate_node
@ -790,14 +796,13 @@ minetest.register_node("default:pine_wood", {
place_param2 = 0,
tiles = {"default_pine_wood.png"},
is_ground_content = false,
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 3, wood = 1},
groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3, wood = 1},
sounds = default.node_sound_wood_defaults(),
})
minetest.register_node("default:pine_needles",{
description = "Pine Needles",
drawtype = "allfaces_optional",
visual_scale = 1.3,
tiles = {"default_pine_needles.png"},
waving = 1,
paramtype = "light",
@ -828,9 +833,9 @@ minetest.register_node("default:pine_sapling", {
on_timer = default.grow_sapling,
selection_box = {
type = "fixed",
fixed = {-0.3, -0.5, -0.3, 0.3, 0.35, 0.3}
fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 7 / 16, 4 / 16}
},
groups = {snappy = 2, dig_immediate = 3, flammable = 2,
groups = {snappy = 2, dig_immediate = 3, flammable = 3,
attached_node = 1, sapling = 1},
sounds = default.node_sound_leaves_defaults(),
@ -871,15 +876,15 @@ minetest.register_node("default:acacia_wood", {
place_param2 = 0,
tiles = {"default_acacia_wood.png"},
is_ground_content = false,
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 3, wood = 1},
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2, wood = 1},
sounds = default.node_sound_wood_defaults(),
})
minetest.register_node("default:acacia_leaves", {
description = "Acacia Leaves",
drawtype = "allfaces_optional",
visual_scale = 1.3,
tiles = {"default_acacia_leaves.png"},
special_tiles = {"default_acacia_leaves_simple.png"},
waving = 1,
paramtype = "light",
is_ground_content = false,
@ -909,7 +914,7 @@ minetest.register_node("default:acacia_sapling", {
on_timer = default.grow_sapling,
selection_box = {
type = "fixed",
fixed = {-0.3, -0.5, -0.3, 0.3, 0.35, 0.3}
fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 7 / 16, 4 / 16}
},
groups = {snappy = 2, dig_immediate = 3, flammable = 2,
attached_node = 1, sapling = 1},
@ -939,7 +944,7 @@ minetest.register_node("default:aspen_tree", {
"default_aspen_tree.png"},
paramtype2 = "facedir",
is_ground_content = false,
groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
groups = {tree = 1, choppy = 3, oddly_breakable_by_hand = 1, flammable = 3},
sounds = default.node_sound_wood_defaults(),
on_place = minetest.rotate_node
@ -951,14 +956,13 @@ minetest.register_node("default:aspen_wood", {
place_param2 = 0,
tiles = {"default_aspen_wood.png"},
is_ground_content = false,
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 3, wood = 1},
groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3, wood = 1},
sounds = default.node_sound_wood_defaults(),
})
minetest.register_node("default:aspen_leaves", {
description = "Aspen Leaves",
drawtype = "allfaces_optional",
visual_scale = 1.3,
tiles = {"default_aspen_leaves.png"},
waving = 1,
paramtype = "light",
@ -986,13 +990,12 @@ minetest.register_node("default:aspen_sapling", {
paramtype = "light",
sunlight_propagates = true,
walkable = false,
is_ground_content = true,
on_timer = default.grow_sapling,
selection_box = {
type = "fixed",
fixed = {-0.3, -0.5, -0.3, 0.3, 0.35, 0.3}
fixed = {-3 / 16, -0.5, -3 / 16, 3 / 16, 0.5, 3 / 16}
},
groups = {snappy = 2, dig_immediate = 3, flammable = 2,
groups = {snappy = 2, dig_immediate = 3, flammable = 3,
attached_node = 1, sapling = 1},
sounds = default.node_sound_leaves_defaults(),
@ -1163,14 +1166,13 @@ minetest.register_node("default:steelblock", {
tiles = {"default_steel_block.png"},
is_ground_content = false,
groups = {cracky = 1, level = 2},
sounds = default.node_sound_stone_defaults(),
sounds = default.node_sound_metal_defaults(),
})
minetest.register_node("default:stone_with_copper", {
description = "Copper Ore",
tiles = {"default_stone.png^default_mineral_copper.png"},
is_ground_content = true,
groups = {cracky = 2},
drop = {
items = {
@ -1202,7 +1204,7 @@ minetest.register_node("default:copperblock", {
tiles = {"default_copper_block.png"},
is_ground_content = false,
groups = {cracky = 1, level = 2},
sounds = default.node_sound_stone_defaults(),
sounds = default.node_sound_metal_defaults(),
})
minetest.register_node("default:bronzeblock", {
@ -1210,7 +1212,7 @@ minetest.register_node("default:bronzeblock", {
tiles = {"default_bronze_block.png"},
is_ground_content = false,
groups = {cracky = 1, level = 2},
sounds = default.node_sound_stone_defaults(),
sounds = default.node_sound_metal_defaults(),
})
minetest.register_node("default:stone_with_tin", {
@ -1307,13 +1309,6 @@ minetest.register_node("default:mese", {
description = "Mese Block",
tiles = {"default_mese_block.png"},
paramtype = "light",
is_ground_content = true,
drop = {
items = {
{items = {"default:mese"}},
-- {items = {"maptools:silver_coin"}, rarity = 32},
},
},
groups = {cracky = 1, level = 2},
sounds = default.node_sound_stone_defaults(),
light_source = 3,
@ -1363,7 +1358,7 @@ minetest.register_node("default:goldblock", {
tiles = {"default_gold_block.png"},
is_ground_content = false,
groups = {cracky = 1},
sounds = default.node_sound_stone_defaults(),
sounds = default.node_sound_metal_defaults(),
})
minetest.register_node("default:stone_with_mithril", {
@ -1479,7 +1474,7 @@ minetest.register_node("default:papyrus", {
walkable = false,
selection_box = {
type = "fixed",
fixed = {-0.3, -0.5, -0.3, 0.3, 0.5, 0.3}
fixed = {-6 / 16, -0.5, -6 / 16, 6 / 16, 0.5, 6 / 16},
},
groups = {snappy = 3, flammable = 2},
sounds = default.node_sound_leaves_defaults(),
@ -1505,7 +1500,7 @@ minetest.register_node("default:dry_shrub", {
sounds = default.node_sound_leaves_defaults(),
selection_box = {
type = "fixed",
fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},
fixed = {-5 / 16, -0.5, -5 / 16, 5 / 16, 4 / 16, 5 / 16},
},
})
@ -1521,11 +1516,11 @@ minetest.register_node("default:junglegrass", {
sunlight_propagates = true,
walkable = false,
buildable_to = true,
groups = {snappy = 3, flammable = 2, flora = 1, attached_node = 1, grass = 1},
groups = {snappy = 3, flora = 1, attached_node = 1, grass = 1, flammable = 1},
sounds = default.node_sound_leaves_defaults(),
selection_box = {
type = "fixed",
fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},
fixed = {-7 / 16, -0.5, -7 / 16, 7 / 16, 1.19, 7 / 16},
},
})
@ -1546,7 +1541,7 @@ minetest.register_node("default:grass_1", {
sounds = default.node_sound_leaves_defaults(),
selection_box = {
type = "fixed",
fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},
fixed = {-6 / 16, -0.5, -6 / 16, 6 / 16, -5 / 16, 6 / 16},
},
on_place = function(itemstack, placer, pointed_thing)
@ -1571,12 +1566,12 @@ for i = 2, 5 do
walkable = false,
buildable_to = true,
drop = "default:grass_1",
groups = {snappy = 3, flammable = 3, flora = 1,
attached_node = 1, not_in_creative_inventory = 1, grass = 1},
groups = {snappy = 3, flora = 1, attached_node = 1,
not_in_creative_inventory = 1, grass = 1, flammable = 1},
sounds = default.node_sound_leaves_defaults(),
selection_box = {
type = "fixed",
fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},
fixed = {-6 / 16, -0.5, -6 / 16, 6 / 16, -3 / 16, 6 / 16},
},
})
end
@ -1598,7 +1593,7 @@ minetest.register_node("default:dry_grass_1", {
sounds = default.node_sound_leaves_defaults(),
selection_box = {
type = "fixed",
fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},
fixed = {-6 / 16, -0.5, -6 / 16, 6 / 16, -3 / 16, 6 / 16},
},
on_place = function(itemstack, placer, pointed_thing)
@ -1628,11 +1623,95 @@ for i = 2, 5 do
sounds = default.node_sound_leaves_defaults(),
selection_box = {
type = "fixed",
fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},
fixed = {-6 / 16, -0.5, -6 / 16, 6 / 16, -1 / 16, 6 / 16},
},
})
end
minetest.register_node("default:bush_stem", {
description = "Bush Stem",
drawtype = "plantlike",
visual_scale = 1.18,
tiles = {"default_bush_stem.png"},
inventory_image = "default_bush_stem.png",
wield_image = "default_bush_stem.png",
paramtype = "light",
sunlight_propagates = true,
groups = {choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
sounds = default.node_sound_wood_defaults(),
selection_box = {
type = "fixed",
fixed = {-7 / 16, -0.5, -7 / 16, 7 / 16, 0.54, 7 / 16},
},
})
minetest.register_node("default:bush_leaves", {
description = "Bush Leaves",
drawtype = "allfaces_optional",
waving = 1,
tiles = {"default_leaves_simple.png"},
paramtype = "light",
groups = {snappy = 3, flammable = 2, leaves = 1},
sounds = default.node_sound_leaves_defaults(),
})
minetest.register_node("default:acacia_bush_stem", {
description = "Acacia Bush Stem",
drawtype = "plantlike",
visual_scale = 1.18,
tiles = {"default_acacia_bush_stem.png"},
inventory_image = "default_acacia_bush_stem.png",
wield_image = "default_acacia_bush_stem.png",
paramtype = "light",
sunlight_propagates = true,
groups = {choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
sounds = default.node_sound_wood_defaults(),
selection_box = {
type = "fixed",
fixed = {-7 / 16, -0.5, -7 / 16, 7 / 16, 0.54, 7 / 16},
},
})
minetest.register_node("default:acacia_bush_leaves", {
description = "Acacia Bush Leaves",
drawtype = "allfaces_optional",
waving = 1,
tiles = {"default_acacia_leaves_simple.png"},
paramtype = "light",
groups = {snappy = 3, flammable = 2, leaves = 1},
sounds = default.node_sound_leaves_defaults(),
})
--
-- Corals
--
minetest.register_node("default:coral_brown", {
description = "Brown Coral",
tiles = {"default_coral_brown.png"},
groups = {cracky = 3},
drop = "default:coral_skeleton",
sounds = default.node_sound_stone_defaults(),
})
minetest.register_node("default:coral_orange", {
description = "Orange Coral",
tiles = {"default_coral_orange.png"},
groups = {cracky = 3},
drop = "default:coral_skeleton",
sounds = default.node_sound_stone_defaults(),
})
minetest.register_node("default:coral_skeleton", {
description = "Coral Skeleton",
tiles = {"default_coral_skeleton.png"},
groups = {cracky = 3},
sounds = default.node_sound_stone_defaults(),
})
--
-- Liquids
--
@ -2102,7 +2181,7 @@ minetest.register_node("default:torch", {
groups = {choppy = 2, dig_immediate = 3, flammable = 1, attached_node = 1,
hot = 2},
legacy_wallmounted = true,
sounds = default.node_sound_wood_defaults(),
sounds = default.node_sound_defaults(),
})
@ -2137,7 +2216,7 @@ end
local function has_locked_chest_privilege(meta, player)
local name = ""
if player then
if minetest.check_player_privs(player:get_player_name(), {protection_bypass = true}) then
if minetest.check_player_privs(player, "protection_bypass") then
return true
end
name = player:get_player_name()
@ -2281,6 +2360,18 @@ local bookshelf_formspec =
"listring[current_player;main]" ..
default.get_hotbar_bg(0,2.85)
-- Inventory slots overlay
local bx, by = 0, 0.3
for i = 1, 16 do
if i == 9 then
bx = 0
by = by + 1
end
bookshelf_formspec = bookshelf_formspec ..
"image[" .. bx .. "," .. by .. ";1,1;default_bookshelf_slot.png]"
bx = bx + 1
end
minetest.register_node("default:bookshelf", {
description = "Bookshelf",
tiles = {"default_wood.png", "default_wood.png", "default_wood.png",
@ -2353,7 +2444,6 @@ local function register_sign(material, desc, def)
--local n = minetest.get_node(pos)
local meta = minetest.get_meta(pos)
meta:set_string("formspec", "field[text;;${text}]")
meta:set_string("infotext", "\"\"")
end,
on_receive_fields = function(pos, formname, fields, sender)
--print("Sign at "..minetest.pos_to_string(pos).." got "..dump(fields))
@ -2378,7 +2468,7 @@ register_sign("wood", "Wooden", {
})
register_sign("steel", "Steel", {
sounds = default.node_sound_defaults(),
sounds = default.node_sound_metal_defaults(),
groups = {cracky = 2, attached_node = 1}
})
@ -2446,12 +2536,14 @@ minetest.register_node("default:ladder_steel", {
--wall_side = = <default>
},
groups = {cracky = 2},
sounds = default.node_sound_stone_defaults(),
sounds = default.node_sound_metal_defaults(),
})
default.register_fence("default:fence_wood", {
description = "Wooden Fence",
texture = "default_fence_wood.png",
inventory_image = "default_fence_overlay.png^default_wood.png^default_fence_overlay.png^[makealpha:255,126,126",
wield_image = "default_fence_overlay.png^default_wood.png^default_fence_overlay.png^[makealpha:255,126,126",
material = "default:wood",
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
sounds = default.node_sound_wood_defaults()
@ -2460,6 +2552,8 @@ default.register_fence("default:fence_wood", {
default.register_fence("default:fence_acacia_wood", {
description = "Acacia Fence",
texture = "default_fence_acacia_wood.png",
inventory_image = "default_fence_overlay.png^default_acacia_wood.png^default_fence_overlay.png^[makealpha:255,126,126",
wield_image = "default_fence_overlay.png^default_acacia_wood.png^default_fence_overlay.png^[makealpha:255,126,126",
material = "default:acacia_wood",
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
sounds = default.node_sound_wood_defaults()
@ -2468,6 +2562,8 @@ default.register_fence("default:fence_acacia_wood", {
default.register_fence("default:fence_junglewood", {
description = "Junglewood Fence",
texture = "default_fence_junglewood.png",
inventory_image = "default_fence_overlay.png^default_junglewood.png^default_fence_overlay.png^[makealpha:255,126,126",
wield_image = "default_fence_overlay.png^default_junglewood.png^default_fence_overlay.png^[makealpha:255,126,126",
material = "default:junglewood",
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
sounds = default.node_sound_wood_defaults()
@ -2476,16 +2572,20 @@ default.register_fence("default:fence_junglewood", {
default.register_fence("default:fence_pine_wood", {
description = "Pine Fence",
texture = "default_fence_pine_wood.png",
inventory_image = "default_fence_overlay.png^default_pine_wood.png^default_fence_overlay.png^[makealpha:255,126,126",
wield_image = "default_fence_overlay.png^default_pine_wood.png^default_fence_overlay.png^[makealpha:255,126,126",
material = "default:pine_wood",
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3},
sounds = default.node_sound_wood_defaults()
})
default.register_fence("default:fence_aspen_wood", {
description = "Aspen Fence",
texture = "default_fence_aspen_wood.png",
inventory_image = "default_fence_overlay.png^default_aspen_wood.png^default_fence_overlay.png^[makealpha:255,126,126",
wield_image = "default_fence_overlay.png^default_aspen_wood.png^default_fence_overlay.png^[makealpha:255,126,126",
material = "default:aspen_wood",
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3},
sounds = default.node_sound_wood_defaults()
})
@ -2560,7 +2660,7 @@ minetest.register_node("default:rail", {
-- but how to specify the dimensions for curved and sideways rails?
fixed = {-1/2, -1/2, -1/2, 1/2, -1/2+1/16, 1/2},
},
groups = {bendy = 2, dig_immediate = 2, attached_node = 1,
groups = {dig_immediate = 2, attached_node = 1,
connect_to_raillike = minetest.raillike_group("rail")},
})
@ -2599,34 +2699,3 @@ minetest.register_node("default:cloud", {
sounds = default.node_sound_defaults(),
groups = {not_in_creative_inventory = 1},
})
minetest.register_node("default:nyancat", {
description = "Nyan Cat",
tiles = {"default_nc_side.png", "default_nc_side.png", "default_nc_side.png",
"default_nc_side.png", "default_nc_back.png", "default_nc_front.png"},
paramtype2 = "facedir",
groups = {cracky = 2},
is_ground_content = false,
post_effect_color = {a = 128, r= 255, g= 128, b= 255},
legacy_facedir_simple = true,
sounds = default.node_sound_defaults(),
})
minetest.register_node("default:nyancat_rainbow", {
description = "Nyan Cat Rainbow",
drawtype = "glasslike",
tiles = {
"default_nc_rb.png^[transformR90", "default_nc_rb.png^[transformR90",
"default_nc_rb.png", "default_nc_rb.png"
},
paramtype = "light",
paramtype2 = "facedir",
groups = {cracky = 2},
sunlight_propagate = true,
walkable = false,
use_texture_alpha = true,
climbable = true,
is_ground_content = false,
post_effect_color = {a = 128, r= 255, g= 128, b= 255},
sounds = default.node_sound_defaults(),
})

View File

@ -25,7 +25,6 @@ default.player_register_model("character.b3d", {
walk = { x=168, y=187, },
mine = { x=189, y=198, },
walk_mine = { x=200, y=219, },
-- Extra animations (not currently used by the game).
sit = { x= 81, y=160, },
},
})

Binary file not shown.

After

Width:  |  Height:  |  Size: 476 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 202 B

After

Width:  |  Height:  |  Size: 444 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 688 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 467 B

After

Width:  |  Height:  |  Size: 471 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 216 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 428 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 401 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 358 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 256 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 307 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 527 B

View File

@ -32,6 +32,7 @@ minetest.register_tool("default:pick_wood", {
},
damage_groups = {fleshy=2},
},
groups = {flammable = 2},
})
minetest.register_tool("default:pick_stone", {
description = "Stone Pickaxe",
@ -167,6 +168,7 @@ minetest.register_tool("default:shovel_wood", {
},
damage_groups = {fleshy = 2},
},
groups = {flammable = 2},
})
minetest.register_tool("default:shovel_stone", {
description = "Stone Shovel",
@ -302,6 +304,7 @@ minetest.register_tool("default:axe_wood", {
},
damage_groups = {fleshy = 2},
},
groups = {flammable = 2},
})
minetest.register_tool("default:axe_stone", {
description = "Stone Axe",

View File

@ -27,10 +27,8 @@ end
-- 'is snow nearby' function
local function is_snow_nearby(pos)
return #minetest.find_nodes_in_area(
{x = pos.x - 1, y = pos.y - 1, z = pos.z - 1},
{x = pos.x + 1, y = pos.y + 1, z = pos.z + 1},
{"default:snow", "default:snowblock", "default:dirt_with_snow"}) > 0
return minetest.find_node_near(pos, 1,
{"default:snow", "default:snowblock", "default:dirt_with_snow"})
end
@ -43,8 +41,7 @@ function default.grow_sapling(pos)
return
end
--local mg_name = minetest.get_mapgen_setting("mg_name") --new function in > 0.4.14 stable ???
local mg_name = minetest.get_mapgen_params().mgname
local mg_name = minetest.get_mapgen_setting("mg_name")
local node = minetest.get_node(pos)
if node.name == "default:sapling" then
minetest.log("action", "A sapling grows into a tree at "..
@ -429,6 +426,7 @@ function default.grow_new_aspen_tree(pos)
path, "0", nil, false)
end
--
-- Sapling 'on place' function to check protection of node and resulting tree volume
--
@ -437,12 +435,17 @@ function default.sapling_on_place(itemstack, placer, pointed_thing,
sapling_name, minp_relative, maxp_relative, interval)
-- Position of sapling
local pos = pointed_thing.under
local node = minetest.get_node(pos)
local pdef = minetest.registered_nodes[node.name]
local node = minetest.get_node_or_nil(pos)
local pdef = node and minetest.registered_nodes[node.name]
if pdef and pdef.on_rightclick and not placer:get_player_control().sneak then
return pdef.on_rightclick(pos, node, placer, itemstack, pointed_thing)
end
if not pdef or not pdef.buildable_to then
pos = pointed_thing.above
node = minetest.get_node(pos)
pdef = minetest.registered_nodes[node.name]
node = minetest.get_node_or_nil(pos)
pdef = node and minetest.registered_nodes[node.name]
if not pdef or not pdef.buildable_to then
return itemstack
end