This commit is contained in:
DesertMermaid 2024-12-12 23:59:48 -08:00
parent 3fb04a93e3
commit f5877a23cf
397 changed files with 3277 additions and 237 deletions

View file

@ -0,0 +1,836 @@
--
-- Sounds
--
function vox_main.node_sound_defaults(tbl)
tbl = tbl or {}
tbl.footstep = tbl.footstep or
{name = "", gain = 1.0}
tbl.dug = tbl.dug or
{name = "default_dug_node", gain = 0.25}
tbl.place = tbl.place or
{name = "default_place_node_hard", gain = 1.0}
return tbl
end
function vox_main.node_sound_stone_defaults(tbl)
tbl = tbl or {}
tbl.footstep = tbl.footstep or
{name = "default_hard_footstep", gain = 0.2}
tbl.dug = tbl.dug or
{name = "default_hard_footstep", gain = 1.0}
vox_main.node_sound_defaults(tbl)
return tbl
end
function vox_main.node_sound_dirt_defaults(tbl)
tbl = tbl or {}
tbl.footstep = tbl.footstep or
{name = "default_dirt_footstep", gain = 0.25}
tbl.dig = tbl.dig or
{name = "default_dig_crumbly", gain = 0.4}
tbl.dug = tbl.dug or
{name = "default_dirt_footstep", gain = 1.0}
tbl.place = tbl.place or
{name = "default_place_node", gain = 1.0}
vox_main.node_sound_defaults(tbl)
return tbl
end
function vox_main.node_sound_sand_defaults(tbl)
tbl = tbl or {}
tbl.footstep = tbl.footstep or
{name = "default_sand_footstep", gain = 0.05}
tbl.dug = tbl.dug or
{name = "default_sand_footstep", gain = 0.15}
tbl.place = tbl.place or
{name = "default_place_node", gain = 1.0}
vox_main.node_sound_defaults(tbl)
return tbl
end
function vox_main.node_sound_gravel_defaults(tbl)
tbl = tbl or {}
tbl.footstep = tbl.footstep or
{name = "default_gravel_footstep", gain = 0.25}
tbl.dig = tbl.dig or
{name = "default_gravel_dig", gain = 0.35}
tbl.dug = tbl.dug or
{name = "default_gravel_dug", gain = 1.0}
tbl.place = tbl.place or
{name = "default_place_node", gain = 1.0}
vox_main.node_sound_defaults(tbl)
return tbl
end
function vox_main.node_sound_wood_defaults(tbl)
tbl = tbl or {}
tbl.footstep = tbl.footstep or
{name = "default_wood_footstep", gain = 0.15}
tbl.dig = tbl.dig or
{name = "default_dig_choppy", gain = 0.4}
tbl.dug = tbl.dug or
{name = "default_wood_footstep", gain = 1.0}
vox_main.node_sound_defaults(tbl)
return tbl
end
function vox_main.node_sound_leaves_defaults(tbl)
tbl = tbl or {}
tbl.footstep = tbl.footstep or
{name = "default_grass_footstep", gain = 0.45}
tbl.dug = tbl.dug or
{name = "default_grass_footstep", gain = 0.7}
tbl.place = tbl.place or
{name = "default_place_node", gain = 1.0}
vox_main.node_sound_defaults(tbl)
return tbl
end
function vox_main.node_sound_glass_defaults(tbl)
tbl = tbl or {}
tbl.footstep = tbl.footstep or
{name = "default_glass_footstep", gain = 0.3}
tbl.dig = tbl.dig or
{name = "default_glass_footstep", gain = 0.5}
tbl.dug = tbl.dug or
{name = "default_break_glass", gain = 1.0}
vox_main.node_sound_defaults(tbl)
return tbl
end
function vox_main.node_sound_ice_defaults(tbl)
tbl = tbl or {}
tbl.footstep = tbl.footstep or
{name = "default_ice_footstep", gain = 0.15}
tbl.dig = tbl.dig or
{name = "default_ice_dig", gain = 0.5}
tbl.dug = tbl.dug or
{name = "default_ice_dug", gain = 0.5}
vox_main.node_sound_defaults(tbl)
return tbl
end
function vox_main.node_sound_metal_defaults(tbl)
tbl = tbl or {}
tbl.footstep = tbl.footstep or
{name = "default_metal_footstep", gain = 0.2}
tbl.dig = tbl.dig or
{name = "default_dig_metal", gain = 0.5}
tbl.dug = tbl.dug or
{name = "default_dug_metal", gain = 0.5}
tbl.place = tbl.place or
{name = "default_place_node_metal", gain = 0.5}
vox_main.node_sound_defaults(tbl)
return tbl
end
function vox_main.node_sound_water_defaults(tbl)
tbl = tbl or {}
tbl.footstep = tbl.footstep or
{name = "default_water_footstep", gain = 0.2}
vox_main.node_sound_defaults(tbl)
return tbl
end
function vox_main.node_sound_snow_defaults(tbl)
tbl = tbl or {}
tbl.footstep = tbl.footstep or
{name = "default_snow_footstep", gain = 0.2}
tbl.dig = tbl.dig or
{name = "default_snow_footstep", gain = 0.3}
tbl.dug = tbl.dug or
{name = "default_snow_footstep", gain = 0.3}
tbl.place = tbl.place or
{name = "default_place_node", gain = 1.0}
vox_main.node_sound_defaults(tbl)
return tbl
end
--
-- Lavacooling
--
vox_main.cool_lava = function(pos, node)
if node.name == "vox_main:lava_source" then
minetest.set_node(pos, {name = "vox_main:obsidian"})
else -- Lava flowing
minetest.set_node(pos, {name = "vox_main:stone"})
end
minetest.sound_play("default_cool_lava",
{pos = pos, max_hear_distance = 16, gain = 0.2}, true)
end
if minetest.settings:get_bool("enable_lavacooling") ~= false then
minetest.register_abm({
label = "Lava cooling",
nodenames = {"vox_main:lava_source", "vox_main:lava_flowing"},
neighbors = {"group:cools_lava", "group:water"},
interval = 2,
chance = 2,
catch_up = false,
action = function(...)
vox_main.cool_lava(...)
end,
})
end
--
-- Optimized helper to put all items in an inventory into a drops list
--
function vox_main.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 vox_main.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 == "vox_main: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 = "vox_main:cactus"})
return true
end
function vox_main.grow_papyrus(pos, node)
pos.y = pos.y - 1
local name = minetest.get_node(pos).name
if name ~= "vox_main:dirt" and
name ~= "vox_main:dirt_with_grass" and
name ~= "vox_main:dirt_with_dry_grass" and
name ~= "vox_main:dirt_with_rainforest_litter" and
name ~= "vox_main:dry_dirt" and
name ~= "vox_main:dry_dirt_with_dry_grass" 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 == "vox_main: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 = "vox_main:papyrus"})
return true
end
minetest.register_abm({
label = "Grow cactus",
nodenames = {"vox_main:cactus"},
neighbors = {"group:sand"},
interval = 12,
chance = 83,
action = function(...)
vox_main.grow_cactus(...)
end
})
minetest.register_abm({
label = "Grow papyrus",
nodenames = {"vox_main:papyrus"},
-- Grows on the dirt and surface dirt nodes of the biomes papyrus appears in,
-- including the old savanna nodes.
-- 'vox_main:dirt_with_grass' is here only because it was allowed before.
neighbors = {
"vox_main:dirt",
"vox_main:dirt_with_grass",
"vox_main:dirt_with_dry_grass",
"vox_main:dirt_with_rainforest_litter",
"vox_main:dry_dirt",
"vox_main:dry_dirt_with_dry_grass",
},
interval = 14,
chance = 71,
action = function(...)
vox_main.grow_papyrus(...)
end
})
--
-- Dig upwards
--
local in_dig_up = false
function vox_main.dig_up(pos, node, digger, max_height)
if in_dig_up then return end -- Do not recurse
if digger == nil then return end
max_height = max_height or 100
in_dig_up = true
for y = 1, max_height do
local up_pos = vector.offset(pos, 0, y, 0)
local up_node = minetest.get_node(up_pos)
if up_node.name ~= node.name then
break
end
if not minetest.node_dig(up_pos, up_node, digger) then
break
end
end
in_dig_up = false
end
-- errors are hard to handle, instead we rely on resetting this value the next step
minetest.register_globalstep(function()
in_dig_up = false
end)
--
-- Fence registration helper
--
local fence_collision_extra = minetest.settings:get_bool("enable_fence_tall") and 3/8 or 0
function vox_main.register_fence(name, def)
local fence_texture = "default_fence_overlay.png^" .. def.texture ..
"^default_fence_overlay.png^[makealpha:255,126,126"
-- Allow almost everything to be overridden
local default_fields = {
paramtype = "light",
drawtype = "nodebox",
node_box = {
type = "connected",
fixed = {-1/8, -1/2, -1/8, 1/8, 1/2, 1/8},
-- connect_top =
-- connect_bottom =
connect_front = {{-1/16, 3/16, -1/2, 1/16, 5/16, -1/8 },
{-1/16, -5/16, -1/2, 1/16, -3/16, -1/8 }},
connect_left = {{-1/2, 3/16, -1/16, -1/8, 5/16, 1/16},
{-1/2, -5/16, -1/16, -1/8, -3/16, 1/16}},
connect_back = {{-1/16, 3/16, 1/8, 1/16, 5/16, 1/2 },
{-1/16, -5/16, 1/8, 1/16, -3/16, 1/2 }},
connect_right = {{ 1/8, 3/16, -1/16, 1/2, 5/16, 1/16},
{ 1/8, -5/16, -1/16, 1/2, -3/16, 1/16}}
},
collision_box = {
type = "connected",
fixed = {-1/8, -1/2, -1/8, 1/8, 1/2 + fence_collision_extra, 1/8},
-- connect_top =
-- connect_bottom =
connect_front = {-1/8, -1/2, -1/2, 1/8, 1/2 + fence_collision_extra, -1/8},
connect_left = {-1/2, -1/2, -1/8, -1/8, 1/2 + fence_collision_extra, 1/8},
connect_back = {-1/8, -1/2, 1/8, 1/8, 1/2 + fence_collision_extra, 1/2},
connect_right = { 1/8, -1/2, -1/8, 1/2, 1/2 + fence_collision_extra, 1/8}
},
connects_to = {"group:fence", "group:wood", "group:tree", "group:wall"},
inventory_image = fence_texture,
wield_image = fence_texture,
tiles = {def.texture},
sunlight_propagates = true,
is_ground_content = false,
groups = {},
}
for k, v in pairs(default_fields) do
if def[k] == nil then
def[k] = v
end
end
-- Always add to the fence group, even if no group provided
def.groups.fence = 1
local material = def.material
def.texture = nil
def.material = nil
minetest.register_node(name, def)
-- Register crafting recipe, trim away starting colon if any
if not material then return end
name = string.gsub(name, "^:", "")
minetest.register_craft({
output = name .. " 4",
recipe = {
{ material, 'group:stick', material },
{ material, 'group:stick', material },
}
})
end
--
-- Fence rail registration helper
--
function vox_main.register_fence_rail(name, def)
local fence_rail_texture = "default_fence_rail_overlay.png^" .. def.texture ..
"^default_fence_rail_overlay.png^[makealpha:255,126,126"
-- Allow almost everything to be overridden
local default_fields = {
paramtype = "light",
drawtype = "nodebox",
node_box = {
type = "connected",
fixed = {{-1/16, 3/16, -1/16, 1/16, 5/16, 1/16},
{-1/16, -3/16, -1/16, 1/16, -5/16, 1/16}},
-- connect_top =
-- connect_bottom =
connect_front = {{-1/16, 3/16, -1/2, 1/16, 5/16, -1/16},
{-1/16, -5/16, -1/2, 1/16, -3/16, -1/16}},
connect_left = {{-1/2, 3/16, -1/16, -1/16, 5/16, 1/16},
{-1/2, -5/16, -1/16, -1/16, -3/16, 1/16}},
connect_back = {{-1/16, 3/16, 1/16, 1/16, 5/16, 1/2 },
{-1/16, -5/16, 1/16, 1/16, -3/16, 1/2 }},
connect_right = {{ 1/16, 3/16, -1/16, 1/2, 5/16, 1/16},
{ 1/16, -5/16, -1/16, 1/2, -3/16, 1/16}}
},
collision_box = {
type = "connected",
fixed = {-1/8, -1/2, -1/8, 1/8, 1/2 + fence_collision_extra, 1/8},
-- connect_top =
-- connect_bottom =
connect_front = {-1/8, -1/2, -1/2, 1/8, 1/2 + fence_collision_extra, -1/8},
connect_left = {-1/2, -1/2, -1/8, -1/8, 1/2 + fence_collision_extra, 1/8},
connect_back = {-1/8, -1/2, 1/8, 1/8, 1/2 + fence_collision_extra, 1/2},
connect_right = { 1/8, -1/2, -1/8, 1/2, 1/2 + fence_collision_extra, 1/8}
},
connects_to = {"group:fence", "group:wall"},
inventory_image = fence_rail_texture,
wield_image = fence_rail_texture,
tiles = {def.texture},
sunlight_propagates = true,
is_ground_content = false,
groups = {},
}
for k, v in pairs(default_fields) do
if def[k] == nil then
def[k] = v
end
end
-- Always add to the fence group, even if no group provided
def.groups.fence = 1
local material = def.material
def.texture = nil
def.material = nil
minetest.register_node(name, def)
-- Register crafting recipe, trim away starting colon if any
if not material then return end
name = string.gsub(name, "^:", "")
minetest.register_craft({
output = name .. " 16",
recipe = {
{ material, material },
{ "", ""},
{ material, material },
}
})
end
--
-- Mese post registration helper
--
function vox_main.register_mesepost(name, def)
local post_texture = def.texture .. "^default_mese_post_light_side.png^[makealpha:0,0,0"
local post_texture_dark = def.texture .. "^default_mese_post_light_side_dark.png^[makealpha:0,0,0"
-- Allow almost everything to be overridden
local default_fields = {
wield_image = post_texture,
drawtype = "nodebox",
node_box = {
type = "fixed",
fixed = {
{-2 / 16, -8 / 16, -2 / 16, 2 / 16, 8 / 16, 2 / 16},
},
},
paramtype = "light",
tiles = {def.texture, def.texture, post_texture_dark, post_texture_dark, post_texture, post_texture},
use_texture_alpha = "opaque",
light_source = vox_main.LIGHT_MAX,
sunlight_propagates = true,
is_ground_content = false,
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
sounds = vox_main.node_sound_wood_defaults(),
}
for k, v in pairs(default_fields) do
if def[k] == nil then
def[k] = v
end
end
local material = def.material
def.texture = nil
def.material = nil
minetest.register_node(name, def)
-- Register crafting recipe, trim away starting colon if any
if not material then return end
name = string.gsub(name, "^:", "")
minetest.register_craft({
output = name .. " 4",
recipe = {
{'', 'vox_main:glass', ''},
{'vox_main:mese_crystal', 'vox_main:mese_crystal', 'vox_main:mese_crystal'},
{'', material, ''},
}
})
end
--
-- Leafdecay
--
-- Prevent decay of placed leaves
vox_main.after_place_leaves = function(pos, placer, itemstack, pointed_thing)
if placer and placer:is_player() 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 ~= 1 and not timer:is_started() then
timer:start(math.random(20, 120) / 10)
end
end
end
local movement_gravity = tonumber(
minetest.settings:get("movement_gravity")) or 9.81
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)
-- spawn a few particles for the removed node
minetest.add_particlespawner({
amount = 8,
time = 0.001,
minpos = vector.subtract(pos, {x=0.5, y=0.5, z=0.5}),
maxpos = vector.add(pos, {x=0.5, y=0.5, z=0.5}),
minvel = vector.new(-0.5, -1, -0.5),
maxvel = vector.new(0.5, 0, 0.5),
minacc = vector.new(0, -movement_gravity, 0),
maxacc = vector.new(0, -movement_gravity, 0),
minsize = 0,
maxsize = 0,
node = node,
})
end
function vox_main.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 vox_main:dirt to something that fits the environment
--
minetest.register_abm({
label = "Grass spread",
nodenames = {"vox_main:dirt"},
neighbors = {
"air",
"group:grass",
"group:dry_grass",
"vox_main: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 == "vox_main:snow" then
minetest.set_node(pos, {name = "vox_main:dirt_with_snow"})
elseif minetest.get_item_group(name, "grass") ~= 0 then
minetest.set_node(pos, {name = "vox_main:dirt_with_grass"})
elseif minetest.get_item_group(name, "dry_grass") ~= 0 then
minetest.set_node(pos, {name = "vox_main:dirt_with_dry_grass"})
end
end
})
--
-- Grass and dry grass removed in darkness
--
minetest.register_abm({
label = "Grass covered",
nodenames = {"group:spreading_dirt_type", "vox_main:dry_dirt_with_dry_grass"},
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
if node.name == "vox_main:dry_dirt_with_dry_grass" then
minetest.set_node(pos, {name = "vox_main:dry_dirt"})
else
minetest.set_node(pos, {name = "vox_main:dirt"})
end
end
end
})
--
-- Moss growth on cobble near water
--
local moss_correspondences = {
["vox_main:cobble"] = "vox_main:mossycobble",
["vox_structural:slab_cobble"] = "vox_structural:slab_mossycobble",
["vox_structural:stair_cobble"] = "vox_structural:stair_mossycobble",
["vox_structural:stair_inner_cobble"] = "vox_structural:stair_inner_mossycobble",
["vox_structural:stair_outer_cobble"] = "vox_structural:stair_outer_mossycobble",
["vox_structural:cobble"] = "vox_structural:mossycobble",
}
minetest.register_abm({
label = "Moss growth",
nodenames = {"vox_main:cobble", "vox_structural:slab_cobble", "vox_structural:stair_cobble",
"vox_structural:stair_inner_cobble", "vox_structural:stair_outer_cobble",
"vox_structural:cobble"},
neighbors = {"group:water"},
interval = 16,
chance = 200,
catch_up = false,
action = function(pos, node)
node.name = moss_correspondences[node.name]
if node.name then
minetest.set_node(pos, node)
end
end
})
--
-- Register a craft to copy the metadata of items
--
function vox_main.register_craft_metadata_copy(ingredient, result)
minetest.register_craft({
type = "shapeless",
output = result,
recipe = {ingredient, result}
})
minetest.register_on_craft(function(itemstack, player, old_craft_grid, craft_inv)
if itemstack:get_name() ~= result then
return
end
local original
local index
for i = 1, #old_craft_grid do
if old_craft_grid[i]:get_name() == result then
original = old_craft_grid[i]
index = i
end
end
if not original then
return
end
local copymeta = original:get_meta():to_table()
itemstack:get_meta():from_table(copymeta)
-- put the book with metadata back in the craft grid
craft_inv:set_stack("craft", index, original)
end)
end
--
-- Log API / helpers
--
local log_non_player_actions = minetest.settings:get_bool("log_non_player_actions", false)
local is_pos = function(v)
return type(v) == "table" and
type(v.x) == "number" and type(v.y) == "number" and type(v.z) == "number"
end
function vox_main.log_player_action(player, ...)
local msg = player:get_player_name()
if player.is_fake_player or not player:is_player() then
if not log_non_player_actions then
return
end
msg = msg .. "(" .. (type(player.is_fake_player) == "string"
and player.is_fake_player or "*") .. ")"
end
for _, v in ipairs({...}) do
-- translate pos
local part = is_pos(v) and minetest.pos_to_string(v) or v
-- no leading spaces before punctuation marks
msg = msg .. (string.match(part, "^[;,.]") and "" or " ") .. part
end
minetest.log("action", msg)
end
local nop = function() end
function vox_main.set_inventory_action_loggers(def, name)
local on_move = def.on_metadata_inventory_move or nop
def.on_metadata_inventory_move = function(pos, from_list, from_index,
to_list, to_index, count, player)
vox_main.log_player_action(player, "moves stuff in", name, "at", pos)
return on_move(pos, from_list, from_index, to_list, to_index, count, player)
end
local on_put = def.on_metadata_inventory_put or nop
def.on_metadata_inventory_put = function(pos, listname, index, stack, player)
vox_main.log_player_action(player, "moves", stack:get_name(), stack:get_count(), "to", name, "at", pos)
return on_put(pos, listname, index, stack, player)
end
local on_take = def.on_metadata_inventory_take or nop
def.on_metadata_inventory_take = function(pos, listname, index, stack, player)
vox_main.log_player_action(player, "takes", stack:get_name(), stack:get_count(), "from", name, "at", pos)
return on_take(pos, listname, index, stack, player)
end
end
--
-- NOTICE: This method is not an official part of the API yet.
-- This method may change in future.
--
function vox_main.can_interact_with_node(player, pos)
if player and player:is_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 minetest.get_item_group(item:get_name(), "key") == 1 then
local key_meta = item:get_meta()
if key_meta:get_string("secret") == "" then
local key_oldmeta = item:get_meta():get_string("")
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

View file

@ -11,6 +11,8 @@
-- with this program; if not, see <http://www.gnu.org/licenses/>.
---------------------------------------------------------------------------
vox_main = {}
-- Load from minerals.lua
dofile(core.get_modpath("vox_main").."/minerals.lua")
-- Load from ores.lua
@ -19,6 +21,11 @@ dofile(core.get_modpath("vox_main").."/ores.lua")
dofile(core.get_modpath("vox_main").."/gems.lua")
-- Load from liquids.lua
dofile(core.get_modpath("vox_main").."/liquids.lua")
-- Load from trees.lua
dofile(core.get_modpath("vox_main").."/trees.lua")
-- Load from plants.lua
dofile(core.get_modpath("vox_main").."/plants.lua")
-- Load from ocean.lua
dofile(core.get_modpath("vox_main").."/ocean.lua")
-- Load from sky_island.lua
@ -30,6 +37,11 @@ dofile(minetest.get_modpath("vox_main").."/mobdrops.lua")
dofile(minetest.get_modpath("vox_main").."/mats.lua")
-- Load from functions.lua
-- This is copy/paste from 'default' mod and we're using it temporarily(?)
--dofile(minetest.get_modpath("vox_main").."/functions.lua")
-- Glowing Moss
core.register_node("vox_main:glowing_moss", {
description = "Glowing Moss",

View file

@ -1,69 +1,95 @@
-- -------------------------------------------------------------------------- --
-- Liquids --
-- -------------------------------------------------------------------------- --
-- Water
core.register_node("vox_main:water_source", {
description = "Water Source",
minetest.register_node("vox_main:water_source", {
description = ("Water Source"),
drawtype = "liquid",
waving = 3,
tiles = {
{
name = "vox_water.png",
animation = {
type = "vertical_frames",
aspect_w = 16,
aspect_h = 16,
length = 2.0
}
}
},
alpha = 128,
paramtype = "light",
walkable = false,
pointable = false,
diggable = false,
buildable_to = true,
liquidtype = "source",
liquid_alternative_flowing = "vox_main:water_flowing",
liquid_alternative_source = "vox_main:water_source",
liquid_viscosity = 1,
post_effect_color = {a = 103, r = 30, g = 60, b = 90}
})
core.register_alias("water_source", "vox_main:water_source")
core.register_alias("default:river_water", "vox_main:water_source")
core.register_alias("mapgen_water_source", "vox_main:water_source")
core.register_node("vox_main:water_flowing", {
description = "Flowing Water",
drawtype = "flowingliquid",
tiles = {"vox_water.png"},
special_tiles = {
{
name = "vox_water.png",
name = "default_water_source_animated.png",
backface_culling = false,
animation = {
type = "vertical_frames",
aspect_w = 16,
aspect_h = 16,
length = 0.8
}
}
length = 2.0,
},
},
{
name = "default_water_source_animated.png",
backface_culling = true,
animation = {
type = "vertical_frames",
aspect_w = 16,
aspect_h = 16,
length = 2.0,
},
},
},
alpha = 160,
use_texture_alpha = "blend",
paramtype = "light",
walkable = false,
pointable = false,
diggable = false,
buildable_to = true,
is_ground_content = false,
drop = "",
drowning = 1,
liquidtype = "source",
liquid_alternative_flowing = "vox_main:water_flowing",
liquid_alternative_source = "vox_main:water_source",
liquid_viscosity = 1,
post_effect_color = {a = 103, r = 30, g = 60, b = 90},
groups = {water = 3, liquid = 3, cools_lava = 1},
})
-- Flowing Water
minetest.register_node("vox_main:water_flowing", {
description = ("Flowing Water"),
drawtype = "flowingliquid",
waving = 3,
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.5,
},
},
{
name = "default_water_flowing_animated.png",
backface_culling = true,
animation = {
type = "vertical_frames",
aspect_w = 16,
aspect_h = 16,
length = 0.5,
},
},
},
use_texture_alpha = "blend",
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 = "vox_main:water_flowing",
liquid_alternative_source = "vox_main:water_source",
liquid_viscosity = 1,
post_effect_color = {a = 103, r = 30, g = 60, b = 90}
post_effect_color = {a = 103, r = 30, g = 60, b = 90},
groups = {water = 3, liquid = 3, not_in_creative_inventory = 1, cools_lava = 1},
})
core.register_alias("water_flowing", "vox_main:water_flowing")
core.register_alias("default:river_water_flowing", "vox_main:water_flowing")
core.register_alias("mapgen_water_flowing", "vox_main:water_flowing")
-- River Water
core.register_node("vox_main:river_water_source", {
@ -71,7 +97,7 @@ core.register_node("vox_main:river_water_source", {
drawtype = "liquid",
tiles = {
{
name = "vox_river_water.png",
name = "default_river_water_source_animated.png",
animation = {
type = "vertical_frames",
aspect_w = 16,
@ -80,29 +106,41 @@ core.register_node("vox_main:river_water_source", {
}
}
},
alpha = 128,
special_tiles = {
{
name = "default_river_water_source_animated.png",
animation = {
type = "vertical_frames",
aspect_w = 16,
aspect_h = 16,
length = 0.8
}
}
},
alpha = 160,
paramtype = "light",
walkable = false,
pointable = false,
diggable = false,
buildable_to = true,
drop = "",
drowning = 1,
liquidtype = "source",
liquid_alternative_flowing = "vox_main:river_water_flowing",
liquid_alternative_source = "vox_main:river_water_source",
liquid_viscosity = 1,
post_effect_color = {a = 103, r = 30, g = 60, b = 90}
post_effect_color = {a = 103, r = 30, g = 60, b = 90},
groups = {water = 3, liquid = 3, puts_out_fire = 1}
})
core.register_alias("river_water_source", "vox_main:river_water_source")
core.register_alias("mapgen_river_water_source", "vox_main:river_water_source")
core.register_alias("default:river_water_source", "vox_main:river_water_source")
-- Flowing River Water
core.register_node("vox_main:river_water_flowing", {
description = "Flowing River Water",
drawtype = "flowingliquid",
tiles = {"vox_river_water.png"},
tiles = {"default_river_water_flowing_animated.png"},
special_tiles = {
{
name = "vox_river_water.png",
name = "default_river_water_flowing_animated.png",
backface_culling = false,
animation = {
type = "vertical_frames",
@ -114,85 +152,28 @@ core.register_node("vox_main:river_water_flowing", {
},
alpha = 160,
paramtype = "light",
paramtype2 = "flowingliquid",
walkable = false,
pointable = false,
diggable = false,
buildable_to = true,
drop = "",
drowning = 1,
liquidtype = "flowing",
liquid_alternative_flowing = "vox_main:river_water_flowing",
liquid_alternative_source = "vox_main:river_water_source",
liquid_viscosity = 1,
post_effect_color = {a = 103, r = 30, g = 60, b = 90}
post_effect_color = {a = 103, r = 30, g = 60, b = 90},
groups = {water = 3, liquid = 3, puts_out_fire = 1}
})
-- Hotspring Water
core.register_node("vox_main:hotspring_water_source", {
description = "Hotspring Water Source",
drawtype = "liquid",
tiles = {
{
name = "vox_hotspring_water.png",
animation = {
type = "vertical_frames",
aspect_w = 16,
aspect_h = 16,
length = 2.0
}
}
},
alpha = 128,
paramtype = "light",
walkable = false,
pointable = false,
diggable = false,
buildable_to = true,
liquidtype = "source",
liquid_alternative_flowing = "vox_main:hotspring_water_flowing",
liquid_alternative_source = "vox_main:hotspring_water_source",
liquid_viscosity = 1,
post_effect_color = {a = 103, r = 30, g = 60, b = 90}
})
core.register_alias("hotspring_water_source", "vox_main:hotspring_water_source")
core.register_alias("mapgen_hotspring_water_source", "vox_main:hotspring_water_source")
core.register_node("vox_main:hotspring_water_flowing", {
description = "Flowing Hotspring Water",
drawtype = "flowingliquid",
tiles = {"vox_hotspring_water.png"},
special_tiles = {
{
name = "vox_hotspring_water.png",
backface_culling = false,
animation = {
type = "vertical_frames",
aspect_w = 16,
aspect_h = 16,
length = 0.8
}
}
},
alpha = 160,
paramtype = "light",
walkable = false,
pointable = false,
diggable = false,
buildable_to = true,
liquidtype = "flowing",
liquid_alternative_flowing = "vox_main:hotspring_water_flowing",
liquid_alternative_source = "vox_main:hotspring_water_source",
liquid_viscosity = 1,
post_effect_color = {a = 103, r = 30, g = 60, b = 90}
})
core.register_alias("hotspring_water_flowing", "vox_main:hotspring_water_flowing")
core.register_alias("mapgen_hotspring_water_flowing", "vox_main:hotspring_water_flowing")
-- Lava
core.register_node("vox_main:lava_source", {
description = "Lava Source",
drawtype = "liquid",
tiles = {
{
name = "vox_lava.png",
name = "default_lava_source_animated.png",
animation = {
type = "vertical_frames",
aspect_w = 16,
@ -201,53 +182,64 @@ core.register_node("vox_main:lava_source", {
}
}
},
alpha = 255,
special_tiles = {
{
name = "default_lava_source_animated.png",
animation = {
type = "vertical_frames",
aspect_w = 16,
aspect_h = 16,
length = 0.8
}
}
},
alpha = 160,
paramtype = "light",
walkable = false,
pointable = false,
diggable = false,
buildable_to = true,
drop = "",
liquidtype = "source",
liquid_alternative_flowing = "vox_main:lava_flowing",
liquid_alternative_source = "vox_main:lava_source",
liquid_viscosity = 7,
post_effect_color = {a = 255, r = 255, g = 0, b = 0}
post_effect_color = {a = 240, r = 255, g = 64, b = 0},
groups = {lava = 3, liquid = 3, hot = 3, igniter = 1}
})
core.register_alias("lava_source", "vox_main:lava_source")
core.register_alias("default:lava_source", "vox_main:lava_source")
core.register_alias("mapgen_lava_source", "vox_main:lava_source")
-- Flowing Lava
core.register_node("vox_main:lava_flowing", {
description = "Flowing Lava",
drawtype = "flowingliquid",
tiles = {"vox_lava.png"},
tiles = {"default_lava_flowing_animated.png"},
special_tiles = {
{
name = "vox_lava.png",
name = "default_lava_flowing_animated.png",
backface_culling = false,
animation = {
type = "vertical_frames",
aspect_w = 16,
aspect_h = 16,
length = 2.0
length = 0.8
}
}
},
alpha = 255,
alpha = 160,
paramtype = "light",
paramtype2 = "flowingliquid",
walkable = false,
pointable = false,
diggable = false,
buildable_to = true,
drop = "",
liquidtype = "flowing",
liquid_alternative_flowing = "vox_main:lava_flowing",
liquid_alternative_source = "vox_main:lava_source",
liquid_viscosity = 7,
post_effect_color = {a = 255, r = 255, g = 0, b = 0}
post_effect_color = {a = 240, r = 255, g = 64, b = 0},
groups = {lava = 3, liquid = 3, hot = 3, igniter = 1}
})
core.register_alias("lava_flowing", "vox_main:lava_flowing")
core.register_alias("default:lava_flowing", "vox_main:lava_flowing")
core.register_alias("mapgen_lava_flowing", "vox_main:lava_flowing")
-- Oil
core.register_node("vox_main:oil_source", {
@ -255,7 +247,7 @@ core.register_node("vox_main:oil_source", {
drawtype = "liquid",
tiles = {
{
name = "vox_oil.png",
name = "default_water_source_animated.png^[colorize:black:200",
animation = {
type = "vertical_frames",
aspect_w = 16,
@ -264,51 +256,64 @@ core.register_node("vox_main:oil_source", {
}
}
},
alpha = 255,
special_tiles = {
{
name = "default_water_source_animated.png^[colorize:black:200",
animation = {
type = "vertical_frames",
aspect_w = 16,
aspect_h = 16,
length = 0.8
}
}
},
alpha = 160,
paramtype = "light",
walkable = false,
pointable = false,
diggable = false,
buildable_to = true,
drop = "",
liquidtype = "source",
liquid_alternative_flowing = "vox_main:oil_flowing",
liquid_alternative_source = "vox_main:oil_source",
liquid_viscosity = 1,
post_effect_color = {a = 255, r = 0, g = 0, b = 0}
post_effect_color = {a = 240, r = 0, g = 0, b = 0},
groups = {oil = 3, liquid = 3, igniter = 1}
})
core.register_alias("oil_source", "vox_main:oil_source")
core.register_alias("mapgen_oil_source", "vox_main:oil_source")
-- Flowing Oil
core.register_node("vox_main:oil_flowing", {
description = "Flowing Oil",
drawtype = "flowingliquid",
tiles = {"vox_oil.png"},
tiles = {"default_water_flowing_animated.png^[colorize:black:200"},
special_tiles = {
{
name = "vox_oil.png",
name = "default_water_flowing_animated.png^[colorize:black:200",
backface_culling = false,
animation = {
type = "vertical_frames",
aspect_w = 16,
aspect_h = 16,
length = 2.0
length = 0.8
}
}
},
alpha = 255,
alpha = 160,
paramtype = "light",
paramtype2 = "flowingliquid",
walkable = false,
pointable = false,
diggable = false,
buildable_to = true,
drop = "",
liquidtype = "flowing",
liquid_alternative_flowing = "vox_main:oil_flowing",
liquid_alternative_source = "vox_main:oil_source",
liquid_viscosity = 1,
post_effect_color = {a = 255, r = 0, g = 0, b = 0}
post_effect_color = {a = 240, r = 0, g = 0, b = 0},
groups = {oil = 3, liquid = 3, igniter = 1}
})
core.register_alias("oil_flowing", "vox_main:oil_flowing")
core.register_alias("mapgen_oil_flowing", "vox_main:oil_flowing")
-- Acid
core.register_node("vox_main:acid_source", {
@ -316,7 +321,7 @@ core.register_node("vox_main:acid_source", {
drawtype = "liquid",
tiles = {
{
name = "vox_acid.png",
name = "default_water_source_animated.png^[colorize:green:200",
animation = {
type = "vertical_frames",
aspect_w = 16,
@ -325,29 +330,72 @@ core.register_node("vox_main:acid_source", {
}
}
},
alpha = 255,
special_tiles = {
{
name = "default_water_source_animated.png^[colorize:green:200",
animation = {
type = "vertical_frames",
aspect_w = 16,
aspect_h = 16,
length = 0.8
}
}
},
alpha = 160,
paramtype = "light",
walkable = false,
pointable = false,
diggable = false,
buildable_to = true,
drop = "",
liquidtype = "source",
liquid_alternative_flowing = "vox_main:acid_flowing",
liquid_alternative_source = "vox_main:acid_source",
liquid_viscosity = 1,
post_effect_color = {a = 255, r = 0, g = 255, b = 0}
post_effect_color = {a = 240, r = 0, g = 255, b = 0},
groups = {acid = 3, liquid = 3, igniter = 1}
})
core.register_alias("acid_source", "vox_main:acid_source")
core.register_alias("mapgen_acid_source", "vox_main:acid_source")
-- Flowing Acid
core.register_node("vox_main:acid_flowing", {
description = "Flowing Acid",
drawtype = "flowingliquid",
tiles = {"vox_acid.png"},
tiles = {"default_water_flowing_animated.png^[colorize:green:200"},
special_tiles = {
{
name = "vox_acid.png",
name = "default_water_flowing_animated.png^[colorize:green:200",
backface_culling = false,
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,
drop = "",
liquidtype = "flowing",
liquid_alternative_flowing = "vox_main:acid_flowing",
liquid_alternative_source = "vox_main:acid_source",
liquid_viscosity = 1,
post_effect_color = {a = 240, r = 0, g = 255, b = 0},
groups = {acid = 3, liquid = 3, igniter = 1}
})
-- Slime
core.register_node("vox_main:slime_source", {
description = "Slime Source",
drawtype = "liquid",
tiles = {
{
name = "default_water_source_animated.png^[colorize:lime:200",
animation = {
type = "vertical_frames",
aspect_w = 16,
@ -356,15 +404,391 @@ core.register_node("vox_main:acid_flowing", {
}
}
},
alpha = 255,
special_tiles = {
{
name = "default_water_source_animated.png^[colorize:lime:200",
animation = {
type = "vertical_frames",
aspect_w = 16,
aspect_h = 16,
length = 0.8
}
}
},
alpha = 160,
paramtype = "light",
walkable = false,
pointable = false,
diggable = false,
buildable_to = true,
drop = "",
liquidtype = "source",
liquid_alternative_flowing = "vox_main:slime_flowing",
liquid_alternative_source = "vox_main:slime_source",
liquid_viscosity = 1,
post_effect_color = {a = 240, r = 0, g = 255, b = 0},
groups = {slime = 3, liquid = 3, igniter = 1}
})
-- Flowing Slime
core.register_node("vox_main:slime_flowing", {
description = "Flowing Slime",
drawtype = "flowingliquid",
tiles = {"default_water_flowing_animated.png^[colorize:lime:200"},
special_tiles = {
{
name = "default_water_flowing_animated.png^[colorize:lime:200",
backface_culling = false,
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,
drop = "",
liquidtype = "flowing",
liquid_alternative_flowing = "vox_main:slime_flowing",
liquid_alternative_source = "vox_main:slime_source",
liquid_viscosity = 1,
post_effect_color = {a = 240, r = 0, g = 255, b = 0},
groups = {slime = 3, liquid = 3, igniter = 1}
})
-- Sewage
core.register_node("vox_main:sewage_source", {
description = "Sewage Source",
drawtype = "liquid",
tiles = {
{
name = "default_water_source_animated.png^[colorize:brown:200",
animation = {
type = "vertical_frames",
aspect_w = 16,
aspect_h = 16,
length = 2.0
}
}
},
special_tiles = {
{
name = "default_water_source_animated.png^[colorize:brown:200",
animation = {
type = "vertical_frames",
aspect_w = 16,
aspect_h = 16,
length = 0.8
}
}
},
alpha = 160,
paramtype = "light",
walkable = false,
pointable = false,
diggable = false,
buildable_to = true,
drop = "",
liquidtype = "source",
liquid_alternative_flowing = "vox_main:sewage_flowing",
liquid_alternative_source = "vox_main:sewage_source",
liquid_viscosity = 1,
post_effect_color = {a = 240, r = 0, g = 255, b = 0},
groups = {sewage = 3, liquid = 3, igniter = 1}
})
-- Flowing Sewage
core.register_node("vox_main:sewage_flowing", {
description = "Flowing Sewage",
drawtype = "flowingliquid",
tiles = {"default_water_flowing_animated.png^[colorize:#4B5320:150"},
special_tiles = {
{
name = "default_water_flowing_animated.png^[colorize:#4B5320:150",
backface_culling = false,
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,
drop = "",
liquidtype = "flowing",
liquid_alternative_flowing = "vox_main:sewage_flowing",
liquid_alternative_source = "vox_main:sewage_source",
liquid_viscosity = 1,
post_effect_color = {a = 240, r = 0, g = 255, b = 0},
groups = {sewage = 3, liquid = 3, igniter = 1}
})
-- Tar
core.register_node("vox_main:tar_source", {
description = "Tar Source",
drawtype = "liquid",
tiles = {"default_water_source_animated.png^[colorize:#2F4F4F:200"},
special_tiles = {
{
name = "default_water_source_animated.png^[colorize:#2F4F4F:200",
animation = {
type = "vertical_frames",
aspect_w = 16,
aspect_h = 16,
length = 2.0
}
}
},
alpha = 160,
paramtype = "light",
walkable = false,
pointable = false,
diggable = false,
buildable_to = true,
drop = "",
liquidtype = "source",
liquid_alternative_flowing = "vox_main:tar_flowing",
liquid_alternative_source = "vox_main:tar_source",
liquid_viscosity = 1,
post_effect_color = {a = 240, r = 0, g = 0, b = 0},
groups = {tar = 3, liquid = 3, igniter = 1}
})
-- Flowing Tar
core.register_node("vox_main:tar_flowing", {
description = "Flowing Tar",
drawtype = "flowingliquid",
tiles = {"default_water_flowing_animated.png^[colorize:#2F4F4F:200"},
special_tiles = {
{
name = "default_water_flowing_animated.png^[colorize:#2F4F4F:200",
backface_culling = false,
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,
drop = "",
liquidtype = "flowing",
liquid_alternative_flowing = "vox_main:tar_flowing",
liquid_alternative_source = "vox_main:tar_source",
liquid_viscosity = 1,
post_effect_color = {a = 240, r = 0, g = 0, b = 0},
groups = {tar = 3, liquid = 3, igniter = 1}
})
-- Oil
core.register_node("vox_main:oil_source", {
description = "Oil Source",
drawtype = "liquid",
tiles = {"default_water_source_animated.png^[colorize:#000000:200"},
special_tiles = {
{
name = "default_water_source_animated.png^[colorize:#000000:200",
animation = {
type = "vertical_frames",
aspect_w = 16,
aspect_h = 16,
length = 2.0
}
}
},
alpha = 160,
paramtype = "light",
walkable = false,
pointable = false,
diggable = false,
buildable_to = true,
drop = "",
liquidtype = "source",
liquid_alternative_flowing = "vox_main:oil_flowing",
liquid_alternative_source = "vox_main:oil_source",
liquid_viscosity = 1,
post_effect_color = {a = 240, r = 0, g = 0, b = 0},
groups = {oil = 3, liquid = 3, igniter = 1}
})
-- Flowing Oil
core.register_node("vox_main:oil_flowing", {
description = "Flowing Oil",
drawtype = "flowingliquid",
tiles = {"default_water_flowing_animated.png^[colorize:#000000:200"},
special_tiles = {
{
name = "default_water_flowing_animated.png^[colorize:#000000:200",
backface_culling = false,
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,
drop = "",
liquidtype = "flowing",
liquid_alternative_flowing = "vox_main:oil_flowing",
liquid_alternative_source = "vox_main:oil_source",
liquid_viscosity = 1,
post_effect_color = {a = 240, r = 0, g = 0, b = 0},
groups = {oil = 3, liquid = 3, igniter = 1}
})
-- Acid
core.register_node("vox_main:acid_source", {
description = "Acid Source",
drawtype = "liquid",
tiles = {"default_water_source_animated.png^[colorize:#00FF00:150"},
special_tiles = {
{
name = "default_water_source_animated.png^[colorize:#00FF00:150",
animation = {
type = "vertical_frames",
aspect_w = 16,
aspect_h = 16,
length = 2.0
}
}
},
alpha = 160,
paramtype = "light",
walkable = false,
pointable = false,
diggable = false,
buildable_to = true,
drop = "",
liquidtype = "source",
liquid_alternative_flowing = "vox_main:acid_flowing",
liquid_alternative_source = "vox_main:acid_source",
liquid_viscosity = 1,
post_effect_color = {a = 240, r = 0, g = 255, b = 0},
groups = {acid = 3, liquid = 3, igniter = 1}
})
-- Flowing Acid
core.register_node("vox_main:acid_flowing", {
description = "Flowing Acid",
drawtype = "flowingliquid",
tiles = {"default_water_flowing_animated.png^[colorize:#00FF00:150"},
special_tiles = {
{
name = "default_water_flowing_animated.png^[colorize:#00FF00:150",
backface_culling = false,
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,
drop = "",
liquidtype = "flowing",
liquid_alternative_flowing = "vox_main:acid_flowing",
liquid_alternative_source = "vox_main:acid_source",
liquid_viscosity = 1,
post_effect_color = {a = 255, r = 0, g = 255, b = 0}
post_effect_color = {a = 240, r = 0, g = 255, b = 0},
groups = {acid = 3, liquid = 3, igniter = 1}
})
-- Slime
core.register_node("vox_main:slime_source", {
description = "Slime Source",
drawtype = "liquid",
tiles = {"default_water_source_animated.png^[colorize:#00FF00:100"},
special_tiles = {
{
name = "default_water_source_animated.png^[colorize:#00FF00:100",
animation = {
type = "vertical_frames",
aspect_w = 16,
aspect_h = 16,
length = 2.0
}
}
},
alpha = 160,
paramtype = "light",
walkable = false,
pointable = false,
diggable = false,
buildable_to = true,
drop = "",
liquidtype = "source",
liquid_alternative_flowing = "vox_main:slime_flowing",
liquid_alternative_source = "vox_main:slime_source",
liquid_viscosity = 1,
post_effect_color = {a = 240, r = 0, g = 255, b = 0},
groups = {slime = 3, liquid = 3, igniter = 1}
})
-- Flowing Slime
core.register_node("vox_main:slime_flowing", {
description = "Flowing Slime",
drawtype = "flowingliquid",
tiles = {"default_water_flowing_animated.png^[colorize:#00FF00:100"},
special_tiles = {
{
name = "default_water_flowing_animated.png^[colorize:#00FF00:100",
backface_culling = false,
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,
drop = "",
liquidtype = "flowing",
liquid_alternative_flowing = "vox_main:slime_flowing",
liquid_alternative_source = "vox_main:slime_source",
liquid_viscosity = 1,
post_effect_color = {a = 240, r = 0, g = 255, b = 0},
groups = {slime = 3, liquid = 3, igniter = 1}
})

View file

@ -1,8 +1,71 @@
--[[
These are temporarily using Minetest Game assets for the time being.
Stone
-----
(1. Material 2. Cobble variant 3. Brick variant 4. Modified forms)
default:stone
default:cobble
default:stonebrick
default:stone_block
default:mossycobble
default:desert_stone
default:desert_cobble
default:desert_stonebrick
default:desert_stone_block
default:sandstone
default:sandstonebrick
default:sandstone_block
default:desert_sandstone
default:desert_sandstone_brick
default:desert_sandstone_block
default:silver_sandstone
default:silver_sandstone_brick
default:silver_sandstone_block
default:obsidian
default:obsidianbrick
default:obsidian_block
Soft / Non-Stone
----------------
(1. Material 2. Modified forms)
default:dirt
default:dirt_with_grass
default:dirt_with_grass_footsteps
default:dirt_with_dry_grass
default:dirt_with_snow
default:dirt_with_rainforest_litter
default:dirt_with_coniferous_litter
default:dry_dirt
default:dry_dirt_with_dry_grass
default:permafrost
default:permafrost_with_stones
default:permafrost_with_moss
default:sand
default:desert_sand
default:silver_sand
default:gravel
default:clay
default:snow
default:snowblock
default:ice
default:cave_ice
]] --
-- Bedrock
core.register_node("vox_main:bedrock", {
description = "Bedrock",
tiles = {"vox_bedrock.png"},
tiles = {"default_bedrock.png"},
groups = {cracky = 1}
})
core.register_alias("bedrock", "vox_main:bedrock")
@ -12,24 +75,115 @@ core.register_alias("default:bedrock", "vox_main:bedrock")
core.register_node("vox_main:dirt", {
description = "Dirt",
tiles = {"vox_dirt.png"},
groups = {crumbly = 3}
groups = {crumbly = 3, soil = 1},
--sounds = node_sound_dirt_defaults(),
})
core.register_alias("dirt", "vox_main:dirt")
core.register_alias("default:dirt", "vox_main:dirt")
-- Grass
core.register_node("vox_main:grass_block", {
description = "Grass Block",
tiles = {"vox_grass_block.png"},
groups = {cracky = 3}
-- Dirt with Grass
core.register_node("vox_main:dirt_with_grass", {
description = "Dirt with Grass",
tiles = {"default_grass.png", "vox_dirt.png",
{name = "vox_dirt.png^default_grass_side.png",
tileable_vertical = false}},
groups = {crumbly = 3, soil = 1, spreading_dirt_type = 1},
drop = "vox_main:dirt",
--sounds = vox_main.node_sound_dirt_defaults({
-- footstep = {name = "default_grass_footstep", gain = 0.25},
--}),
})
core.register_node("vox_main:dirt_with_grass_footsteps", {
description = "Dirt with Grass and Footsteps",
tiles = {"default_grass.png^default_footprint.png", "vox_dirt.png",
{name = "vox_dirt.png^default_grass_side.png",
tileable_vertical = false}},
groups = {crumbly = 3, soil = 1, not_in_creative_inventory = 1},
drop = "vox_main:dirt",
--sounds = vox_main.node_sound_dirt_defaults({
-- footstep = {name = "default_grass_footstep", gain = 0.25},
--}),
})
core.register_node("vox_main:dirt_with_dry_grass", {
description = "Dirt with Savanna Grass",
tiles = {"default_dry_grass.png",
"vox_dirt.png",
{name = "vox_dirt.png^default_dry_grass_side.png",
tileable_vertical = false}},
groups = {crumbly = 3, soil = 1, spreading_dirt_type = 1},
drop = "vox_main:dirt",
--sounds = vox_main.node_sound_dirt_defaults({
-- footstep = {name = "default_grass_footstep", gain = 0.4},
--}),
})
core.register_node("vox_main:dirt_with_snow", {
description = "Dirt with Snow",
tiles = {"default_snow.png", "vox_dirt.png",
{name = "vox_dirt.png^default_snow_side.png",
tileable_vertical = false}},
groups = {crumbly = 3, soil = 1, spreading_dirt_type = 1, snowy = 1},
drop = "vox_main:dirt",
--sounds = vox_main.node_sound_dirt_defaults({
-- footstep = {name = "default_snow_footstep", gain = 0.2},
--}),
})
core.register_node("vox_main:dirt_with_rainforest_litter", {
description = "Dirt with Rainforest Litter",
tiles = {
"default_rainforest_litter.png",
"vox_dirt.png",
{name = "vox_dirt.png^default_rainforest_litter_side.png",
tileable_vertical = false}
},
groups = {crumbly = 3, soil = 1, spreading_dirt_type = 1},
drop = "vox_main:dirt",
--sounds = vox_main.node_sound_dirt_defaults({
-- footstep = {name = "default_grass_footstep", gain = 0.4},
--}),
})
core.register_node("vox_main:dirt_with_coniferous_litter", {
description = "Dirt with Coniferous Litter",
tiles = {
"default_coniferous_litter.png",
"vox_dirt.png",
{name = "vox_dirt.png^default_coniferous_litter_side.png",
tileable_vertical = false}
},
groups = {crumbly = 3, soil = 1, spreading_dirt_type = 1},
drop = "vox_main:dirt",
--sounds = vox_main.node_sound_dirt_defaults({
-- footstep = {name = "default_grass_footstep", gain = 0.4},
--}),
})
core.register_node("vox_main:dry_dirt", {
description = "Savanna Dirt",
tiles = {"default_dry_dirt.png"},
groups = {crumbly = 3, soil = 1},
--sounds = vox_main.node_sound_dirt_defaults(),
})
core.register_node("vox_main:dry_dirt_with_dry_grass", {
description = "Savanna Dirt with Savanna Grass",
tiles = {"default_dry_grass.png", "default_dry_dirt.png",
{name = "default_dry_dirt.png^default_dry_grass_side.png",
tileable_vertical = false}},
groups = {crumbly = 3, soil = 1},
drop = "vox_main:dry_dirt",
--sounds = vox_main.node_sound_dirt_defaults({
-- footstep = {name = "default_grass_footstep", gain = 0.4},
--}),
})
core.register_alias("grass_block", "vox_main:grass_block")
core.register_alias("default:dirt_with_grass_block" , "vox_main:grass_block")
-- Snow
core.register_node("vox_main:snow", {
description = "Snow",
tiles = {"vox_snow.png"},
tiles = {"default_snow.png"},
groups = {crumbly = 3}
})
core.register_alias("snow", "vox_main:snow")
@ -46,28 +200,76 @@ core.register_alias("packed_snow", "vox_main:packed_snow")
-- Ice
core.register_node("vox_main:ice", {
description = "Ice",
tiles = {"vox_ice.png"},
tiles = {"default_ice.png"},
groups = {crumbly = 3}
})
core.register_alias("ice", "vox_main:ice")
core.register_alias("default:ice", "vox_main:ice")
-- Dirt With Snow
core.register_node("vox_main:dirt_with_snow", {
description = "Dirt With Snow",
tiles = {"vox_dirt_with_snow.png"},
groups = {crumbly = 3}
})
core.register_alias("dirt_with_snow", "vox_main:dirt_with_snow")
-- Permafrost
core.register_node("vox_main:permafrost", {
description = "Permafrost",
tiles = {"vox_permafrost.png"},
groups = {crumbly = 3}
groups = {cracky = 3},
--sounds = vox_main.node_sound_dirt_defaults(),
})
core.register_alias("permafrost", "vox_main:permafrost")
-- Stone
core.register_node("vox_main:stone", {
description = "Stone",
tiles = {"default_stone.png"},
groups = {cracky = 3, stone = 1},
drop = "vox_main:cobble",
legacy_mineral = true,
--sounds = vox_main.node_sound_stone_defaults(),
})
core.register_alias("stone", "vox_main:stone")
core.register_alias("mapgen_stone", "vox_main:stone")
-- core.register_alias("default:stone", "vox_main:stone")
-- Cobblestone
core.register_node("vox_main:cobblestone", {
description = "Cobblestone",
tiles = {"default_cobble.png"},
is_ground_content = false,
groups = {cracky = 3, stone = 2},
--sounds = vox_main.node_sound_stone_defaults(),
})
core.register_alias("cobblestone", "vox_main:cobblestone")
core.register_alias("default:cobble", "vox_main:cobblestone")
-- Mossy Cobble
core.register_node("vox_main:mossycobble", {
description = "Mossy Cobble",
tiles = {"default_mossycobble.png"},
is_ground_content = false,
groups = {cracky = 3, stone = 1},
--sounds = vox_main.node_sound_stone_defaults(),
})
core.register_alias("mossycobble", "vox_main:mossycobble")
core.register_alias("default:mossycobble", "vox_main:mossycobble")
-- Stone Block
core.register_node("vox_main:stone_block", {
description = "Stone Block",
tiles = {"default_stone_block.png"},
groups = {cracky = 2, stone = 1},
--sounds = vox_main.node_sound_stone_defaults(),
})
core.register_alias("stone_block", "vox_main:stone_block")
core.register_alias("default:stone_block", "vox_main:stone_block")
-- Stone Brick
core.register_node("vox_main:stone_brick", {
description = "Stone Brick",
tiles = {"default_stone_brick.png"},
groups = {cracky = 2, stone = 1},
--sounds = vox_main.node_sound_stone_defaults(),
})
core.register_alias("stone_brick", "vox_main:stone_brick")
core.register_alias("default:stonebrick", "vox_main:stone_brick")
-- Bluestone
core.register_node("vox_main:bluestone", {
description = "Bluestone",
@ -76,44 +278,35 @@ core.register_node("vox_main:bluestone", {
})
core.register_alias("bluestone", "vox_main:bluestone")
-- Stone
core.register_node("vox_main:stone", {
description = "Stone",
tiles = {"vox_stone.png"},
groups = {cracky = 2}
})
core.register_alias("stone", "vox_main:stone")
core.register_alias("mapgen_stone", "vox_main:stone")
-- core.register_alias("default:stone", "vox_main:stone")
-- Cobblestone
core.register_node("vox_main:cobblestone", {
description = "Cobblestone",
tiles = {"vox_cobblestone.png"},
groups = {cracky = 2}
})
core.register_alias("cobblestone", "vox_main:cobblestone")
core.register_alias("default:cobble", "vox_main:cobblestone")
-- Mossy Cobblestone
core.register_node("vox_main:mossycobble", {
description = "Mossy Cobblestone",
tiles = {"vox_mossycobble.png"},
groups = {cracky = 2}
})
core.register_alias("mossycobble", "vox_main:mossycobble")
core.register_alias("default:mossycobble", "vox_main:mossycobble")
-- Sand
-- (I don't like sand. It's coarse and rough and irritating and it gets everywhere.)
core.register_node("vox_main:sand", {
description = "Sand",
tiles = {"vox_sand.png"},
groups = {crumbly = 3}
tiles = {"default_sand.png"},
groups = {crumbly = 3, falling_node = 1, sand = 1},
--sounds = vox_main.node_sound_sand_defaults(),
})
core.register_alias("sand", "vox_main:sand")
core.register_alias("default:sand", "vox_main:sand")
-- Desert Stone
core.register_node("vox_main:desert_stone", {
description = "Desert Stone",
tiles = {"default_desert_stone.png"},
groups = {cracky = 2}
})
core.register_alias("desert_stone", "vox_main:desert_stone")
core.register_alias("default:desert_stone", "vox_main:desert_stone")
-- Desert Sand
core.register_node("vox_main:desert_sand", {
description = "Desert Sand",
tiles = {"default_desert_sand.png"},
groups = {crumbly = 3}
})
core.register_alias("desert_sand", "vox_main:desert_sand")
core.register_alias("default:desert_sand", "vox_main:desert_sand")
-- Sulfur Crust
core.register_node("vox_main:sulfur_crust", {
description = "Sulfur Crust",
@ -123,7 +316,7 @@ core.register_node("vox_main:sulfur_crust", {
core.register_alias("sulfur_crust", "vox_main:sulfur_crust")
-- Ash
minetest.register_node("vox_main:ash_block", {
core.register_node("vox_main:ash_block", {
description = "Ash Block",
tiles = {"vox_ash_block.png"},
groups = {crumbly = 3},
@ -133,8 +326,16 @@ minetest.register_node("vox_main:ash_block", {
-- Gravel
core.register_node("vox_main:gravel", {
description = "Gravel",
tiles = {"vox_gravel.png"},
groups = {crumbly = 2}
tiles = {"default_gravel.png"},
groups = {crumbly = 2, falling_node = 1},
--sounds = vox_main.node_sound_gravel_defaults(),
drop = {
max_items = 1,
items = {
{items = {"vox:main:flint"}, rarity = 16},
{items = {"vox:main:gravel"}}
}
}
})
core.register_alias("gravel", "vox_main:gravel")
core.register_alias("default:gravel", "vox_main:gravel")
@ -143,15 +344,96 @@ core.register_alias("default:gravel", "vox_main:gravel")
core.register_node("vox_main:sandstone", {
description = "Sandstone",
tiles = {"vox_sandstone.png"},
groups = {cracky = 2}
groups = {crumbly = 1, cracky = 3},
--sounds = vox_main.node_sound_stone_defaults(),
})
core.register_alias("sandstone", "vox_main:sandstone")
core.register_alias("default:sandstone", "vox_main:sandstone")
-- Sandstone Brick
core.register_node("vox_main:sandstone_brick", {
description = "Sandstone Brick",
paramtype2 = "facedir",
place_param2 = 0,
tiles = {"default_sandstone_brick.png"},
is_ground_content = false,
groups = {cracky = 2},
--sounds = vox_main.node_sound_stone_defaults(),
})
core.register_alias("sandstone_brick", "vox_main:sandstone_brick")
core.register_alias("default:sandstonebrick", "vox_main:sandstone_brick")
-- Sandstone Block
core.register_node("vox_main:sandstone_block", {
description = "Sandstone Block",
tiles = {"default_sandstone_block.png"},
is_ground_content = false,
groups = {cracky = 2},
--sounds = vox_main.node_sound_stone_defaults(),
})
core.register_alias("sandstone_block", "vox_main:sandstone_block")
core.register_alias("default:sandstone_block", "vox_main:sandstone_block")
-- Desert Sandstone
core.register_node("vox_main:desert_sandstone", {
description = "Desert Sandstone",
tiles = {"default_desert_sandstone.png"},
groups = {crumbly = 1, cracky = 3},
--sounds = vox_main.node_sound_stone_defaults(),
})
core.register_alias("desert_sandstone", "vox_main:desert_sandstone")
core.register_alias("default:desert_sandstone", "vox_main:desert_sandstone")
-- Desert Sandstone Brick
core.register_node("vox_main: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 = vox_main.node_sound_stone_defaults(),
})
core.register_alias("desert_sandstone_brick", "vox_main:desert_sandstone_brick")
core.register_alias("default:desert_sandstone_brick", "vox_main:desert_sandstone_brick")
-- Desert Sandstone Block
core.register_node("vox_main:desert_sandstone_block", {
description = "Desert Sandstone Block",
tiles = {"default_desert_sandstone_block.png"},
is_ground_content = false,
groups = {cracky = 2},
--sounds = vox_main.node_sound_stone_defaults(),
})
core.register_alias("desert_sandstone_block", "vox_main:desert_sandstone_block")
core.register_alias("default:desert_sandstone_block", "vox_main:desert_sandstone_block")
-- Silver Sandstone
core.register_node("vox_main:silver_sandstone", {
description = "Silver Sandstone",
tiles = {"default_silver_sandstone.png"},
groups = {crumbly = 1, cracky = 3},
--sounds = vox_main.node_sound_stone_defaults(),
})
core.register_alias("silver_sandstone", "vox_main:silver_sandstone")
core.register_alias("default:silver_sandstone", "vox_main:silver_sandstone")
-- Silver Sandstone Brick
core.register_node("vox_main:silver_sandstone_brick", {
description = "Silver Sandstone Brick",
tiles = {"default_silver_sandstone_brick.png"},
is_ground_content = false,
groups = {cracky = 2},
--sounds = vox_main.node_sound_stone_defaults(),
})
core.register_alias("silver_sandstone_brick", "vox_main:silver_sandstone_brick")
core.register_alias("default:silver_sandstone_brick", "vox_main:silver_sandstone_brick")
-- Clay
core.register_node("vox_main:clay", {
description = "Clay",
tiles = {"vox_clay.png"},
tiles = {"default_clay.png"},
groups = {crumbly = 3}
})
core.register_alias("clay", "vox_main:clay")
@ -231,12 +513,39 @@ core.register_alias("default:basalt", "vox_main:basalt")
-- Obsidian
core.register_node("vox_main:obsidian", {
description = "Obsidian",
tiles = {"vox_obsidian.png"},
groups = {cracky = 2}
tiles = {"default_obsidian.png"},
--sounds = vox_main.node_sound_stone_defaults(),
groups = {cracky = 1, level = 2},
})
core.register_alias("obsidian", "vox_main:obsidian")
core.register_alias("default:obsidian", "vox_main:obsidian")
-- Obsidian Brick
core.register_node("vox_main:obsidian_brick", {
description = "Obsidian Brick",
paramtype2 = "facedir",
place_param2 = 0,
tiles = {"default_obsidian_brick.png"},
is_ground_content = false,
--sounds = vox_main.node_sound_stone_defaults(),
groups = {cracky = 1, level = 2},
})
core.register_alias("obsidian_brick", "vox_main:obsidian_brick")
core.register_alias("default:obsidianbrick", "vox_main:obsidian_brick")
-- Obsidian Block
core.register_node("vox_main:obsidian_block", {
description = "Obsidian Block",
tiles = {"default_obsidian_block.png"},
is_ground_content = false,
--sounds = vox_main.node_sound_stone_defaults(),
groups = {cracky = 1, level = 2},
})
core.register_alias("obsidian_block", "vox_main:obsidian_block")
core.register_alias("default:obsidian_block", "vox_main:obsidian_block")
-- Marble
core.register_node("vox_main:marble", {
description = "Marble",

View file

@ -0,0 +1,79 @@
# Blender v2.78 (sub 0) OBJ File: 'chest-open.blend'
# www.blender.org
o Top_Cube.002_None_Top_Cube.002_None_bottom
v -0.500000 0.408471 0.720970
v -0.500000 1.115578 0.013863
v -0.500000 0.894607 -0.207108
v -0.500000 0.187501 0.499999
v 0.500000 1.115578 0.013863
v 0.500000 0.408471 0.720970
v 0.500000 0.187501 0.499999
v 0.500000 0.894607 -0.207108
v -0.500000 0.187500 -0.500000
v -0.500000 -0.500000 -0.500000
v -0.500000 -0.500000 0.500000
v 0.500000 0.187500 -0.500000
v 0.500000 -0.500000 0.500000
v 0.500000 -0.500000 -0.500000
vt 0.0000 1.0000
vt 0.0000 0.0000
vt 1.0000 0.0000
vt 1.0000 1.0000
vt 1.0000 0.0000
vt 1.0000 1.0000
vt 0.0000 1.0000
vt 0.0000 0.0000
vt 0.0000 1.0000
vt 1.0000 1.0000
vt 1.0000 0.6875
vt 0.0000 0.6875
vt 1.0000 1.0000
vt 0.0000 0.6875
vt 1.0000 0.6875
vt 1.0000 0.6875
vt 1.0000 0.0000
vt 0.0000 0.0000
vt 1.0000 0.6875
vt 1.0000 0.0000
vt 1.0000 1.0000
vt 1.0000 0.6875
vt 1.0000 0.0000
vt 0.0000 1.0000
vt 0.0000 0.6875
vt 0.0000 0.6875
vt 0.0000 0.0000
vt 1.0000 0.5000
vt 1.0000 1.0000
vt 0.0000 1.0000
vt 0.0000 0.5000
vt 0.0000 0.0000
vt 1.0000 0.0000
vn 0.0000 0.7071 0.7071
vn -0.0000 -1.0000 -0.0000
vn -1.0000 0.0000 0.0000
vn 1.0000 0.0000 -0.0000
vn 0.0000 -0.7071 0.7071
vn 0.0000 0.0000 1.0000
vn -0.0000 0.7071 -0.7071
vn -0.0000 0.0000 -1.0000
vn -0.0000 -0.7071 -0.7071
vn -0.0000 1.0000 -0.0000
g Top_Cube.002_None_Top_Cube.002_None_bottom_Top_Cube.002_None_Top_Cube.002_None_bottom_Top
s off
f 6/1/1 5/2/1 2/3/1 1/4/1
g Top_Cube.002_None_Top_Cube.002_None_bottom_Top_Cube.002_None_Top_Cube.002_None_bottom_Bottom
f 11/5/2 10/6/2 14/7/2 13/8/2
g Top_Cube.002_None_Top_Cube.002_None_bottom_Top_Cube.002_None_Top_Cube.002_None_bottom_Right-Left
f 1/9/3 2/10/3 3/11/3 4/12/3
f 5/13/4 6/1/4 7/14/4 8/15/4
f 4/12/3 9/16/3 10/17/3 11/18/3
f 12/19/4 7/14/4 13/8/4 14/20/4
g Top_Cube.002_None_Top_Cube.002_None_bottom_Top_Cube.002_None_Top_Cube.002_None_bottom_Back
f 6/21/5 1/9/5 4/12/5 7/22/5
f 7/22/6 4/12/6 11/18/6 13/23/6
g Top_Cube.002_None_Top_Cube.002_None_bottom_Top_Cube.002_None_Top_Cube.002_None_bottom_Front
f 2/10/7 5/24/7 8/25/7 3/11/7
f 9/16/8 12/26/8 14/27/8 10/17/8
g Top_Cube.002_None_Top_Cube.002_None_bottom_Top_Cube.002_None_Top_Cube.002_None_bottom_Inside
f 4/28/9 3/29/9 8/30/9 7/31/9
f 7/31/10 12/32/10 9/33/10 4/28/10

View file

@ -0,0 +1,53 @@
# Blender v2.77 (sub 0) OBJ File: 'torch_ceiling.blend'
# www.blender.org
v -0.062469 -0.047331 0.068152
v -0.062469 -0.559515 -0.164388
v -0.062469 0.004344 -0.045667
v -0.062469 -0.507839 -0.278206
v 0.062531 -0.047331 0.068152
v 0.062531 -0.559515 -0.164388
v 0.062531 0.004344 -0.045667
v 0.062531 -0.507839 -0.278206
v 0.353584 0.040000 0.363553
v 0.353584 -0.397500 0.363553
v -0.353522 0.040000 -0.343553
v -0.353522 -0.397500 -0.343553
v 0.353584 0.040000 -0.343553
v -0.353522 0.040000 0.363553
v 0.353584 -0.397500 -0.343553
v -0.353522 -0.397500 0.363553
vt 0.5625 0.5000
vt 0.5625 0.6250
vt 0.4375 0.6250
vt 0.4375 0.5000
vt 0.4375 0.0000
vt 0.5625 0.0000
vt 0.5625 0.1250
vt 0.4375 0.1250
vt 0.5625 0.6250
vt 0.4375 0.6250
vt 0.4375 0.6250
vt 0.4375 0.0000
vt 0.5625 0.6250
vt 0.5625 0.0000
vt 1.0000 0.5625
vt 1.0000 1.0000
vt 0.0000 1.0000
vt 0.0000 0.5625
vt 0.0000 0.5625
vt 1.0000 0.5625
vt 1.0000 1.0000
vt 0.0000 1.0000
vn 0.0000 0.9105 0.4134
vn -0.0000 -0.4134 0.9105
vn -1.0000 0.0000 0.0000
vn 0.7071 0.0000 -0.7071
vn 0.7071 0.0000 0.7071
f 3/1/1 1/2/1 5/3/1 7/4/1
f 8/5/1 4/6/1 2/7/1 6/8/1
f 3/9/2 4/6/2 8/5/2 7/10/2
f 1/11/3 3/9/3 4/6/3 2/12/3
f 5/13/2 1/11/2 2/12/2 6/14/2
f 7/10/3 8/5/3 6/14/3 5/13/3
f 9/15/4 10/16/4 12/17/4 11/18/4
f 13/19/5 14/20/5 16/21/5 15/22/5

View file

@ -0,0 +1,43 @@
# Blender v2.76 (sub 11) OBJ File: 'torch_floor.blend'
# www.blender.org
v 0.062500 0.062500 -0.062500
v 0.062500 -0.500000 -0.062500
v 0.062500 0.062500 0.062500
v 0.062500 -0.500000 0.062500
v -0.062500 0.062500 -0.062500
v -0.062500 -0.500000 -0.062500
v -0.062500 0.062500 0.062500
v -0.062500 -0.500000 0.062500
v -0.353553 -0.500000 0.353553
v -0.353553 0.500000 0.353553
v 0.353553 -0.500000 -0.353553
v 0.353553 0.500000 -0.353553
v -0.353553 -0.500000 -0.353553
v 0.353553 -0.500000 0.353553
v -0.353553 0.500000 -0.353553
v 0.353553 0.500000 0.353553
vt 0.562500 0.500000
vt 0.562500 0.625000
vt 0.437500 0.625000
vt 0.437500 0.500000
vt 0.437500 0.000000
vt 0.562500 0.000000
vt 0.562500 0.125000
vt 0.437500 0.125000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vn 0.000000 1.000000 0.000000
vn 0.000000 0.000000 -1.000000
vn 1.000000 0.000000 0.000000
vn -0.707100 0.000000 -0.707100
vn -0.707100 -0.000000 0.707100
f 3/1/1 1/2/1 5/3/1 7/4/1
f 8/5/1 4/6/1 2/7/1 6/8/1
f 3/2/2 4/6/2 8/5/2 7/3/2
f 1/3/3 3/2/3 4/6/3 2/5/3
f 5/2/2 1/3/2 2/5/2 6/6/2
f 7/3/3 8/5/3 6/6/3 5/2/3
f 9/9/4 10/10/4 12/11/4 11/12/4
f 13/12/5 14/9/5 16/10/5 15/11/5

View file

@ -0,0 +1,57 @@
# Blender v2.76 (sub 11) OBJ File: 'torch_wall.blend'
# www.blender.org
v 0.062469 -0.195248 0.023570
v 0.062469 -0.476498 -0.463570
v 0.062469 -0.303502 0.086070
v 0.062469 -0.584752 -0.401070
v -0.062531 -0.195248 0.023570
v -0.062531 -0.476498 -0.463570
v -0.062531 -0.303502 0.086070
v -0.062531 -0.584752 -0.401070
v -0.353584 -0.613553 0.022500
v -0.353584 -0.613553 0.460000
v 0.353522 0.093553 0.022500
v 0.353522 0.093553 0.460000
v -0.353584 0.093553 0.022500
v 0.353522 -0.613553 0.022500
v -0.353584 0.093553 0.460000
v 0.353522 -0.613553 0.460000
v 0.353553 0.056811 -0.121957
v 0.353553 -0.224439 -0.609096
v -0.353553 -0.555561 0.231596
v -0.353553 -0.836811 -0.255543
v -0.353553 0.056811 -0.121957
v -0.353553 -0.224439 -0.609096
v 0.353553 -0.555561 0.231596
v 0.353553 -0.836811 -0.255543
vt 0.562500 0.500000
vt 0.562500 0.625000
vt 0.437500 0.625000
vt 0.437500 0.500000
vt 0.437500 0.000000
vt 0.562500 0.000000
vt 0.562500 0.125000
vt 0.437500 0.125000
vt 0.000000 0.562500
vt 0.000000 -0.000000
vt 1.000000 0.000000
vt 1.000000 0.562500
vt 1.000000 1.000000
vt 0.000000 1.000000
vn -0.000000 0.500000 0.866000
vn -0.000000 0.866000 -0.500000
vn 1.000000 0.000000 0.000000
vn -0.707100 0.612400 -0.353600
vn -0.707100 -0.612400 0.353600
vn -0.707100 0.707100 -0.000000
vn -0.707100 -0.707100 -0.000000
f 3/1/1 1/2/1 5/3/1 7/4/1
f 8/5/1 4/6/1 2/7/1 6/8/1
f 3/2/2 4/6/2 8/5/2 7/3/2
f 1/3/3 3/2/3 4/6/3 2/5/3
f 5/2/2 1/3/2 2/5/2 6/6/2
f 7/3/3 8/5/3 6/6/3 5/2/3
f 17/9/4 18/10/4 20/11/4 19/12/4
f 21/9/5 22/10/5 24/11/5 23/12/5
f 9/12/6 10/13/6 12/14/6 11/9/6
f 13/9/7 14/12/7 16/13/7 15/14/7

View file

@ -0,0 +1,203 @@
-- plants.lua
-- Register Cactus
minetest.register_node("vox_main: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,
})
-- Register Large Cactus Seedling
minetest.register_node("vox_main:large_cactus_seedling", {
description = "Large Cactus Seedling",
drawtype = "plantlike",
tiles = {"default_large_cactus_seedling.png"},
inventory_image = "default_large_cactus_seedling.png",
wield_image = "default_large_cactus_seedling.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 = {choppy = 3, dig_immediate = 3, attached_node = 1},
-- sounds = default.node_sound_wood_defaults(),
on_place = function(itemstack, placer, pointed_thing)
return itemstack
end,
on_construct = function(pos)
minetest.get_node_timer(pos):start(math.random(1859, 3719))
end,
on_timer = function(pos)
default.grow_large_cactus(pos)
end,
})
-- Register Papyrus
minetest.register_node("vox_main: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,
})
-- Register Dry Shrub
minetest.register_node("vox_main: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",
paramtype2 = "meshoptions",
place_param2 = 4,
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 = {-6 / 16, -0.5, -6 / 16, 6 / 16, 4 / 16, 6 / 16},
},
})
-- Register Jungle Grass
minetest.register_node("vox_main: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, grass = 1, junglegrass = 1, flammable = 1},
--sounds = default.node_sound_leaves_defaults(),
selection_box = {
type = "fixed",
fixed = {-6 / 16, -0.5, -6 / 16, 6 / 16, 0.5, 6 / 16},
},
})
-- Register Grass
for i = 1, 5 do
minetest.register_node("vox_main:grass_" .. i, {
description = "Grass",
drawtype = "plantlike",
waving = 1,
tiles = {"default_grass_" .. i .. ".png"},
inventory_image = "default_grass_" .. math.min(i + 2, 5) .. ".png",
wield_image = "default_grass_" .. math.min(i + 2, 5) .. ".png",
paramtype = "light",
sunlight_propagates = true,
walkable = false,
buildable_to = true,
groups = {snappy = 3, flora = 1, attached_node = 1, grass = 1, normal_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 + (i - 1) * 2 / 16, 6 / 16},
},
on_place = function(itemstack, placer, pointed_thing)
return itemstack
end,
})
end
-- Register Dry Grass
for i = 1, 5 do
minetest.register_node("vox_main:dry_grass_" .. i, {
description = "Savanna Grass",
drawtype = "plantlike",
waving = 1,
tiles = {"default_dry_grass_" .. i .. ".png"},
inventory_image = "default_dry_grass_" .. math.min(i + 2, 5) .. ".png",
wield_image = "default_dry_grass_" .. math.min(i + 2, 5) .. ".png",
paramtype = "light",
sunlight_propagates = true,
walkable = false,
buildable_to = true,
groups = {snappy = 3, flammable = 3, flora = 1, attached_node = 1, grass = 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 + (i - 1) * 2 / 16, 6 / 16},
},
on_place = function(itemstack, placer, pointed_thing)
return itemstack
end,
})
end
-- Register Fern
for i = 1, 3 do
minetest.register_node("vox_main:fern_" .. i, {
description = "Fern",
drawtype = "plantlike",
waving = 1,
tiles = {"default_fern_" .. i .. ".png"},
inventory_image = "default_fern_" .. i .. ".png",
wield_image = "default_fern_" .. i .. ".png",
paramtype = "light",
sunlight_propagates = true,
walkable = false,
buildable_to = true,
groups = {snappy = 3, flammable = 3, flora = 1, grass = 1, fern = 1, attached_node = 1},
--sounds = default.node_sound_leaves_defaults(),
selection_box = {
type = "fixed",
fixed = {-6 / 16, -0.5, -6 / 16, 6 / 16, -0.25 + (i - 1) * 0.25, 6 / 16},
},
on_place = function(itemstack, placer, pointed_thing)
return itemstack
end,
})
end
-- Register Marram Grass
for i = 1, 3 do
minetest.register_node("vox_main:marram_grass_" .. i, {
description = "Marram Grass",
drawtype = "plantlike",
waving = 1,
tiles = {"default_marram_grass_" .. i .. ".png"},
inventory_image = "default_marram_grass_" .. i .. ".png",
wield_image = "default_marram_grass_" .. i .. ".png",
paramtype = "light",
sunlight_propagates = true,
walkable = false,
buildable_to = true,
groups = {snappy = 3, flammable = 3, flora = 1, grass = 1, marram_grass = 1, attached_node = 1},
--sounds = default.node_sound_leaves_defaults(),
selection_box = {
type = "fixed",
fixed = {-6 / 16, -0.5, -6 / 16, 6 / 16, -0.25 + (i - 1) * 0.25, 6 / 16},
},
on_place = function(itemstack, placer, pointed_thing)
return itemstack
end,
})
end

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -0,0 +1,138 @@
-- vox_main/trees.lua
-- support for MT game translation.
local S = minetest.get_translator("vox_main")
-- Placeholder for vox_main sound functions
local function vox_main_sound_wood_defaults()
return {
footstep = {name = "vox_main_wood_footstep", gain = 0.3},
dug = {name = "vox_main_wood_dug", gain = 1.0},
place = {name = "vox_main_wood_place", gain = 1.0},
}
end
local function vox_main_sound_leaves_defaults()
return {
footstep = {name = "vox_main_leaves_footstep", gain = 0.45},
dug = {name = "vox_main_leaves_dug", gain = 0.7},
place = {name = "vox_main_leaves_place", gain = 1.0},
}
end
local function vox_main_sound_sapling_defaults()
return {
footstep = {name = "vox_main_sapling_footstep", gain = 0.2},
dug = {name = "vox_main_sapling_dug", gain = 0.25},
place = {name = "vox_main_sapling_place", gain = 1.0},
}
end
-- Tree nodes
minetest.register_node("vox_main:tree", {
description = S("Apple Tree"),
tiles = {"default_tree_top.png", "default_tree_top.png", "default_tree.png"},
paramtype2 = "facedir",
is_ground_content = false,
groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
sounds = vox_main_sound_wood_defaults(),
on_place = minetest.rotate_node
})
minetest.register_node("vox_main:wood", {
description = S("Apple Wood Planks"),
paramtype2 = "facedir",
place_param2 = 0,
tiles = {"default_wood.png"},
is_ground_content = false,
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2, wood = 1},
sounds = vox_main_sound_wood_defaults(),
})
minetest.register_node("vox_main:sapling", {
description = S("Apple Tree Sapling"),
drawtype = "plantlike",
tiles = {"default_sapling.png"},
inventory_image = "default_sapling.png",
wield_image = "default_sapling.png",
paramtype = "light",
sunlight_propagates = true,
walkable = false,
on_timer = grow_sapling,
selection_box = {
type = "fixed",
fixed = {-4 / 16, -0.5, -4 / 16, 4 / 16, 7 / 16, 4 / 16}
},
groups = {snappy = 2, dig_immediate = 3, flammable = 2, attached_node = 1, sapling = 1},
sounds = vox_main_sound_sapling_defaults(),
on_construct = function(pos)
minetest.get_node_timer(pos):start(math.random(300, 1500))
end,
on_place = function(itemstack, placer, pointed_thing)
return itemstack
end,
})
minetest.register_node("vox_main:leaves", {
description = S("Apple Tree Leaves"),
drawtype = "allfaces_optional",
waving = 1,
tiles = {"default_leaves.png"},
special_tiles = {"default_leaves_simple.png"},
paramtype = "light",
is_ground_content = false,
groups = {snappy = 3, leafdecay = 3, flammable = 2, leaves = 1},
drop = {
max_items = 1,
items = {
{items = {"vox_main:sapling"}, rarity = 20},
{items = {"vox_main:leaves"}}
}
},
sounds = vox_main_sound_leaves_defaults(),
after_place_node = after_place_leaves,
})
minetest.register_node("vox_main:apple", {
description = S("Apple"),
drawtype = "plantlike",
tiles = {"default_apple.png"},
inventory_image = "default_apple.png",
paramtype = "light",
sunlight_propagates = true,
walkable = false,
is_ground_content = false,
selection_box = {
type = "fixed",
fixed = {-3 / 16, -7 / 16, -3 / 16, 3 / 16, 4 / 16, 3 / 16}
},
groups = {fleshy = 3, dig_immediate = 3, flammable = 2, leafdecay = 3, leafdecay_drop = 1, food_apple = 1},
on_use = minetest.item_eat(2),
sounds = vox_main_sound_leaves_defaults(),
after_place_node = function(pos, placer, itemstack)
minetest.set_node(pos, {name = "vox_main:apple", param2 = 1})
end,
after_dig_node = function(pos, oldnode, oldmetadata, digger)
if oldnode.param2 == 0 then
minetest.set_node(pos, {name = "vox_main:apple_mark"})
end
end,
})
minetest.register_node("vox_main:apple_mark", {
description = S("Apple Marker"),
inventory_image = "default_apple.png^default_invisible_node_overlay.png",
wield_image = "default_apple.png^default_invisible_node_overlay.png",
drawtype = "airlike",
paramtype = "light",
sunlight_propagates = true,
walkable = false,
pointable = false,
diggable = false,
buildable_to = true,
drop = "",
groups = {not_in_creative_inventory = 1},
on_timer = function(pos, elapsed)
minetest.set_node(pos, {name = "vox_main:apple"})
end,
})