fix mergeconflicts

This commit is contained in:
Milan* 2017-07-30 12:15:29 +02:00
commit 8a3f06a18f
47 changed files with 1139 additions and 330 deletions

View file

@ -190,6 +190,9 @@ minetest.register_craft({
}
})
-- Axes
-- Recipes face left to match appearence in textures and inventory
minetest.register_craft({
output = 'default:axe_wood',
recipe = {
@ -244,60 +247,6 @@ minetest.register_craft({
}
})
minetest.register_craft({
output = 'default:axe_wood',
recipe = {
{'group:wood', 'group:wood'},
{'group:stick', 'group:wood'},
{'group:stick',''},
}
})
minetest.register_craft({
output = 'default:axe_stone',
recipe = {
{'group:stone', 'group:stone'},
{'group:stick', 'group:stone'},
{'group:stick', ''},
}
})
minetest.register_craft({
output = 'default:axe_steel',
recipe = {
{'default:steel_ingot', 'default:steel_ingot'},
{'group:stick', 'default:steel_ingot'},
{'group:stick', ''},
}
})
minetest.register_craft({
output = 'default:axe_bronze',
recipe = {
{'default:bronze_ingot', 'default:bronze_ingot'},
{'group:stick', 'default:bronze_ingot'},
{'group:stick', ''},
}
})
minetest.register_craft({
output = 'default:axe_mese',
recipe = {
{'default:mese_crystal', 'default:mese_crystal'},
{'group:stick', 'default:mese_crystal'},
{'group:stick', ''},
}
})
minetest.register_craft({
output = 'default:axe_diamond',
recipe = {
{'default:diamond', 'default:diamond'},
{'group:stick', 'default:diamond'},
{'group:stick', ''},
}
})
minetest.register_craft({
output = 'default:sword_wood',
recipe = {

View file

@ -75,12 +75,16 @@ local function book_on_use(itemstack, user)
return itemstack
end
local max_text_size = 10000
local max_title_size = 80
local short_title_size = 35
minetest.register_on_player_receive_fields(function(player, formname, fields)
if formname ~= "default:book" then return end
local inv = player:get_inventory()
local stack = player:get_wielded_item()
if fields.save and fields.title ~= "" and fields.text ~= "" then
if fields.save and fields.title and fields.text
and fields.title ~= "" and fields.text ~= "" then
local new_stack, data
if stack:get_name() ~= "default:book_written" then
local count = stack:get_count()
@ -99,11 +103,15 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
end
if not data then data = {} end
data.title = fields.title
data.title = fields.title:sub(1, max_title_size)
data.owner = player:get_player_name()
data.description = "\""..fields.title.."\" by "..data.owner
data.text = fields.text
data.text_len = #data.text
local short_title = data.title
-- Don't bother triming the title if the trailing dots would make it longer
if #short_title > short_title_size + 3 then
short_title = short_title:sub(1, short_title_size) .. "..."
end
data.description = "\""..short_title.."\" by "..data.owner
data.text = fields.text:sub(1, max_text_size)
data.page = 1
data.page_max = math.ceil((#data.text:gsub("[^\n]", "") + 1) / lpp)

View file

@ -140,7 +140,7 @@ default.cool_lava = function(pos, node)
{pos = pos, max_hear_distance = 16, gain = 0.25})
end
if minetest.setting_getbool("enable_lavacooling") ~= false then
if minetest.settings:get_bool("enable_lavacooling") ~= false then
minetest.register_abm({
label = "Lava cooling",
nodenames = {"default:lava_source", "default:lava_flowing"},
@ -148,7 +148,9 @@ if minetest.setting_getbool("enable_lavacooling") ~= false then
interval = 1,
chance = 2,
catch_up = false,
action = default.cool_lava,
action = function(...)
default.cool_lava(...)
end,
})
end
@ -231,7 +233,9 @@ minetest.register_abm({
neighbors = {"group:sand"},
interval = 12,
chance = 83,
action = default.grow_cactus
action = function(...)
default.grow_cactus(...)
end
})
minetest.register_abm({
@ -240,7 +244,9 @@ minetest.register_abm({
neighbors = {"default:dirt", "default:dirt_with_grass"},
interval = 14,
chance = 71,
action = default.grow_papyrus
action = function(...)
default.grow_papyrus(...)
end
})

View file

@ -3,50 +3,49 @@
-- Formspecs
--
local function active_formspec(fuel_percent, item_percent)
local formspec =
"size[8,8.5]"..
function default.get_furnace_active_formspec(fuel_percent, item_percent)
return "size[8,8.5]"..
default.gui_bg..
default.gui_bg_img..
default.gui_slots..
"list[current_name;src;2.75,0.5;1,1;]"..
"list[current_name;fuel;2.75,2.5;1,1;]"..
"list[context;src;2.75,0.5;1,1;]"..
"list[context;fuel;2.75,2.5;1,1;]"..
"image[2.75,1.5;1,1;default_furnace_fire_bg.png^[lowpart:"..
(100-fuel_percent)..":default_furnace_fire_fg.png]"..
"image[3.75,1.5;1,1;gui_furnace_arrow_bg.png^[lowpart:"..
(item_percent)..":gui_furnace_arrow_fg.png^[transformR270]"..
"list[current_name;dst;4.75,0.96;2,2;]"..
"list[context;dst;4.75,0.96;2,2;]"..
"list[current_player;main;0,4.25;8,1;]"..
"list[current_player;main;0,5.5;8,3;8]"..
"listring[current_name;dst]"..
"listring[context;dst]"..
"listring[current_player;main]"..
"listring[current_name;src]"..
"listring[context;src]"..
"listring[current_player;main]"..
"listring[current_name;fuel]"..
"listring[context;fuel]"..
"listring[current_player;main]"..
default.get_hotbar_bg(0, 4.25)
return formspec
end
local inactive_formspec =
"size[8,8.5]"..
default.gui_bg..
default.gui_bg_img..
default.gui_slots..
"list[current_name;src;2.75,0.5;1,1;]"..
"list[current_name;fuel;2.75,2.5;1,1;]"..
"image[2.75,1.5;1,1;default_furnace_fire_bg.png]"..
"image[3.75,1.5;1,1;gui_furnace_arrow_bg.png^[transformR270]"..
"list[current_name;dst;4.75,0.96;2,2;]"..
"list[current_player;main;0,4.25;8,1;]"..
"list[current_player;main;0,5.5;8,3;8]"..
"listring[current_name;dst]"..
"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)
function default.get_furnace_inactive_formspec()
return "size[8,8.5]"..
default.gui_bg..
default.gui_bg_img..
default.gui_slots..
"list[context;src;2.75,0.5;1,1;]"..
"list[context;fuel;2.75,2.5;1,1;]"..
"image[2.75,1.5;1,1;default_furnace_fire_bg.png]"..
"image[3.75,1.5;1,1;gui_furnace_arrow_bg.png^[transformR270]"..
"list[context;dst;4.75,0.96;2,2;]"..
"list[current_player;main;0,4.25;8,1;]"..
"list[current_player;main;0,5.5;8,3;8]"..
"listring[context;dst]"..
"listring[current_player;main]"..
"listring[context;src]"..
"listring[current_player;main]"..
"listring[context;fuel]"..
"listring[current_player;main]"..
default.get_hotbar_bg(0, 4.25)
end
--
-- Node callback functions that are the same for active and inactive furnace
@ -190,7 +189,7 @@ local function furnace_node_timer(pos, elapsed)
--
-- Update formspec, infotext and node
--
local formspec = inactive_formspec
local formspec
local item_state
local item_percent = 0
if cookable then
@ -216,7 +215,7 @@ local function furnace_node_timer(pos, elapsed)
active = "active "
local fuel_percent = math.floor(fuel_time / fuel_totaltime * 100)
fuel_state = fuel_percent .. "%"
formspec = active_formspec(fuel_percent, item_percent)
formspec = default.get_furnace_active_formspec(fuel_percent, item_percent)
swap_node(pos, "default:furnace_active")
-- make sure timer restarts automatically
result = true
@ -224,12 +223,14 @@ local function furnace_node_timer(pos, elapsed)
if not fuellist[1]:is_empty() then
fuel_state = "0%"
end
formspec = default.get_furnace_inactive_formspec()
swap_node(pos, "default:furnace")
-- stop timer on the inactive furnace
minetest.get_node_timer(pos):stop()
end
local infotext = "Furnace " .. active .. "(Item: " .. item_state .. "; Fuel: " .. fuel_state .. ")"
local infotext = "Furnace " .. active .. "(Item: " .. item_state ..
"; Fuel: " .. fuel_state .. ")"
--
-- Set meta values
@ -266,7 +267,7 @@ minetest.register_node("default:furnace", {
on_construct = function(pos)
local meta = minetest.get_meta(pos)
meta:set_string("formspec", inactive_formspec)
meta:set_string("formspec", default.get_furnace_inactive_formspec())
local inv = meta:get_inventory()
inv:set_size('src', 1)
inv:set_size('fuel', 1)
@ -327,4 +328,3 @@ minetest.register_node("default:furnace_active", {
allow_metadata_inventory_move = allow_metadata_inventory_move,
allow_metadata_inventory_take = allow_metadata_inventory_take,
})

View file

@ -43,12 +43,12 @@ minetest.register_alias("mapgen_stair_sandstone_block", "stairs:stair_sandstone_
-- Register ores
--
-- Blob ores
-- These first to avoid other ores in blobs
-- Mgv6
function default.register_mgv6_blob_ores()
function default.register_mgv6_ores()
-- Blob ore
-- These first to avoid other ores in blobs
-- Clay
-- This first to avoid clay in sand blobs
@ -134,14 +134,289 @@ function default.register_mgv6_blob_ores()
persist = 0.0
},
})
-- Scatter ores
-- Coal
minetest.register_ore({
ore_type = "scatter",
ore = "default:stone_with_coal",
wherein = "default:stone",
clust_scarcity = 8 * 8 * 8,
clust_num_ores = 9,
clust_size = 3,
y_min = 1025,
y_max = 31000,
})
minetest.register_ore({
ore_type = "scatter",
ore = "default:stone_with_coal",
wherein = "default:stone",
clust_scarcity = 8 * 8 * 8,
clust_num_ores = 8,
clust_size = 3,
y_min = -31000,
y_max = 64,
})
minetest.register_ore({
ore_type = "scatter",
ore = "default:stone_with_coal",
wherein = "default:stone",
clust_scarcity = 24 * 24 * 24,
clust_num_ores = 27,
clust_size = 6,
y_min = -31000,
y_max = 0,
})
-- Iron
minetest.register_ore({
ore_type = "scatter",
ore = "default:stone_with_iron",
wherein = "default:stone",
clust_scarcity = 9 * 9 * 9,
clust_num_ores = 12,
clust_size = 3,
y_min = 1025,
y_max = 31000,
})
minetest.register_ore({
ore_type = "scatter",
ore = "default:stone_with_iron",
wherein = "default:stone",
clust_scarcity = 7 * 7 * 7,
clust_num_ores = 5,
clust_size = 3,
y_min = -31000,
y_max = 0,
})
minetest.register_ore({
ore_type = "scatter",
ore = "default:stone_with_iron",
wherein = "default:stone",
clust_scarcity = 24 * 24 * 24,
clust_num_ores = 27,
clust_size = 6,
y_min = -31000,
y_max = -64,
})
-- Copper
minetest.register_ore({
ore_type = "scatter",
ore = "default:stone_with_copper",
wherein = "default:stone",
clust_scarcity = 9 * 9 * 9,
clust_num_ores = 5,
clust_size = 3,
y_min = 1025,
y_max = 31000,
})
minetest.register_ore({
ore_type = "scatter",
ore = "default:stone_with_copper",
wherein = "default:stone",
clust_scarcity = 12 * 12 * 12,
clust_num_ores = 4,
clust_size = 3,
y_min = -63,
y_max = -16,
})
minetest.register_ore({
ore_type = "scatter",
ore = "default:stone_with_copper",
wherein = "default:stone",
clust_scarcity = 9 * 9 * 9,
clust_num_ores = 5,
clust_size = 3,
y_min = -31000,
y_max = -64,
})
-- Tin
minetest.register_ore({
ore_type = "scatter",
ore = "default:stone_with_tin",
wherein = "default:stone",
clust_scarcity = 10 * 10 * 10,
clust_num_ores = 5,
clust_size = 3,
y_min = 1025,
y_max = 31000,
})
minetest.register_ore({
ore_type = "scatter",
ore = "default:stone_with_tin",
wherein = "default:stone",
clust_scarcity = 13 * 13 * 13,
clust_num_ores = 4,
clust_size = 3,
y_min = -127,
y_max = -32,
})
minetest.register_ore({
ore_type = "scatter",
ore = "default:stone_with_tin",
wherein = "default:stone",
clust_scarcity = 10 * 10 * 10,
clust_num_ores = 5,
clust_size = 3,
y_min = -31000,
y_max = -128,
})
-- Gold
minetest.register_ore({
ore_type = "scatter",
ore = "default:stone_with_gold",
wherein = "default:stone",
clust_scarcity = 13 * 13 * 13,
clust_num_ores = 5,
clust_size = 3,
y_min = 1025,
y_max = 31000,
})
minetest.register_ore({
ore_type = "scatter",
ore = "default:stone_with_gold",
wherein = "default:stone",
clust_scarcity = 15 * 15 * 15,
clust_num_ores = 3,
clust_size = 2,
y_min = -255,
y_max = -64,
})
minetest.register_ore({
ore_type = "scatter",
ore = "default:stone_with_gold",
wherein = "default:stone",
clust_scarcity = 13 * 13 * 13,
clust_num_ores = 5,
clust_size = 3,
y_min = -31000,
y_max = -256,
})
-- Mese crystal
minetest.register_ore({
ore_type = "scatter",
ore = "default:stone_with_mese",
wherein = "default:stone",
clust_scarcity = 14 * 14 * 14,
clust_num_ores = 5,
clust_size = 3,
y_min = 1025,
y_max = 31000,
})
minetest.register_ore({
ore_type = "scatter",
ore = "default:stone_with_mese",
wherein = "default:stone",
clust_scarcity = 18 * 18 * 18,
clust_num_ores = 3,
clust_size = 2,
y_min = -255,
y_max = -64,
})
minetest.register_ore({
ore_type = "scatter",
ore = "default:stone_with_mese",
wherein = "default:stone",
clust_scarcity = 14 * 14 * 14,
clust_num_ores = 5,
clust_size = 3,
y_min = -31000,
y_max = -256,
})
-- Diamond
minetest.register_ore({
ore_type = "scatter",
ore = "default:stone_with_diamond",
wherein = "default:stone",
clust_scarcity = 15 * 15 * 15,
clust_num_ores = 4,
clust_size = 3,
y_min = 1025,
y_max = 31000,
})
minetest.register_ore({
ore_type = "scatter",
ore = "default:stone_with_diamond",
wherein = "default:stone",
clust_scarcity = 17 * 17 * 17,
clust_num_ores = 4,
clust_size = 3,
y_min = -255,
y_max = -128,
})
minetest.register_ore({
ore_type = "scatter",
ore = "default:stone_with_diamond",
wherein = "default:stone",
clust_scarcity = 15 * 15 * 15,
clust_num_ores = 4,
clust_size = 3,
y_min = -31000,
y_max = -256,
})
-- Mese block
minetest.register_ore({
ore_type = "scatter",
ore = "default:mese",
wherein = "default:stone",
clust_scarcity = 36 * 36 * 36,
clust_num_ores = 3,
clust_size = 2,
y_min = 1025,
y_max = 31000,
})
minetest.register_ore({
ore_type = "scatter",
ore = "default:mese",
wherein = "default:stone",
clust_scarcity = 36 * 36 * 36,
clust_num_ores = 3,
clust_size = 2,
y_min = -31000,
y_max = -1024,
})
end
-- All mapgens except mgv6
function default.register_blob_ores()
function default.register_ores()
-- Blob ore
-- These first to avoid other ores in blobs
-- Clay
-- This first to avoid clay in sand blobs
minetest.register_ore({
ore_type = "blob",
@ -188,7 +463,7 @@ function default.register_blob_ores()
"deciduous_forest_shore", "deciduous_forest_ocean", "cold_desert",
"cold_desert_ocean", "savanna", "savanna_shore", "savanna_ocean",
"rainforest", "rainforest_swamp", "rainforest_ocean", "underground",
"floatland_ocean", "floatland_grassland", "floatland_coniferous_forest"}
"floatland_coniferous_forest", "floatland_coniferous_forest_ocean"}
})
-- Dirt
@ -212,8 +487,7 @@ function default.register_blob_ores()
},
biomes = {"taiga", "snowy_grassland", "grassland", "coniferous_forest",
"deciduous_forest", "deciduous_forest_shore", "savanna", "savanna_shore",
"rainforest", "rainforest_swamp", "floatland_grassland",
"floatland_coniferous_forest"}
"rainforest", "rainforest_swamp", "floatland_coniferous_forest"}
})
-- Gravel
@ -242,15 +516,10 @@ function default.register_blob_ores()
"deciduous_forest_shore", "deciduous_forest_ocean", "cold_desert",
"cold_desert_ocean", "savanna", "savanna_shore", "savanna_ocean",
"rainforest", "rainforest_swamp", "rainforest_ocean", "underground",
"floatland_ocean", "floatland_grassland", "floatland_coniferous_forest"}
"floatland_coniferous_forest", "floatland_coniferous_forest_ocean"}
})
end
-- Scatter ores
-- All mapgens
function default.register_ores()
-- Scatter ores
-- Coal
@ -1176,6 +1445,8 @@ end
-- Biomes for floatlands
-- Used when mgv7 'biomerepeat' flag is false
-- TODO Temporary simple biomes to be developed later
function default.register_floatland_biomes(floatland_level, shadow_limit)
@ -1195,60 +1466,16 @@ function default.register_floatland_biomes(floatland_level, shadow_limit)
--node_river_water = "",
--node_riverbed = "",
--depth_riverbed = ,
y_min = floatland_level + 2,
y_min = floatland_level + 4,
y_max = 31000,
heat_point = 50,
humidity_point = 70,
humidity_point = 50,
})
-- Grassland
-- Coniferous forest ocean
minetest.register_biome({
name = "floatland_grassland",
--node_dust = "",
node_top = "default:dirt_with_grass",
depth_top = 1,
node_filler = "default:dirt",
depth_filler = 1,
--node_stone = "",
--node_water_top = "",
--depth_water_top = ,
--node_water = "",
--node_river_water = "",
--node_riverbed = "",
--depth_riverbed = ,
y_min = floatland_level + 2,
y_max = 31000,
heat_point = 50,
humidity_point = 35,
})
-- Sandstone desert
minetest.register_biome({
name = "floatland_sandstone_desert",
--node_dust = "",
node_top = "default:sand",
depth_top = 1,
node_filler = "default:sand",
depth_filler = 1,
node_stone = "default:sandstone",
--node_water_top = "",
--depth_water_top = ,
--node_water = "",
--node_river_water = "",
--node_riverbed = "",
--depth_riverbed = ,
y_min = floatland_level + 2,
y_max = 31000,
heat_point = 50,
humidity_point = 0,
})
-- Floatland ocean / underground
minetest.register_biome({
name = "floatland_ocean",
name = "floatland_coniferous_forest_ocean",
--node_dust = "",
node_top = "default:sand",
depth_top = 1,
@ -1262,7 +1489,7 @@ function default.register_floatland_biomes(floatland_level, shadow_limit)
--node_riverbed = "",
--depth_riverbed = ,
y_min = shadow_limit,
y_max = floatland_level + 1,
y_max = floatland_level + 3,
heat_point = 50,
humidity_point = 50,
})
@ -1794,33 +2021,41 @@ end
-- Get setting or default
local mgv7_spflags = minetest.get_mapgen_setting("mgv7_spflags") or
"mountains, ridges, nofloatlands"
"mountains, ridges, nofloatlands, caverns, biomerepeat"
local captures_float = string.match(mgv7_spflags, "floatlands")
local captures_nofloat = string.match(mgv7_spflags, "nofloatlands")
local captures_nobiorep = string.match(mgv7_spflags, "nobiomerepeat")
local mgv7_floatland_level = minetest.get_mapgen_setting("mgv7_floatland_level") or 1280
local mgv7_shadow_limit = minetest.get_mapgen_setting("mgv7_shadow_limit") or 1024
-- Get setting or default
-- Make global for mods to use to register floatland biomes
default.mgv7_floatland_level =
minetest.get_mapgen_setting("mgv7_floatland_level") or 1280
default.mgv7_shadow_limit =
minetest.get_mapgen_setting("mgv7_shadow_limit") or 1024
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_ores()
default.register_mgv6_decorations()
elseif mg_name == "v7" and captures_float == "floatlands" and
captures_nofloat ~= "nofloatlands" then
-- Mgv7 with floatlands
default.register_biomes(mgv7_shadow_limit - 1)
default.register_floatland_biomes(mgv7_floatland_level, mgv7_shadow_limit)
default.register_blob_ores()
elseif mg_name == "v7" and
captures_float == "floatlands" and
-- Need to check for 'nofloatlands' because that contains
-- 'floatlands' which makes the second condition true.
captures_nofloat ~= "nofloatlands" and
captures_nobiorep == "nobiomerepeat" then
-- Mgv7 with floatlands and floatland biomes
default.register_biomes(default.mgv7_shadow_limit - 1)
default.register_floatland_biomes(
default.mgv7_floatland_level, default.mgv7_shadow_limit)
default.register_ores()
default.register_decorations()
else
default.register_biomes(31000)
default.register_blob_ores()
default.register_ores()
default.register_decorations()
end

Binary file not shown.

Binary file not shown.

View file

@ -592,7 +592,7 @@ minetest.register_node("default:ice", {
--
minetest.register_node("default:tree", {
description = "Tree",
description = "Apple Tree",
tiles = {"default_tree_top.png", "default_tree_top.png", "default_tree.png"},
paramtype2 = "facedir",
is_ground_content = false,
@ -603,7 +603,7 @@ minetest.register_node("default:tree", {
})
minetest.register_node("default:wood", {
description = "Wooden Planks",
description = "Apple Wood Planks",
paramtype2 = "facedir",
place_param2 = 0,
tiles = {"default_wood.png"},
@ -613,7 +613,7 @@ minetest.register_node("default:wood", {
})
minetest.register_node("default:sapling", {
description = "Sapling",
description = "Apple Tree Sapling",
drawtype = "plantlike",
tiles = {"default_sapling.png"},
inventory_image = "default_sapling.png",
@ -631,7 +631,7 @@ minetest.register_node("default:sapling", {
sounds = default.node_sound_leaves_defaults(),
on_construct = function(pos)
minetest.get_node_timer(pos):start(math.random(2400,4800))
minetest.get_node_timer(pos):start(math.random(300, 1500))
end,
on_place = function(itemstack, placer, pointed_thing)
@ -649,7 +649,7 @@ minetest.register_node("default:sapling", {
})
minetest.register_node("default:leaves", {
description = "Leaves",
description = "Apple Tree Leaves",
drawtype = "allfaces_optional",
waving = 1,
tiles = {"default_leaves.png"},
@ -716,7 +716,7 @@ minetest.register_node("default:jungletree", {
})
minetest.register_node("default:junglewood", {
description = "Junglewood Planks",
description = "Jungle Wood Planks",
paramtype2 = "facedir",
place_param2 = 0,
tiles = {"default_junglewood.png"},
@ -726,7 +726,7 @@ minetest.register_node("default:junglewood", {
})
minetest.register_node("default:jungleleaves", {
description = "Jungle Leaves",
description = "Jungle Tree Leaves",
drawtype = "allfaces_optional",
waving = 1,
tiles = {"default_jungleleaves.png"},
@ -747,7 +747,7 @@ minetest.register_node("default:jungleleaves", {
})
minetest.register_node("default:junglesapling", {
description = "Jungle Sapling",
description = "Jungle Tree Sapling",
drawtype = "plantlike",
tiles = {"default_junglesapling.png"},
inventory_image = "default_junglesapling.png",
@ -765,7 +765,7 @@ minetest.register_node("default:junglesapling", {
sounds = default.node_sound_leaves_defaults(),
on_construct = function(pos)
minetest.get_node_timer(pos):start(math.random(2400,4800))
minetest.get_node_timer(pos):start(math.random(300, 1500))
end,
on_place = function(itemstack, placer, pointed_thing)
@ -826,7 +826,7 @@ minetest.register_node("default:pine_needles",{
})
minetest.register_node("default:pine_sapling", {
description = "Pine Sapling",
description = "Pine Tree Sapling",
drawtype = "plantlike",
tiles = {"default_pine_sapling.png"},
inventory_image = "default_pine_sapling.png",
@ -844,7 +844,7 @@ minetest.register_node("default:pine_sapling", {
sounds = default.node_sound_leaves_defaults(),
on_construct = function(pos)
minetest.get_node_timer(pos):start(math.random(2400,4800))
minetest.get_node_timer(pos):start(math.random(300, 1500))
end,
on_place = function(itemstack, placer, pointed_thing)
@ -885,7 +885,7 @@ minetest.register_node("default:acacia_wood", {
})
minetest.register_node("default:acacia_leaves", {
description = "Acacia Leaves",
description = "Acacia Tree Leaves",
drawtype = "allfaces_optional",
tiles = {"default_acacia_leaves.png"},
special_tiles = {"default_acacia_leaves_simple.png"},
@ -924,7 +924,7 @@ minetest.register_node("default:acacia_sapling", {
sounds = default.node_sound_leaves_defaults(),
on_construct = function(pos)
minetest.get_node_timer(pos):start(math.random(2400,4800))
minetest.get_node_timer(pos):start(math.random(300, 1500))
end,
on_place = function(itemstack, placer, pointed_thing)
@ -964,7 +964,7 @@ minetest.register_node("default:aspen_wood", {
})
minetest.register_node("default:aspen_leaves", {
description = "Aspen Leaves",
description = "Aspen Tree Leaves",
drawtype = "allfaces_optional",
tiles = {"default_aspen_leaves.png"},
waving = 1,
@ -1002,7 +1002,7 @@ minetest.register_node("default:aspen_sapling", {
sounds = default.node_sound_leaves_defaults(),
on_construct = function(pos)
minetest.get_node_timer(pos):start(math.random(2400,4800))
minetest.get_node_timer(pos):start(math.random(300, 1500))
end,
on_place = function(itemstack, placer, pointed_thing)
@ -1394,7 +1394,7 @@ minetest.register_node("default:bush_sapling", {
sounds = default.node_sound_leaves_defaults(),
on_construct = function(pos)
minetest.get_node_timer(pos):start(math.random(1200, 2400))
minetest.get_node_timer(pos):start(math.random(300, 1500))
end,
on_place = function(itemstack, placer, pointed_thing)
@ -1465,7 +1465,7 @@ minetest.register_node("default:acacia_bush_sapling", {
sounds = default.node_sound_leaves_defaults(),
on_construct = function(pos)
minetest.get_node_timer(pos):start(math.random(1200, 2400))
minetest.get_node_timer(pos):start(math.random(300, 1500))
end,
on_place = function(itemstack, placer, pointed_thing)
@ -1798,7 +1798,7 @@ minetest.register_node("default:lava_flowing", {
-- Tools / "Advanced" crafting / Non-"natural"
--
local function get_chest_formspec(pos)
function default.get_chest_formspec(pos)
local spos = pos.x .. "," .. pos.y .. "," .. pos.z
local formspec =
"size[8,9]" ..
@ -1815,13 +1815,14 @@ local function get_chest_formspec(pos)
end
local function chest_lid_obstructed(pos)
local above = { x = pos.x, y = pos.y + 1, z = pos.z }
local above = {x = pos.x, y = pos.y + 1, z = pos.z}
local def = minetest.registered_nodes[minetest.get_node(above).name]
-- allow ladders, signs, wallmounted things and torches to not obstruct
if def.drawtype == "airlike" or
if def and
(def.drawtype == "airlike" or
def.drawtype == "signlike" or
def.drawtype == "torchlike" or
(def.drawtype == "nodebox" and def.paramtype2 == "wallmounted") then
(def.drawtype == "nodebox" and def.paramtype2 == "wallmounted")) then
return false
end
return true
@ -1921,7 +1922,7 @@ function default.register_chest(name, d)
end
minetest.after(0.2, minetest.show_formspec,
clicker:get_player_name(),
"default:chest", get_chest_formspec(pos))
"default:chest", default.get_chest_formspec(pos))
open_chests[clicker:get_player_name()] = { pos = pos,
sound = def.sound_close, swap = name }
end
@ -1943,7 +1944,7 @@ function default.register_chest(name, d)
minetest.show_formspec(
player:get_player_name(),
"default:chest_locked",
get_chest_formspec(pos)
default.get_chest_formspec(pos)
)
end
def.on_skeleton_key_use = function(pos, player, newsecret)
@ -1988,7 +1989,7 @@ function default.register_chest(name, d)
end
minetest.after(0.2, minetest.show_formspec,
clicker:get_player_name(),
"default:chest", get_chest_formspec(pos))
"default:chest", default.get_chest_formspec(pos))
open_chests[clicker:get_player_name()] = { pos = pos,
sound = def.sound_close, swap = name }
end
@ -2021,12 +2022,19 @@ function default.register_chest(name, d)
local def_closed = table.copy(def)
def_opened.mesh = "chest_open.obj"
for i = 1, #def_opened.tiles do
if type(def_opened.tiles[i]) == "string" then
def_opened.tiles[i] = {name = def_opened.tiles[i], backface_culling = true}
elseif def_opened.tiles[i].backface_culling == nil then
def_opened.tiles[i].backface_culling = true
end
end
def_opened.drop = "default:" .. name
def_opened.groups.not_in_creative_inventory = 1
def_opened.selection_box = {
type = "fixed",
fixed = { -1/2, -1/2, -1/2, 1/2, 3/16, 1/2 },
}
}
def_opened.can_dig = function()
return false
end
@ -2276,7 +2284,7 @@ minetest.register_node("default:ladder_steel", {
})
default.register_fence("default:fence_wood", {
description = "Wooden Fence",
description = "Apple Wood 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",
@ -2286,7 +2294,7 @@ default.register_fence("default:fence_wood", {
})
default.register_fence("default:fence_acacia_wood", {
description = "Acacia Fence",
description = "Acacia Wood 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",
@ -2296,7 +2304,7 @@ default.register_fence("default:fence_acacia_wood", {
})
default.register_fence("default:fence_junglewood", {
description = "Junglewood Fence",
description = "Jungle Wood 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",
@ -2306,7 +2314,7 @@ default.register_fence("default:fence_junglewood", {
})
default.register_fence("default:fence_pine_wood", {
description = "Pine Fence",
description = "Pine Wood 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",
@ -2316,7 +2324,7 @@ default.register_fence("default:fence_pine_wood", {
})
default.register_fence("default:fence_aspen_wood", {
description = "Aspen Fence",
description = "Aspen Wood 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",

Binary file not shown.

Before

Width:  |  Height:  |  Size: 201 B

After

Width:  |  Height:  |  Size: 255 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 228 B

After

Width:  |  Height:  |  Size: 282 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 216 B

After

Width:  |  Height:  |  Size: 191 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 158 B

After

Width:  |  Height:  |  Size: 160 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 155 B

After

Width:  |  Height:  |  Size: 128 B

Before After
Before After

View file

@ -283,7 +283,7 @@ minetest.register_tool("default:axe_diamond", {
full_punch_interval = 0.9,
max_drop_level=1,
groupcaps={
choppy={times={[1]=2.10, [2]=0.90, [3]=0.50}, uses=30, maxlevel=2},
choppy={times={[1]=2.10, [2]=0.90, [3]=0.50}, uses=30, maxlevel=3},
},
damage_groups = {fleshy=7},
},

View file

@ -31,12 +31,12 @@ local function is_snow_nearby(pos)
end
-- Sapling ABM
-- Grow sapling
function default.grow_sapling(pos)
if not default.can_grow(pos) then
-- try a bit later again
minetest.get_node_timer(pos):start(math.random(240, 600))
-- try again 5 min later
minetest.get_node_timer(pos):start(300)
return
end
@ -94,7 +94,7 @@ minetest.register_lbm({
"default:pine_sapling", "default:acacia_sapling",
"default:aspen_sapling"},
action = function(pos)
minetest.get_node_timer(pos):start(math.random(1200, 2400))
minetest.get_node_timer(pos):start(math.random(300, 1500))
end
})