Move default nodes from base to default mod
|
@ -1,2 +1,2 @@
|
|||
base
|
||||
default
|
||||
intllib?
|
||||
|
|
|
@ -530,8 +530,8 @@ function biome_lib:spawn_on_surfaces(sd,sp,sr,sc,ss,sa)
|
|||
end
|
||||
else
|
||||
local currentsurface = minetest.get_node(pos).name
|
||||
if currentsurface ~= "base:water_source"
|
||||
or (currentsurface == "base:water_source" and #(minetest.find_nodes_in_area({x=pos.x, y=pos.y-biome.depth_max-1, z=pos.z}, {x=pos.x, y=pos.y, z=pos.z}, {"base:dirt", "base:dirt_with_grass", "base:sand"})) > 0 )
|
||||
if currentsurface ~= "default:water_source"
|
||||
or (currentsurface == "default:water_source" and #(minetest.find_nodes_in_area({x=pos.x, y=pos.y-biome.depth_max-1, z=pos.z}, {x=pos.x, y=pos.y, z=pos.z}, {"default:dirt", "default:dirt_with_grass", "default:sand"})) > 0 )
|
||||
then
|
||||
local rnd = math.random(1, biome.spawn_plants_count)
|
||||
local plant_to_spawn = biome.spawn_plants[rnd]
|
||||
|
@ -573,8 +573,8 @@ function biome_lib:grow_plants(opts)
|
|||
local options = opts
|
||||
|
||||
options.height_limit = options.height_limit or 5
|
||||
options.ground_nodes = options.ground_nodes or { "base:dirt_with_grass" }
|
||||
options.grow_nodes = options.grow_nodes or { "base:dirt_with_grass" }
|
||||
options.ground_nodes = options.ground_nodes or { "default:dirt_with_grass" }
|
||||
options.grow_nodes = options.grow_nodes or { "default:dirt_with_grass" }
|
||||
options.seed_diff = options.seed_diff or 0
|
||||
|
||||
if options.grow_delay*time_scale >= 1 then
|
||||
|
@ -597,12 +597,12 @@ function biome_lib:grow_plants(opts)
|
|||
if options.need_wall and options.verticals_list then
|
||||
walldir = biome_lib:find_adjacent_wall(p_top, options.verticals_list, options.choose_random_wall)
|
||||
end
|
||||
if (n_top.name == "air" or n_top.name == "base:snow")
|
||||
if (n_top.name == "air" or n_top.name == "default:snow")
|
||||
and (not options.need_wall or (options.need_wall and walldir)) then
|
||||
-- corner case for changing short junglegrass
|
||||
-- to dry shrub in desert
|
||||
if n_bot.name == options.dry_early_node and options.grow_plant == "junglegrass:short" then
|
||||
minetest.set_node(pos, { name = "base:dry_shrub" })
|
||||
minetest.set_node(pos, { name = "default:dry_shrub" })
|
||||
|
||||
elseif options.grow_vertically and walldir then
|
||||
if biome_lib:search_downward(pos, options.height_limit, options.ground_nodes) then
|
||||
|
|
|
@ -18,14 +18,14 @@ function init.get_hotbar_bg(x,y)
|
|||
end
|
||||
|
||||
init.gui_survival_form = "size[8,8.5]"..
|
||||
init.gui_bg..
|
||||
init.gui_bg_img..
|
||||
init.gui_slots..
|
||||
"list[current_player;main;0,4.25;8,1;]"..
|
||||
"list[current_player;main;0,5.5;8,3;8]"..
|
||||
"list[current_player;craft;1.75,0.5;3,3;]"..
|
||||
"list[current_player;craftpreview;5.75,1.5;1,1;]"..
|
||||
"image[4.75,1.5;1,1;gui_furnace_arrow_bg.png^[transformR270]"..
|
||||
"listring[current_player;main]"..
|
||||
"listring[current_player;craft]"..
|
||||
init.get_hotbar_bg(0,4.25)
|
||||
init.gui_bg..
|
||||
init.gui_bg_img..
|
||||
init.gui_slots..
|
||||
"list[current_player;main;0,4.25;8,1;]"..
|
||||
"list[current_player;main;0,5.5;8,3;8]"..
|
||||
"list[current_player;craft;1.75,0.5;3,3;]"..
|
||||
"list[current_player;craftpreview;5.75,1.5;1,1;]"..
|
||||
"image[4.75,1.5;1,1;gui_furnace_arrow_bg.png^[transformR270]"..
|
||||
"listring[current_player;main]"..
|
||||
"listring[current_player;craft]"..
|
||||
init.get_hotbar_bg(0,4.25)
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
base
|
||||
default
|
||||
player_api
|
||||
|
|
|
@ -39,7 +39,7 @@ local boat = {
|
|||
collisionbox = {-0.5, -0.35, -0.5, 0.5, 0.3, 0.5},
|
||||
visual = "mesh",
|
||||
mesh = "boats_boat.obj",
|
||||
textures = {"base_wood.png"},
|
||||
textures = {"default_wood.png"},
|
||||
|
||||
driver = nil,
|
||||
v = 0,
|
||||
|
|
|
@ -383,7 +383,7 @@ minetest.register_craftitem("carts:cart", {
|
|||
return
|
||||
end
|
||||
|
||||
minetest.sound_play({name = "base_place_node_metal", gain = 0.5},
|
||||
minetest.sound_play({name = "default_place_node_metal", gain = 0.5},
|
||||
{pos = pointed_thing.above})
|
||||
|
||||
if not (creative and creative.is_enabled_for
|
||||
|
@ -397,7 +397,7 @@ minetest.register_craftitem("carts:cart", {
|
|||
minetest.register_craft({
|
||||
output = "carts:cart",
|
||||
recipe = {
|
||||
{"base:steel_ingot", "", "base:steel_ingot"},
|
||||
{"base:steel_ingot", "base:steel_ingot", "base:steel_ingot"},
|
||||
{"default:steel_ingot", "", "default:steel_ingot"},
|
||||
{"default:steel_ingot", "default:steel_ingot", "default:steel_ingot"},
|
||||
},
|
||||
})
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
base
|
||||
default
|
||||
player_api
|
||||
|
|
|
@ -12,7 +12,7 @@ function carts:manage_attachment(player, obj)
|
|||
end
|
||||
local status = obj ~= nil
|
||||
local player_name = player:get_player_name()
|
||||
if defaplayer_apiult.player_attached[player_name] == status then
|
||||
if player_api.player_attached[player_name] == status then
|
||||
return
|
||||
end
|
||||
player_api.player_attached[player_name] = status
|
||||
|
@ -192,7 +192,7 @@ function carts:register_rail(name, def_overwrite, railparams)
|
|||
type = "fixed",
|
||||
fixed = {-1/2, -1/2, -1/2, 1/2, -1/2+1/16, 1/2},
|
||||
},
|
||||
sounds = base.node_sound_metal_defaults()
|
||||
sounds = default.node_sound_metal_defaults()
|
||||
}
|
||||
for k, v in pairs(def_overwrite) do
|
||||
def[k] = v
|
||||
|
|
|
@ -12,9 +12,9 @@ carts:register_rail("carts:rail", {
|
|||
minetest.register_craft({
|
||||
output = "carts:rail 18",
|
||||
recipe = {
|
||||
{"base:steel_ingot", "group:wood", "base:steel_ingot"},
|
||||
{"base:steel_ingot", "", "base:steel_ingot"},
|
||||
{"base:steel_ingot", "group:wood", "base:steel_ingot"},
|
||||
{"default:steel_ingot", "group:wood", "default:steel_ingot"},
|
||||
{"default:steel_ingot", "", "default:steel_ingot"},
|
||||
{"default:steel_ingot", "group:wood", "default:steel_ingot"},
|
||||
}
|
||||
})
|
||||
|
||||
|
@ -31,9 +31,9 @@ carts:register_rail("carts:powerrail", {
|
|||
minetest.register_craft({
|
||||
output = "carts:powerrail 18",
|
||||
recipe = {
|
||||
{"base:steel_ingot", "group:wood", "base:steel_ingot"},
|
||||
{"base:steel_ingot", "base:mese_crystal", "base:steel_ingot"},
|
||||
{"base:steel_ingot", "group:wood", "base:steel_ingot"},
|
||||
{"default:steel_ingot", "group:wood", "default:steel_ingot"},
|
||||
{"default:steel_ingot", "default:mese_crystal", "default:steel_ingot"},
|
||||
{"default:steel_ingot", "group:wood", "default:steel_ingot"},
|
||||
}
|
||||
})
|
||||
|
||||
|
@ -50,8 +50,8 @@ carts:register_rail("carts:brakerail", {
|
|||
minetest.register_craft({
|
||||
output = "carts:brakerail 18",
|
||||
recipe = {
|
||||
{"base:steel_ingot", "group:wood", "base:steel_ingot"},
|
||||
{"base:steel_ingot", "base:coal_lump", "base:steel_ingot"},
|
||||
{"base:steel_ingot", "group:wood", "base:steel_ingot"},
|
||||
{"default:steel_ingot", "group:wood", "default:steel_ingot"},
|
||||
{"default:steel_ingot", "default:coal_lump", "default:steel_ingot"},
|
||||
{"default:steel_ingot", "group:wood", "default:steel_ingot"},
|
||||
}
|
||||
})
|
||||
|
|
|
@ -75,10 +75,10 @@ local stuck_path_timeout = 10 -- how long will mob follow path before giving up
|
|||
-- default nodes
|
||||
local node_fire = "fire:basic_flame"
|
||||
local node_permanent_flame = "fire:permanent_flame"
|
||||
local node_ice = "base:ice"
|
||||
local node_snowblock = "base:snowblock"
|
||||
local node_snow = "base:snow"
|
||||
mobs.fallback_node = minetest.registered_aliases["mapgen_dirt"] or "base:dirt"
|
||||
local node_ice = "default:ice"
|
||||
local node_snowblock = "default:snowblock"
|
||||
local node_snow = "default:snow"
|
||||
mobs.fallback_node = minetest.registered_aliases["mapgen_dirt"] or "default:dirt"
|
||||
|
||||
-- play sound
|
||||
local mob_sound = function(self, sound)
|
||||
|
@ -3285,7 +3285,7 @@ function mobs:capture_mob(self, clicker, chance_hand, chance_net, chance_lasso,
|
|||
|
||||
self.object:remove()
|
||||
|
||||
mob_sound(self, "base_place_node_hard")
|
||||
mob_sound(self, "default_place_node_hard")
|
||||
|
||||
|
||||
else
|
||||
|
|
|
@ -11,7 +11,7 @@ if minetest.get_modpath("dye") and minetest.get_modpath("farming") then
|
|||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = "mobs:nametag",
|
||||
recipe = {"base:paper", "dye:black", "farming:string"},
|
||||
recipe = {"default:paper", "dye:black", "farming:string"},
|
||||
})
|
||||
end
|
||||
|
||||
|
@ -53,7 +53,7 @@ if minetest.get_modpath("farming") then
|
|||
output = "mobs:lasso",
|
||||
recipe = {
|
||||
{"farming:string", "", "farming:string"},
|
||||
{"", "base:diamond", ""},
|
||||
{"", "default:diamond", ""},
|
||||
{"farming:string", "", "farming:string"},
|
||||
}
|
||||
})
|
||||
|
@ -87,8 +87,8 @@ minetest.register_tool("mobs:shears", {
|
|||
minetest.register_craft({
|
||||
output = 'mobs:shears',
|
||||
recipe = {
|
||||
{'', 'base:steel_ingot', ''},
|
||||
{'', 'group:stick', 'base:steel_ingot'},
|
||||
{'', 'default:steel_ingot', ''},
|
||||
{'', 'group:stick', 'default:steel_ingot'},
|
||||
}
|
||||
})
|
||||
|
||||
|
@ -101,9 +101,9 @@ minetest.register_craftitem("mobs:protector", {
|
|||
minetest.register_craft({
|
||||
output = "mobs:protector",
|
||||
recipe = {
|
||||
{"base:stone", "base:stone", "base:stone"},
|
||||
{"base:stone", "base:goldblock", "base:stone"},
|
||||
{"base:stone", "base:stone", "base:stone"},
|
||||
{"default:stone", "default:stone", "default:stone"},
|
||||
{"default:stone", "default:goldblock", "default:stone"},
|
||||
{"default:stone", "default:stone", "default:stone"},
|
||||
}
|
||||
})
|
||||
|
||||
|
@ -117,7 +117,7 @@ minetest.register_craft({
|
|||
output = "mobs:saddle",
|
||||
recipe = {
|
||||
{"mobs:leather", "mobs:leather", "mobs:leather"},
|
||||
{"mobs:leather", "base:steel_ingot", "mobs:leather"},
|
||||
{"mobs:leather", "base:steel_ingot", "mobs:leather"},
|
||||
{"mobs:leather", "default:steel_ingot", "mobs:leather"},
|
||||
{"mobs:leather", "default:steel_ingot", "mobs:leather"},
|
||||
}
|
||||
})
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
init
|
||||
base
|
||||
default
|
||||
tnt?
|
||||
dye?
|
||||
farming?
|
||||
|
|
|
@ -1 +1,23 @@
|
|||
-- This mod has no code and is only a collection of textures.
|
||||
--[[
|
||||
Inventory
|
||||
]]
|
||||
|
||||
|
||||
inventory = {}
|
||||
|
||||
--
|
||||
-- optimized helper to put all items in an inventory into a drops list
|
||||
--
|
||||
|
||||
function inventory.get_inventory_drops(pos, inventory, drops)
|
||||
local inv = minetest.get_meta(pos):get_inventory()
|
||||
local n = #drops
|
||||
for i = 1, inv:get_size(inventory) do
|
||||
local stack = inv:get_stack(inventory, i)
|
||||
if stack:get_count() > 0 then
|
||||
drops[n+1] = stack:to_table()
|
||||
n = n + 1
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -2,43 +2,9 @@
|
|||
Base crafting
|
||||
--]]
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'base:wood 4',
|
||||
recipe = {
|
||||
{'base:tree'},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'base:junglewood 4',
|
||||
recipe = {
|
||||
{'base:jungletree'},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'base:pine_wood 4',
|
||||
recipe = {
|
||||
{'base:pine_tree'},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'base:acacia_wood 4',
|
||||
recipe = {
|
||||
{'base:acacia_tree'},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'base:aspen_wood 4',
|
||||
recipe = {
|
||||
{'base:aspen_tree'},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "base:pine_wood 4",
|
||||
output = "default:pine_wood 4",
|
||||
recipe = {
|
||||
{"base:arnhem_cypress_pine_tree"}
|
||||
}
|
||||
|
@ -66,7 +32,7 @@ minetest.register_craft({
|
|||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "base:wood 4",
|
||||
output = "default:wood 4",
|
||||
recipe = {
|
||||
{"base:boab_tree"}
|
||||
}
|
||||
|
@ -80,7 +46,7 @@ minetest.register_craft({
|
|||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "base:acacia_wood 4",
|
||||
output = "default:acacia_wood 4",
|
||||
recipe = {
|
||||
{"base:coast_banksia_tree"}
|
||||
}
|
||||
|
@ -109,7 +75,7 @@ minetest.register_craft({
|
|||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "base:acacia_wood 4",
|
||||
output = "default:acacia_wood 4",
|
||||
recipe = {
|
||||
{"base:desert_oak_tree"}
|
||||
}
|
||||
|
@ -123,7 +89,7 @@ minetest.register_craft({
|
|||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "base:wood 4",
|
||||
output = "default:wood 4",
|
||||
recipe = {
|
||||
{"base:illawarra_flame_tree"}
|
||||
}
|
||||
|
@ -151,7 +117,7 @@ minetest.register_craft({
|
|||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "base:wood 4",
|
||||
output = "default:wood 4",
|
||||
recipe = {
|
||||
{"base:macadamia_tree"}
|
||||
}
|
||||
|
@ -172,28 +138,28 @@ minetest.register_craft({
|
|||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "base:wood 4",
|
||||
output = "default:wood 4",
|
||||
recipe = {
|
||||
{"base:moreton_bay_fig_tree"}
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "base:acacia_wood 4",
|
||||
output = "default:acacia_wood 4",
|
||||
recipe = {
|
||||
{"base:mulga_tree"}
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "base:acacia_wood 4",
|
||||
output = "default:acacia_wood 4",
|
||||
recipe = {
|
||||
{"base:paperbark_tree"}
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "base:acacia_wood 4",
|
||||
output = "default:acacia_wood 4",
|
||||
recipe = {
|
||||
{"base:river_oak_tree"}
|
||||
}
|
||||
|
@ -207,7 +173,7 @@ minetest.register_craft({
|
|||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "base:pine_wood 4",
|
||||
output = "default:pine_wood 4",
|
||||
recipe = {
|
||||
{"base:rottnest_island_pine_tree"}
|
||||
}
|
||||
|
@ -221,7 +187,7 @@ minetest.register_craft({
|
|||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "base:acacia_wood 4",
|
||||
output = "default:acacia_wood 4",
|
||||
recipe = {
|
||||
{"base:shoestring_acacia_tree"}
|
||||
}
|
||||
|
@ -276,109 +242,6 @@ minetest.register_craft({
|
|||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'base:wood',
|
||||
recipe = {
|
||||
{'base:bush_stem'},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'base:acacia_wood',
|
||||
recipe = {
|
||||
{'base:acacia_bush_stem'},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'base:stick 4',
|
||||
recipe = {
|
||||
{'group:wood'},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'base:sign_wall_steel 3',
|
||||
recipe = {
|
||||
{'base:steel_ingot', 'base:steel_ingot', 'base:steel_ingot'},
|
||||
{'base:steel_ingot', 'base:steel_ingot', 'base:steel_ingot'},
|
||||
{'', 'group:stick', ''},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'base:sign_wall_wood 3',
|
||||
recipe = {
|
||||
{'group:wood', 'group:wood', 'group:wood'},
|
||||
{'group:wood', 'group:wood', 'group:wood'},
|
||||
{'', 'group:stick', ''},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'base:coalblock',
|
||||
recipe = {
|
||||
{'base:coal_lump', 'base:coal_lump', 'base:coal_lump'},
|
||||
{'base:coal_lump', 'base:coal_lump', 'base:coal_lump'},
|
||||
{'base:coal_lump', 'base:coal_lump', 'base:coal_lump'},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'base:coal_lump 9',
|
||||
recipe = {
|
||||
{'base:coalblock'},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'base:steelblock',
|
||||
recipe = {
|
||||
{'base:steel_ingot', 'base:steel_ingot', 'base:steel_ingot'},
|
||||
{'base:steel_ingot', 'base:steel_ingot', 'base:steel_ingot'},
|
||||
{'base:steel_ingot', 'base:steel_ingot', 'base:steel_ingot'},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'base:steel_ingot 9',
|
||||
recipe = {
|
||||
{'base:steelblock'},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'base:copperblock',
|
||||
recipe = {
|
||||
{'base:copper_ingot', 'base:copper_ingot', 'base:copper_ingot'},
|
||||
{'base:copper_ingot', 'base:copper_ingot', 'base:copper_ingot'},
|
||||
{'base:copper_ingot', 'base:copper_ingot', 'base:copper_ingot'},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'base:copper_ingot 9',
|
||||
recipe = {
|
||||
{'base:copperblock'},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "base:tinblock",
|
||||
recipe = {
|
||||
{"base:tin_ingot", "base:tin_ingot", "base:tin_ingot"},
|
||||
{"base:tin_ingot", "base:tin_ingot", "base:tin_ingot"},
|
||||
{"base:tin_ingot", "base:tin_ingot", "base:tin_ingot"},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "base:tin_ingot 9",
|
||||
recipe = {
|
||||
{"base:tinblock"},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "base:aluminiumblock",
|
||||
recipe = {
|
||||
|
@ -411,47 +274,6 @@ minetest.register_craft({
|
|||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "base:bronze_ingot 9",
|
||||
recipe = {
|
||||
{"base:copper_ingot", "base:copper_ingot", "base:copper_ingot"},
|
||||
{"base:copper_ingot", "base:tin_ingot", "base:copper_ingot"},
|
||||
{"base:copper_ingot", "base:copper_ingot", "base:copper_ingot"},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'base:bronzeblock',
|
||||
recipe = {
|
||||
{'base:bronze_ingot', 'base:bronze_ingot', 'base:bronze_ingot'},
|
||||
{'base:bronze_ingot', 'base:bronze_ingot', 'base:bronze_ingot'},
|
||||
{'base:bronze_ingot', 'base:bronze_ingot', 'base:bronze_ingot'},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'base:bronze_ingot 9',
|
||||
recipe = {
|
||||
{'base:bronzeblock'},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'base:goldblock',
|
||||
recipe = {
|
||||
{'base:gold_ingot', 'base:gold_ingot', 'base:gold_ingot'},
|
||||
{'base:gold_ingot', 'base:gold_ingot', 'base:gold_ingot'},
|
||||
{'base:gold_ingot', 'base:gold_ingot', 'base:gold_ingot'},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'base:gold_ingot 9',
|
||||
recipe = {
|
||||
{'base:goldblock'},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'base:silverblock',
|
||||
recipe = {
|
||||
|
@ -468,273 +290,6 @@ minetest.register_craft({
|
|||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'base:diamondblock',
|
||||
recipe = {
|
||||
{'base:diamond', 'base:diamond', 'base:diamond'},
|
||||
{'base:diamond', 'base:diamond', 'base:diamond'},
|
||||
{'base:diamond', 'base:diamond', 'base:diamond'},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'base:diamond 9',
|
||||
recipe = {
|
||||
{'base:diamondblock'},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "base:sandstone",
|
||||
recipe = {
|
||||
{"base:sand", "base:sand"},
|
||||
{"base:sand", "base:sand"},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "base:sand 4",
|
||||
recipe = {
|
||||
{"base:sandstone"},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "base:sandstonebrick 4",
|
||||
recipe = {
|
||||
{"base:sandstone", "base:sandstone"},
|
||||
{"base:sandstone", "base:sandstone"},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "base:sandstone_block 9",
|
||||
recipe = {
|
||||
{"base:sandstone", "base:sandstone", "base:sandstone"},
|
||||
{"base:sandstone", "base:sandstone", "base:sandstone"},
|
||||
{"base:sandstone", "base:sandstone", "base:sandstone"},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "base:desert_sandstone",
|
||||
recipe = {
|
||||
{"base:desert_sand", "base:desert_sand"},
|
||||
{"base:desert_sand", "base:desert_sand"},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "base:desert_sand 4",
|
||||
recipe = {
|
||||
{"base:desert_sandstone"},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "base:desert_sandstone_brick 4",
|
||||
recipe = {
|
||||
{"base:desert_sandstone", "base:desert_sandstone"},
|
||||
{"base:desert_sandstone", "base:desert_sandstone"},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "base:desert_sandstone_block 9",
|
||||
recipe = {
|
||||
{"base:desert_sandstone", "base:desert_sandstone", "base:desert_sandstone"},
|
||||
{"base:desert_sandstone", "base:desert_sandstone", "base:desert_sandstone"},
|
||||
{"base:desert_sandstone", "base:desert_sandstone", "base:desert_sandstone"},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'base:clay',
|
||||
recipe = {
|
||||
{'base:clay_lump', 'base:clay_lump'},
|
||||
{'base:clay_lump', 'base:clay_lump'},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'base:clay_lump 4',
|
||||
recipe = {
|
||||
{'base:clay'},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'base:brick',
|
||||
recipe = {
|
||||
{'base:clay_brick', 'base:clay_brick'},
|
||||
{'base:clay_brick', 'base:clay_brick'},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'base:clay_brick 4',
|
||||
recipe = {
|
||||
{'base:brick'},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'base:paper',
|
||||
recipe = {
|
||||
{'base:papyrus', 'base:papyrus', 'base:papyrus'},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "base:ladder_wood 5",
|
||||
recipe = {
|
||||
{"group:stick", "", "group:stick"},
|
||||
{"group:stick", "group:stick", "group:stick"},
|
||||
{"group:stick", "", "group:stick"},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'base:ladder_steel 15',
|
||||
recipe = {
|
||||
{'base:steel_ingot', '', 'base:steel_ingot'},
|
||||
{'base:steel_ingot', 'base:steel_ingot', 'base:steel_ingot'},
|
||||
{'base:steel_ingot', '', 'base:steel_ingot'},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'base:mese',
|
||||
recipe = {
|
||||
{'base:mese_crystal', 'base:mese_crystal', 'base:mese_crystal'},
|
||||
{'base:mese_crystal', 'base:mese_crystal', 'base:mese_crystal'},
|
||||
{'base:mese_crystal', 'base:mese_crystal', 'base:mese_crystal'},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'base:mese_crystal 9',
|
||||
recipe = {
|
||||
{'base:mese'},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'base:mese_crystal_fragment 9',
|
||||
recipe = {
|
||||
{'base:mese_crystal'},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "base:mese_crystal",
|
||||
recipe = {
|
||||
{"base:mese_crystal_fragment", "base:mese_crystal_fragment", "base:mese_crystal_fragment"},
|
||||
{"base:mese_crystal_fragment", "base:mese_crystal_fragment", "base:mese_crystal_fragment"},
|
||||
{"base:mese_crystal_fragment", "base:mese_crystal_fragment", "base:mese_crystal_fragment"},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'base:meselamp',
|
||||
recipe = {
|
||||
{'base:glass'},
|
||||
{'base:mese_crystal'},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "base:mese_post_light 3",
|
||||
recipe = {
|
||||
{"", "base:glass", ""},
|
||||
{"base:mese_crystal", "base:mese_crystal", "base:mese_crystal"},
|
||||
{"", "group:wood", ""},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'base:obsidian_shard 9',
|
||||
recipe = {
|
||||
{'base:obsidian'}
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'base:obsidian',
|
||||
recipe = {
|
||||
{'base:obsidian_shard', 'base:obsidian_shard', 'base:obsidian_shard'},
|
||||
{'base:obsidian_shard', 'base:obsidian_shard', 'base:obsidian_shard'},
|
||||
{'base:obsidian_shard', 'base:obsidian_shard', 'base:obsidian_shard'},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'base:obsidianbrick 4',
|
||||
recipe = {
|
||||
{'base:obsidian', 'base:obsidian'},
|
||||
{'base:obsidian', 'base:obsidian'}
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'base:obsidian_block 9',
|
||||
recipe = {
|
||||
{'base:obsidian', 'base:obsidian', 'base:obsidian'},
|
||||
{'base:obsidian', 'base:obsidian', 'base:obsidian'},
|
||||
{'base:obsidian', 'base:obsidian', 'base:obsidian'},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'base:stonebrick 4',
|
||||
recipe = {
|
||||
{'base:stone', 'base:stone'},
|
||||
{'base:stone', 'base:stone'},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'base:stone_block 9',
|
||||
recipe = {
|
||||
{'base:stone', 'base:stone', 'base:stone'},
|
||||
{'base:stone', 'base:stone', 'base:stone'},
|
||||
{'base:stone', 'base:stone', 'base:stone'},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'base:desert_stonebrick 4',
|
||||
recipe = {
|
||||
{'base:desert_stone', 'base:desert_stone'},
|
||||
{'base:desert_stone', 'base:desert_stone'},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'base:desert_stone_block 9',
|
||||
recipe = {
|
||||
{'base:desert_stone', 'base:desert_stone', 'base:desert_stone'},
|
||||
{'base:desert_stone', 'base:desert_stone', 'base:desert_stone'},
|
||||
{'base:desert_stone', 'base:desert_stone', 'base:desert_stone'},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'base:snowblock',
|
||||
recipe = {
|
||||
{'base:snow', 'base:snow', 'base:snow'},
|
||||
{'base:snow', 'base:snow', 'base:snow'},
|
||||
{'base:snow', 'base:snow', 'base:snow'},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'base:snow 9',
|
||||
recipe = {
|
||||
{'base:snowblock'},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "base:salt_block",
|
||||
recipe = {
|
||||
|
@ -772,7 +327,7 @@ minetest.register_craft({
|
|||
recipe = {
|
||||
{"base:slate","base:slate"},
|
||||
{"base:slate","base:slate"},
|
||||
{"base:sand","base:clay"},
|
||||
{"default:sand","default:clay"},
|
||||
}
|
||||
})
|
||||
|
||||
|
@ -781,7 +336,7 @@ minetest.register_craft({
|
|||
recipe = {
|
||||
{"base:marble","base:marble"},
|
||||
{"base:marble","base:marble"},
|
||||
{"base:sand","base:clay"},
|
||||
{"default:sand","default:clay"},
|
||||
}
|
||||
})
|
||||
|
||||
|
@ -805,7 +360,7 @@ minetest.register_craft({
|
|||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "base:cobble",
|
||||
output = "default:cobble",
|
||||
recipe = {
|
||||
{"base:small_stone_rocks", "base:small_stone_rocks", "base:small_stone_rocks"},
|
||||
{"base:small_stone_rocks", "base:small_stone_rocks", "base:small_stone_rocks"},
|
||||
|
@ -814,57 +369,9 @@ minetest.register_craft({
|
|||
})
|
||||
|
||||
|
||||
--
|
||||
-- Cooking recipes
|
||||
--
|
||||
|
||||
minetest.register_craft({
|
||||
type = "cooking",
|
||||
output = "base:glass",
|
||||
recipe = "group:sand",
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "cooking",
|
||||
output = "base:obsidian_glass",
|
||||
recipe = "base:obsidian_shard",
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "cooking",
|
||||
output = "base:stone",
|
||||
recipe = "base:cobble",
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "cooking",
|
||||
output = "base:stone",
|
||||
recipe = "base:mossycobble",
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "cooking",
|
||||
output = "base:desert_stone",
|
||||
recipe = "base:desert_cobble",
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "cooking",
|
||||
output = "base:steel_ingot",
|
||||
recipe = "base:iron_lump",
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "cooking",
|
||||
output = "base:copper_ingot",
|
||||
recipe = "base:copper_lump",
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "cooking",
|
||||
output = "base:tin_ingot",
|
||||
recipe = "base:tin_lump",
|
||||
})
|
||||
--[[
|
||||
Cooking recipes
|
||||
--]]
|
||||
|
||||
minetest.register_craft({
|
||||
type = "cooking",
|
||||
|
@ -878,24 +385,12 @@ minetest.register_craft({
|
|||
recipe = "base:nickel_lump",
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "cooking",
|
||||
output = "base:gold_ingot",
|
||||
recipe = "base:gold_lump",
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "cooking",
|
||||
output = "base:silver_ingot",
|
||||
recipe = "base:silver_lump",
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "cooking",
|
||||
output = "base:clay_brick",
|
||||
recipe = "base:clay_lump",
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "cooking",
|
||||
output = "base:basalt",
|
||||
|
|
|
@ -2,39 +2,6 @@
|
|||
Base craftitems
|
||||
--]]
|
||||
|
||||
minetest.register_craftitem("base:stick", {
|
||||
description = "Stick",
|
||||
inventory_image = "base_stick.png",
|
||||
groups = {stick = 1, flammable = 2},
|
||||
})
|
||||
|
||||
minetest.register_craftitem("base:paper", {
|
||||
description = "Paper",
|
||||
inventory_image = "base_paper.png",
|
||||
groups = {flammable = 3},
|
||||
})
|
||||
|
||||
minetest.register_craftitem("base:coal_lump", {
|
||||
description = "Coal Lump",
|
||||
inventory_image = "base_coal_lump.png",
|
||||
groups = {coal = 1, flammable = 1}
|
||||
})
|
||||
|
||||
minetest.register_craftitem("base:iron_lump", {
|
||||
description = "Iron Lump",
|
||||
inventory_image = "base_iron_lump.png",
|
||||
})
|
||||
|
||||
minetest.register_craftitem("base:copper_lump", {
|
||||
description = "Copper Lump",
|
||||
inventory_image = "base_copper_lump.png",
|
||||
})
|
||||
|
||||
minetest.register_craftitem("base:tin_lump", {
|
||||
description = "Tin Lump",
|
||||
inventory_image = "base_tin_lump.png",
|
||||
})
|
||||
|
||||
minetest.register_craftitem("base:aluminium_lump", {
|
||||
description = "Aluminium Lump",
|
||||
inventory_image = "base_aluminium_lump.png",
|
||||
|
@ -45,46 +12,11 @@ minetest.register_craftitem("base:nickel_lump", {
|
|||
inventory_image = "base_nickel_lump.png",
|
||||
})
|
||||
|
||||
minetest.register_craftitem("base:mese_crystal", {
|
||||
description = "Mese Crystal",
|
||||
inventory_image = "base_mese_crystal.png",
|
||||
})
|
||||
|
||||
minetest.register_craftitem("base:gold_lump", {
|
||||
description = "Gold Lump",
|
||||
inventory_image = "base_gold_lump.png",
|
||||
})
|
||||
|
||||
minetest.register_craftitem("base:silver_lump", {
|
||||
description = "Silver Lump",
|
||||
inventory_image = "base_silver_lump.png",
|
||||
})
|
||||
|
||||
minetest.register_craftitem("base:diamond", {
|
||||
description = "Diamond",
|
||||
inventory_image = "base_diamond.png",
|
||||
})
|
||||
|
||||
minetest.register_craftitem("base:clay_lump", {
|
||||
description = "Clay Lump",
|
||||
inventory_image = "base_clay_lump.png",
|
||||
})
|
||||
|
||||
minetest.register_craftitem("base:steel_ingot", {
|
||||
description = "Steel Ingot",
|
||||
inventory_image = "base_steel_ingot.png",
|
||||
})
|
||||
|
||||
minetest.register_craftitem("base:copper_ingot", {
|
||||
description = "Copper Ingot",
|
||||
inventory_image = "base_copper_ingot.png",
|
||||
})
|
||||
|
||||
minetest.register_craftitem("base:tin_ingot", {
|
||||
description = "Tin Ingot",
|
||||
inventory_image = "base_tin_ingot.png",
|
||||
})
|
||||
|
||||
minetest.register_craftitem("base:aluminium_ingot", {
|
||||
description = "Aluminium Ingot",
|
||||
inventory_image = "base_aluminium_ingot.png",
|
||||
|
@ -95,38 +27,8 @@ minetest.register_craftitem("base:nickel_ingot", {
|
|||
inventory_image = "base_nickel_ingot.png",
|
||||
})
|
||||
|
||||
minetest.register_craftitem("base:bronze_ingot", {
|
||||
description = "Bronze Ingot",
|
||||
inventory_image = "base_bronze_ingot.png",
|
||||
})
|
||||
|
||||
minetest.register_craftitem("base:gold_ingot", {
|
||||
description = "Gold Ingot",
|
||||
inventory_image = "base_gold_ingot.png"
|
||||
})
|
||||
|
||||
minetest.register_craftitem("base:silver_ingot", {
|
||||
description = "Silver Ingot",
|
||||
inventory_image = "base_silver_ingot.png",
|
||||
})
|
||||
|
||||
minetest.register_craftitem("base:mese_crystal_fragment", {
|
||||
description = "Mese Crystal Fragment",
|
||||
inventory_image = "base_mese_crystal_fragment.png",
|
||||
})
|
||||
|
||||
minetest.register_craftitem("base:clay_brick", {
|
||||
description = "Clay Brick",
|
||||
inventory_image = "base_clay_brick.png",
|
||||
})
|
||||
|
||||
minetest.register_craftitem("base:obsidian_shard", {
|
||||
description = "Obsidian Shard",
|
||||
inventory_image = "base_obsidian_shard.png",
|
||||
})
|
||||
|
||||
minetest.register_craftitem("base:flint", {
|
||||
description = "Flint",
|
||||
inventory_image = "base_flint.png"
|
||||
})
|
||||
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
default
|
|
@ -8,387 +8,3 @@ function base.push(t, x)
|
|||
t[#t+1] = x
|
||||
end
|
||||
|
||||
|
||||
--
|
||||
-- Lavacooling
|
||||
--
|
||||
|
||||
base.cool_lava = function(pos, node)
|
||||
if node.name == "base:lava_source" then
|
||||
minetest.set_node(pos, {name = "base:obsidian"})
|
||||
else -- Lava flowing
|
||||
minetest.set_node(pos, {name = "base:stone"})
|
||||
end
|
||||
minetest.sound_play("base_cool_lava",
|
||||
{pos = pos, max_hear_distance = 16, gain = 0.25})
|
||||
end
|
||||
|
||||
if minetest.settings:get_bool("enable_lavacooling") ~= false then
|
||||
minetest.register_abm({
|
||||
label = "Lava cooling",
|
||||
nodenames = {"base:lava_source", "base:lava_flowing"},
|
||||
neighbors = {"group:cools_lava", "group:water"},
|
||||
interval = 1,
|
||||
chance = 2,
|
||||
catch_up = false,
|
||||
action = base.cool_lava,
|
||||
})
|
||||
end
|
||||
|
||||
--
|
||||
-- optimized helper to put all items in an inventory into a drops list
|
||||
--
|
||||
|
||||
function base.get_inventory_drops(pos, inventory, drops)
|
||||
local inv = minetest.get_meta(pos):get_inventory()
|
||||
local n = #drops
|
||||
for i = 1, inv:get_size(inventory) do
|
||||
local stack = inv:get_stack(inventory, i)
|
||||
if stack:get_count() > 0 then
|
||||
drops[n+1] = stack:to_table()
|
||||
n = n + 1
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--
|
||||
-- Papyrus and cactus growing
|
||||
--
|
||||
|
||||
-- wrapping the functions in abm action is necessary to make overriding them possible
|
||||
|
||||
function base.grow_cactus(pos, node)
|
||||
if node.param2 >= 4 then
|
||||
return
|
||||
end
|
||||
pos.y = pos.y - 1
|
||||
if minetest.get_item_group(minetest.get_node(pos).name, "sand") == 0 then
|
||||
return
|
||||
end
|
||||
pos.y = pos.y + 1
|
||||
local height = 0
|
||||
while node.name == "base:cactus" and height < 4 do
|
||||
height = height + 1
|
||||
pos.y = pos.y + 1
|
||||
node = minetest.get_node(pos)
|
||||
end
|
||||
if height == 4 or node.name ~= "air" then
|
||||
return
|
||||
end
|
||||
if minetest.get_node_light(pos) < 13 then
|
||||
return
|
||||
end
|
||||
minetest.set_node(pos, {name = "base:cactus"})
|
||||
return true
|
||||
end
|
||||
|
||||
function base.grow_papyrus(pos, node)
|
||||
pos.y = pos.y - 1
|
||||
local name = minetest.get_node(pos).name
|
||||
if name ~= "base:dirt_with_grass" and name ~= "base:dirt" then
|
||||
return
|
||||
end
|
||||
if not minetest.find_node_near(pos, 3, {"group:water"}) then
|
||||
return
|
||||
end
|
||||
pos.y = pos.y + 1
|
||||
local height = 0
|
||||
while node.name == "base:papyrus" and height < 4 do
|
||||
height = height + 1
|
||||
pos.y = pos.y + 1
|
||||
node = minetest.get_node(pos)
|
||||
end
|
||||
if height == 4 or node.name ~= "air" then
|
||||
return
|
||||
end
|
||||
if minetest.get_node_light(pos) < 13 then
|
||||
return
|
||||
end
|
||||
minetest.set_node(pos, {name = "base:papyrus"})
|
||||
return true
|
||||
end
|
||||
|
||||
minetest.register_abm({
|
||||
label = "Grow cactus",
|
||||
nodenames = {"base:cactus"},
|
||||
neighbors = {"group:sand"},
|
||||
interval = 12,
|
||||
chance = 83,
|
||||
action = base.grow_cactus
|
||||
})
|
||||
|
||||
minetest.register_abm({
|
||||
label = "Grow papyrus",
|
||||
nodenames = {"base:papyrus"},
|
||||
neighbors = {"base:dirt", "base:dirt_with_grass"},
|
||||
interval = 14,
|
||||
chance = 71,
|
||||
action = base.grow_papyrus
|
||||
})
|
||||
|
||||
|
||||
--
|
||||
-- dig upwards
|
||||
--
|
||||
|
||||
function base.dig_up(pos, node, digger)
|
||||
if digger == nil then return end
|
||||
local np = {x = pos.x, y = pos.y + 1, z = pos.z}
|
||||
local nn = minetest.get_node(np)
|
||||
if nn.name == node.name then
|
||||
minetest.node_dig(np, nn, digger)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
--
|
||||
-- Leafdecay
|
||||
--
|
||||
|
||||
-- Prevent decay of placed leaves
|
||||
|
||||
base.after_place_leaves = function(pos, placer, itemstack, pointed_thing)
|
||||
if placer and not placer:get_player_control().sneak then
|
||||
local node = minetest.get_node(pos)
|
||||
node.param2 = 1
|
||||
minetest.set_node(pos, node)
|
||||
end
|
||||
end
|
||||
|
||||
-- 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)
|
||||
local timer = minetest.get_node_timer(v)
|
||||
if node.param2 == 0 and not timer:is_started() then
|
||||
timer:start(math.random(20, 120) / 10)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
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
|
||||
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 base.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
|
||||
--
|
||||
|
||||
minetest.register_abm({
|
||||
label = "Grass spread",
|
||||
nodenames = {"base:dirt"},
|
||||
neighbors = {
|
||||
"air",
|
||||
"group:grass",
|
||||
"group:dry_grass",
|
||||
"base:snow",
|
||||
},
|
||||
interval = 6,
|
||||
chance = 50,
|
||||
catch_up = false,
|
||||
action = function(pos, node)
|
||||
-- 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 spreading dirt-type neighbours
|
||||
local p2 = minetest.find_node_near(pos, 1, "group:spreading_dirt_type")
|
||||
if p2 then
|
||||
local n3 = minetest.get_node(p2)
|
||||
minetest.set_node(pos, {name = n3.name})
|
||||
return
|
||||
end
|
||||
|
||||
-- Else, any seeding nodes on top?
|
||||
local name = minetest.get_node(above).name
|
||||
-- Snow check is cheapest, so comes first
|
||||
if name == "base:snow" then
|
||||
minetest.set_node(pos, {name = "base:dirt_with_snow"})
|
||||
-- Most likely case first
|
||||
elseif minetest.get_item_group(name, "grass") ~= 0 then
|
||||
minetest.set_node(pos, {name = "base:dirt_with_grass"})
|
||||
elseif minetest.get_item_group(name, "dry_grass") ~= 0 then
|
||||
minetest.set_node(pos, {name = "base:dirt_with_dry_grass"})
|
||||
end
|
||||
end
|
||||
})
|
||||
|
||||
|
||||
--
|
||||
-- Grass and dry grass removed in darkness
|
||||
--
|
||||
|
||||
minetest.register_abm({
|
||||
label = "Grass covered",
|
||||
nodenames = {"group:spreading_dirt_type"},
|
||||
interval = 8,
|
||||
chance = 50,
|
||||
catch_up = false,
|
||||
action = function(pos, node)
|
||||
local above = {x = pos.x, y = pos.y + 1, z = pos.z}
|
||||
local name = minetest.get_node(above).name
|
||||
local nodedef = minetest.registered_nodes[name]
|
||||
if name ~= "ignore" and nodedef and not ((nodedef.sunlight_propagates or
|
||||
nodedef.paramtype == "light") and
|
||||
nodedef.liquidtype == "none") then
|
||||
minetest.set_node(pos, {name = "base:dirt"})
|
||||
end
|
||||
end
|
||||
})
|
||||
|
||||
|
||||
--
|
||||
-- Moss growth on cobble near water
|
||||
--
|
||||
|
||||
minetest.register_abm({
|
||||
label = "Moss growth",
|
||||
nodenames = {"base:cobble", "stairs:slab_cobble", "stairs:stair_cobble", "walls:cobble"},
|
||||
neighbors = {"group:water"},
|
||||
interval = 16,
|
||||
chance = 200,
|
||||
catch_up = false,
|
||||
action = function(pos, node)
|
||||
if node.name == "base:cobble" then
|
||||
minetest.set_node(pos, {name = "base:mossycobble"})
|
||||
elseif node.name == "stairs:slab_cobble" then
|
||||
minetest.set_node(pos, {name = "stairs:slab_mossycobble", param2 = node.param2})
|
||||
elseif node.name == "stairs:stair_cobble" then
|
||||
minetest.set_node(pos, {name = "stairs:stair_mossycobble", param2 = node.param2})
|
||||
elseif node.name == "walls:cobble" then
|
||||
minetest.set_node(pos, {name = "walls:mossycobble", param2 = node.param2})
|
||||
end
|
||||
end
|
||||
})
|
||||
|
||||
|
||||
--
|
||||
-- Checks if specified volume intersects a protected volume
|
||||
--
|
||||
|
||||
function base.intersects_protection(minp, maxp, player_name, interval)
|
||||
-- 'interval' is the largest allowed interval for the 3D lattice of checks
|
||||
|
||||
-- Compute the optimal float step 'd' for each axis so that all corners and
|
||||
-- borders are checked. 'd' will be smaller or equal to 'interval'.
|
||||
-- Subtracting 1e-4 ensures that the max co-ordinate will be reached by the
|
||||
-- for loop (which might otherwise not be the case due to rounding errors).
|
||||
local d = {}
|
||||
for _, c in pairs({"x", "y", "z"}) do
|
||||
if maxp[c] > minp[c] then
|
||||
d[c] = (maxp[c] - minp[c]) / math.ceil((maxp[c] - minp[c]) / interval) - 1e-4
|
||||
elseif maxp[c] == minp[c] then
|
||||
d[c] = 1 -- Any value larger than 0 to avoid division by zero
|
||||
else -- maxp[c] < minp[c], print error and treat as protection intersected
|
||||
minetest.log("error", "maxp < minp in 'base.intersects_protection()'")
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
for zf = minp.z, maxp.z, d.z do
|
||||
local z = math.floor(zf + 0.5)
|
||||
for yf = minp.y, maxp.y, d.y do
|
||||
local y = math.floor(yf + 0.5)
|
||||
for xf = minp.x, maxp.x, d.x do
|
||||
local x = math.floor(xf + 0.5)
|
||||
if minetest.is_protected({x = x, y = y, z = z}, player_name) then
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
return false
|
||||
end
|
||||
|
||||
|
||||
--
|
||||
-- NOTICE: This method is not an official part of the API yet!
|
||||
-- This method may change in future.
|
||||
--
|
||||
|
||||
function base.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)
|
||||
local owner = meta:get_string("owner")
|
||||
|
||||
if not owner or owner == "" or owner == player:get_player_name() then
|
||||
return true
|
||||
end
|
||||
|
||||
-- is player wielding the right key?
|
||||
local item = player:get_wielded_item()
|
||||
if item:get_name() == "base:key" then
|
||||
local key_meta = item:get_meta()
|
||||
|
||||
if key_meta:get_string("secret") == "" then
|
||||
local key_oldmeta = item:get_metadata()
|
||||
if key_oldmeta == "" or not minetest.parse_json(key_oldmeta) then
|
||||
return false
|
||||
end
|
||||
|
||||
key_meta:set_string("secret", minetest.parse_json(key_oldmeta).secret)
|
||||
item:set_metadata("")
|
||||
end
|
||||
|
||||
return meta:get_string("key_lock_secret") == key_meta:get_string("secret")
|
||||
end
|
||||
|
||||
return false
|
||||
end
|
||||
|
||||
|
|
|
@ -6,7 +6,6 @@ base = {}
|
|||
|
||||
-- Load files
|
||||
local modpath = minetest.get_modpath("base")
|
||||
dofile(modpath.."/sounds.lua")
|
||||
dofile(modpath.."/functions.lua")
|
||||
dofile(modpath.."/nodes_base.lua") -- Simple solid cubic nodes with simple definitions
|
||||
dofile(modpath.."/nodes_liquid.lua") -- Liquids
|
||||
|
|
|
@ -7,81 +7,12 @@
|
|||
-- Stone
|
||||
--
|
||||
|
||||
minetest.register_node("base:stone", {
|
||||
description = "Stone",
|
||||
tiles = {"base_stone.png"},
|
||||
groups = {cracky = 3, stone = 1},
|
||||
drop = 'base:cobble',
|
||||
legacy_mineral = true,
|
||||
sounds = base.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("base:cobble", {
|
||||
description = "Cobblestone",
|
||||
tiles = {"base_cobble.png"},
|
||||
is_ground_content = false,
|
||||
groups = {cracky = 3, stone = 2},
|
||||
sounds = base.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("base:stonebrick", {
|
||||
description = "Stone Brick",
|
||||
paramtype2 = "facedir",
|
||||
place_param2 = 0,
|
||||
tiles = {"base_stone_brick.png"},
|
||||
is_ground_content = false,
|
||||
groups = {cracky = 2, stone = 1},
|
||||
sounds = base.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("base:stone_block", {
|
||||
description = "Stone Block",
|
||||
tiles = {"base_stone_block.png"},
|
||||
is_ground_content = false,
|
||||
groups = {cracky = 2, stone = 1},
|
||||
sounds = base.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("base:mossycobble", {
|
||||
description = "Mossy Cobblestone",
|
||||
tiles = {"base_mossycobble.png"},
|
||||
is_ground_content = false,
|
||||
groups = {cracky = 3, stone = 1},
|
||||
sounds = base.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("base:sandstone", {
|
||||
description = "Sandstone",
|
||||
tiles = {"base_sandstone.png"},
|
||||
drop = 'base:sandstone_cobble',
|
||||
groups = {crumbly = 1, cracky = 3},
|
||||
sounds = base.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("base:sandstonebrick", {
|
||||
description = "Sandstone Brick",
|
||||
paramtype2 = "facedir",
|
||||
place_param2 = 0,
|
||||
tiles = {"base_sandstone_brick.png"},
|
||||
is_ground_content = false,
|
||||
groups = {cracky = 2},
|
||||
sounds = base.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("base:sandstone_block", {
|
||||
description = "Sandstone Block",
|
||||
tiles = {"base_sandstone_block.png"},
|
||||
is_ground_content = false,
|
||||
groups = {cracky = 2},
|
||||
sounds = base.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("base:red_sandstone", {
|
||||
description = "Red Sandstone",
|
||||
tiles = {"base_red_sandstone.png"},
|
||||
groups = {crumbly = 1, cracky = 3},
|
||||
drop = 'base:red_sandstone_cobble',
|
||||
sounds = base.node_sound_stone_defaults(),
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("base:red_sandstonebrick", {
|
||||
|
@ -91,64 +22,14 @@ minetest.register_node("base:red_sandstonebrick", {
|
|||
tiles = {"base_red_sandstone_brick.png"},
|
||||
is_ground_content = false,
|
||||
groups = {cracky = 2},
|
||||
sounds = base.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("base:desert_sandstone", {
|
||||
description = "Desert Sandstone",
|
||||
tiles = {"base_desert_sandstone.png"},
|
||||
groups = {crumbly = 1, cracky = 3},
|
||||
sounds = base.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("base:desert_sandstone_brick", {
|
||||
description = "Desert Sandstone Brick",
|
||||
paramtype2 = "facedir",
|
||||
place_param2 = 0,
|
||||
tiles = {"base_desert_sandstone_brick.png"},
|
||||
is_ground_content = false,
|
||||
groups = {cracky = 2},
|
||||
sounds = base.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("base:desert_sandstone_block", {
|
||||
description = "Desert Sandstone Block",
|
||||
tiles = {"base_desert_sandstone_block.png"},
|
||||
is_ground_content = false,
|
||||
groups = {cracky = 2},
|
||||
sounds = base.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("base:obsidian", {
|
||||
description = "Obsidian",
|
||||
tiles = {"base_obsidian.png"},
|
||||
sounds = base.node_sound_stone_defaults(),
|
||||
groups = {cracky = 1, level = 2},
|
||||
})
|
||||
|
||||
minetest.register_node("base:obsidianbrick", {
|
||||
description = "Obsidian Brick",
|
||||
paramtype2 = "facedir",
|
||||
place_param2 = 0,
|
||||
tiles = {"base_obsidian_brick.png"},
|
||||
is_ground_content = false,
|
||||
sounds = base.node_sound_stone_defaults(),
|
||||
groups = {cracky = 1, level = 2},
|
||||
})
|
||||
|
||||
minetest.register_node("base:obsidian_block", {
|
||||
description = "Obsidian Block",
|
||||
tiles = {"base_obsidian_block.png"},
|
||||
is_ground_content = false,
|
||||
sounds = base.node_sound_stone_defaults(),
|
||||
groups = {cracky = 1, level = 2},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("base:sandstone_cobble", {
|
||||
description = "Sandstone Cobble",
|
||||
tiles = {"base_sandstone_cobble.png"},
|
||||
groups = {crumbly = 1, cracky = 3, oddly_breakable_by_hand = 1},
|
||||
sounds = base.node_sound_stone_defaults(),
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("base:basalt", {
|
||||
|
@ -156,7 +37,7 @@ minetest.register_node("base:basalt", {
|
|||
tiles = {"base_basalt.png"},
|
||||
groups = {cracky = 2, stone = 1},
|
||||
drop = "base:basalt_cobble",
|
||||
sounds = base.node_sound_stone_defaults(),
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("base:basalt_cobble", {
|
||||
|
@ -164,7 +45,7 @@ minetest.register_node("base:basalt_cobble", {
|
|||
tiles = {"base_basalt_cobble.png"},
|
||||
is_ground_content = false,
|
||||
groups = {cracky = 2, stone = 2},
|
||||
sounds = base.node_sound_stone_defaults(),
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("base:basalt_brick", {
|
||||
|
@ -172,7 +53,7 @@ minetest.register_node("base:basalt_brick", {
|
|||
tiles = {"base_basalt_brick.png"},
|
||||
is_ground_content = false,
|
||||
groups = {cracky = 1, stone = 1},
|
||||
sounds = base.node_sound_stone_defaults(),
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("base:diorite", {
|
||||
|
@ -180,21 +61,21 @@ minetest.register_node("base:diorite", {
|
|||
tiles = {"base_diorite.png"},
|
||||
groups = {cracky = 2, stone = 1},
|
||||
drop = 'base:diorite_cobble',
|
||||
sounds = base.node_sound_stone_defaults(),
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("base:diorite_cobble", {
|
||||
description = "Diorite Cobble",
|
||||
tiles = {"base_diorite_cobble.png"},
|
||||
groups = {cracky = 2, stone = 1},
|
||||
sounds = base.node_sound_stone_defaults(),
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("base:diorite_brick", {
|
||||
description = "Diorite Brick",
|
||||
tiles = {"base_diorite_brick.png"},
|
||||
groups = {cracky = 2, stone = 1},
|
||||
sounds = base.node_sound_stone_defaults(),
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("base:limestone", {
|
||||
|
@ -202,7 +83,7 @@ minetest.register_node("base:limestone", {
|
|||
tiles = {"base_limestone.png"},
|
||||
drop = 'base:limestone_cobble',
|
||||
groups = {cracky = 3, stone = 1},
|
||||
sounds = base.node_sound_stone_defaults(),
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("base:limestone_cobble", {
|
||||
|
@ -210,29 +91,29 @@ minetest.register_node("base:limestone_cobble", {
|
|||
tiles = {"base_limestone_cobble.png"},
|
||||
is_ground_content = false,
|
||||
groups = {cracky = 3, stone = 2},
|
||||
sounds = base.node_sound_stone_defaults(),
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("base:limestone_brick", {
|
||||
description = "Limestone Brick",
|
||||
tiles = {"base_limestone_brick.png"},
|
||||
groups = {cracky = 3, stone = 1},
|
||||
sounds = base.node_sound_stone_defaults(),
|
||||
})
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("base:marble", {
|
||||
description = "Marble",
|
||||
tiles = {"base_marble.png"},
|
||||
groups = {cracky = 3, stone = 1},
|
||||
sounds = base.node_sound_stone_defaults(),
|
||||
})
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("base:marble_tile", {
|
||||
description = "Marble Tile",
|
||||
tiles = {"base_marble_tile.png"},
|
||||
is_ground_content = false,
|
||||
groups = {cracky = 2, stone = 1},
|
||||
sounds = base.node_sound_stone_defaults()
|
||||
sounds = default.node_sound_stone_defaults()
|
||||
})
|
||||
|
||||
minetest.register_node("base:shale", {
|
||||
|
@ -240,7 +121,7 @@ minetest.register_node("base:shale", {
|
|||
tiles = {"base_shale.png","base_shale.png","base_shale_side.png"},
|
||||
is_ground_content = true,
|
||||
groups = {crumbly = 2, cracky = 2},
|
||||
sounds = base.node_sound_stone_defaults()
|
||||
sounds = default.node_sound_stone_defaults()
|
||||
})
|
||||
|
||||
minetest.register_node("base:slate", {
|
||||
|
@ -249,7 +130,7 @@ minetest.register_node("base:slate", {
|
|||
is_ground_content = true,
|
||||
drop = 'base:slate_rubble',
|
||||
groups = {cracky = 2},
|
||||
sounds = base.node_sound_stone_defaults()
|
||||
sounds = default.node_sound_stone_defaults()
|
||||
})
|
||||
|
||||
minetest.register_node("base:slate_rubble", {
|
||||
|
@ -257,7 +138,7 @@ minetest.register_node("base:slate_rubble", {
|
|||
tiles = {"base_slate_rubble.png"},
|
||||
is_ground_content = false,
|
||||
groups = {cracky = 2},
|
||||
sounds = base.node_sound_stone_defaults()
|
||||
sounds = default.node_sound_stone_defaults()
|
||||
})
|
||||
|
||||
minetest.register_node("base:slate_brick", {
|
||||
|
@ -265,7 +146,7 @@ minetest.register_node("base:slate_brick", {
|
|||
tiles = {"base_slate_brick.png"},
|
||||
is_ground_content = false,
|
||||
groups = {cracky = 2},
|
||||
sounds = base.node_sound_stone_defaults()
|
||||
sounds = default.node_sound_stone_defaults()
|
||||
})
|
||||
|
||||
minetest.register_node("base:slate_tile", {
|
||||
|
@ -273,7 +154,7 @@ minetest.register_node("base:slate_tile", {
|
|||
tiles = {"base_slate_tile.png"},
|
||||
is_ground_content = false,
|
||||
groups = {cracky = 2},
|
||||
sounds = base.node_sound_stone_defaults()
|
||||
sounds = default.node_sound_stone_defaults()
|
||||
})
|
||||
|
||||
|
||||
|
@ -281,197 +162,32 @@ minetest.register_node("base:slate_tile", {
|
|||
-- Soft / Non-Stone
|
||||
--
|
||||
|
||||
minetest.register_node("base:dirt", {
|
||||
description = "Dirt",
|
||||
tiles = {"base_dirt.png"},
|
||||
groups = {crumbly = 3, soil = 1},
|
||||
sounds = base.node_sound_dirt_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("base:red_dirt", {
|
||||
description = "Red Dirt",
|
||||
tiles = {"base_red_dirt.png"},
|
||||
groups = {crumbly = 3, soil = 1},
|
||||
sounds = base.node_sound_dirt_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("base:dirt_with_grass", {
|
||||
description = "Dirt with Grass",
|
||||
tiles = {"base_grass.png", "base_dirt.png",
|
||||
{name = "base_dirt.png^base_grass_side.png",
|
||||
tileable_vertical = false}},
|
||||
groups = {crumbly = 3, soil = 1, spreading_dirt_type = 1},
|
||||
drop = 'base:dirt',
|
||||
sounds = base.node_sound_dirt_defaults({
|
||||
footstep = {name = "base_grass_footstep", gain = 0.25},
|
||||
}),
|
||||
})
|
||||
|
||||
minetest.register_node("base:dirt_with_grass_footsteps", {
|
||||
description = "Dirt with Grass and Footsteps",
|
||||
tiles = {"base_grass.png^base_footprint.png", "base_dirt.png",
|
||||
{name = "base_dirt.png^base_grass_side.png",
|
||||
tileable_vertical = false}},
|
||||
groups = {crumbly = 3, soil = 1, not_in_creative_inventory = 1},
|
||||
drop = 'base:dirt',
|
||||
sounds = base.node_sound_dirt_defaults({
|
||||
footstep = {name = "base_grass_footstep", gain = 0.25},
|
||||
}),
|
||||
})
|
||||
|
||||
minetest.register_node("base:dirt_with_dry_grass", {
|
||||
description = "Dirt with Dry Grass",
|
||||
tiles = {"base_dry_grass.png",
|
||||
"base_dirt.png",
|
||||
{name = "base_dirt.png^base_dry_grass_side.png",
|
||||
tileable_vertical = false}},
|
||||
groups = {crumbly = 3, soil = 1, spreading_dirt_type = 1},
|
||||
drop = 'base:dirt',
|
||||
sounds = base.node_sound_dirt_defaults({
|
||||
footstep = {name = "base_grass_footstep", gain = 0.4},
|
||||
}),
|
||||
})
|
||||
|
||||
minetest.register_node("base:dirt_with_snow", {
|
||||
description = "Dirt with Snow",
|
||||
tiles = {"base_snow.png", "base_dirt.png",
|
||||
{name = "base_dirt.png^base_snow_side.png",
|
||||
tileable_vertical = false}},
|
||||
groups = {crumbly = 3, spreading_dirt_type = 1, snowy = 1},
|
||||
drop = 'base:dirt',
|
||||
sounds = base.node_sound_dirt_defaults({
|
||||
footstep = {name = "base_snow_footstep", gain = 0.15},
|
||||
}),
|
||||
})
|
||||
|
||||
minetest.register_node("base:dirt_with_rainforest_litter", {
|
||||
description = "Dirt with Rainforest Litter",
|
||||
tiles = {
|
||||
"base_rainforest_litter.png",
|
||||
"base_dirt.png",
|
||||
{name = "base_dirt.png^base_rainforest_litter_side.png",
|
||||
tileable_vertical = false}
|
||||
},
|
||||
groups = {crumbly = 3, soil = 1, spreading_dirt_type = 1},
|
||||
drop = "base:dirt",
|
||||
sounds = base.node_sound_dirt_defaults({
|
||||
footstep = {name = "base_grass_footstep", gain = 0.4},
|
||||
}),
|
||||
})
|
||||
|
||||
minetest.register_node("base:sand", {
|
||||
description = "Sand",
|
||||
tiles = {"base_sand.png"},
|
||||
groups = {crumbly = 3, falling_node = 1, sand = 1},
|
||||
sounds = base.node_sound_sand_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("base:desert_sand", {
|
||||
description = "Desert Sand",
|
||||
tiles = {"base_desert_sand.png"},
|
||||
groups = {crumbly = 3, falling_node = 1, sand = 1},
|
||||
sounds = base.node_sound_sand_defaults(),
|
||||
sounds = default.node_sound_dirt_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("base:red_sand", {
|
||||
description = "Red Sand",
|
||||
tiles = {"base_red_sand.png"},
|
||||
groups = {crumbly = 3, falling_node = 1, sand = 1},
|
||||
sounds = base.node_sound_sand_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("base:gravel", {
|
||||
description = "Gravel",
|
||||
tiles = {"base_gravel.png"},
|
||||
groups = {crumbly = 2, falling_node = 1},
|
||||
sounds = base.node_sound_gravel_defaults(),
|
||||
drop = {
|
||||
max_items = 1,
|
||||
items = {
|
||||
{items = {'base:flint'}, rarity = 16},
|
||||
{items = {'base:gravel'}}
|
||||
}
|
||||
}
|
||||
sounds = default.node_sound_sand_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("base:red_gravel", {
|
||||
description = "Red Gravel",
|
||||
tiles = {"base_red_gravel.png"},
|
||||
groups = {crumbly = 2, falling_node = 1},
|
||||
sounds = base.node_sound_gravel_defaults(),
|
||||
})
|
||||
|
||||
|
||||
minetest.register_node("base:clay", {
|
||||
description = "Clay",
|
||||
tiles = {"base_clay.png"},
|
||||
groups = {crumbly = 3},
|
||||
drop = 'base:clay_lump 4',
|
||||
sounds = base.node_sound_dirt_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("base:snow", {
|
||||
description = "Snow",
|
||||
tiles = {"base_snow.png"},
|
||||
inventory_image = "base_snowball.png",
|
||||
wield_image = "base_snowball.png",
|
||||
paramtype = "light",
|
||||
buildable_to = true,
|
||||
floodable = true,
|
||||
drawtype = "nodebox",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.5, 0.5, -0.25, 0.5},
|
||||
},
|
||||
},
|
||||
groups = {crumbly = 3, falling_node = 1, puts_out_fire = 1, snowy = 1},
|
||||
sounds = base.node_sound_dirt_defaults({
|
||||
footstep = {name = "base_snow_footstep", gain = 0.15},
|
||||
dug = {name = "base_snow_footstep", gain = 0.2},
|
||||
dig = {name = "base_snow_footstep", gain = 0.2}
|
||||
}),
|
||||
|
||||
on_construct = function(pos)
|
||||
pos.y = pos.y - 1
|
||||
if minetest.get_node(pos).name == "base:dirt_with_grass" then
|
||||
minetest.set_node(pos, {name = "base:dirt_with_snow"})
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_node("base:snowblock", {
|
||||
description = "Snow Block",
|
||||
tiles = {"base_snow.png"},
|
||||
groups = {crumbly = 3, puts_out_fire = 1, cools_lava = 1, snowy = 1},
|
||||
sounds = base.node_sound_dirt_defaults({
|
||||
footstep = {name = "base_snow_footstep", gain = 0.15},
|
||||
dug = {name = "base_snow_footstep", gain = 0.2},
|
||||
dig = {name = "base_snow_footstep", gain = 0.2}
|
||||
}),
|
||||
|
||||
on_construct = function(pos)
|
||||
pos.y = pos.y - 1
|
||||
if minetest.get_node(pos).name == "base:dirt_with_grass" then
|
||||
minetest.set_node(pos, {name = "base:dirt_with_snow"})
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_node("base:ice", {
|
||||
description = "Ice",
|
||||
tiles = {"base_ice.png"},
|
||||
is_ground_content = false,
|
||||
paramtype = "light",
|
||||
groups = {cracky = 3, puts_out_fire = 1, cools_lava = 1},
|
||||
sounds = base.node_sound_glass_defaults(),
|
||||
sounds = default.node_sound_gravel_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("base:mangrove_mud", {
|
||||
description = "Mangrove Mud",
|
||||
tiles = {"base_mangrove_mud_top.png","base_mangrove_mud.png"},
|
||||
tiles = {"base_mangrove_mud.png"},
|
||||
groups = {crumbly = 3, soil = 1, disable_jump = 1},
|
||||
sounds = base.node_sound_dirt_defaults({
|
||||
sounds = default.node_sound_dirt_defaults({
|
||||
footstep = {name = "base_mangrove_mud", gain = 0.4},
|
||||
dug = {name = "base_mangrove_mud", gain = 0.4},
|
||||
}),
|
||||
|
@ -489,16 +205,16 @@ minetest.register_node("base:mineral_salt", {
|
|||
{items = {"base:salt"} }
|
||||
}
|
||||
},
|
||||
sounds = base.node_sound_dirt_defaults,
|
||||
sounds = default.node_sound_dirt_defaults,
|
||||
})
|
||||
|
||||
minetest.register_node( "base:salt_block", {
|
||||
description = "Salt Block",
|
||||
tiles = {"base_clay.png^base_salt_block.png"},
|
||||
tiles = {"default_clay.png^base_salt_block.png"},
|
||||
is_ground_content = false,
|
||||
groups = {snappy = 2, cracky = 3, oddly_breakable_by_hand = 3},
|
||||
on_use = minetest.item_eat(3),
|
||||
sounds = base.node_sound_stone_defaults(),
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
|
||||
|
@ -506,76 +222,28 @@ minetest.register_node( "base:salt_block", {
|
|||
-- Ores
|
||||
--
|
||||
|
||||
minetest.register_node("base:stone_with_coal", {
|
||||
description = "Coal Ore",
|
||||
tiles = {"base_stone.png^base_mineral_coal.png"},
|
||||
groups = {cracky = 3},
|
||||
drop = 'base:coal_lump',
|
||||
sounds = base.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("base:diorite_with_coal", {
|
||||
description = "Coal Ore",
|
||||
tiles = {"base_diorite.png^base_mineral_coal.png"},
|
||||
tiles = {"base_diorite.png^default_mineral_coal.png"},
|
||||
groups = {cracky = 3},
|
||||
drop = 'base:coal_lump',
|
||||
sounds = base.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("base:coalblock", {
|
||||
description = "Coal Block",
|
||||
tiles = {"base_coal_block.png"},
|
||||
is_ground_content = false,
|
||||
groups = {cracky = 3},
|
||||
sounds = base.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("base:stone_with_iron", {
|
||||
description = "Iron Ore",
|
||||
tiles = {"base_stone.png^base_mineral_iron.png"},
|
||||
groups = {cracky = 2},
|
||||
drop = 'base:iron_lump',
|
||||
sounds = base.node_sound_stone_defaults(),
|
||||
drop = 'default:coal_lump',
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("base:granite_with_iron", {
|
||||
description = "Iron Ore",
|
||||
tiles = {"technic_granite.png^base_mineral_iron.png"},
|
||||
tiles = {"technic_granite.png^default_mineral_iron.png"},
|
||||
groups = {cracky = 2},
|
||||
drop = 'base:iron_lump',
|
||||
sounds = base.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("base:steelblock", {
|
||||
description = "Steel Block",
|
||||
tiles = {"base_steel_block.png"},
|
||||
is_ground_content = false,
|
||||
groups = {cracky = 1, level = 2},
|
||||
sounds = base.node_sound_metal_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("base:stone_with_copper", {
|
||||
description = "Copper Ore",
|
||||
tiles = {"base_stone.png^base_mineral_copper.png"},
|
||||
groups = {cracky = 2},
|
||||
drop = 'base:copper_lump',
|
||||
sounds = base.node_sound_stone_defaults(),
|
||||
drop = 'default:iron_lump',
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("base:granite_with_copper", {
|
||||
description = "Copper Ore",
|
||||
tiles = {"technic_granite.png^base_mineral_copper.png"},
|
||||
tiles = {"technic_granite.png^default_mineral_copper.png"},
|
||||
groups = {cracky = 2},
|
||||
drop = 'base:copper_lump',
|
||||
sounds = base.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("base:copperblock", {
|
||||
description = "Copper Block",
|
||||
tiles = {"base_copper_block.png"},
|
||||
is_ground_content = false,
|
||||
groups = {cracky = 1, level = 2},
|
||||
sounds = base.node_sound_metal_defaults(),
|
||||
drop = 'default:copper_lump',
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("base:granite_with_opal", {
|
||||
|
@ -583,39 +251,23 @@ minetest.register_node("base:granite_with_opal", {
|
|||
tiles = {"technic_granite.png^base_mineral_opal.png"},
|
||||
groups = {cracky = 2},
|
||||
drop = "base:opal",
|
||||
sounds = base.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("base:stone_with_tin", {
|
||||
description = "Tin Ore",
|
||||
tiles = {"base_stone.png^base_mineral_tin.png"},
|
||||
groups = {cracky = 2},
|
||||
drop = "base:tin_lump",
|
||||
sounds = base.node_sound_stone_defaults(),
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("base:granite_with_tin", {
|
||||
description = "Tin Ore",
|
||||
tiles = {"technic_granite.png^base_mineral_tin.png"},
|
||||
tiles = {"technic_granite.png^default_mineral_tin.png"},
|
||||
groups = {cracky = 2},
|
||||
drop = "base:tin_lump",
|
||||
sounds = base.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("base:tinblock", {
|
||||
description = "Tin Block",
|
||||
tiles = {"base_tin_block.png"},
|
||||
is_ground_content = false,
|
||||
groups = {cracky = 1, level = 2},
|
||||
sounds = base.node_sound_metal_defaults(),
|
||||
drop = "default:tin_lump",
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("base:stone_with_aluminium", {
|
||||
description = "Aluminium Ore",
|
||||
tiles = {"base_stone.png^base_mineral_aluminium.png"},
|
||||
tiles = {"default_stone.png^base_mineral_aluminium.png"},
|
||||
groups = {cracky = 2},
|
||||
drop = "base:aluminium_lump",
|
||||
sounds = base.node_sound_stone_defaults(),
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("base:aluminiumblock", {
|
||||
|
@ -623,15 +275,15 @@ minetest.register_node("base:aluminiumblock", {
|
|||
tiles = {"base_aluminium_block.png"},
|
||||
is_ground_content = false,
|
||||
groups = {cracky = 1, level = 2},
|
||||
sounds = base.node_sound_metal_defaults(),
|
||||
sounds = default.node_sound_metal_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("base:stone_with_nickel", {
|
||||
description = "Nickel Ore",
|
||||
tiles = {"base_stone.png^base_mineral_nickel.png"},
|
||||
tiles = {"default_stone.png^base_mineral_nickel.png"},
|
||||
groups = {cracky = 2},
|
||||
drop = "base:nickel_lump",
|
||||
sounds = base.node_sound_stone_defaults(),
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("base:nickelblock", {
|
||||
|
@ -639,23 +291,15 @@ minetest.register_node("base:nickelblock", {
|
|||
tiles = {"base_nickel_block.png"},
|
||||
is_ground_content = false,
|
||||
groups = {cracky = 1, level = 2},
|
||||
sounds = base.node_sound_metal_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("base:bronzeblock", {
|
||||
description = "Bronze Block",
|
||||
tiles = {"base_bronze_block.png"},
|
||||
is_ground_content = false,
|
||||
groups = {cracky = 1, level = 2},
|
||||
sounds = base.node_sound_metal_defaults(),
|
||||
sounds = default.node_sound_metal_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("base:stone_with_silver", {
|
||||
description = "Silver Ore",
|
||||
tiles = {"base_stone.png^base_mineral_silver.png" },
|
||||
tiles = {"default_stone.png^base_mineral_silver.png" },
|
||||
groups = {cracky = 3},
|
||||
drop = "base:silver_lump",
|
||||
sounds = base.node_sound_stone_defaults(),
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("base:silverblock", {
|
||||
|
@ -663,80 +307,31 @@ minetest.register_node("base:silverblock", {
|
|||
tiles = {"base_silver_block.png"},
|
||||
is_ground_content = false,
|
||||
groups = {cracky = 1, level = 2},
|
||||
sounds = base.node_sound_metal_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("base:stone_with_mese", {
|
||||
description = "Mese Ore",
|
||||
tiles = {"base_stone.png^base_mineral_mese.png"},
|
||||
groups = {cracky = 1},
|
||||
drop = "base:mese_crystal",
|
||||
sounds = base.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("base:mese", {
|
||||
description = "Mese Block",
|
||||
tiles = {"base_mese_block.png"},
|
||||
paramtype = "light",
|
||||
groups = {cracky = 1, level = 2},
|
||||
sounds = base.node_sound_stone_defaults(),
|
||||
light_source = 3,
|
||||
})
|
||||
|
||||
minetest.register_node("base:stone_with_gold", {
|
||||
description = "Gold Ore",
|
||||
tiles = {"base_stone.png^base_mineral_gold.png"},
|
||||
groups = {cracky = 2},
|
||||
drop = "base:gold_lump",
|
||||
sounds = base.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("base:goldblock", {
|
||||
description = "Gold Block",
|
||||
tiles = {"base_gold_block.png"},
|
||||
is_ground_content = false,
|
||||
groups = {cracky = 1},
|
||||
sounds = base.node_sound_metal_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("base:stone_with_diamond", {
|
||||
description = "Diamond Ore",
|
||||
tiles = {"base_stone.png^base_mineral_diamond.png"},
|
||||
groups = {cracky = 1},
|
||||
drop = "base:diamond",
|
||||
sounds = base.node_sound_stone_defaults(),
|
||||
sounds = default.node_sound_metal_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("base:basalt_with_diamond", {
|
||||
description = "Diamond Ore",
|
||||
tiles = {"base_basalt.png^base_mineral_diamond.png"},
|
||||
tiles = {"base_basalt.png^default_mineral_diamond.png"},
|
||||
groups = {cracky = 1},
|
||||
drop = "base:diamond",
|
||||
sounds = base.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("base:diamondblock", {
|
||||
description = "Diamond Block",
|
||||
tiles = {"base_diamond_block.png"},
|
||||
is_ground_content = false,
|
||||
groups = {cracky = 1, level = 3},
|
||||
sounds = base.node_sound_stone_defaults(),
|
||||
drop = "default:diamond",
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("base:stone_with_agate", {
|
||||
description = "Agate Ore",
|
||||
tiles = {"base_stone.png^base_mineral_agate.png"},
|
||||
tiles = {"default_stone.png^base_mineral_agate.png"},
|
||||
groups = {cracky = 1},
|
||||
drop = "base:agate",
|
||||
sounds = base.node_sound_stone_defaults(),
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("base:stone_with_amethyst", {
|
||||
description = "Amethyst Ore",
|
||||
tiles = {"base_stone.png^base_mineral_amethyst.png"},
|
||||
tiles = {"default_stone.png^base_mineral_amethyst.png"},
|
||||
groups = {cracky = 1},
|
||||
drop = "base:amethyst",
|
||||
sounds = base.node_sound_stone_defaults(),
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("base:granite_with_amethyst", {
|
||||
|
@ -744,23 +339,23 @@ minetest.register_node("base:granite_with_amethyst", {
|
|||
tiles = {"technic_granite.png^base_mineral_amethyst.png"},
|
||||
groups = {cracky = 1},
|
||||
drop = "base:amethyst",
|
||||
sounds = base.node_sound_stone_defaults(),
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("base:stone_with_citrine", {
|
||||
description = "Citrine Ore",
|
||||
tiles = {"base_stone.png^base_mineral_citrine.png"},
|
||||
tiles = {"default_stone.png^base_mineral_citrine.png"},
|
||||
groups = {cracky = 1},
|
||||
drop = "base:citrine",
|
||||
sounds = base.node_sound_stone_defaults(),
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("base:stone_with_emerald", {
|
||||
description = "Emerald Ore",
|
||||
tiles = {"base_stone.png^base_mineral_emerald.png"},
|
||||
tiles = {"default_stone.png^base_mineral_emerald.png"},
|
||||
groups = {cracky = 1},
|
||||
drop = "base:emerald",
|
||||
sounds = base.node_sound_stone_defaults(),
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("base:granite_with_emerald", {
|
||||
|
@ -768,39 +363,39 @@ minetest.register_node("base:granite_with_emerald", {
|
|||
tiles = {"technic_granite.png^base_mineral_emerald.png"},
|
||||
groups = {cracky = 1},
|
||||
drop = "base:emerald",
|
||||
sounds = base.node_sound_stone_defaults(),
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("base:stone_with_jade", {
|
||||
description = "Jade Ore",
|
||||
tiles = {"base_stone.png^base_mineral_jade.png"},
|
||||
tiles = {"default_stone.png^base_mineral_jade.png"},
|
||||
groups = {cracky = 1},
|
||||
drop = "base:jade",
|
||||
sounds = base.node_sound_stone_defaults(),
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("base:stone_with_ruby", {
|
||||
description = "Ruby Ore",
|
||||
tiles = {"base_stone.png^base_mineral_ruby.png"},
|
||||
tiles = {"default_stone.png^base_mineral_ruby.png"},
|
||||
groups = {cracky = 1},
|
||||
drop = "base:ruby",
|
||||
sounds = base.node_sound_stone_defaults(),
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("base:stone_with_sapphire", {
|
||||
description = "Sapphire Ore",
|
||||
tiles = {"base_stone.png^base_mineral_sapphire.png"},
|
||||
tiles = {"default_stone.png^base_mineral_sapphire.png"},
|
||||
groups = {cracky = 1},
|
||||
drop = "base:sapphire",
|
||||
sounds = base.node_sound_stone_defaults(),
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("base:stone_with_smoky_quartz", {
|
||||
description = "Smoky Quartz Ore",
|
||||
tiles = {"base_stone.png^base_mineral_smoky_quartz.png"},
|
||||
tiles = {"default_stone.png^base_mineral_smoky_quartz.png"},
|
||||
groups = {cracky = 1},
|
||||
drop = "base:smoky_quartz",
|
||||
sounds = base.node_sound_stone_defaults(),
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("base:granite_with_smoky_quartz", {
|
||||
|
@ -808,58 +403,6 @@ minetest.register_node("base:granite_with_smoky_quartz", {
|
|||
tiles = {"technic_granite.png^base_mineral_smoky_quartz.png"},
|
||||
groups = {cracky = 1},
|
||||
drop = "base:smoky_quartz",
|
||||
sounds = base.node_sound_stone_defaults(),
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
|
||||
--
|
||||
-- Other
|
||||
--
|
||||
|
||||
minetest.register_node("base:brick", {
|
||||
description = "Brick Block",
|
||||
paramtype2 = "facedir",
|
||||
place_param2 = 0,
|
||||
tiles = {"base_brick.png"},
|
||||
is_ground_content = false,
|
||||
groups = {cracky = 3},
|
||||
sounds = base.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
|
||||
minetest.register_node("base:meselamp", {
|
||||
description = "Mese Lamp",
|
||||
drawtype = "glasslike",
|
||||
tiles = {"base_meselamp.png"},
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
is_ground_content = false,
|
||||
groups = {cracky = 3, oddly_breakable_by_hand = 3},
|
||||
sounds = base.node_sound_glass_defaults(),
|
||||
light_source = 14,
|
||||
})
|
||||
|
||||
minetest.register_node("base:mese_post_light", {
|
||||
description = "Mese Post Light",
|
||||
tiles = {"base_mese_post_light_top.png", "base_mese_post_light_top.png",
|
||||
"base_mese_post_light_side_dark.png", "base_mese_post_light_side_dark.png",
|
||||
"base_mese_post_light_side.png", "base_mese_post_light_side.png"},
|
||||
wield_image = "base_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 = 14,
|
||||
sunlight_propagates = true,
|
||||
is_ground_content = false,
|
||||
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
|
||||
sounds = base.node_sound_wood_defaults(),
|
||||
})
|
||||
|
||||
|
||||
-- Aliases for schematic nodes
|
||||
minetest.register_alias("default:dirt", "base:dirt")
|
||||
|
|
|
@ -2,48 +2,3 @@
|
|||
Base climbable nodes
|
||||
--]]
|
||||
|
||||
minetest.register_node("base:ladder_wood", {
|
||||
description = "Wooden Ladder",
|
||||
drawtype = "signlike",
|
||||
tiles = {"base_ladder_wood.png"},
|
||||
inventory_image = "base_ladder_wood.png",
|
||||
wield_image = "base_ladder_wood.png",
|
||||
paramtype = "light",
|
||||
paramtype2 = "wallmounted",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
climbable = true,
|
||||
is_ground_content = false,
|
||||
selection_box = {
|
||||
type = "wallmounted",
|
||||
--wall_top = = <default>
|
||||
--wall_bottom = = <default>
|
||||
--wall_side = = <default>
|
||||
},
|
||||
groups = {choppy = 2, oddly_breakable_by_hand = 3, flammable = 2},
|
||||
legacy_wallmounted = true,
|
||||
sounds = base.node_sound_wood_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("base:ladder_steel", {
|
||||
description = "Steel Ladder",
|
||||
drawtype = "signlike",
|
||||
tiles = {"base_ladder_steel.png"},
|
||||
inventory_image = "base_ladder_steel.png",
|
||||
wield_image = "base_ladder_steel.png",
|
||||
paramtype = "light",
|
||||
paramtype2 = "wallmounted",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
climbable = true,
|
||||
is_ground_content = false,
|
||||
selection_box = {
|
||||
type = "wallmounted",
|
||||
--wall_top = = <default>
|
||||
--wall_bottom = = <default>
|
||||
--wall_side = = <default>
|
||||
},
|
||||
groups = {cracky = 2},
|
||||
sounds = base.node_sound_metal_defaults(),
|
||||
})
|
||||
|
||||
|
|
|
@ -2,27 +2,3 @@
|
|||
Base glass nodes
|
||||
--]]
|
||||
|
||||
minetest.register_node("base:glass", {
|
||||
description = "Glass",
|
||||
drawtype = "glasslike_framed_optional",
|
||||
tiles = {"base_glass.png", "base_glass_detail.png"},
|
||||
paramtype = "light",
|
||||
paramtype2 = "glasslikeliquidlevel",
|
||||
sunlight_propagates = true,
|
||||
is_ground_content = false,
|
||||
groups = {cracky = 3, oddly_breakable_by_hand = 3},
|
||||
sounds = base.node_sound_glass_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("base:obsidian_glass", {
|
||||
description = "Obsidian Glass",
|
||||
drawtype = "glasslike_framed_optional",
|
||||
tiles = {"base_obsidian_glass.png", "base_obsidian_glass_detail.png"},
|
||||
paramtype = "light",
|
||||
paramtype2 = "glasslikeliquidlevel",
|
||||
is_ground_content = false,
|
||||
sunlight_propagates = true,
|
||||
sounds = base.node_sound_glass_defaults(),
|
||||
groups = {cracky = 3},
|
||||
})
|
||||
|
||||
|
|
|
@ -2,287 +2,6 @@
|
|||
Base liquid nodes
|
||||
--]]
|
||||
|
||||
minetest.register_node("base:water_source", {
|
||||
description = "Water Source",
|
||||
drawtype = "liquid",
|
||||
tiles = {
|
||||
{
|
||||
name = "base_water_source_animated.png",
|
||||
animation = {
|
||||
type = "vertical_frames",
|
||||
aspect_w = 16,
|
||||
aspect_h = 16,
|
||||
length = 2.0,
|
||||
},
|
||||
},
|
||||
},
|
||||
special_tiles = {
|
||||
-- New-style water source material (mostly unused)
|
||||
{
|
||||
name = "base_water_source_animated.png",
|
||||
animation = {
|
||||
type = "vertical_frames",
|
||||
aspect_w = 16,
|
||||
aspect_h = 16,
|
||||
length = 2.0,
|
||||
},
|
||||
backface_culling = false,
|
||||
},
|
||||
},
|
||||
alpha = 160,
|
||||
paramtype = "light",
|
||||
walkable = false,
|
||||
pointable = false,
|
||||
diggable = false,
|
||||
buildable_to = true,
|
||||
is_ground_content = false,
|
||||
drop = "",
|
||||
drowning = 1,
|
||||
liquidtype = "source",
|
||||
liquid_alternative_flowing = "base:water_flowing",
|
||||
liquid_alternative_source = "base:water_source",
|
||||
liquid_viscosity = 1,
|
||||
post_effect_color = {a = 103, r = 30, g = 60, b = 90},
|
||||
groups = {water = 3, liquid = 3, puts_out_fire = 1, cools_lava = 1},
|
||||
sounds = base.node_sound_water_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("base:water_flowing", {
|
||||
description = "Flowing Water",
|
||||
drawtype = "flowingliquid",
|
||||
tiles = {"base_water.png"},
|
||||
special_tiles = {
|
||||
{
|
||||
name = "base_water_flowing_animated.png",
|
||||
backface_culling = false,
|
||||
animation = {
|
||||
type = "vertical_frames",
|
||||
aspect_w = 16,
|
||||
aspect_h = 16,
|
||||
length = 0.8,
|
||||
},
|
||||
},
|
||||
{
|
||||
name = "base_water_flowing_animated.png",
|
||||
backface_culling = true,
|
||||
animation = {
|
||||
type = "vertical_frames",
|
||||
aspect_w = 16,
|
||||
aspect_h = 16,
|
||||
length = 0.8,
|
||||
},
|
||||
},
|
||||
},
|
||||
alpha = 160,
|
||||
paramtype = "light",
|
||||
paramtype2 = "flowingliquid",
|
||||
walkable = false,
|
||||
pointable = false,
|
||||
diggable = false,
|
||||
buildable_to = true,
|
||||
is_ground_content = false,
|
||||
drop = "",
|
||||
drowning = 1,
|
||||
liquidtype = "flowing",
|
||||
liquid_alternative_flowing = "base:water_flowing",
|
||||
liquid_alternative_source = "base:water_source",
|
||||
liquid_viscosity = 1,
|
||||
post_effect_color = {a = 103, r = 30, g = 60, b = 90},
|
||||
groups = {water = 3, liquid = 3, puts_out_fire = 1,
|
||||
not_in_creative_inventory = 1, cools_lava = 1},
|
||||
sounds = base.node_sound_water_defaults(),
|
||||
})
|
||||
|
||||
|
||||
minetest.register_node("base:river_water_source", {
|
||||
description = "River Water Source",
|
||||
drawtype = "liquid",
|
||||
tiles = {
|
||||
{
|
||||
name = "base_river_water_source_animated.png",
|
||||
animation = {
|
||||
type = "vertical_frames",
|
||||
aspect_w = 16,
|
||||
aspect_h = 16,
|
||||
length = 2.0,
|
||||
},
|
||||
},
|
||||
},
|
||||
special_tiles = {
|
||||
{
|
||||
name = "base_river_water_source_animated.png",
|
||||
animation = {
|
||||
type = "vertical_frames",
|
||||
aspect_w = 16,
|
||||
aspect_h = 16,
|
||||
length = 2.0,
|
||||
},
|
||||
backface_culling = false,
|
||||
},
|
||||
},
|
||||
alpha = 160,
|
||||
paramtype = "light",
|
||||
walkable = false,
|
||||
pointable = false,
|
||||
diggable = false,
|
||||
buildable_to = true,
|
||||
is_ground_content = false,
|
||||
drop = "",
|
||||
drowning = 1,
|
||||
liquidtype = "source",
|
||||
liquid_alternative_flowing = "base:river_water_flowing",
|
||||
liquid_alternative_source = "base:river_water_source",
|
||||
liquid_viscosity = 1,
|
||||
liquid_renewable = false,
|
||||
liquid_range = 2,
|
||||
post_effect_color = {a = 103, r = 30, g = 76, b = 90},
|
||||
groups = {water = 3, liquid = 3, puts_out_fire = 1, cools_lava = 1},
|
||||
sounds = base.node_sound_water_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("base:river_water_flowing", {
|
||||
description = "Flowing River Water",
|
||||
drawtype = "flowingliquid",
|
||||
tiles = {"base_river_water.png"},
|
||||
special_tiles = {
|
||||
{
|
||||
name = "base_river_water_flowing_animated.png",
|
||||
backface_culling = false,
|
||||
animation = {
|
||||
type = "vertical_frames",
|
||||
aspect_w = 16,
|
||||
aspect_h = 16,
|
||||
length = 0.8,
|
||||
},
|
||||
},
|
||||
{
|
||||
name = "base_river_water_flowing_animated.png",
|
||||
backface_culling = true,
|
||||
animation = {
|
||||
type = "vertical_frames",
|
||||
aspect_w = 16,
|
||||
aspect_h = 16,
|
||||
length = 0.8,
|
||||
},
|
||||
},
|
||||
},
|
||||
alpha = 160,
|
||||
paramtype = "light",
|
||||
paramtype2 = "flowingliquid",
|
||||
walkable = false,
|
||||
pointable = false,
|
||||
diggable = false,
|
||||
buildable_to = true,
|
||||
is_ground_content = false,
|
||||
drop = "",
|
||||
drowning = 1,
|
||||
liquidtype = "flowing",
|
||||
liquid_alternative_flowing = "base:river_water_flowing",
|
||||
liquid_alternative_source = "base:river_water_source",
|
||||
liquid_viscosity = 1,
|
||||
liquid_renewable = false,
|
||||
liquid_range = 2,
|
||||
post_effect_color = {a = 103, r = 30, g = 76, b = 90},
|
||||
groups = {water = 3, liquid = 3, puts_out_fire = 1,
|
||||
not_in_creative_inventory = 1, cools_lava = 1},
|
||||
sounds = base.node_sound_water_defaults(),
|
||||
})
|
||||
|
||||
|
||||
minetest.register_node("base:lava_source", {
|
||||
description = "Lava Source",
|
||||
drawtype = "liquid",
|
||||
tiles = {
|
||||
{
|
||||
name = "base_lava_source_animated.png",
|
||||
animation = {
|
||||
type = "vertical_frames",
|
||||
aspect_w = 16,
|
||||
aspect_h = 16,
|
||||
length = 3.0,
|
||||
},
|
||||
},
|
||||
},
|
||||
special_tiles = {
|
||||
-- New-style lava source material (mostly unused)
|
||||
{
|
||||
name = "base_lava_source_animated.png",
|
||||
animation = {
|
||||
type = "vertical_frames",
|
||||
aspect_w = 16,
|
||||
aspect_h = 16,
|
||||
length = 3.0,
|
||||
},
|
||||
backface_culling = false,
|
||||
},
|
||||
},
|
||||
paramtype = "light",
|
||||
light_source = 13,
|
||||
walkable = false,
|
||||
pointable = false,
|
||||
diggable = false,
|
||||
buildable_to = true,
|
||||
is_ground_content = false,
|
||||
drop = "",
|
||||
drowning = 1,
|
||||
liquidtype = "source",
|
||||
liquid_alternative_flowing = "base:lava_flowing",
|
||||
liquid_alternative_source = "base:lava_source",
|
||||
liquid_viscosity = 7,
|
||||
liquid_renewable = false,
|
||||
damage_per_second = 4 * 2,
|
||||
post_effect_color = {a = 191, r = 255, g = 64, b = 0},
|
||||
groups = {lava = 3, liquid = 2, igniter = 1},
|
||||
})
|
||||
|
||||
minetest.register_node("base:lava_flowing", {
|
||||
description = "Flowing Lava",
|
||||
drawtype = "flowingliquid",
|
||||
tiles = {"base_lava.png"},
|
||||
special_tiles = {
|
||||
{
|
||||
name = "base_lava_flowing_animated.png",
|
||||
backface_culling = false,
|
||||
animation = {
|
||||
type = "vertical_frames",
|
||||
aspect_w = 16,
|
||||
aspect_h = 16,
|
||||
length = 3.3,
|
||||
},
|
||||
},
|
||||
{
|
||||
name = "base_lava_flowing_animated.png",
|
||||
backface_culling = true,
|
||||
animation = {
|
||||
type = "vertical_frames",
|
||||
aspect_w = 16,
|
||||
aspect_h = 16,
|
||||
length = 3.3,
|
||||
},
|
||||
},
|
||||
},
|
||||
paramtype = "light",
|
||||
paramtype2 = "flowingliquid",
|
||||
light_source = 13,
|
||||
walkable = false,
|
||||
pointable = false,
|
||||
diggable = false,
|
||||
buildable_to = true,
|
||||
is_ground_content = false,
|
||||
drop = "",
|
||||
drowning = 1,
|
||||
liquidtype = "flowing",
|
||||
liquid_alternative_flowing = "base:lava_flowing",
|
||||
liquid_alternative_source = "base:lava_source",
|
||||
liquid_viscosity = 7,
|
||||
liquid_renewable = false,
|
||||
damage_per_second = 4 * 2,
|
||||
post_effect_color = {a = 191, r = 255, g = 64, b = 0},
|
||||
groups = {lava = 3, liquid = 2, igniter = 1,
|
||||
not_in_creative_inventory = 1},
|
||||
})
|
||||
|
||||
|
||||
minetest.register_node("base:muddy_water_source", {
|
||||
description = "Muddy Water Source",
|
||||
drawtype = "liquid",
|
||||
|
@ -326,7 +45,7 @@ minetest.register_node("base:muddy_water_source", {
|
|||
liquid_range = 2,
|
||||
post_effect_color = {a = 232, r = 92, g = 80, b = 48},
|
||||
groups = {water = 3, liquid = 3, puts_out_fire = 1, cools_lava = 1},
|
||||
sounds = base.node_sound_water_defaults(),
|
||||
sounds = default.node_sound_water_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("base:muddy_water_flowing", {
|
||||
|
@ -373,7 +92,7 @@ minetest.register_node("base:muddy_water_flowing", {
|
|||
post_effect_color = {a = 232, r = 92, g = 80, b = 48},
|
||||
groups = {water = 3, liquid = 3, puts_out_fire = 1,
|
||||
not_in_creative_inventory = 1, cools_lava = 1},
|
||||
sounds = base.node_sound_water_defaults(),
|
||||
sounds = default.node_sound_water_defaults(),
|
||||
})
|
||||
|
||||
|
||||
|
@ -420,7 +139,7 @@ minetest.register_node("base:crude_oil_source", {
|
|||
liquid_range = 2,
|
||||
post_effect_color = {a = 240, r = 16, g = 16, b = 16},
|
||||
groups = {liquid = 3, flammable = 1},
|
||||
sounds = base.node_sound_water_defaults(),
|
||||
sounds = default.node_sound_water_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("base:crude_oil_flowing", {
|
||||
|
@ -466,7 +185,6 @@ minetest.register_node("base:crude_oil_flowing", {
|
|||
liquid_range = 2,
|
||||
post_effect_color = {a = 240, r = 16, g = 16, b = 16},
|
||||
groups = {liquid = 3, flammable = 1, not_in_creative_inventory = 1},
|
||||
sounds = base.node_sound_water_defaults(),
|
||||
sounds = default.node_sound_water_defaults(),
|
||||
})
|
||||
|
||||
|
||||
|
|
|
@ -2,14 +2,6 @@
|
|||
Base miscellaneous nodes
|
||||
--]]
|
||||
|
||||
minetest.register_node("base:cloud", {
|
||||
description = "Cloud",
|
||||
tiles = {"base_cloud.png"},
|
||||
is_ground_content = false,
|
||||
sounds = base.node_sound_defaults(),
|
||||
groups = {not_in_creative_inventory = 1},
|
||||
})
|
||||
|
||||
minetest.register_node("base:salt", {
|
||||
description = "Salt",
|
||||
drawtype = "plantlike",
|
||||
|
@ -21,7 +13,7 @@ minetest.register_node("base:salt", {
|
|||
walkable = false,
|
||||
groups = {fleshy = 3, dig_immediate = 3, flammable = 1},
|
||||
on_use = minetest.item_eat(1),
|
||||
sounds = base.node_sound_defaults(),
|
||||
sounds = default.node_sound_defaults(),
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-3/32, -8/16, -3/32, 3/32, -4/16, 3/32},
|
||||
|
@ -48,7 +40,7 @@ minetest.register_node("base:opal",{
|
|||
type = "fixed",
|
||||
fixed = {-5/16, -8/16, -6/16, 5/16, -1/32, 5/16},
|
||||
},
|
||||
sounds = base.node_sound_stone_defaults(),
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
|
||||
|
@ -96,7 +88,7 @@ for grid_count = 1, 6 do
|
|||
},
|
||||
groups = {stone = 1, oddly_breakable_by_hand = 3},
|
||||
drop = "base:small_red_rocks",
|
||||
sounds = base.node_sound_stone_defaults(),
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
default_grid_red_rocks = grid
|
||||
|
@ -116,7 +108,7 @@ minetest.register_node("base:small_red_rocks", {
|
|||
fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},
|
||||
},
|
||||
groups = {stone = 1, oddly_breakable_by_hand = 3},
|
||||
sounds = base.node_sound_stone_defaults(),
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
local pos = pointed_thing.above
|
||||
local player_name = placer:get_player_name()
|
||||
|
@ -130,7 +122,6 @@ minetest.register_node("base:small_red_rocks", {
|
|||
minetest.chat_send_player(player_name, "Node is protected")
|
||||
minetest.record_protection_violation(pos, player_name)
|
||||
end
|
||||
|
||||
return itemstack
|
||||
end
|
||||
})
|
||||
|
@ -149,7 +140,7 @@ for grid_count = 1, 6 do
|
|||
|
||||
minetest.register_node("base:small_sandstone_rocks"..grid_count, {
|
||||
description = "Small Sandstone Rocks",
|
||||
tiles = {"base_sandstone.png"},
|
||||
tiles = {"default_sandstone.png"},
|
||||
is_ground_content = true,
|
||||
walkable = false,
|
||||
paramtype = "light",
|
||||
|
@ -162,7 +153,7 @@ for grid_count = 1, 6 do
|
|||
},
|
||||
groups = {stone = 1, oddly_breakable_by_hand = 3},
|
||||
drop = "base:small_sandstone_rocks",
|
||||
sounds = base.node_sound_stone_defaults(),
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
default_grid_sandstone_rocks = grid
|
||||
|
@ -170,7 +161,7 @@ end
|
|||
|
||||
minetest.register_node("base:small_sandstone_rocks", {
|
||||
description = "Small Sandstone Rocks",
|
||||
tiles = {"base_sandstone.png"},
|
||||
tiles = {"default_sandstone.png"},
|
||||
inventory_image = "base_small_sandstone_rocks.png",
|
||||
is_ground_content = true,
|
||||
walkable = false,
|
||||
|
@ -182,7 +173,7 @@ minetest.register_node("base:small_sandstone_rocks", {
|
|||
fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},
|
||||
},
|
||||
groups = {stone = 1, oddly_breakable_by_hand = 3},
|
||||
sounds = base.node_sound_stone_defaults(),
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
local pos = pointed_thing.above
|
||||
local player_name = placer:get_player_name()
|
||||
|
@ -196,7 +187,6 @@ minetest.register_node("base:small_sandstone_rocks", {
|
|||
minetest.chat_send_player(player_name, "Node is protected")
|
||||
minetest.record_protection_violation(pos, player_name)
|
||||
end
|
||||
|
||||
return itemstack
|
||||
end
|
||||
})
|
||||
|
@ -215,7 +205,7 @@ for grid_count = 1, 6 do
|
|||
|
||||
minetest.register_node("base:small_stone_rocks"..grid_count, {
|
||||
description = "Small Stone Rocks",
|
||||
tiles = {"base_stone.png"},
|
||||
tiles = {"default_stone.png"},
|
||||
is_ground_content = true,
|
||||
walkable = false,
|
||||
paramtype = "light",
|
||||
|
@ -228,7 +218,7 @@ for grid_count = 1, 6 do
|
|||
},
|
||||
groups = {stone = 1, oddly_breakable_by_hand = 3},
|
||||
drop = "base:small_stone_rocks",
|
||||
sounds = base.node_sound_stone_defaults(),
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
default_grid_stone_rocks = grid
|
||||
|
@ -236,7 +226,7 @@ end
|
|||
|
||||
minetest.register_node("base:small_stone_rocks", {
|
||||
description = "Small Stone Rocks",
|
||||
tiles = {"base_stone.png"},
|
||||
tiles = {"default_stone.png"},
|
||||
inventory_image = "base_small_stone_rocks.png",
|
||||
is_ground_content = true,
|
||||
walkable = false,
|
||||
|
@ -248,7 +238,7 @@ minetest.register_node("base:small_stone_rocks", {
|
|||
fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},
|
||||
},
|
||||
groups = {stone = 1, oddly_breakable_by_hand = 3},
|
||||
sounds = base.node_sound_stone_defaults(),
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
local pos = pointed_thing.above
|
||||
local player_name = placer:get_player_name()
|
||||
|
@ -262,7 +252,6 @@ minetest.register_node("base:small_stone_rocks", {
|
|||
minetest.chat_send_player(player_name, "Node is protected")
|
||||
minetest.record_protection_violation(pos, player_name)
|
||||
end
|
||||
|
||||
return itemstack
|
||||
end
|
||||
})
|
||||
|
|
|
@ -3,181 +3,6 @@
|
|||
--]]
|
||||
|
||||
|
||||
minetest.register_node("base:cactus", {
|
||||
description = "Cactus",
|
||||
tiles = {"base_cactus_top.png", "base_cactus_top.png",
|
||||
"base_cactus_side.png"},
|
||||
paramtype2 = "facedir",
|
||||
groups = {choppy = 3},
|
||||
sounds = base.node_sound_wood_defaults(),
|
||||
on_place = minetest.rotate_node,
|
||||
})
|
||||
|
||||
minetest.register_node("base:papyrus", {
|
||||
description = "Papyrus",
|
||||
drawtype = "plantlike",
|
||||
tiles = {"base_papyrus.png"},
|
||||
inventory_image = "base_papyrus.png",
|
||||
wield_image = "base_papyrus.png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-6 / 16, -0.5, -6 / 16, 6 / 16, 0.5, 6 / 16},
|
||||
},
|
||||
groups = {snappy = 3, flammable = 2},
|
||||
sounds = base.node_sound_leaves_defaults(),
|
||||
|
||||
after_dig_node = function(pos, node, metadata, digger)
|
||||
base.dig_up(pos, node, digger)
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_node("base:dry_shrub", {
|
||||
description = "Dry Shrub",
|
||||
drawtype = "plantlike",
|
||||
waving = 1,
|
||||
tiles = {"base_dry_shrub.png"},
|
||||
inventory_image = "base_dry_shrub.png",
|
||||
wield_image = "base_dry_shrub.png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
buildable_to = true,
|
||||
groups = {snappy = 3, flammable = 3, attached_node = 1},
|
||||
sounds = base.node_sound_leaves_defaults(),
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-5 / 16, -0.5, -5 / 16, 5 / 16, 4 / 16, 5 / 16},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_node("base:junglegrass", {
|
||||
description = "Jungle Grass",
|
||||
drawtype = "plantlike",
|
||||
waving = 1,
|
||||
visual_scale = 1.69,
|
||||
tiles = {"base_junglegrass.png"},
|
||||
inventory_image = "base_junglegrass.png",
|
||||
wield_image = "base_junglegrass.png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
buildable_to = true,
|
||||
groups = {snappy = 3, flora = 1, attached_node = 1, flammable = 1},
|
||||
sounds = base.node_sound_leaves_defaults(),
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-7 / 16, -0.5, -7 / 16, 7 / 16, 1.19, 7 / 16},
|
||||
},
|
||||
})
|
||||
|
||||
|
||||
minetest.register_node("base:grass_1", {
|
||||
description = "Grass",
|
||||
drawtype = "plantlike",
|
||||
waving = 1,
|
||||
tiles = {"base_grass_1.png"},
|
||||
-- Use texture of a taller grass stage in inventory
|
||||
inventory_image = "base_grass_3.png",
|
||||
wield_image = "base_grass_3.png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
buildable_to = true,
|
||||
groups = {snappy = 3, flora = 1, attached_node = 1, grass = 1, flammable = 1},
|
||||
sounds = base.node_sound_leaves_defaults(),
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-6 / 16, -0.5, -6 / 16, 6 / 16, -5 / 16, 6 / 16},
|
||||
},
|
||||
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
-- place a random grass node
|
||||
local stack = ItemStack("base:grass_" .. math.random(1,5))
|
||||
local ret = minetest.item_place(stack, placer, pointed_thing)
|
||||
return ItemStack("base:grass_1 " ..
|
||||
itemstack:get_count() - (1 - ret:get_count()))
|
||||
end,
|
||||
})
|
||||
|
||||
for i = 2, 5 do
|
||||
minetest.register_node("base:grass_" .. i, {
|
||||
description = "Grass",
|
||||
drawtype = "plantlike",
|
||||
waving = 1,
|
||||
tiles = {"base_grass_" .. i .. ".png"},
|
||||
inventory_image = "base_grass_" .. i .. ".png",
|
||||
wield_image = "base_grass_" .. i .. ".png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
buildable_to = true,
|
||||
drop = "base:grass_1",
|
||||
groups = {snappy = 3, flora = 1, attached_node = 1,
|
||||
not_in_creative_inventory = 1, grass = 1, flammable = 1},
|
||||
sounds = base.node_sound_leaves_defaults(),
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-6 / 16, -0.5, -6 / 16, 6 / 16, -3 / 16, 6 / 16},
|
||||
},
|
||||
})
|
||||
end
|
||||
|
||||
|
||||
minetest.register_node("base:dry_grass_1", {
|
||||
description = "Dry Grass",
|
||||
drawtype = "plantlike",
|
||||
waving = 1,
|
||||
tiles = {"base_dry_grass_1.png"},
|
||||
inventory_image = "base_dry_grass_3.png",
|
||||
wield_image = "base_dry_grass_3.png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
buildable_to = true,
|
||||
groups = {snappy = 3, flammable = 3, flora = 1,
|
||||
attached_node = 1, dry_grass = 1},
|
||||
sounds = base.node_sound_leaves_defaults(),
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-6 / 16, -0.5, -6 / 16, 6 / 16, -3 / 16, 6 / 16},
|
||||
},
|
||||
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
-- place a random dry grass node
|
||||
local stack = ItemStack("base:dry_grass_" .. math.random(1, 5))
|
||||
local ret = minetest.item_place(stack, placer, pointed_thing)
|
||||
return ItemStack("base:dry_grass_1 " ..
|
||||
itemstack:get_count() - (1 - ret:get_count()))
|
||||
end,
|
||||
})
|
||||
|
||||
for i = 2, 5 do
|
||||
minetest.register_node("base:dry_grass_" .. i, {
|
||||
description = "Dry Grass",
|
||||
drawtype = "plantlike",
|
||||
waving = 1,
|
||||
tiles = {"base_dry_grass_" .. i .. ".png"},
|
||||
inventory_image = "base_dry_grass_" .. i .. ".png",
|
||||
wield_image = "base_dry_grass_" .. i .. ".png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
buildable_to = true,
|
||||
groups = {snappy = 3, flammable = 3, flora = 1, attached_node = 1,
|
||||
not_in_creative_inventory=1, dry_grass = 1},
|
||||
drop = "base:dry_grass_1",
|
||||
sounds = base.node_sound_leaves_defaults(),
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-6 / 16, -0.5, -6 / 16, 6 / 16, -1 / 16, 6 / 16},
|
||||
},
|
||||
})
|
||||
end
|
||||
|
||||
|
||||
minetest.register_node("base:tomato_bush", {
|
||||
description = "Bush Tomato plant",
|
||||
drawtype = "plantlike",
|
||||
|
@ -189,7 +14,7 @@ minetest.register_node("base:tomato_bush", {
|
|||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
buildable_to = true,
|
||||
groups = {snappy = 3, flammable = 2, flora = 1, attached_node = 1,
|
||||
groups = {snappy = 3, flammable = 2, flora = 1, attached_node = 1,
|
||||
not_in_creative_inventory = 1},
|
||||
drop = {
|
||||
items = {
|
||||
|
@ -197,7 +22,7 @@ minetest.register_node("base:tomato_bush", {
|
|||
{items = {"base:bush_tomato 4"}}
|
||||
}
|
||||
},
|
||||
sounds = base.node_sound_leaves_defaults(),
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-8/16, -8/16, -8/16, 8/16, -5/16, 8/16},
|
||||
|
@ -220,7 +45,7 @@ minetest.register_node("base:lavender_grevillea", {
|
|||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
groups = {snappy = 3, flammable = 2, flora = 1, attached_node = 1},
|
||||
sounds = base.node_sound_leaves_defaults(),
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("base:mangrove_fern", {
|
||||
|
@ -235,7 +60,7 @@ minetest.register_node("base:mangrove_fern", {
|
|||
walkable = false,
|
||||
buildable_to = false,
|
||||
groups = {snappy = 3, flammable = 3, flora = 1, attached_node = 1},
|
||||
sounds = base.node_sound_leaves_defaults(),
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-8/16, -8/16, -8/16, 8/16, -5/16, 8/16},
|
||||
|
@ -254,7 +79,7 @@ minetest.register_node("base:mitchell_grass", {
|
|||
walkable = false,
|
||||
buildable_to = false,
|
||||
groups = {snappy = 3, flammable = 1, flora = 1, attached_node = 1},
|
||||
sounds = base.node_sound_leaves_defaults(),
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-8/16, -8/16, -8/16, 8/16, -5/16, 8/16},
|
||||
|
@ -271,7 +96,7 @@ minetest.register_node("base:mangrove_palm_trunk", {
|
|||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = {choppy = 2, flammable = 3, flora = 1, attached_node = 1, oddly_breakable_by_hand = 1},
|
||||
sounds = base.node_sound_wood_defaults(),
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
on_place = minetest.rotate_node,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
|
@ -288,7 +113,7 @@ minetest.register_node("base:mangrove_palm_leaf_bot", {
|
|||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = {snappy = 3, flammable = 3, flora = 1, attached_node = 1},
|
||||
sounds = base.node_sound_leaves_defaults(),
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
drawtype = "nodebox",
|
||||
nodebox = {
|
||||
type = "fixed",
|
||||
|
@ -309,7 +134,7 @@ minetest.register_node("base:mangrove_palm_leaf_top", {
|
|||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = {snappy = 3, flammable = 3, flora = 1, attached_node = 1},
|
||||
sounds = base.node_sound_leaves_defaults(),
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
drawtype = "nodebox",
|
||||
nodebox = {
|
||||
type = "fixed",
|
||||
|
@ -334,7 +159,7 @@ minetest.register_node("base:saltbush", {
|
|||
walkable = false,
|
||||
buildable_to = true,
|
||||
groups = {snappy = 2, flammable = 1, flora = 1, attached_node = 1},
|
||||
sounds = base.node_sound_leaves_defaults(),
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-8/16, -8/16, -8/16, 8/16, -5/16, 8/16},
|
||||
|
@ -354,156 +179,13 @@ minetest.register_node("base:spinifex", {
|
|||
walkable = false,
|
||||
buildable_to = true,
|
||||
groups = {snappy = 2, flammable = 1, flora = 1, attached_node = 1},
|
||||
sounds = base.node_sound_leaves_defaults(),
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-8/16, -8/16, -8/16, 8/16, -5/16, 8/16},
|
||||
},
|
||||
})
|
||||
|
||||
|
||||
minetest.register_node("base:bush_stem", {
|
||||
description = "Bush Stem",
|
||||
drawtype = "plantlike",
|
||||
visual_scale = 1.41,
|
||||
tiles = {"base_bush_stem.png"},
|
||||
inventory_image = "base_bush_stem.png",
|
||||
wield_image = "base_bush_stem.png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
groups = {choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
|
||||
sounds = base.node_sound_wood_defaults(),
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-7 / 16, -0.5, -7 / 16, 7 / 16, 0.5, 7 / 16},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_node("base:bush_leaves", {
|
||||
description = "Bush Leaves",
|
||||
drawtype = "allfaces_optional",
|
||||
waving = 1,
|
||||
tiles = {"base_leaves_simple.png"},
|
||||
paramtype = "light",
|
||||
groups = {snappy = 3, flammable = 2, leaves = 1},
|
||||
drop = {
|
||||
max_items = 1,
|
||||
items = {
|
||||
{items = {"base:bush_sapling"}, rarity = 5},
|
||||
{items = {"base:bush_leaves"}}
|
||||
}
|
||||
},
|
||||
sounds = base.node_sound_leaves_defaults(),
|
||||
|
||||
after_place_node = base.after_place_leaves,
|
||||
})
|
||||
|
||||
minetest.register_node("base:bush_sapling", {
|
||||
description = "Bush Sapling",
|
||||
drawtype = "plantlike",
|
||||
tiles = {"base_bush_sapling.png"},
|
||||
inventory_image = "base_bush_sapling.png",
|
||||
wield_image = "base_bush_sapling.png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
on_timer = base.grow_sapling,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 2 / 16, 4 / 16}
|
||||
},
|
||||
groups = {snappy = 2, dig_immediate = 3, flammable = 2,
|
||||
attached_node = 1, sapling = 1},
|
||||
sounds = base.node_sound_leaves_defaults(),
|
||||
|
||||
on_construct = function(pos)
|
||||
minetest.get_node_timer(pos):start(math.random(1200, 2400))
|
||||
end,
|
||||
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
itemstack = base.sapling_on_place(itemstack, placer, pointed_thing,
|
||||
"base:bush_sapling",
|
||||
-- minp, maxp to be checked, relative to sapling pos
|
||||
{x = -1, y = 0, z = -1},
|
||||
{x = 1, y = 1, z = 1},
|
||||
-- maximum interval of interior volume check
|
||||
2)
|
||||
|
||||
return itemstack
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_node("base:acacia_bush_stem", {
|
||||
description = "Acacia Bush Stem",
|
||||
drawtype = "plantlike",
|
||||
visual_scale = 1.41,
|
||||
tiles = {"base_acacia_bush_stem.png"},
|
||||
inventory_image = "base_acacia_bush_stem.png",
|
||||
wield_image = "base_acacia_bush_stem.png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
groups = {choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
|
||||
sounds = base.node_sound_wood_defaults(),
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-7 / 16, -0.5, -7 / 16, 7 / 16, 0.5, 7 / 16},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_node("base:acacia_bush_leaves", {
|
||||
description = "Acacia Bush Leaves",
|
||||
drawtype = "allfaces_optional",
|
||||
waving = 1,
|
||||
tiles = {"base_acacia_leaves_simple.png"},
|
||||
paramtype = "light",
|
||||
groups = {snappy = 3, flammable = 2, leaves = 1},
|
||||
drop = {
|
||||
max_items = 1,
|
||||
items = {
|
||||
{items = {"base:acacia_bush_sapling"}, rarity = 5},
|
||||
{items = {"base:acacia_bush_leaves"}}
|
||||
}
|
||||
},
|
||||
sounds = base.node_sound_leaves_defaults(),
|
||||
|
||||
after_place_node = base.after_place_leaves,
|
||||
})
|
||||
|
||||
minetest.register_node("base:acacia_bush_sapling", {
|
||||
description = "Acacia Bush Sapling",
|
||||
drawtype = "plantlike",
|
||||
tiles = {"base_acacia_bush_sapling.png"},
|
||||
inventory_image = "base_acacia_bush_sapling.png",
|
||||
wield_image = "base_acacia_bush_sapling.png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
on_timer = base.grow_sapling,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-3 / 16, -0.5, -3 / 16, 3 / 16, 2 / 16, 3 / 16}
|
||||
},
|
||||
groups = {snappy = 2, dig_immediate = 3, flammable = 2,
|
||||
attached_node = 1, sapling = 1},
|
||||
sounds = base.node_sound_leaves_defaults(),
|
||||
|
||||
on_construct = function(pos)
|
||||
minetest.get_node_timer(pos):start(math.random(1200, 2400))
|
||||
end,
|
||||
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
itemstack = base.sapling_on_place(itemstack, placer, pointed_thing,
|
||||
"base:acacia_bush_sapling",
|
||||
-- minp, maxp to be checked, relative to sapling pos
|
||||
{x = -1, y = 0, z = -1},
|
||||
{x = 1, y = 1, z = 1},
|
||||
-- maximum interval of interior volume check
|
||||
2)
|
||||
|
||||
return itemstack
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_node("base:flame_grevillea_leaves", {
|
||||
description = "Flame Grevillea Leaves",
|
||||
drawtype = "allfaces_optional",
|
||||
|
@ -518,34 +200,34 @@ minetest.register_node("base:flame_grevillea_leaves", {
|
|||
{items = {"base:flame_grevillea_leaves"},}
|
||||
}
|
||||
},
|
||||
sounds = base.node_sound_leaves_defaults(),
|
||||
after_place_node = base.after_place_leaves,
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
after_place_node = default.after_place_leaves,
|
||||
})
|
||||
|
||||
minetest.register_node("base:flame_grevillea_sapling", {
|
||||
description = "Flame Grevillea Sapling",
|
||||
drawtype = "plantlike",
|
||||
tiles = {"base_acacia_sapling.png"},
|
||||
inventory_image = "base_acacia_sapling.png",
|
||||
wield_image = "base_acacia_sapling.png",
|
||||
tiles = {"default_acacia_sapling.png"},
|
||||
inventory_image = "default_acacia_sapling.png",
|
||||
wield_image = "default_acacia_sapling.png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
on_timer = base.grow_sapling,
|
||||
on_timer = default.grow_sapling,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-5/16, -8/16, -5/16, 5/16, 6/16, 5/16}
|
||||
},
|
||||
groups = {snappy = 2, dig_immediate = 3, flammable = 2,
|
||||
attached_node = 1, sapling = 1},
|
||||
sounds = base.node_sound_leaves_defaults(),
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
|
||||
on_construct = function(pos)
|
||||
minetest.get_node_timer(pos):start(math.random(1200, 2400))
|
||||
end,
|
||||
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
itemstack = base.sapling_on_place(itemstack, placer, pointed_thing,
|
||||
itemstack = default.sapling_on_place(itemstack, placer, pointed_thing,
|
||||
"base:flame_grevillea_sapling",
|
||||
-- minp, maxp to be checked, relative to sapling pos
|
||||
-- minp_relative.y = 1 because sapling pos has been checked
|
||||
|
@ -573,8 +255,8 @@ minetest.register_node("base:red_bottlebrush_leaves", {
|
|||
{items = {"base:red_bottlebrush_leaves"},}
|
||||
}
|
||||
},
|
||||
sounds = base.node_sound_leaves_defaults(),
|
||||
after_place_node = base.after_place_leaves,
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
after_place_node = default.after_place_leaves,
|
||||
})
|
||||
|
||||
minetest.register_node("base:red_bottlebrush_sapling", {
|
||||
|
@ -587,21 +269,21 @@ minetest.register_node("base:red_bottlebrush_sapling", {
|
|||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
on_timer = base.grow_sapling,
|
||||
on_timer = default.grow_sapling,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-5/16, -8/16, -5/16, 5/16, 6/16, 5/16}
|
||||
},
|
||||
groups = {snappy = 2, dig_immediate = 3, flammable = 2,
|
||||
attached_node = 1, sapling = 1},
|
||||
sounds = base.node_sound_leaves_defaults(),
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
|
||||
on_construct = function(pos)
|
||||
minetest.get_node_timer(pos):start(math.random(1200, 2400))
|
||||
end,
|
||||
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
itemstack = base.sapling_on_place(itemstack, placer, pointed_thing,
|
||||
itemstack = default.sapling_on_place(itemstack, placer, pointed_thing,
|
||||
"base:red_bottlebrush_sapling",
|
||||
-- minp, maxp to be checked, relative to sapling pos
|
||||
-- minp_relative.y = 1 because sapling pos has been checked
|
||||
|
@ -629,34 +311,34 @@ minetest.register_node("base:waratah_leaves", {
|
|||
{items = {"base:waratah_leaves"},}
|
||||
}
|
||||
},
|
||||
sounds = base.node_sound_leaves_defaults(),
|
||||
after_place_node = base.after_place_leaves,
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
after_place_node = default.after_place_leaves,
|
||||
})
|
||||
|
||||
minetest.register_node("base:waratah_sapling", {
|
||||
description = "Waratah Sapling",
|
||||
drawtype = "plantlike",
|
||||
tiles = {"base_acacia_sapling.png"},
|
||||
inventory_image = "base_acacia_sapling.png",
|
||||
wield_image = "base_acacia_sapling.png",
|
||||
tiles = {"default_acacia_sapling.png"},
|
||||
inventory_image = "default_acacia_sapling.png",
|
||||
wield_image = "default_acacia_sapling.png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
on_timer = base.grow_sapling,
|
||||
on_timer = default.grow_sapling,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-5/16, -8/16, -5/16, 5/16, 6/16, 5/16}
|
||||
},
|
||||
groups = {snappy = 2, dig_immediate = 3, flammable = 2,
|
||||
attached_node = 1, sapling = 1},
|
||||
sounds = base.node_sound_leaves_defaults(),
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
|
||||
on_construct = function(pos)
|
||||
minetest.get_node_timer(pos):start(math.random(2400,4800))
|
||||
end,
|
||||
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
itemstack = base.sapling_on_place(itemstack, placer, pointed_thing,
|
||||
itemstack = default.sapling_on_place(itemstack, placer, pointed_thing,
|
||||
"base:waratah_sapling",
|
||||
-- minp, maxp to be checked, relative to sapling pos
|
||||
-- minp_relative.y = 1 because sapling pos has been checked
|
||||
|
@ -669,11 +351,3 @@ minetest.register_node("base:waratah_sapling", {
|
|||
end,
|
||||
})
|
||||
|
||||
|
||||
minetest.register_alias("default:bush_stem", "base:bush_stem")
|
||||
minetest.register_alias("default:bush_leaves", "base:bush_leaves")
|
||||
minetest.register_alias("default:acacia_bush_stem", "base:acacia_bush_stem")
|
||||
minetest.register_alias("default:acacia_bush_leaves", "base:acacia_bush_leaves")
|
||||
minetest.register_alias("default:cactus", "base:cactus")
|
||||
minetest.register_alias("default:papyrus", "base:papyrus")
|
||||
|
||||
|
|
|
@ -1,117 +0,0 @@
|
|||
--[[
|
||||
Base sounds
|
||||
--]]
|
||||
|
||||
function base.node_sound_defaults(table)
|
||||
table = table or {}
|
||||
table.footstep = table.footstep or
|
||||
{name = "", gain = 1.0}
|
||||
table.dug = table.dug or
|
||||
{name = "base_dug_node", gain = 0.25}
|
||||
table.place = table.place or
|
||||
{name = "base_place_node_hard", gain = 1.0}
|
||||
return table
|
||||
end
|
||||
|
||||
function base.node_sound_stone_defaults(table)
|
||||
table = table or {}
|
||||
table.footstep = table.footstep or
|
||||
{name = "base_hard_footstep", gain = 0.3}
|
||||
table.dug = table.dug or
|
||||
{name = "base_hard_footstep", gain = 1.0}
|
||||
base.node_sound_defaults(table)
|
||||
return table
|
||||
end
|
||||
|
||||
function base.node_sound_dirt_defaults(table)
|
||||
table = table or {}
|
||||
table.footstep = table.footstep or
|
||||
{name = "base_dirt_footstep", gain = 0.4}
|
||||
table.dug = table.dug or
|
||||
{name = "base_dirt_footstep", gain = 1.0}
|
||||
table.place = table.place or
|
||||
{name = "base_place_node", gain = 1.0}
|
||||
base.node_sound_defaults(table)
|
||||
return table
|
||||
end
|
||||
|
||||
function base.node_sound_sand_defaults(table)
|
||||
table = table or {}
|
||||
table.footstep = table.footstep or
|
||||
{name = "base_sand_footstep", gain = 0.12}
|
||||
table.dug = table.dug or
|
||||
{name = "base_sand_footstep", gain = 0.24}
|
||||
table.place = table.place or
|
||||
{name = "base_place_node", gain = 1.0}
|
||||
base.node_sound_defaults(table)
|
||||
return table
|
||||
end
|
||||
|
||||
function base.node_sound_gravel_defaults(table)
|
||||
table = table or {}
|
||||
table.footstep = table.footstep or
|
||||
{name = "base_gravel_footstep", gain = 0.4}
|
||||
table.dug = table.dug or
|
||||
{name = "base_gravel_footstep", gain = 1.0}
|
||||
table.place = table.place or
|
||||
{name = "base_place_node", gain = 1.0}
|
||||
base.node_sound_defaults(table)
|
||||
return table
|
||||
end
|
||||
|
||||
function base.node_sound_wood_defaults(table)
|
||||
table = table or {}
|
||||
table.footstep = table.footstep or
|
||||
{name = "base_wood_footstep", gain = 0.3}
|
||||
table.dug = table.dug or
|
||||
{name = "base_wood_footstep", gain = 1.0}
|
||||
base.node_sound_defaults(table)
|
||||
return table
|
||||
end
|
||||
|
||||
function base.node_sound_leaves_defaults(table)
|
||||
table = table or {}
|
||||
table.footstep = table.footstep or
|
||||
{name = "base_grass_footstep", gain = 0.45}
|
||||
table.dug = table.dug or
|
||||
{name = "base_grass_footstep", gain = 0.7}
|
||||
table.place = table.place or
|
||||
{name = "base_place_node", gain = 1.0}
|
||||
base.node_sound_defaults(table)
|
||||
return table
|
||||
end
|
||||
|
||||
function base.node_sound_glass_defaults(table)
|
||||
table = table or {}
|
||||
table.footstep = table.footstep or
|
||||
{name = "base_glass_footstep", gain = 0.3}
|
||||
table.dig = table.dig or
|
||||
{name = "base_glass_footstep", gain = 0.5}
|
||||
table.dug = table.dug or
|
||||
{name = "base_break_glass", gain = 1.0}
|
||||
base.node_sound_defaults(table)
|
||||
return table
|
||||
end
|
||||
|
||||
function base.node_sound_metal_defaults(table)
|
||||
table = table or {}
|
||||
table.footstep = table.footstep or
|
||||
{name = "base_metal_footstep", gain = 0.4}
|
||||
table.dig = table.dig or
|
||||
{name = "base_dig_metal", gain = 0.5}
|
||||
table.dug = table.dug or
|
||||
{name = "base_dug_metal", gain = 0.5}
|
||||
table.place = table.place or
|
||||
{name = "base_place_node_metal", gain = 0.5}
|
||||
base.node_sound_defaults(table)
|
||||
return table
|
||||
end
|
||||
|
||||
function base.node_sound_water_defaults(table)
|
||||
table = table or {}
|
||||
table.footstep = table.footstep or
|
||||
{name = "base_water_footstep", gain = 0.2}
|
||||
base.node_sound_defaults(table)
|
||||
return table
|
||||
end
|
||||
|
Before Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 4.5 KiB |
Before Width: | Height: | Size: 4.8 KiB |
Before Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 307 B |
Before Width: | Height: | Size: 515 B After Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 474 B |
Before Width: | Height: | Size: 923 B After Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 937 B After Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 938 B After Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 3.0 KiB |
Before Width: | Height: | Size: 916 B After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 922 B After Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 929 B After Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 932 B After Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 925 B After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 2.7 KiB |
|
@ -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 = def.sounds or base.node_sound_wood_defaults(),
|
||||
sounds = def.sounds or default.node_sound_wood_defaults(),
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = def.nodebox.bottom,
|
||||
|
@ -147,7 +147,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 = def.sounds or base.node_sound_wood_defaults(),
|
||||
sounds = def.sounds or default.node_sound_wood_defaults(),
|
||||
drop = name .. "_bottom",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
|
|
|
@ -7,19 +7,19 @@ beds.register_bed("beds:fancy_bed", {
|
|||
tiles = {
|
||||
bottom = {
|
||||
"beds_bed_top1.png",
|
||||
"base_wood.png",
|
||||
"default_wood.png",
|
||||
"beds_bed_side1.png",
|
||||
"beds_bed_side1.png^[transformFX",
|
||||
"base_wood.png",
|
||||
"default_wood.png",
|
||||
"beds_bed_foot.png",
|
||||
},
|
||||
top = {
|
||||
"beds_bed_top2.png",
|
||||
"base_wood.png",
|
||||
"default_wood.png",
|
||||
"beds_bed_side2.png",
|
||||
"beds_bed_side2.png^[transformFX",
|
||||
"beds_bed_head.png",
|
||||
"base_wood.png",
|
||||
"default_wood.png",
|
||||
}
|
||||
},
|
||||
nodebox = {
|
||||
|
@ -58,7 +58,7 @@ beds.register_bed("beds:bed", {
|
|||
tiles = {
|
||||
bottom = {
|
||||
"beds_bed_top_bottom.png^[transformR90",
|
||||
"base_wood.png",
|
||||
"default_wood.png",
|
||||
"beds_bed_side_bottom_r.png",
|
||||
"beds_bed_side_bottom_r.png^[transformfx",
|
||||
"beds_transparent.png",
|
||||
|
@ -66,7 +66,7 @@ beds.register_bed("beds:bed", {
|
|||
},
|
||||
top = {
|
||||
"beds_bed_top_top.png^[transformR90",
|
||||
"base_wood.png",
|
||||
"default_wood.png",
|
||||
"beds_bed_side_top_r.png",
|
||||
"beds_bed_side_top_r.png^[transformfx",
|
||||
"beds_bed_side_top.png",
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
base
|
||||
default
|
||||
wool
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
init
|
||||
inventory
|
||||
base
|
||||
default
|
||||
|
|
|
@ -37,12 +37,12 @@ end
|
|||
|
||||
minetest.register_node("books:bookshelf", {
|
||||
description = "Bookshelf",
|
||||
tiles = {"base_wood.png", "base_wood.png", "base_wood.png",
|
||||
"base_wood.png", "books_bookshelf.png", "books_bookshelf.png"},
|
||||
tiles = {"default_wood.png", "default_wood.png", "default_wood.png",
|
||||
"default_wood.png", "books_bookshelf.png", "books_bookshelf.png"},
|
||||
paramtype2 = "facedir",
|
||||
is_ground_content = false,
|
||||
groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3},
|
||||
sounds = base.node_sound_wood_defaults(),
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
|
||||
on_construct = function(pos)
|
||||
local meta = minetest.get_meta(pos)
|
||||
|
@ -80,7 +80,7 @@ minetest.register_node("books:bookshelf", {
|
|||
end,
|
||||
on_blast = function(pos)
|
||||
local drops = {}
|
||||
base.get_inventory_drops(pos, "books", drops)
|
||||
inventory.get_inventory_drops(pos, "books", drops)
|
||||
drops[#drops+1] = "books:bookshelf"
|
||||
minetest.remove_node(pos)
|
||||
return drops
|
||||
|
@ -269,9 +269,9 @@ end)
|
|||
minetest.register_craft({
|
||||
output = 'books:book',
|
||||
recipe = {
|
||||
{'base:paper'},
|
||||
{'base:paper'},
|
||||
{'base:paper'},
|
||||
{'default:paper'},
|
||||
{'default:paper'},
|
||||
{'default:paper'},
|
||||
}
|
||||
})
|
||||
|
||||
|
|
|
@ -1 +1,2 @@
|
|||
base
|
||||
default
|
||||
|
|
|
@ -8,8 +8,8 @@ minetest.register_alias("bucket_lava", "bucket:bucket_lava")
|
|||
minetest.register_craft({
|
||||
output = 'bucket:bucket_empty 1',
|
||||
recipe = {
|
||||
{'base:steel_ingot', '', 'base:steel_ingot'},
|
||||
{'', 'base:steel_ingot', ''},
|
||||
{'default:steel_ingot', '', 'default:steel_ingot'},
|
||||
{'', 'default:steel_ingot', ''},
|
||||
}
|
||||
})
|
||||
|
||||
|
@ -180,8 +180,8 @@ minetest.register_craftitem("bucket:bucket_empty", {
|
|||
})
|
||||
|
||||
bucket.register_liquid(
|
||||
"base:water_source",
|
||||
"base:water_flowing",
|
||||
"default:water_source",
|
||||
"default:water_flowing",
|
||||
"bucket:bucket_water",
|
||||
"bucket_water.png",
|
||||
"Water Bucket",
|
||||
|
@ -189,8 +189,8 @@ bucket.register_liquid(
|
|||
)
|
||||
|
||||
bucket.register_liquid(
|
||||
"base:river_water_source",
|
||||
"base:river_water_flowing",
|
||||
"default:river_water_source",
|
||||
"default:river_water_flowing",
|
||||
"bucket:bucket_river_water",
|
||||
"bucket_river_water.png",
|
||||
"River Water Bucket",
|
||||
|
@ -208,8 +208,8 @@ bucket.register_liquid(
|
|||
)
|
||||
|
||||
bucket.register_liquid(
|
||||
"base:lava_source",
|
||||
"base:lava_flowing",
|
||||
"default:lava_source",
|
||||
"default:lava_flowing",
|
||||
"bucket:bucket_lava",
|
||||
"bucket_lava.png",
|
||||
"Lava Bucket"
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
init
|
||||
base
|
||||
inventory
|
||||
default
|
||||
|
|
|
@ -92,29 +92,29 @@ function chests.register_chest(name, d)
|
|||
local meta = minetest.get_meta(pos);
|
||||
local inv = meta:get_inventory()
|
||||
return inv:is_empty("main") and
|
||||
base.can_interact_with_node(player, pos)
|
||||
default.can_interact_with_node(player, pos)
|
||||
end
|
||||
def.allow_metadata_inventory_move = function(pos, from_list, from_index,
|
||||
to_list, to_index, count, player)
|
||||
if not base.can_interact_with_node(player, pos) then
|
||||
if not default.can_interact_with_node(player, pos) then
|
||||
return 0
|
||||
end
|
||||
return count
|
||||
end
|
||||
def.allow_metadata_inventory_put = function(pos, listname, index, stack, player)
|
||||
if not base.can_interact_with_node(player, pos) then
|
||||
if not default.can_interact_with_node(player, pos) then
|
||||
return 0
|
||||
end
|
||||
return stack:get_count()
|
||||
end
|
||||
def.allow_metadata_inventory_take = function(pos, listname, index, stack, player)
|
||||
if not base.can_interact_with_node(player, pos) then
|
||||
if not default.can_interact_with_node(player, pos) then
|
||||
return 0
|
||||
end
|
||||
return stack:get_count()
|
||||
end
|
||||
def.on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
||||
if not base.can_interact_with_node(clicker, pos) then
|
||||
if not default.can_interact_with_node(clicker, pos) then
|
||||
return itemstack
|
||||
end
|
||||
|
||||
|
@ -217,7 +217,7 @@ function chests.register_chest(name, d)
|
|||
end
|
||||
def.on_blast = function(pos)
|
||||
local drops = {}
|
||||
base.get_inventory_drops(pos, "main", drops)
|
||||
inventory.get_inventory_drops(pos, "main", drops)
|
||||
drops[#drops+1] = "chests:chest"
|
||||
minetest.remove_node(pos)
|
||||
return drops
|
||||
|
@ -258,7 +258,7 @@ chests.register_chest("chest", {
|
|||
"chests_chest_front.png",
|
||||
"chests_chest_inside.png"
|
||||
},
|
||||
sounds = base.node_sound_wood_defaults(),
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
sound_open = "chests_chest_open",
|
||||
sound_close = "chests_chest_close",
|
||||
groups = {choppy = 2, oddly_breakable_by_hand = 2},
|
||||
|
@ -274,7 +274,7 @@ chests.register_chest("chest_locked", {
|
|||
"chests_chest_lock.png",
|
||||
"chests_chest_inside.png"
|
||||
},
|
||||
sounds = base.node_sound_wood_defaults(),
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
sound_open = "chests_chest_open",
|
||||
sound_close = "chests_chest_close",
|
||||
groups = {choppy = 2, oddly_breakable_by_hand = 2},
|
||||
|
@ -295,7 +295,7 @@ minetest.register_craft({
|
|||
output = 'chests:chest_locked',
|
||||
recipe = {
|
||||
{'group:wood', 'group:wood', 'group:wood'},
|
||||
{'group:wood', 'base:steel_ingot', 'group:wood'},
|
||||
{'group:wood', 'default:steel_ingot', 'group:wood'},
|
||||
{'group:wood', 'group:wood', 'group:wood'},
|
||||
}
|
||||
})
|
||||
|
@ -303,7 +303,7 @@ minetest.register_craft({
|
|||
minetest.register_craft( {
|
||||
type = "shapeless",
|
||||
output = "chests:chest_locked",
|
||||
recipe = {"chests:chest", "base:steel_ingot"},
|
||||
recipe = {"chests:chest", "default:steel_ingot"},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
|
|
|
@ -28,8 +28,8 @@ minetest.register_craft({
|
|||
output = "crops:unbaked_clay_bowl",
|
||||
recipe = {
|
||||
{ "", "", "" },
|
||||
{ "base:clay_lump", "", "base:clay_lump" },
|
||||
{ "", "base:clay_lump", "" }
|
||||
{ "default:clay_lump", "", "default:clay_lump" },
|
||||
{ "", "default:clay_lump", "" }
|
||||
}
|
||||
})
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ minetest.register_node("crops:corn", {
|
|||
node_placement_prediction = "crops:corn_base_seed",
|
||||
groups = { snappy=3,flammable=3,flora=1,attached_node=1 },
|
||||
drop = {},
|
||||
sounds = base.node_sound_leaves_defaults(),
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
local under = minetest.get_node(pointed_thing.under)
|
||||
|
@ -79,7 +79,7 @@ minetest.register_node("crops:corn_base_seed", {
|
|||
paramtype = "light",
|
||||
groups = { snappy=3,flammable=3,flora=1,attached_node=1,not_in_creative_inventory=1 },
|
||||
drop = {},
|
||||
sounds = base.node_sound_leaves_defaults(),
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, -0.5, 0.5, -0.3, 0.5}
|
||||
|
@ -112,7 +112,7 @@ minetest.register_node("crops:corn_base_1", {
|
|||
paramtype = "light",
|
||||
groups = { snappy=3,flammable=3,flora=1,attached_node=1,not_in_creative_inventory=1 },
|
||||
drop = {},
|
||||
sounds = base.node_sound_leaves_defaults(),
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_abm({
|
||||
|
@ -146,7 +146,7 @@ minetest.register_node("crops:corn_base_2", {
|
|||
paramtype = "light",
|
||||
groups = { snappy=3,flammable=3,flora=1,attached_node=1,not_in_creative_inventory=1 },
|
||||
drop = {},
|
||||
sounds = base.node_sound_leaves_defaults(),
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
on_dig = function(pos, node, digger)
|
||||
local above = {x = pos.x, y = pos.y + 1, z = pos.z}
|
||||
if minetest.get_node(above).name == "crops:corn_top_1" or minetest.get_node(above).name == "crops:corn_top_2" then
|
||||
|
@ -169,7 +169,7 @@ minetest.register_node("crops:corn_base_2", {
|
|||
end
|
||||
minetest.set_node(pos, { name = "crops:corn_base_3", param2 = 3 })
|
||||
minetest.set_node(above, { name = "crops:corn_top_4", param2 = 3 })
|
||||
base.handle_node_drops(above, drops, digger)
|
||||
minetest.handle_node_drops(above, drops, digger)
|
||||
end
|
||||
})
|
||||
|
||||
|
@ -184,7 +184,7 @@ minetest.register_node("crops:corn_base_3", {
|
|||
paramtype = "light",
|
||||
groups = { snappy=3,flammable=3,flora=1,attached_node=1,not_in_creative_inventory=1 },
|
||||
drop = {},
|
||||
sounds = base.node_sound_leaves_defaults(),
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
on_dig = function(pos, node, digger)
|
||||
local above = {x = pos.x, y = pos.y + 1, z = pos.z}
|
||||
if minetest.get_node(above).name == "crops:corn_top_4" then
|
||||
|
@ -206,7 +206,7 @@ minetest.register_node("crops:corn_top_1", {
|
|||
paramtype = "light",
|
||||
groups = { snappy=3,flammable=3,flora=1,not_in_creative_inventory=1 },
|
||||
drop = {},
|
||||
sounds = base.node_sound_leaves_defaults(),
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
on_dig = function(pos, node, digger)
|
||||
local below = {x = pos.x, y = pos.y - 1, z = pos.z}
|
||||
if not minetest.get_node(below).name == "crops:base_2" then
|
||||
|
@ -242,7 +242,7 @@ minetest.register_node("crops:corn_top_2", {
|
|||
paramtype = "light",
|
||||
groups = { snappy=3,flammable=3,flora=1,not_in_creative_inventory=1 },
|
||||
drop = {},
|
||||
sounds = base.node_sound_leaves_defaults(),
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
|
||||
on_dig = function(pos, node, digger)
|
||||
local below = {x = pos.x, y = pos.y - 1, z = pos.z}
|
||||
|
@ -281,7 +281,7 @@ minetest.register_node("crops:corn_top_3", {
|
|||
paramtype = "light",
|
||||
groups = { snappy=3,flammable=3,flora=1,not_in_creative_inventory=1 },
|
||||
drop = {},
|
||||
sounds = base.node_sound_leaves_defaults(),
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
|
||||
on_dig = function(pos, node, digger)
|
||||
local below = { x = pos.x, y = pos.y - 1, z = pos.z }
|
||||
|
@ -295,7 +295,7 @@ minetest.register_node("crops:corn_top_3", {
|
|||
table.insert(drops, ('crops:corn_cob'))
|
||||
end
|
||||
crops.die(below)
|
||||
base.handle_node_drops(pos, drops, digger)
|
||||
minetest.handle_node_drops(pos, drops, digger)
|
||||
end
|
||||
})
|
||||
|
||||
|
@ -311,7 +311,7 @@ minetest.register_node("crops:corn_top_4", {
|
|||
paramtype = "light",
|
||||
groups = { snappy=3,flammable=3,flora=1,not_in_creative_inventory=1 },
|
||||
drop = {},
|
||||
sounds = base.node_sound_leaves_defaults(),
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
|
||||
on_dig = function(pos, node, digger)
|
||||
local below = {x = pos.x, y = pos.y - 1, z = pos.z}
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
base
|
||||
default
|
||||
farming
|
||||
intllib?
|
||||
|
|
|
@ -328,11 +328,11 @@ if crops.settings.hydration then
|
|||
end
|
||||
|
||||
-- increase water for nearby water sources
|
||||
local f = minetest.find_node_near(pos, 1, {"base:water_source", "base:water_flowing"})
|
||||
local f = minetest.find_node_near(pos, 1, {"default:water_source", "default:water_flowing"})
|
||||
if not f == nil then
|
||||
water = math.min(100, water + 2)
|
||||
else
|
||||
f = minetest.find_node_near(pos, 2, {"base:water_source", "base:water_flowing"})
|
||||
f = minetest.find_node_near(pos, 2, {"default:water_source", "default:water_flowing"})
|
||||
if not f == nil then
|
||||
water = math.min(100, water + 1)
|
||||
end
|
||||
|
|
|
@ -3,7 +3,7 @@ local mg_params = minetest.get_mapgen_params()
|
|||
if mg_params.mgname ~= "v6" and mg_params.mgname ~= "singlenode" then
|
||||
minetest.register_decoration({
|
||||
deco_type = "simple",
|
||||
place_on = { "base:dirt_with_grass" },
|
||||
place_on = { "default:dirt_with_grass" },
|
||||
sidelen = 16,
|
||||
noise_params = {
|
||||
offset = -0.02,
|
||||
|
@ -20,7 +20,7 @@ if mg_params.mgname ~= "v6" and mg_params.mgname ~= "singlenode" then
|
|||
})
|
||||
minetest.register_decoration({
|
||||
deco_type = "simple",
|
||||
place_on = { "base:dirt_with_grass" },
|
||||
place_on = { "default:dirt_with_grass" },
|
||||
sidelen = 16,
|
||||
noise_params = {
|
||||
offset = -0.02,
|
||||
|
@ -38,10 +38,10 @@ if mg_params.mgname ~= "v6" and mg_params.mgname ~= "singlenode" then
|
|||
end
|
||||
|
||||
-- drop potatoes when digging in dirt
|
||||
minetest.override_item("base:dirt_with_grass", {
|
||||
minetest.override_item("default:dirt_with_grass", {
|
||||
drop = {
|
||||
items = {
|
||||
{ items = {'base:dirt'}},
|
||||
{ items = {'default:dirt'}},
|
||||
{ items = {'crops:potato'}, rarity = 500 }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -59,7 +59,7 @@ minetest.register_node("crops:melon_plant_" .. stage , {
|
|||
paramtype = "light",
|
||||
groups = { snappy=3, flammable=3, flora=1, attached_node=1, not_in_creative_inventory=1 },
|
||||
drop = "crops:melon_seed",
|
||||
sounds = base.node_sound_leaves_defaults(),
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, -0.5, 0.5, -0.5 + (((math.min(stage, 4)) + 1) / 5), 0.5}
|
||||
|
@ -80,7 +80,7 @@ minetest.register_node("crops:melon_plant_5_attached", {
|
|||
paramtype = "light",
|
||||
groups = { snappy=3, flammable=3, flora=1, attached_node=1, not_in_creative_inventory=1 },
|
||||
drop = "crops:melon_seed",
|
||||
sounds = base.node_sound_leaves_defaults(),
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
})
|
||||
|
||||
|
||||
|
@ -112,9 +112,9 @@ minetest.register_node("crops:melon", {
|
|||
groups = { snappy=3, flammable=3, oddly_breakable_by_hand=2 },
|
||||
paramtype2 = "facedir",
|
||||
drop = {},
|
||||
sounds = base.node_sound_wood_defaults({
|
||||
dig = { name = "base_dig_oddly_breakable_by_hand" },
|
||||
dug = { name = "base_dig_choppy" }
|
||||
sounds = default.node_sound_wood_defaults({
|
||||
dig = { name = "default_dig_oddly_breakable_by_hand" },
|
||||
dug = { name = "default_dig_choppy" }
|
||||
}),
|
||||
on_dig = function(pos, node, digger)
|
||||
for face = 1, 4 do
|
||||
|
@ -136,7 +136,7 @@ minetest.register_node("crops:melon", {
|
|||
for i = 1,math.random(3 - (2 * (damage / 100)), 5 - (4 * (damage / 100))) do
|
||||
table.insert(drops, ('crops:melon_slice'))
|
||||
end
|
||||
base.handle_node_drops(pos, drops, digger)
|
||||
minetest.handle_node_drops(pos, drops, digger)
|
||||
minetest.remove_node(pos)
|
||||
end
|
||||
})
|
||||
|
|
|
@ -17,8 +17,8 @@ minetest.register_craft({
|
|||
output = "crops:beanpoles",
|
||||
recipe = {
|
||||
{'', '', ''},
|
||||
{'base:stick', '', 'base:stick'},
|
||||
{'base:stick', '', 'base:stick'},
|
||||
{'default:stick', '', 'default:stick'},
|
||||
{'default:stick', '', 'default:stick'},
|
||||
}
|
||||
})
|
||||
|
||||
|
@ -86,7 +86,7 @@ local function crops_beanpole_on_dig(pos, node, digger)
|
|||
) then
|
||||
-- non-ripe
|
||||
for i = 1,4 do
|
||||
table.insert(drops, "base:stick")
|
||||
table.insert(drops, "default:stick")
|
||||
end
|
||||
minetest.set_node(bottom, { name = "crops:beanpole_base"})
|
||||
minetest.set_node(top, { name = "crops:beanpole_top"})
|
||||
|
@ -104,7 +104,7 @@ local function crops_beanpole_on_dig(pos, node, digger)
|
|||
elseif bottom_n.name == "crops:beanpole_plant_base_6" and top_n.name == "crops:beanpole_plant_top_4" then
|
||||
-- harvested beans
|
||||
for i = 1,math.random(3,4) do
|
||||
table.insert(drops, "base:stick")
|
||||
table.insert(drops, "default:stick")
|
||||
end
|
||||
minetest.remove_node(bottom)
|
||||
minetest.remove_node(top)
|
||||
|
@ -119,7 +119,7 @@ local function crops_beanpole_on_dig(pos, node, digger)
|
|||
return
|
||||
end
|
||||
|
||||
base.handle_node_drops(pos, drops, digger)
|
||||
minetest.handle_node_drops(pos, drops, digger)
|
||||
end
|
||||
|
||||
minetest.register_node("crops:beanpole_base", {
|
||||
|
@ -132,7 +132,7 @@ minetest.register_node("crops:beanpole_base", {
|
|||
paramtype = "light",
|
||||
groups = { snappy=3,flammable=3,flora=1,attached_node=1,not_in_creative_inventory=1 },
|
||||
drop = {},
|
||||
sounds = base.node_sound_leaves_defaults(),
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
on_dig = crops_beanpole_on_dig,
|
||||
})
|
||||
|
||||
|
@ -146,7 +146,7 @@ minetest.register_node("crops:beanpole_top", {
|
|||
paramtype = "light",
|
||||
groups = { snappy=3,flammable=3,flora=1,not_in_creative_inventory=1 },
|
||||
drop = {},
|
||||
sounds = base.node_sound_leaves_defaults(),
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
on_dig = crops_beanpole_on_dig,
|
||||
})
|
||||
|
||||
|
@ -161,7 +161,7 @@ minetest.register_node("crops:beanpoles", {
|
|||
paramtype = "light",
|
||||
groups = { snappy=3,flammable=3,flora=1,attached_node=1 },
|
||||
drop = {},
|
||||
sounds = base.node_sound_leaves_defaults(),
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
node_placement_prediction = "crops:beanpole_base",
|
||||
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
|
@ -225,7 +225,7 @@ minetest.register_node("crops:beanpole_plant_base_" .. stage, {
|
|||
walkable = false,
|
||||
groups = { snappy=3,flammable=3,flora=1,attached_node=1,not_in_creative_inventory=1 },
|
||||
drop = {},
|
||||
sounds = base.node_sound_leaves_defaults(),
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
on_dig = crops_beanpole_on_dig
|
||||
})
|
||||
end
|
||||
|
@ -241,7 +241,7 @@ minetest.register_node("crops:beanpole_plant_top_" .. stage, {
|
|||
walkable = true,
|
||||
groups = { snappy=3,flammable=3,flora=1,not_in_creative_inventory=1 },
|
||||
drop = {},
|
||||
sounds = base.node_sound_leaves_defaults(),
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
on_dig = crops_beanpole_on_dig
|
||||
})
|
||||
end
|
||||
|
|
|
@ -58,7 +58,7 @@ minetest.register_node("crops:potato_plant_" .. stage , {
|
|||
paramtype = "light",
|
||||
groups = { snappy=3, flammable=3, flora=1, attached_node=1, not_in_creative_inventory=1 },
|
||||
drop = {},
|
||||
sounds = base.node_sound_leaves_defaults(),
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.45, -0.5, -0.45, 0.45, -0.6 + (((math.min(stage, 4)) + 1) / 5), 0.45}
|
||||
|
@ -83,7 +83,7 @@ minetest.register_craft({
|
|||
--
|
||||
minetest.register_node("crops:soil_with_potatoes", {
|
||||
description = S("Soil with potatoes"),
|
||||
tiles = { "base_dirt.png^crops_potato_soil.png", "base_dirt.png" },
|
||||
tiles = { "default_dirt.png^crops_potato_soil.png", "default_dirt.png" },
|
||||
sunlight_propagates = false,
|
||||
use_texture_alpha = false,
|
||||
walkable = true,
|
||||
|
@ -96,7 +96,7 @@ minetest.register_node("crops:soil_with_potatoes", {
|
|||
{ items = {'crops:potato'}, rarity = 2 },
|
||||
{ items = {'crops:potato'}, rarity = 5 },
|
||||
}},
|
||||
sounds = base.node_sound_dirt_defaults(),
|
||||
sounds = default.node_sound_dirt_defaults(),
|
||||
on_dig = function(pos, node, digger)
|
||||
local drops = {}
|
||||
-- damage 0 = drops 3-5
|
||||
|
@ -107,7 +107,7 @@ minetest.register_node("crops:soil_with_potatoes", {
|
|||
for i = 1, math.random(3 - (3 * damage / 100), 5 - (4 * (damage / 100))) do
|
||||
table.insert(drops, "crops:potato")
|
||||
end
|
||||
base.handle_node_drops(pos, drops, digger)
|
||||
minetest.handle_node_drops(pos, drops, digger)
|
||||
minetest.set_node(pos, { name = "farming:soil" })
|
||||
local above = { x = pos.x, y = pos.y + 1, z = pos.z }
|
||||
if minetest.get_node(above).name == "crops:potato_plant_4" then
|
||||
|
|
|
@ -59,7 +59,7 @@ minetest.register_node("crops:pumpkin_plant_" .. stage , {
|
|||
paramtype = "light",
|
||||
groups = { snappy=3, flammable=3, flora=1, attached_node=1, not_in_creative_inventory=1 },
|
||||
drop = "crops:pumpkin_seed",
|
||||
sounds = base.node_sound_leaves_defaults(),
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, -0.5, 0.5, -0.5 + (((math.min(stage, 4)) + 1) / 5), 0.5}
|
||||
|
@ -80,7 +80,7 @@ minetest.register_node("crops:pumpkin_plant_5_attached", {
|
|||
paramtype = "light",
|
||||
groups = { snappy=3, flammable=3, flora=1, attached_node=1, not_in_creative_inventory=1 },
|
||||
drop = "crops:pumpkin_seed",
|
||||
sounds = base.node_sound_leaves_defaults(),
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
})
|
||||
|
||||
|
||||
|
@ -117,9 +117,9 @@ minetest.register_node("crops:pumpkin", {
|
|||
walkable = true,
|
||||
groups = { snappy=3, flammable=3, oddly_breakable_by_hand=2 },
|
||||
paramtype2 = "facedir",
|
||||
sounds = base.node_sound_wood_defaults({
|
||||
dig = { name = "base_dig_oddly_breakable_by_hand" },
|
||||
dug = { name = "base_dig_choppy" }
|
||||
sounds = default.node_sound_wood_defaults({
|
||||
dig = { name = "default_dig_oddly_breakable_by_hand" },
|
||||
dug = { name = "default_dig_choppy" }
|
||||
}),
|
||||
after_dig_node = function(pos, node)
|
||||
for face = 1, 4 do
|
||||
|
|
|
@ -28,7 +28,7 @@ minetest.register_node("crops:tomato_seed", {
|
|||
node_placement_prediction = "crops:tomato_plant_1",
|
||||
groups = { snappy=3,flammable=3,flora=1,attached_node=1 },
|
||||
drop = {},
|
||||
sounds = base.node_sound_leaves_defaults(),
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
local under = minetest.get_node(pointed_thing.under)
|
||||
|
@ -56,7 +56,7 @@ minetest.register_node("crops:tomato_plant_" .. stage , {
|
|||
paramtype = "light",
|
||||
groups = { snappy=3, flammable=3, flora=1, attached_node=1, not_in_creative_inventory=1 },
|
||||
drop = {},
|
||||
sounds = base.node_sound_leaves_defaults(),
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.45, -0.5, -0.45, 0.45, -0.6 + (((math.min(stage, 4)) + 1) / 5), 0.45}
|
||||
|
@ -76,7 +76,7 @@ minetest.register_node("crops:tomato_plant_5" , {
|
|||
paramtype = "light",
|
||||
groups = { snappy=3, flammable=3, flora=1, attached_node=1, not_in_creative_inventory=1 },
|
||||
drop = {},
|
||||
sounds = base.node_sound_leaves_defaults(),
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.45, -0.5, -0.45, 0.45, 0.45, 0.45}
|
||||
|
@ -86,7 +86,7 @@ minetest.register_node("crops:tomato_plant_5" , {
|
|||
for i = 1, math.random(1, 2) do
|
||||
table.insert(drops, "crops:tomato")
|
||||
end
|
||||
base.handle_node_drops(pos, drops, digger)
|
||||
minetest.handle_node_drops(pos, drops, digger)
|
||||
|
||||
local meta = minetest.get_meta(pos)
|
||||
local ttl = meta:get_int("crops_tomato_ttl")
|
||||
|
@ -111,7 +111,7 @@ minetest.register_node("crops:tomato_plant_6", {
|
|||
paramtype = "light",
|
||||
groups = { snappy=3, flammable=3, flora=1, attached_node=1, not_in_creative_inventory=1 },
|
||||
drop = {},
|
||||
sounds = base.node_sound_leaves_defaults(),
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.45, -0.5, -0.45, 0.45, 0.45, 0.45}
|
||||
|
|
|
@ -109,17 +109,17 @@ minetest.register_tool("crops:hydrometer", {
|
|||
minetest.register_craft({
|
||||
output = "crops:watering_can",
|
||||
recipe = {
|
||||
{ "base:steel_ingot", "", "" },
|
||||
{ "base:steel_ingot", "", "base:steel_ingot" },
|
||||
{ "", "base:steel_ingot", "" },
|
||||
{ "default:steel_ingot", "", "" },
|
||||
{ "default:steel_ingot", "", "default:steel_ingot" },
|
||||
{ "", "default:steel_ingot", "" },
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "crops:hydrometer",
|
||||
recipe = {
|
||||
{ "base:mese_crystal_fragment", "", "" },
|
||||
{ "", "base:steel_ingot", "" },
|
||||
{ "", "", "base:steel_ingot" },
|
||||
{ "default:mese_crystal_fragment", "", "" },
|
||||
{ "", "default:steel_ingot", "" },
|
||||
{ "", "", "default:steel_ingot" },
|
||||
},
|
||||
})
|
||||
|
|
|
@ -0,0 +1,497 @@
|
|||
--[[
|
||||
Default crafting
|
||||
--]]
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'default:wood 4',
|
||||
recipe = {
|
||||
{'default:tree'},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'default:junglewood 4',
|
||||
recipe = {
|
||||
{'default:jungletree'},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'default:pine_wood 4',
|
||||
recipe = {
|
||||
{'default:pine_tree'},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'default:acacia_wood 4',
|
||||
recipe = {
|
||||
{'default:acacia_tree'},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'default:aspen_wood 4',
|
||||
recipe = {
|
||||
{'default:aspen_tree'},
|
||||
}
|
||||
})
|
||||
|
||||
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 4',
|
||||
recipe = {
|
||||
{'group:wood'},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'default:coalblock',
|
||||
recipe = {
|
||||
{'default:coal_lump', 'default:coal_lump', 'default:coal_lump'},
|
||||
{'default:coal_lump', 'default:coal_lump', 'default:coal_lump'},
|
||||
{'default:coal_lump', 'default:coal_lump', 'default:coal_lump'},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'default:coal_lump 9',
|
||||
recipe = {
|
||||
{'default:coalblock'},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'default:steelblock',
|
||||
recipe = {
|
||||
{'default:steel_ingot', 'default:steel_ingot', 'default:steel_ingot'},
|
||||
{'default:steel_ingot', 'default:steel_ingot', 'default:steel_ingot'},
|
||||
{'default:steel_ingot', 'default:steel_ingot', 'default:steel_ingot'},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'default:steel_ingot 9',
|
||||
recipe = {
|
||||
{'default:steelblock'},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'default:copperblock',
|
||||
recipe = {
|
||||
{'default:copper_ingot', 'default:copper_ingot', 'default:copper_ingot'},
|
||||
{'default:copper_ingot', 'default:copper_ingot', 'default:copper_ingot'},
|
||||
{'default:copper_ingot', 'default:copper_ingot', 'default:copper_ingot'},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'default:copper_ingot 9',
|
||||
recipe = {
|
||||
{'default:copperblock'},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "default:tinblock",
|
||||
recipe = {
|
||||
{"default:tin_ingot", "default:tin_ingot", "default:tin_ingot"},
|
||||
{"default:tin_ingot", "default:tin_ingot", "default:tin_ingot"},
|
||||
{"default:tin_ingot", "default:tin_ingot", "default:tin_ingot"},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "default:tin_ingot 9",
|
||||
recipe = {
|
||||
{"default:tinblock"},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "default:bronze_ingot 9",
|
||||
recipe = {
|
||||
{"default:copper_ingot", "default:copper_ingot", "default:copper_ingot"},
|
||||
{"default:copper_ingot", "default:tin_ingot", "default:copper_ingot"},
|
||||
{"default:copper_ingot", "default:copper_ingot", "default:copper_ingot"},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'default:bronzeblock',
|
||||
recipe = {
|
||||
{'default:bronze_ingot', 'default:bronze_ingot', 'default:bronze_ingot'},
|
||||
{'default:bronze_ingot', 'default:bronze_ingot', 'default:bronze_ingot'},
|
||||
{'default:bronze_ingot', 'default:bronze_ingot', 'default:bronze_ingot'},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'default:bronze_ingot 9',
|
||||
recipe = {
|
||||
{'default:bronzeblock'},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'default:goldblock',
|
||||
recipe = {
|
||||
{'default:gold_ingot', 'default:gold_ingot', 'default:gold_ingot'},
|
||||
{'default:gold_ingot', 'default:gold_ingot', 'default:gold_ingot'},
|
||||
{'default:gold_ingot', 'default:gold_ingot', 'default:gold_ingot'},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'default:gold_ingot 9',
|
||||
recipe = {
|
||||
{'default:goldblock'},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'default:diamondblock',
|
||||
recipe = {
|
||||
{'default:diamond', 'default:diamond', 'default:diamond'},
|
||||
{'default:diamond', 'default:diamond', 'default:diamond'},
|
||||
{'default:diamond', 'default:diamond', 'default:diamond'},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'default:diamond 9',
|
||||
recipe = {
|
||||
{'default:diamondblock'},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "default:sandstone",
|
||||
recipe = {
|
||||
{"default:sand", "default:sand"},
|
||||
{"default:sand", "default:sand"},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "default:sand 4",
|
||||
recipe = {
|
||||
{"default:sandstone"},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "default:sandstonebrick 4",
|
||||
recipe = {
|
||||
{"default:sandstone", "default:sandstone"},
|
||||
{"default:sandstone", "default:sandstone"},
|
||||
}
|
||||
})
|
||||
|
||||
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:desert_sandstone",
|
||||
recipe = {
|
||||
{"default:desert_sand", "default:desert_sand"},
|
||||
{"default:desert_sand", "default:desert_sand"},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "default:desert_sand 4",
|
||||
recipe = {
|
||||
{"default:desert_sandstone"},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "default:desert_sandstone_brick 4",
|
||||
recipe = {
|
||||
{"default:desert_sandstone", "default:desert_sandstone"},
|
||||
{"default:desert_sandstone", "default:desert_sandstone"},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "default:desert_sandstone_block 9",
|
||||
recipe = {
|
||||
{"default:desert_sandstone", "default:desert_sandstone", "default:desert_sandstone"},
|
||||
{"default:desert_sandstone", "default:desert_sandstone", "default:desert_sandstone"},
|
||||
{"default:desert_sandstone", "default:desert_sandstone", "default:desert_sandstone"},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'default:clay',
|
||||
recipe = {
|
||||
{'default:clay_lump', 'default:clay_lump'},
|
||||
{'default:clay_lump', 'default:clay_lump'},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'default:clay_lump 4',
|
||||
recipe = {
|
||||
{'deafult:clay'},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'default:brick',
|
||||
recipe = {
|
||||
{'default:clay_brick', 'default:clay_brick'},
|
||||
{'default:clay_brick', 'default:clay_brick'},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'default:clay_brick 4',
|
||||
recipe = {
|
||||
{'default:brick'},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'default:paper',
|
||||
recipe = {
|
||||
{'default:papyrus', 'default:papyrus', 'default:papyrus'},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "default:ladder_wood 5",
|
||||
recipe = {
|
||||
{"group:stick", "", "group:stick"},
|
||||
{"group:stick", "group:stick", "group:stick"},
|
||||
{"group:stick", "", "group:stick"},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'default:ladder_steel 15',
|
||||
recipe = {
|
||||
{'default:steel_ingot', '', 'default:steel_ingot'},
|
||||
{'default:steel_ingot', 'default:steel_ingot', 'default:steel_ingot'},
|
||||
{'default:steel_ingot', '', 'default:steel_ingot'},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'default:mese',
|
||||
recipe = {
|
||||
{'default:mese_crystal', 'default:mese_crystal', 'default:mese_crystal'},
|
||||
{'default:mese_crystal', 'default:mese_crystal', 'default:mese_crystal'},
|
||||
{'default:mese_crystal', 'default:mese_crystal', 'default:mese_crystal'},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'default:mese_crystal 9',
|
||||
recipe = {
|
||||
{'default:mese'},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'default:mese_crystal_fragment 9',
|
||||
recipe = {
|
||||
{'default:mese_crystal'},
|
||||
}
|
||||
})
|
||||
|
||||
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:meselamp',
|
||||
recipe = {
|
||||
{'default:glass'},
|
||||
{'default:mese_crystal'},
|
||||
}
|
||||
})
|
||||
|
||||
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 = {
|
||||
{'default:obsidian'}
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'default:obsidian',
|
||||
recipe = {
|
||||
{'default:obsidian_shard', 'default:obsidian_shard', 'default:obsidian_shard'},
|
||||
{'default:obsidian_shard', 'default:obsidian_shard', 'default:obsidian_shard'},
|
||||
{'default:obsidian_shard', 'default:obsidian_shard', 'default:obsidian_shard'},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'default:obsidianbrick 4',
|
||||
recipe = {
|
||||
{'default:obsidian', 'default:obsidian'},
|
||||
{'default:obsidian', 'default:obsidian'}
|
||||
}
|
||||
})
|
||||
|
||||
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:stonebrick 4',
|
||||
recipe = {
|
||||
{'default:stone', 'default:stone'},
|
||||
{'default:stone', 'default:stone'},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'default:stone_block 9',
|
||||
recipe = {
|
||||
{'default:stone', 'default:stone', 'default:stone'},
|
||||
{'default:stone', 'default:stone', 'default:stone'},
|
||||
{'default:stone', 'default:stone', 'default:stone'},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'default:desert_stonebrick 4',
|
||||
recipe = {
|
||||
{'default:desert_stone', 'default:desert_stone'},
|
||||
{'default:desert_stone', 'default:desert_stone'},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'default:desert_stone_block 9',
|
||||
recipe = {
|
||||
{'default:desert_stone', 'default:desert_stone', 'default:desert_stone'},
|
||||
{'default:desert_stone', 'default:desert_stone', 'default:desert_stone'},
|
||||
{'default:desert_stone', 'default:desert_stone', 'default:desert_stone'},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'default:snowblock',
|
||||
recipe = {
|
||||
{'default:snow', 'default:snow', 'default:snow'},
|
||||
{'default:snow', 'default:snow', 'default:snow'},
|
||||
{'default:snow', 'default:snow', 'default:snow'},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'default:snow 9',
|
||||
recipe = {
|
||||
{'default:snowblock'},
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
--[[
|
||||
Cooking recipes
|
||||
--]]
|
||||
|
||||
minetest.register_craft({
|
||||
type = "cooking",
|
||||
output = "default:glass",
|
||||
recipe = "group:sand",
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "cooking",
|
||||
output = "default:obsidian_glass",
|
||||
recipe = "default:obsidian_shard",
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "cooking",
|
||||
output = "default:stone",
|
||||
recipe = "default:cobble",
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "cooking",
|
||||
output = "default:stone",
|
||||
recipe = "default:mossycobble",
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "cooking",
|
||||
output = "default:desert_stone",
|
||||
recipe = "default:desert_cobble",
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "cooking",
|
||||
output = "default:steel_ingot",
|
||||
recipe = "default:iron_lump",
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "cooking",
|
||||
output = "default:copper_ingot",
|
||||
recipe = "default:copper_lump",
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "cooking",
|
||||
output = "default:tin_ingot",
|
||||
recipe = "default:tin_lump",
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "cooking",
|
||||
output = "default:gold_ingot",
|
||||
recipe = "default:gold_lump",
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "cooking",
|
||||
output = "default:clay_brick",
|
||||
recipe = "default:clay_lump",
|
||||
})
|
||||
|
|
@ -0,0 +1,102 @@
|
|||
--[[
|
||||
Default craftitems
|
||||
--]]
|
||||
|
||||
minetest.register_craftitem("default:stick", {
|
||||
description = "Stick",
|
||||
inventory_image = "default_stick.png",
|
||||
groups = {stick = 1, flammable = 2},
|
||||
})
|
||||
|
||||
minetest.register_craftitem("default:paper", {
|
||||
description = "Paper",
|
||||
inventory_image = "default_paper.png",
|
||||
groups = {flammable = 3},
|
||||
})
|
||||
|
||||
minetest.register_craftitem("default:coal_lump", {
|
||||
description = "Coal Lump",
|
||||
inventory_image = "default_coal_lump.png",
|
||||
groups = {coal = 1, flammable = 1}
|
||||
})
|
||||
|
||||
minetest.register_craftitem("default:iron_lump", {
|
||||
description = "Iron Lump",
|
||||
inventory_image = "default_iron_lump.png",
|
||||
})
|
||||
|
||||
minetest.register_craftitem("default:copper_lump", {
|
||||
description = "Copper Lump",
|
||||
inventory_image = "default_copper_lump.png",
|
||||
})
|
||||
|
||||
minetest.register_craftitem("default:tin_lump", {
|
||||
description = "Tin Lump",
|
||||
inventory_image = "default_tin_lump.png",
|
||||
})
|
||||
|
||||
minetest.register_craftitem("default:mese_crystal", {
|
||||
description = "Mese Crystal",
|
||||
inventory_image = "default_mese_crystal.png",
|
||||
})
|
||||
|
||||
minetest.register_craftitem("default:gold_lump", {
|
||||
description = "Gold Lump",
|
||||
inventory_image = "default_gold_lump.png",
|
||||
})
|
||||
|
||||
minetest.register_craftitem("default:diamond", {
|
||||
description = "Diamond",
|
||||
inventory_image = "default_diamond.png",
|
||||
})
|
||||
|
||||
minetest.register_craftitem("default:clay_lump", {
|
||||
description = "Clay Lump",
|
||||
inventory_image = "default_clay_lump.png",
|
||||
})
|
||||
|
||||
minetest.register_craftitem("default:steel_ingot", {
|
||||
description = "Steel Ingot",
|
||||
inventory_image = "default_steel_ingot.png",
|
||||
})
|
||||
|
||||
minetest.register_craftitem("default:copper_ingot", {
|
||||
description = "Copper Ingot",
|
||||
inventory_image = "default_copper_ingot.png",
|
||||
})
|
||||
|
||||
minetest.register_craftitem("default:tin_ingot", {
|
||||
description = "Tin Ingot",
|
||||
inventory_image = "default_tin_ingot.png",
|
||||
})
|
||||
|
||||
minetest.register_craftitem("default:bronze_ingot", {
|
||||
description = "Bronze Ingot",
|
||||
inventory_image = "default_bronze_ingot.png",
|
||||
})
|
||||
|
||||
minetest.register_craftitem("default:gold_ingot", {
|
||||
description = "Gold Ingot",
|
||||
inventory_image = "default_gold_ingot.png"
|
||||
})
|
||||
|
||||
minetest.register_craftitem("default:mese_crystal_fragment", {
|
||||
description = "Mese Crystal Fragment",
|
||||
inventory_image = "default_mese_crystal_fragment.png",
|
||||
})
|
||||
|
||||
minetest.register_craftitem("default:clay_brick", {
|
||||
description = "Clay Brick",
|
||||
inventory_image = "default_clay_brick.png",
|
||||
})
|
||||
|
||||
minetest.register_craftitem("default:obsidian_shard", {
|
||||
description = "Obsidian Shard",
|
||||
inventory_image = "default_obsidian_shard.png",
|
||||
})
|
||||
|
||||
minetest.register_craftitem("default:flint", {
|
||||
description = "Flint",
|
||||
inventory_image = "default_flint.png"
|
||||
})
|
||||
|
|
@ -0,0 +1 @@
|
|||
init
|
|
@ -0,0 +1,374 @@
|
|||
--[[
|
||||
Default functions
|
||||
--]]
|
||||
|
||||
|
||||
--
|
||||
-- Lavacooling
|
||||
--
|
||||
|
||||
default.cool_lava = function(pos, node)
|
||||
if node.name == "default:lava_source" then
|
||||
minetest.set_node(pos, {name = "default:obsidian"})
|
||||
else -- Lava flowing
|
||||
minetest.set_node(pos, {name = "default:stone"})
|
||||
end
|
||||
minetest.sound_play("default_cool_lava",
|
||||
{pos = pos, max_hear_distance = 16, gain = 0.25})
|
||||
end
|
||||
|
||||
if minetest.settings:get_bool("enable_lavacooling") ~= false then
|
||||
minetest.register_abm({
|
||||
label = "Lava cooling",
|
||||
nodenames = {"default:lava_source", "default:lava_flowing"},
|
||||
neighbors = {"group:cools_lava", "group:water"},
|
||||
interval = 1,
|
||||
chance = 2,
|
||||
catch_up = false,
|
||||
action = default.cool_lava,
|
||||
})
|
||||
end
|
||||
|
||||
|
||||
--
|
||||
-- Papyrus and cactus growing
|
||||
--
|
||||
|
||||
-- wrapping the functions in abm action is necessary to make overriding them possible
|
||||
|
||||
function default.grow_cactus(pos, node)
|
||||
if node.param2 >= 4 then
|
||||
return
|
||||
end
|
||||
pos.y = pos.y - 1
|
||||
if minetest.get_item_group(minetest.get_node(pos).name, "sand") == 0 then
|
||||
return
|
||||
end
|
||||
pos.y = pos.y + 1
|
||||
local height = 0
|
||||
while node.name == "default:cactus" and height < 4 do
|
||||
height = height + 1
|
||||
pos.y = pos.y + 1
|
||||
node = minetest.get_node(pos)
|
||||
end
|
||||
if height == 4 or node.name ~= "air" then
|
||||
return
|
||||
end
|
||||
if minetest.get_node_light(pos) < 13 then
|
||||
return
|
||||
end
|
||||
minetest.set_node(pos, {name = "default:cactus"})
|
||||
return true
|
||||
end
|
||||
|
||||
function default.grow_papyrus(pos, node)
|
||||
pos.y = pos.y - 1
|
||||
local name = minetest.get_node(pos).name
|
||||
if name ~= "default:dirt_with_grass" and name ~= "default:dirt" then
|
||||
return
|
||||
end
|
||||
if not minetest.find_node_near(pos, 3, {"group:water"}) then
|
||||
return
|
||||
end
|
||||
pos.y = pos.y + 1
|
||||
local height = 0
|
||||
while node.name == "default:papyrus" and height < 4 do
|
||||
height = height + 1
|
||||
pos.y = pos.y + 1
|
||||
node = minetest.get_node(pos)
|
||||
end
|
||||
if height == 4 or node.name ~= "air" then
|
||||
return
|
||||
end
|
||||
if minetest.get_node_light(pos) < 13 then
|
||||
return
|
||||
end
|
||||
minetest.set_node(pos, {name = "default:papyrus"})
|
||||
return true
|
||||
end
|
||||
|
||||
minetest.register_abm({
|
||||
label = "Grow cactus",
|
||||
nodenames = {"default:cactus"},
|
||||
neighbors = {"group:sand"},
|
||||
interval = 12,
|
||||
chance = 83,
|
||||
action = default.grow_cactus
|
||||
})
|
||||
|
||||
minetest.register_abm({
|
||||
label = "Grow papyrus",
|
||||
nodenames = {"default:papyrus"},
|
||||
neighbors = {"default:dirt", "default:dirt_with_grass"},
|
||||
interval = 14,
|
||||
chance = 71,
|
||||
action = default.grow_papyrus
|
||||
})
|
||||
|
||||
|
||||
--
|
||||
-- dig upwards
|
||||
--
|
||||
|
||||
function default.dig_up(pos, node, digger)
|
||||
if digger == nil then return end
|
||||
local np = {x = pos.x, y = pos.y + 1, z = pos.z}
|
||||
local nn = minetest.get_node(np)
|
||||
if nn.name == node.name then
|
||||
minetest.node_dig(np, nn, digger)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
--
|
||||
-- Convert dirt to something that fits the environment
|
||||
--
|
||||
|
||||
minetest.register_abm({
|
||||
label = "Grass spread",
|
||||
nodenames = {"default:dirt"},
|
||||
neighbors = {
|
||||
"air",
|
||||
"group:grass",
|
||||
"group:dry_grass",
|
||||
"default:snow",
|
||||
},
|
||||
interval = 6,
|
||||
chance = 50,
|
||||
catch_up = false,
|
||||
action = function(pos, node)
|
||||
-- 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 spreading dirt-type neighbours
|
||||
local p2 = minetest.find_node_near(pos, 1, "group:spreading_dirt_type")
|
||||
if p2 then
|
||||
local n3 = minetest.get_node(p2)
|
||||
minetest.set_node(pos, {name = n3.name})
|
||||
return
|
||||
end
|
||||
|
||||
-- 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
|
||||
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
|
||||
minetest.set_node(pos, {name = "default:dirt_with_dry_grass"})
|
||||
end
|
||||
end
|
||||
})
|
||||
|
||||
|
||||
--
|
||||
-- Grass and dry grass removed in darkness
|
||||
--
|
||||
|
||||
minetest.register_abm({
|
||||
label = "Grass covered",
|
||||
nodenames = {"group:spreading_dirt_type"},
|
||||
interval = 8,
|
||||
chance = 50,
|
||||
catch_up = false,
|
||||
action = function(pos, node)
|
||||
local above = {x = pos.x, y = pos.y + 1, z = pos.z}
|
||||
local name = minetest.get_node(above).name
|
||||
local nodedef = minetest.registered_nodes[name]
|
||||
if name ~= "ignore" and nodedef and not ((nodedef.sunlight_propagates or
|
||||
nodedef.paramtype == "light") and
|
||||
nodedef.liquidtype == "none") then
|
||||
minetest.set_node(pos, {name = "default:dirt"})
|
||||
end
|
||||
end
|
||||
})
|
||||
|
||||
|
||||
--
|
||||
-- Moss growth on cobble near water
|
||||
--
|
||||
|
||||
minetest.register_abm({
|
||||
label = "Moss growth",
|
||||
nodenames = {"default:cobble", "stairs:slab_cobble", "stairs:stair_cobble", "walls:cobble"},
|
||||
neighbors = {"group:water"},
|
||||
interval = 16,
|
||||
chance = 200,
|
||||
catch_up = false,
|
||||
action = function(pos, node)
|
||||
if node.name == "default:cobble" then
|
||||
minetest.set_node(pos, {name = "default:mossycobble"})
|
||||
elseif node.name == "stairs:slab_cobble" then
|
||||
minetest.set_node(pos, {name = "stairs:slab_mossycobble", param2 = node.param2})
|
||||
elseif node.name == "stairs:stair_cobble" then
|
||||
minetest.set_node(pos, {name = "stairs:stair_mossycobble", param2 = node.param2})
|
||||
elseif node.name == "walls:cobble" then
|
||||
minetest.set_node(pos, {name = "walls:mossycobble", param2 = node.param2})
|
||||
end
|
||||
end
|
||||
})
|
||||
|
||||
|
||||
--
|
||||
-- Leafdecay
|
||||
--
|
||||
|
||||
-- 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
|
||||
local node = minetest.get_node(pos)
|
||||
node.param2 = 1
|
||||
minetest.set_node(pos, node)
|
||||
end
|
||||
end
|
||||
|
||||
-- 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)
|
||||
local timer = minetest.get_node_timer(v)
|
||||
if node.param2 == 0 and not timer:is_started() then
|
||||
timer:start(math.random(20, 120) / 10)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
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
|
||||
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
|
||||
|
||||
|
||||
--
|
||||
-- Checks if specified volume intersects a protected volume
|
||||
--
|
||||
|
||||
function default.intersects_protection(minp, maxp, player_name, interval)
|
||||
-- 'interval' is the largest allowed interval for the 3D lattice of checks
|
||||
|
||||
-- Compute the optimal float step 'd' for each axis so that all corners and
|
||||
-- borders are checked. 'd' will be smaller or equal to 'interval'.
|
||||
-- Subtracting 1e-4 ensures that the max co-ordinate will be reached by the
|
||||
-- for loop (which might otherwise not be the case due to rounding errors).
|
||||
local d = {}
|
||||
for _, c in pairs({"x", "y", "z"}) do
|
||||
if maxp[c] > minp[c] then
|
||||
d[c] = (maxp[c] - minp[c]) / math.ceil((maxp[c] - minp[c]) / interval) - 1e-4
|
||||
elseif maxp[c] == minp[c] then
|
||||
d[c] = 1 -- Any value larger than 0 to avoid division by zero
|
||||
else -- maxp[c] < minp[c], print error and treat as protection intersected
|
||||
minetest.log("error", "maxp < minp in 'default.intersects_protection()'")
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
for zf = minp.z, maxp.z, d.z do
|
||||
local z = math.floor(zf + 0.5)
|
||||
for yf = minp.y, maxp.y, d.y do
|
||||
local y = math.floor(yf + 0.5)
|
||||
for xf = minp.x, maxp.x, d.x do
|
||||
local x = math.floor(xf + 0.5)
|
||||
if minetest.is_protected({x = x, y = y, z = z}, player_name) then
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
return false
|
||||
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)
|
||||
local owner = meta:get_string("owner")
|
||||
|
||||
if not owner or owner == "" or owner == player:get_player_name() then
|
||||
return true
|
||||
end
|
||||
|
||||
-- is player wielding the right key?
|
||||
local item = player:get_wielded_item()
|
||||
if item:get_name() == "default:key" then
|
||||
local key_meta = item:get_meta()
|
||||
|
||||
if key_meta:get_string("secret") == "" then
|
||||
local key_oldmeta = item:get_metadata()
|
||||
if key_oldmeta == "" or not minetest.parse_json(key_oldmeta) then
|
||||
return false
|
||||
end
|
||||
|
||||
key_meta:set_string("secret", minetest.parse_json(key_oldmeta).secret)
|
||||
item:set_metadata("")
|
||||
end
|
||||
|
||||
return meta:get_string("key_lock_secret") == key_meta:get_string("secret")
|
||||
end
|
||||
|
||||
return false
|
||||
end
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
--[[
|
||||
Default
|
||||
--]]
|
||||
|
||||
-- Definitions made by this mod that other mods can use too
|
||||
default = {}
|
||||
|
||||
default.LIGHT_MAX = 14
|
||||
|
||||
-- Load files
|
||||
local modpath = minetest.get_modpath("default")
|
||||
dofile(modpath.."/sounds.lua")
|
||||
dofile(modpath.."/functions.lua")
|
||||
dofile(modpath.."/nodes_base.lua") -- Simple solid cubic nodes with simple definitions
|
||||
dofile(modpath.."/nodes_liquid.lua") -- Liquids
|
||||
dofile(modpath.."/nodes_plants.lua") -- Plants
|
||||
dofile(modpath.."/nodes_trees.lua") -- Tree nodes: wood, planks, sapling, leaves
|
||||
dofile(modpath.."/nodes_glass.lua") -- Glass
|
||||
dofile(modpath.."/nodes_climb.lua") -- Climbable nodes
|
||||
dofile(modpath.."/nodes_misc.lua") -- Other and special nodes
|
||||
dofile(modpath.."/craftitems.lua")
|
||||
dofile(modpath.."/crafting.lua")
|
||||
|
||||
-- Legacy
|
||||
WATER_ALPHA = minetest.registered_nodes["default:water_source"].alpha
|
||||
WATER_VISC = minetest.registered_nodes["default:water_source"].liquid_viscosity
|
||||
LAVA_VISC = minetest.registered_nodes["default:lava_source"].liquid_viscosity
|
||||
LIGHT_MAX = default.LIGHT_MAX
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
name = default
|
||||
|
|
@ -0,0 +1,452 @@
|
|||
--[[
|
||||
Default nodes
|
||||
--]]
|
||||
|
||||
|
||||
minetest.register_node("default:clay", {
|
||||
description = "Clay",
|
||||
tiles = {"default_clay.png"},
|
||||
groups = {crumbly = 3},
|
||||
drop = "default:clay_lump 4",
|
||||
sounds = default.node_sound_dirt_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("default:dirt", {
|
||||
description = "Dirt",
|
||||
tiles = {"default_dirt.png"},
|
||||
groups = {crumbly = 3, soil = 1},
|
||||
sounds = default.node_sound_dirt_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("default:gravel", {
|
||||
description = "Gravel",
|
||||
tiles = {"default_gravel.png"},
|
||||
groups = {crumbly = 2, falling_node = 1},
|
||||
sounds = default.node_sound_gravel_defaults(),
|
||||
drop = {
|
||||
max_items = 1,
|
||||
items = {
|
||||
{items = {"default:flint"}, rarity = 16},
|
||||
{items = {"default:gravel"}}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_node("default:stone", {
|
||||
description = "Stone",
|
||||
tiles = {"default_stone.png"},
|
||||
groups = {cracky = 3, stone = 1},
|
||||
drop = "default:cobble",
|
||||
legacy_mineral = true,
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("default:stone_with_diamond", {
|
||||
description = "Diamond Ore",
|
||||
tiles = {"default_stone.png^default_mineral_diamond.png"},
|
||||
groups = {cracky = 1},
|
||||
drop = "default:diamond",
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("default:cobble", {
|
||||
description = "Cobblestone",
|
||||
tiles = {"default_cobble.png"},
|
||||
is_ground_content = false,
|
||||
groups = {cracky = 3, stone = 2},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("default:stonebrick", {
|
||||
description = "Stone Brick",
|
||||
paramtype2 = "facedir",
|
||||
place_param2 = 0,
|
||||
tiles = {"default_stone_brick.png"},
|
||||
is_ground_content = false,
|
||||
groups = {cracky = 2, stone = 1},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("default:stone_block", {
|
||||
description = "Stone Block",
|
||||
tiles = {"default_stone_block.png"},
|
||||
is_ground_content = false,
|
||||
groups = {cracky = 2, stone = 1},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("default:mossycobble", {
|
||||
description = "Mossy Cobblestone",
|
||||
tiles = {"default_mossycobble.png"},
|
||||
is_ground_content = false,
|
||||
groups = {cracky = 3, stone = 1},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("default:sandstone", {
|
||||
description = "Sandstone",
|
||||
tiles = {"default_sandstone.png"},
|
||||
drop = "base:sandstone_cobble",
|
||||
groups = {crumbly = 1, cracky = 3},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("default:sandstonebrick", {
|
||||
description = "Sandstone Brick",
|
||||
paramtype2 = "facedir",
|
||||
place_param2 = 0,
|
||||
tiles = {"default_sandstone_brick.png"},
|
||||
is_ground_content = false,
|
||||
groups = {cracky = 2},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("default:sandstone_block", {
|
||||
description = "Sandstone Block",
|
||||
tiles = {"default_sandstone_block.png"},
|
||||
is_ground_content = false,
|
||||
groups = {cracky = 2},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("default:desert_sandstone", {
|
||||
description = "Desert Sandstone",
|
||||
tiles = {"default_desert_sandstone.png"},
|
||||
groups = {crumbly = 1, cracky = 3},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("default:desert_sandstone_brick", {
|
||||
description = "Desert Sandstone Brick",
|
||||
paramtype2 = "facedir",
|
||||
place_param2 = 0,
|
||||
tiles = {"default_desert_sandstone_brick.png"},
|
||||
is_ground_content = false,
|
||||
groups = {cracky = 2},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("default:desert_sandstone_block", {
|
||||
description = "Desert Sandstone Block",
|
||||
tiles = {"default_desert_sandstone_block.png"},
|
||||
is_ground_content = false,
|
||||
groups = {cracky = 2},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("default:obsidian", {
|
||||
description = "Obsidian",
|
||||
tiles = {"default_obsidian.png"},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
groups = {cracky = 1, level = 2},
|
||||
})
|
||||
|
||||
minetest.register_node("default:obsidianbrick", {
|
||||
description = "Obsidian Brick",
|
||||
paramtype2 = "facedir",
|
||||
place_param2 = 0,
|
||||
tiles = {"default_obsidian_brick.png"},
|
||||
is_ground_content = false,
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
groups = {cracky = 1, level = 2},
|
||||
})
|
||||
|
||||
minetest.register_node("default:obsidian_block", {
|
||||
description = "Obsidian Block",
|
||||
tiles = {"default_obsidian_block.png"},
|
||||
is_ground_content = false,
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
groups = {cracky = 1, level = 2},
|
||||
})
|
||||
|
||||
minetest.register_node("default:dirt_with_grass", {
|
||||
description = "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, spreading_dirt_type = 1},
|
||||
drop = "default:dirt",
|
||||
sounds = default.node_sound_dirt_defaults({
|
||||
footstep = {name = "default_grass_footstep", gain = 0.25},
|
||||
}),
|
||||
})
|
||||
|
||||
minetest.register_node("default:dirt_with_grass_footsteps", {
|
||||
description = "Dirt with Grass and Footsteps",
|
||||
tiles = {"default_grass.png^default_footprint.png", "default_dirt.png",
|
||||
{name = "default_dirt.png^default_grass_side.png",
|
||||
tileable_vertical = false}},
|
||||
groups = {crumbly = 3, soil = 1, not_in_creative_inventory = 1},
|
||||
drop = "default:dirt",
|
||||
sounds = default.node_sound_dirt_defaults({
|
||||
footstep = {name = "default_grass_footstep", gain = 0.25},
|
||||
}),
|
||||
})
|
||||
|
||||
minetest.register_node("default:dirt_with_dry_grass", {
|
||||
description = "Dirt with Dry Grass",
|
||||
tiles = {"default_dry_grass.png",
|
||||
"default_dirt.png",
|
||||
{name = "default_dirt.png^default_dry_grass_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:dirt_with_snow", {
|
||||
description = "Dirt with Snow",
|
||||
tiles = {"default_snow.png", "default_dirt.png",
|
||||
{name = "default_dirt.png^default_snow_side.png",
|
||||
tileable_vertical = false}},
|
||||
groups = {crumbly = 3, 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"},
|
||||
groups = {crumbly = 3, falling_node = 1, sand = 1},
|
||||
sounds = default.node_sound_sand_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("default:desert_sand", {
|
||||
description = "Desert Sand",
|
||||
tiles = {"default_desert_sand.png"},
|
||||
groups = {crumbly = 3, falling_node = 1, sand = 1},
|
||||
sounds = default.node_sound_sand_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("default:snow", {
|
||||
description = "Snow",
|
||||
tiles = {"default_snow.png"},
|
||||
inventory_image = "default_snowball.png",
|
||||
wield_image = "default_snowball.png",
|
||||
paramtype = "light",
|
||||
buildable_to = true,
|
||||
floodable = true,
|
||||
drawtype = "nodebox",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.5, 0.5, -0.25, 0.5},
|
||||
},
|
||||
},
|
||||
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},
|
||||
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:snowblock", {
|
||||
description = "Snow Block",
|
||||
tiles = {"default_snow.png"},
|
||||
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},
|
||||
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", {
|
||||
description = "Ice",
|
||||
tiles = {"default_ice.png"},
|
||||
is_ground_content = false,
|
||||
paramtype = "light",
|
||||
groups = {cracky = 3, puts_out_fire = 1, cools_lava = 1},
|
||||
sounds = default.node_sound_glass_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("default:stone_with_coal", {
|
||||
description = "Coal Ore",
|
||||
tiles = {"default_stone.png^default_mineral_coal.png"},
|
||||
groups = {cracky = 3},
|
||||
drop = "default:coal_lump",
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("default:coalblock", {
|
||||
description = "Coal Block",
|
||||
tiles = {"default_coal_block.png"},
|
||||
is_ground_content = false,
|
||||
groups = {cracky = 3},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("default:stone_with_iron", {
|
||||
description = "Iron Ore",
|
||||
tiles = {"default_stone.png^default_mineral_iron.png"},
|
||||
groups = {cracky = 2},
|
||||
drop = "default:iron_lump",
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("default:steelblock", {
|
||||
description = "Steel Block",
|
||||
tiles = {"default_steel_block.png"},
|
||||
is_ground_content = false,
|
||||
groups = {cracky = 1, level = 2},
|
||||
sounds = default.node_sound_metal_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("default:stone_with_copper", {
|
||||
description = "Copper Ore",
|
||||
tiles = {"default_stone.png^default_mineral_copper.png"},
|
||||
groups = {cracky = 2},
|
||||
drop = "default:copper_lump",
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("default:copperblock", {
|
||||
description = "Copper Block",
|
||||
tiles = {"default_copper_block.png"},
|
||||
is_ground_content = false,
|
||||
groups = {cracky = 1, level = 2},
|
||||
sounds = default.node_sound_metal_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("default:stone_with_tin", {
|
||||
description = "Tin Ore",
|
||||
tiles = {"default_stone.png^default_mineral_tin.png"},
|
||||
groups = {cracky = 2},
|
||||
drop = "default:tin_lump",
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("default:tinblock", {
|
||||
description = "Tin Block",
|
||||
tiles = {"default_tin_block.png"},
|
||||
is_ground_content = false,
|
||||
groups = {cracky = 1, level = 2},
|
||||
sounds = default.node_sound_metal_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("default:bronzeblock", {
|
||||
description = "Bronze Block",
|
||||
tiles = {"default_bronze_block.png"},
|
||||
is_ground_content = false,
|
||||
groups = {cracky = 1, level = 2},
|
||||
sounds = default.node_sound_metal_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("default:stone_with_mese", {
|
||||
description = "Mese Ore",
|
||||
tiles = {"default_stone.png^default_mineral_mese.png"},
|
||||
groups = {cracky = 1},
|
||||
drop = "default:mese_crystal",
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("default:mese", {
|
||||
description = "Mese Block",
|
||||
tiles = {"default_mese_block.png"},
|
||||
paramtype = "light",
|
||||
groups = {cracky = 1, level = 2},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
light_source = 3,
|
||||
})
|
||||
|
||||
minetest.register_node("default:stone_with_gold", {
|
||||
description = "Gold Ore",
|
||||
tiles = {"default_stone.png^default_mineral_gold.png"},
|
||||
groups = {cracky = 2},
|
||||
drop = "default:gold_lump",
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("default:goldblock", {
|
||||
description = "Gold Block",
|
||||
tiles = {"default_gold_block.png"},
|
||||
is_ground_content = false,
|
||||
groups = {cracky = 1},
|
||||
sounds = default.node_sound_metal_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("default:diamondblock", {
|
||||
description = "Diamond Block",
|
||||
tiles = {"default_diamond_block.png"},
|
||||
is_ground_content = false,
|
||||
groups = {cracky = 1, level = 3},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("default:brick", {
|
||||
description = "Brick Block",
|
||||
paramtype2 = "facedir",
|
||||
place_param2 = 0,
|
||||
tiles = {"default_brick.png"},
|
||||
is_ground_content = false,
|
||||
groups = {cracky = 3},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("default:meselamp", {
|
||||
description = "Mese Lamp",
|
||||
drawtype = "glasslike",
|
||||
tiles = {"default_meselamp.png"},
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
is_ground_content = false,
|
||||
groups = {cracky = 3, oddly_breakable_by_hand = 3},
|
||||
sounds = default.node_sound_glass_defaults(),
|
||||
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(),
|
||||
})
|
||||
|
|
@ -0,0 +1,49 @@
|
|||
--[[
|
||||
Default climbable nodes
|
||||
--]]
|
||||
|
||||
minetest.register_node("default:ladder_wood", {
|
||||
description = "Wooden Ladder",
|
||||
drawtype = "signlike",
|
||||
tiles = {"default_ladder_wood.png"},
|
||||
inventory_image = "default_ladder_wood.png",
|
||||
wield_image = "default_ladder_wood.png",
|
||||
paramtype = "light",
|
||||
paramtype2 = "wallmounted",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
climbable = true,
|
||||
is_ground_content = false,
|
||||
selection_box = {
|
||||
type = "wallmounted",
|
||||
--wall_top = = <default>
|
||||
--wall_bottom = = <default>
|
||||
--wall_side = = <default>
|
||||
},
|
||||
groups = {choppy = 2, oddly_breakable_by_hand = 3, flammable = 2},
|
||||
legacy_wallmounted = true,
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("default:ladder_steel", {
|
||||
description = "Steel Ladder",
|
||||
drawtype = "signlike",
|
||||
tiles = {"default_ladder_steel.png"},
|
||||
inventory_image = "default_ladder_steel.png",
|
||||
wield_image = "default_ladder_steel.png",
|
||||
paramtype = "light",
|
||||
paramtype2 = "wallmounted",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
climbable = true,
|
||||
is_ground_content = false,
|
||||
selection_box = {
|
||||
type = "wallmounted",
|
||||
--wall_top = = <default>
|
||||
--wall_bottom = = <default>
|
||||
--wall_side = = <default>
|
||||
},
|
||||
groups = {cracky = 2},
|
||||
sounds = default.node_sound_metal_defaults(),
|
||||
})
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
--[[
|
||||
Default glass nodes
|
||||
--]]
|
||||
|
||||
minetest.register_node("default:glass", {
|
||||
description = "Glass",
|
||||
drawtype = "glasslike_framed_optional",
|
||||
tiles = {"default_glass.png", "default_glass_detail.png"},
|
||||
paramtype = "light",
|
||||
paramtype2 = "glasslikeliquidlevel",
|
||||
sunlight_propagates = true,
|
||||
is_ground_content = false,
|
||||
groups = {cracky = 3, oddly_breakable_by_hand = 3},
|
||||
sounds = default.node_sound_glass_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("default:obsidian_glass", {
|
||||
description = "Obsidian Glass",
|
||||
drawtype = "glasslike_framed_optional",
|
||||
tiles = {"default_obsidian_glass.png", "default_obsidian_glass_detail.png"},
|
||||
paramtype = "light",
|
||||
paramtype2 = "glasslikeliquidlevel",
|
||||
is_ground_content = false,
|
||||
sunlight_propagates = true,
|
||||
sounds = default.node_sound_glass_defaults(),
|
||||
groups = {cracky = 3},
|
||||
})
|
||||
|
|
@ -0,0 +1,284 @@
|
|||
--[[
|
||||
Default liquid nodes
|
||||
--]]
|
||||
|
||||
minetest.register_node("default:water_source", {
|
||||
description = "Water Source",
|
||||
drawtype = "liquid",
|
||||
tiles = {
|
||||
{
|
||||
name = "default_water_source_animated.png",
|
||||
animation = {
|
||||
type = "vertical_frames",
|
||||
aspect_w = 16,
|
||||
aspect_h = 16,
|
||||
length = 2.0,
|
||||
},
|
||||
},
|
||||
},
|
||||
special_tiles = {
|
||||
-- New-style water source material (mostly unused)
|
||||
{
|
||||
name = "default_water_source_animated.png",
|
||||
animation = {
|
||||
type = "vertical_frames",
|
||||
aspect_w = 16,
|
||||
aspect_h = 16,
|
||||
length = 2.0,
|
||||
},
|
||||
backface_culling = false,
|
||||
},
|
||||
},
|
||||
alpha = 160,
|
||||
paramtype = "light",
|
||||
walkable = false,
|
||||
pointable = false,
|
||||
diggable = false,
|
||||
buildable_to = true,
|
||||
is_ground_content = false,
|
||||
drop = "",
|
||||
drowning = 1,
|
||||
liquidtype = "source",
|
||||
liquid_alternative_flowing = "default:water_flowing",
|
||||
liquid_alternative_source = "default:water_source",
|
||||
liquid_viscosity = 1,
|
||||
post_effect_color = {a = 103, r = 30, g = 60, b = 90},
|
||||
groups = {water = 3, liquid = 3, puts_out_fire = 1, cools_lava = 1},
|
||||
sounds = default.node_sound_water_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("default:water_flowing", {
|
||||
description = "Flowing Water",
|
||||
drawtype = "flowingliquid",
|
||||
tiles = {"default_water.png"},
|
||||
special_tiles = {
|
||||
{
|
||||
name = "default_water_flowing_animated.png",
|
||||
backface_culling = false,
|
||||
animation = {
|
||||
type = "vertical_frames",
|
||||
aspect_w = 16,
|
||||
aspect_h = 16,
|
||||
length = 0.8,
|
||||
},
|
||||
},
|
||||
{
|
||||
name = "default_water_flowing_animated.png",
|
||||
backface_culling = true,
|
||||
animation = {
|
||||
type = "vertical_frames",
|
||||
aspect_w = 16,
|
||||
aspect_h = 16,
|
||||
length = 0.8,
|
||||
},
|
||||
},
|
||||
},
|
||||
alpha = 160,
|
||||
paramtype = "light",
|
||||
paramtype2 = "flowingliquid",
|
||||
walkable = false,
|
||||
pointable = false,
|
||||
diggable = false,
|
||||
buildable_to = true,
|
||||
is_ground_content = false,
|
||||
drop = "",
|
||||
drowning = 1,
|
||||
liquidtype = "flowing",
|
||||
liquid_alternative_flowing = "default:water_flowing",
|
||||
liquid_alternative_source = "default:water_source",
|
||||
liquid_viscosity = 1,
|
||||
post_effect_color = {a = 103, r = 30, g = 60, b = 90},
|
||||
groups = {water = 3, liquid = 3, puts_out_fire = 1,
|
||||
not_in_creative_inventory = 1, cools_lava = 1},
|
||||
sounds = default.node_sound_water_defaults(),
|
||||
})
|
||||
|
||||
|
||||
minetest.register_node("default:river_water_source", {
|
||||
description = "River Water Source",
|
||||
drawtype = "liquid",
|
||||
tiles = {
|
||||
{
|
||||
name = "default_river_water_source_animated.png",
|
||||
animation = {
|
||||
type = "vertical_frames",
|
||||
aspect_w = 16,
|
||||
aspect_h = 16,
|
||||
length = 2.0,
|
||||
},
|
||||
},
|
||||
},
|
||||
special_tiles = {
|
||||
{
|
||||
name = "default_river_water_source_animated.png",
|
||||
animation = {
|
||||
type = "vertical_frames",
|
||||
aspect_w = 16,
|
||||
aspect_h = 16,
|
||||
length = 2.0,
|
||||
},
|
||||
backface_culling = false,
|
||||
},
|
||||
},
|
||||
alpha = 160,
|
||||
paramtype = "light",
|
||||
walkable = false,
|
||||
pointable = false,
|
||||
diggable = false,
|
||||
buildable_to = true,
|
||||
is_ground_content = false,
|
||||
drop = "",
|
||||
drowning = 1,
|
||||
liquidtype = "source",
|
||||
liquid_alternative_flowing = "default:river_water_flowing",
|
||||
liquid_alternative_source = "default:river_water_source",
|
||||
liquid_viscosity = 1,
|
||||
liquid_renewable = false,
|
||||
liquid_range = 2,
|
||||
post_effect_color = {a = 103, r = 30, g = 76, b = 90},
|
||||
groups = {water = 3, liquid = 3, puts_out_fire = 1, cools_lava = 1},
|
||||
sounds = default.node_sound_water_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("default:river_water_flowing", {
|
||||
description = "Flowing River Water",
|
||||
drawtype = "flowingliquid",
|
||||
tiles = {"default_river_water.png"},
|
||||
special_tiles = {
|
||||
{
|
||||
name = "default_river_water_flowing_animated.png",
|
||||
backface_culling = false,
|
||||
animation = {
|
||||
type = "vertical_frames",
|
||||
aspect_w = 16,
|
||||
aspect_h = 16,
|
||||
length = 0.8,
|
||||
},
|
||||
},
|
||||
{
|
||||
name = "default_river_water_flowing_animated.png",
|
||||
backface_culling = true,
|
||||
animation = {
|
||||
type = "vertical_frames",
|
||||
aspect_w = 16,
|
||||
aspect_h = 16,
|
||||
length = 0.8,
|
||||
},
|
||||
},
|
||||
},
|
||||
alpha = 160,
|
||||
paramtype = "light",
|
||||
paramtype2 = "flowingliquid",
|
||||
walkable = false,
|
||||
pointable = false,
|
||||
diggable = false,
|
||||
buildable_to = true,
|
||||
is_ground_content = false,
|
||||
drop = "",
|
||||
drowning = 1,
|
||||
liquidtype = "flowing",
|
||||
liquid_alternative_flowing = "default:river_water_flowing",
|
||||
liquid_alternative_source = "default:river_water_source",
|
||||
liquid_viscosity = 1,
|
||||
liquid_renewable = false,
|
||||
liquid_range = 2,
|
||||
post_effect_color = {a = 103, r = 30, g = 76, b = 90},
|
||||
groups = {water = 3, liquid = 3, puts_out_fire = 1,
|
||||
not_in_creative_inventory = 1, cools_lava = 1},
|
||||
sounds = default.node_sound_water_defaults(),
|
||||
})
|
||||
|
||||
|
||||
minetest.register_node("default:lava_source", {
|
||||
description = "Lava Source",
|
||||
drawtype = "liquid",
|
||||
tiles = {
|
||||
{
|
||||
name = "default_lava_source_animated.png",
|
||||
animation = {
|
||||
type = "vertical_frames",
|
||||
aspect_w = 16,
|
||||
aspect_h = 16,
|
||||
length = 3.0,
|
||||
},
|
||||
},
|
||||
},
|
||||
special_tiles = {
|
||||
-- New-style lava source material (mostly unused)
|
||||
{
|
||||
name = "default_lava_source_animated.png",
|
||||
animation = {
|
||||
type = "vertical_frames",
|
||||
aspect_w = 16,
|
||||
aspect_h = 16,
|
||||
length = 3.0,
|
||||
},
|
||||
backface_culling = false,
|
||||
},
|
||||
},
|
||||
paramtype = "light",
|
||||
light_source = default.LIGHT_MAX - 1,
|
||||
walkable = false,
|
||||
pointable = false,
|
||||
diggable = false,
|
||||
buildable_to = true,
|
||||
is_ground_content = false,
|
||||
drop = "",
|
||||
drowning = 1,
|
||||
liquidtype = "source",
|
||||
liquid_alternative_flowing = "default:lava_flowing",
|
||||
liquid_alternative_source = "default:lava_source",
|
||||
liquid_viscosity = 7,
|
||||
liquid_renewable = false,
|
||||
damage_per_second = 4 * 2,
|
||||
post_effect_color = {a = 191, r = 255, g = 64, b = 0},
|
||||
groups = {lava = 3, liquid = 2, igniter = 1},
|
||||
})
|
||||
|
||||
minetest.register_node("default:lava_flowing", {
|
||||
description = "Flowing Lava",
|
||||
drawtype = "flowingliquid",
|
||||
tiles = {"default_lava.png"},
|
||||
special_tiles = {
|
||||
{
|
||||
name = "default_lava_flowing_animated.png",
|
||||
backface_culling = false,
|
||||
animation = {
|
||||
type = "vertical_frames",
|
||||
aspect_w = 16,
|
||||
aspect_h = 16,
|
||||
length = 3.3,
|
||||
},
|
||||
},
|
||||
{
|
||||
name = "default_lava_flowing_animated.png",
|
||||
backface_culling = true,
|
||||
animation = {
|
||||
type = "vertical_frames",
|
||||
aspect_w = 16,
|
||||
aspect_h = 16,
|
||||
length = 3.3,
|
||||
},
|
||||
},
|
||||
},
|
||||
paramtype = "light",
|
||||
paramtype2 = "flowingliquid",
|
||||
light_source = default.LIGHT_MAX - 1,
|
||||
walkable = false,
|
||||
pointable = false,
|
||||
diggable = false,
|
||||
buildable_to = true,
|
||||
is_ground_content = false,
|
||||
drop = "",
|
||||
drowning = 1,
|
||||
liquidtype = "flowing",
|
||||
liquid_alternative_flowing = "default:lava_flowing",
|
||||
liquid_alternative_source = "default:lava_source",
|
||||
liquid_viscosity = 7,
|
||||
liquid_renewable = false,
|
||||
damage_per_second = 4 * 2,
|
||||
post_effect_color = {a = 191, r = 255, g = 64, b = 0},
|
||||
groups = {lava = 3, liquid = 2, igniter = 1,
|
||||
not_in_creative_inventory = 1},
|
||||
})
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
--[[
|
||||
Default miscellaneous nodes
|
||||
--]]
|
||||
|
||||
minetest.register_node("default:cloud", {
|
||||
description = "Cloud",
|
||||
tiles = {"default_cloud.png"},
|
||||
is_ground_content = false,
|
||||
sounds = default.node_sound_defaults(),
|
||||
groups = {not_in_creative_inventory = 1},
|
||||
})
|
||||
|
|
@ -0,0 +1,318 @@
|
|||
--[[
|
||||
Default plant nodes
|
||||
--]]
|
||||
|
||||
|
||||
minetest.register_node("default:cactus", {
|
||||
description = "Cactus",
|
||||
tiles = {"default_cactus_top.png", "default_cactus_top.png",
|
||||
"default_cactus_side.png"},
|
||||
paramtype2 = "facedir",
|
||||
groups = {choppy = 3},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
on_place = minetest.rotate_node,
|
||||
})
|
||||
|
||||
minetest.register_node("default:papyrus", {
|
||||
description = "Papyrus",
|
||||
drawtype = "plantlike",
|
||||
tiles = {"default_papyrus.png"},
|
||||
inventory_image = "default_papyrus.png",
|
||||
wield_image = "default_papyrus.png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-6 / 16, -0.5, -6 / 16, 6 / 16, 0.5, 6 / 16},
|
||||
},
|
||||
groups = {snappy = 3, flammable = 2},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
|
||||
after_dig_node = function(pos, node, metadata, digger)
|
||||
default.dig_up(pos, node, digger)
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_node("default:dry_shrub", {
|
||||
description = "Dry Shrub",
|
||||
drawtype = "plantlike",
|
||||
waving = 1,
|
||||
tiles = {"default_dry_shrub.png"},
|
||||
inventory_image = "default_dry_shrub.png",
|
||||
wield_image = "default_dry_shrub.png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
buildable_to = true,
|
||||
groups = {snappy = 3, flammable = 3, attached_node = 1},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-5 / 16, -0.5, -5 / 16, 5 / 16, 4 / 16, 5 / 16},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_node("default:junglegrass", {
|
||||
description = "Jungle Grass",
|
||||
drawtype = "plantlike",
|
||||
waving = 1,
|
||||
visual_scale = 1.69,
|
||||
tiles = {"default_junglegrass.png"},
|
||||
inventory_image = "default_junglegrass.png",
|
||||
wield_image = "default_junglegrass.png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
buildable_to = true,
|
||||
groups = {snappy = 3, flora = 1, attached_node = 1, flammable = 1},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-7 / 16, -0.5, -7 / 16, 7 / 16, 1.19, 7 / 16},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_node("default:grass_1", {
|
||||
description = "Grass",
|
||||
drawtype = "plantlike",
|
||||
waving = 1,
|
||||
tiles = {"default_grass_1.png"},
|
||||
-- Use texture of a taller grass stage in inventory
|
||||
inventory_image = "default_grass_3.png",
|
||||
wield_image = "default_grass_3.png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
buildable_to = true,
|
||||
groups = {snappy = 3, flora = 1, attached_node = 1, grass = 1, flammable = 1},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-6 / 16, -0.5, -6 / 16, 6 / 16, -5 / 16, 6 / 16},
|
||||
},
|
||||
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
-- place a random grass node
|
||||
local stack = ItemStack("default:grass_" .. math.random(1,5))
|
||||
local ret = minetest.item_place(stack, placer, pointed_thing)
|
||||
return ItemStack("default:grass_1 " ..
|
||||
itemstack:get_count() - (1 - ret:get_count()))
|
||||
end,
|
||||
})
|
||||
|
||||
for i = 2, 5 do
|
||||
minetest.register_node("default:grass_" .. i, {
|
||||
description = "Grass",
|
||||
drawtype = "plantlike",
|
||||
waving = 1,
|
||||
tiles = {"default_grass_" .. i .. ".png"},
|
||||
inventory_image = "default_grass_" .. i .. ".png",
|
||||
wield_image = "default_grass_" .. i .. ".png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
buildable_to = true,
|
||||
drop = "default: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 = {-6 / 16, -0.5, -6 / 16, 6 / 16, -3 / 16, 6 / 16},
|
||||
},
|
||||
})
|
||||
end
|
||||
|
||||
minetest.register_node("default:dry_grass_1", {
|
||||
description = "Dry Grass",
|
||||
drawtype = "plantlike",
|
||||
waving = 1,
|
||||
tiles = {"default_dry_grass_1.png"},
|
||||
inventory_image = "default_dry_grass_3.png",
|
||||
wield_image = "default_dry_grass_3.png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
buildable_to = true,
|
||||
groups = {snappy = 3, flammable = 3, flora = 1,
|
||||
attached_node = 1, dry_grass = 1},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-6 / 16, -0.5, -6 / 16, 6 / 16, -3 / 16, 6 / 16},
|
||||
},
|
||||
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
-- place a random dry grass node
|
||||
local stack = ItemStack("default:dry_grass_" .. math.random(1, 5))
|
||||
local ret = minetest.item_place(stack, placer, pointed_thing)
|
||||
return ItemStack("default:dry_grass_1 " ..
|
||||
itemstack:get_count() - (1 - ret:get_count()))
|
||||
end,
|
||||
})
|
||||
|
||||
for i = 2, 5 do
|
||||
minetest.register_node("default:dry_grass_" .. i, {
|
||||
description = "Dry Grass",
|
||||
drawtype = "plantlike",
|
||||
waving = 1,
|
||||
tiles = {"default_dry_grass_" .. i .. ".png"},
|
||||
inventory_image = "default_dry_grass_" .. i .. ".png",
|
||||
wield_image = "default_dry_grass_" .. i .. ".png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
buildable_to = true,
|
||||
groups = {snappy = 3, flammable = 3, flora = 1, attached_node = 1,
|
||||
not_in_creative_inventory=1, dry_grass = 1},
|
||||
drop = "default:dry_grass_1",
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
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.41,
|
||||
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.5, 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},
|
||||
drop = {
|
||||
max_items = 1,
|
||||
items = {
|
||||
{items = {"default:bush_sapling"}, rarity = 5},
|
||||
{items = {"default:bush_leaves"}}
|
||||
}
|
||||
},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
|
||||
after_place_node = default.after_place_leaves,
|
||||
})
|
||||
|
||||
minetest.register_node("default:bush_sapling", {
|
||||
description = "Bush Sapling",
|
||||
drawtype = "plantlike",
|
||||
tiles = {"default_bush_sapling.png"},
|
||||
inventory_image = "default_bush_sapling.png",
|
||||
wield_image = "default_bush_sapling.png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
on_timer = default.grow_sapling,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 2 / 16, 4 / 16}
|
||||
},
|
||||
groups = {snappy = 2, dig_immediate = 3, flammable = 2,
|
||||
attached_node = 1, sapling = 1},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
|
||||
on_construct = function(pos)
|
||||
minetest.get_node_timer(pos):start(math.random(1200, 2400))
|
||||
end,
|
||||
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
itemstack = default.sapling_on_place(itemstack, placer, pointed_thing,
|
||||
"default:bush_sapling",
|
||||
-- minp, maxp to be checked, relative to sapling pos
|
||||
{x = -1, y = 0, z = -1},
|
||||
{x = 1, y = 1, z = 1},
|
||||
-- maximum interval of interior volume check
|
||||
2)
|
||||
|
||||
return itemstack
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_node("default:acacia_bush_stem", {
|
||||
description = "Acacia Bush Stem",
|
||||
drawtype = "plantlike",
|
||||
visual_scale = 1.41,
|
||||
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.5, 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},
|
||||
drop = {
|
||||
max_items = 1,
|
||||
items = {
|
||||
{items = {"default:acacia_bush_sapling"}, rarity = 5},
|
||||
{items = {"default:acacia_bush_leaves"}}
|
||||
}
|
||||
},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
|
||||
after_place_node = default.after_place_leaves,
|
||||
})
|
||||
|
||||
minetest.register_node("default:acacia_bush_sapling", {
|
||||
description = "Acacia Bush Sapling",
|
||||
drawtype = "plantlike",
|
||||
tiles = {"default_acacia_bush_sapling.png"},
|
||||
inventory_image = "default_acacia_bush_sapling.png",
|
||||
wield_image = "default_acacia_bush_sapling.png",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
walkable = false,
|
||||
on_timer = default.grow_sapling,
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-3 / 16, -0.5, -3 / 16, 3 / 16, 2 / 16, 3 / 16}
|
||||
},
|
||||
groups = {snappy = 2, dig_immediate = 3, flammable = 2,
|
||||
attached_node = 1, sapling = 1},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
|
||||
on_construct = function(pos)
|
||||
minetest.get_node_timer(pos):start(math.random(1200, 2400))
|
||||
end,
|
||||
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
itemstack = default.sapling_on_place(itemstack, placer, pointed_thing,
|
||||
"default:acacia_bush_sapling",
|
||||
-- minp, maxp to be checked, relative to sapling pos
|
||||
{x = -1, y = 0, z = -1},
|
||||
{x = 1, y = 1, z = 1},
|
||||
-- maximum interval of interior volume check
|
||||
2)
|
||||
|
||||
return itemstack
|
||||
end,
|
||||
})
|
||||
|
|
@ -0,0 +1,117 @@
|
|||
--[[
|
||||
Default sounds
|
||||
--]]
|
||||
|
||||
function default.node_sound_defaults(table)
|
||||
table = table or {}
|
||||
table.footstep = table.footstep or
|
||||
{name = "", gain = 1.0}
|
||||
table.dug = table.dug or
|
||||
{name = "default_dug_node", gain = 0.25}
|
||||
table.place = table.place or
|
||||
{name = "default_place_node_hard", gain = 1.0}
|
||||
return table
|
||||
end
|
||||
|
||||
function default.node_sound_stone_defaults(table)
|
||||
table = table or {}
|
||||
table.footstep = table.footstep or
|
||||
{name = "default_hard_footstep", gain = 0.3}
|
||||
table.dug = table.dug or
|
||||
{name = "default_hard_footstep", gain = 1.0}
|
||||
default.node_sound_defaults(table)
|
||||
return table
|
||||
end
|
||||
|
||||
function default.node_sound_dirt_defaults(table)
|
||||
table = table or {}
|
||||
table.footstep = table.footstep or
|
||||
{name = "default_dirt_footstep", gain = 0.4}
|
||||
table.dug = table.dug or
|
||||
{name = "default_dirt_footstep", gain = 1.0}
|
||||
table.place = table.place or
|
||||
{name = "default_place_node", gain = 1.0}
|
||||
default.node_sound_defaults(table)
|
||||
return table
|
||||
end
|
||||
|
||||
function default.node_sound_sand_defaults(table)
|
||||
table = table or {}
|
||||
table.footstep = table.footstep or
|
||||
{name = "default_sand_footstep", gain = 0.12}
|
||||
table.dug = table.dug or
|
||||
{name = "default_sand_footstep", gain = 0.24}
|
||||
table.place = table.place or
|
||||
{name = "default_place_node", gain = 1.0}
|
||||
default.node_sound_defaults(table)
|
||||
return table
|
||||
end
|
||||
|
||||
function default.node_sound_gravel_defaults(table)
|
||||
table = table or {}
|
||||
table.footstep = table.footstep or
|
||||
{name = "default_gravel_footstep", gain = 0.4}
|
||||
table.dug = table.dug or
|
||||
{name = "default_gravel_footstep", gain = 1.0}
|
||||
table.place = table.place or
|
||||
{name = "default_place_node", gain = 1.0}
|
||||
default.node_sound_defaults(table)
|
||||
return table
|
||||
end
|
||||
|
||||
function default.node_sound_wood_defaults(table)
|
||||
table = table or {}
|
||||
table.footstep = table.footstep or
|
||||
{name = "default_wood_footstep", gain = 0.3}
|
||||
table.dug = table.dug or
|
||||
{name = "default_wood_footstep", gain = 1.0}
|
||||
default.node_sound_defaults(table)
|
||||
return table
|
||||
end
|
||||
|
||||
function default.node_sound_leaves_defaults(table)
|
||||
table = table or {}
|
||||
table.footstep = table.footstep or
|
||||
{name = "default_grass_footstep", gain = 0.45}
|
||||
table.dug = table.dug or
|
||||
{name = "default_grass_footstep", gain = 0.7}
|
||||
table.place = table.place or
|
||||
{name = "default_place_node", gain = 1.0}
|
||||
default.node_sound_defaults(table)
|
||||
return table
|
||||
end
|
||||
|
||||
function default.node_sound_glass_defaults(table)
|
||||
table = table or {}
|
||||
table.footstep = table.footstep or
|
||||
{name = "default_glass_footstep", gain = 0.3}
|
||||
table.dig = table.dig or
|
||||
{name = "default_glass_footstep", gain = 0.5}
|
||||
table.dug = table.dug or
|
||||
{name = "default_break_glass", gain = 1.0}
|
||||
default.node_sound_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.4}
|
||||
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
|
||||
|
||||
function default.node_sound_water_defaults(table)
|
||||
table = table or {}
|
||||
table.footstep = table.footstep or
|
||||
{name = "default_water_footstep", gain = 0.2}
|
||||
default.node_sound_defaults(table)
|
||||
return table
|
||||
end
|
||||
|