add all sand paths and snow path
83
init.lua
|
@ -3,6 +3,7 @@
|
|||
--
|
||||
|
||||
dofile(minetest.get_modpath("obsidianmese").."/api.lua")
|
||||
dofile(minetest.get_modpath("obsidianmese").."/nodes.lua")
|
||||
dofile(minetest.get_modpath("obsidianmese").."/obsidianmese_chest.lua")
|
||||
|
||||
--
|
||||
|
@ -66,7 +67,7 @@ local sync_table = function(owner)
|
|||
|
||||
fired_table[owner] = fired_table[owner] - 1
|
||||
|
||||
print(minetest.serialize(fired_table))
|
||||
-- print(minetest.serialize(fired_table))
|
||||
|
||||
end
|
||||
end
|
||||
|
@ -195,7 +196,7 @@ function fire_sword(itemstack, user, pointed_thing)
|
|||
fired_table[player_name] = 1
|
||||
end
|
||||
|
||||
print(minetest.serialize(fired_table))
|
||||
-- print(minetest.serialize(fired_table))
|
||||
|
||||
pos.x = pos.x + v.x
|
||||
pos.z = pos.z + v.z
|
||||
|
@ -476,32 +477,40 @@ minetest.register_tool("obsidianmese:shovel", {
|
|||
return
|
||||
end
|
||||
|
||||
-- check on what we are pointing
|
||||
-- dirt path
|
||||
if under.name == "default:dirt" and
|
||||
under.name ~= "obsidianmese:dirt_path" then
|
||||
-- print("set_node DIRT path")
|
||||
under.name ~= "obsidianmese:path_dirt" then
|
||||
minetest.set_node(pt.under, {name = "obsidianmese:path_dirt"})
|
||||
|
||||
-- grass path
|
||||
elseif (under.name == "default:dirt" or
|
||||
under.name == "default:dirt_with_grass" or
|
||||
elseif (under.name == "default:dirt_with_grass" or
|
||||
under.name == "default:dirt_with_grass_footsteps" or
|
||||
under.name == "default:dirt_with_dry_grass" or
|
||||
under.name == "default:dirt_with_snow" or
|
||||
under.name == "default:dirt_with_rainforest_litter") and
|
||||
under.name ~= "obsidianmese:grass_path" then
|
||||
-- print("set_node GRASS path")
|
||||
under.name ~= "obsidianmese:path_grass" then
|
||||
minetest.set_node(pt.under, {name = "obsidianmese:path_grass"})
|
||||
|
||||
-- sand path
|
||||
elseif (under.name == "default:sand" or
|
||||
under.name == "default:desert_sand" or
|
||||
under.name == "default:silver_sand") and
|
||||
under.name ~= "obsidianmese:sand_path" then
|
||||
-- print("set_node SAND path")
|
||||
elseif under.name == "default:sand" and
|
||||
under.name ~= "obsidianmese:path_sand" then
|
||||
minetest.set_node(pt.under, {name = "obsidianmese:path_sand"})
|
||||
|
||||
-- desert sand path
|
||||
elseif under.name == "default:desert_sand" and
|
||||
under.name ~= "obsidianmese:path_desert_sand" then
|
||||
minetest.set_node(pt.under, {name = "obsidianmese:path_desert_sand"})
|
||||
|
||||
-- silver sand path
|
||||
elseif under.name == "default:silver_sand" and
|
||||
under.name ~= "obsidianmese:path_silver_sand" then
|
||||
minetest.set_node(pt.under, {name = "obsidianmese:path_silver_sand"})
|
||||
|
||||
-- snow path
|
||||
elseif under.name == "default:snowblock" and
|
||||
under.name ~= "obsidianmese:path_snowblock" then
|
||||
minetest.set_node(pt.under, {name = "obsidianmese:path_snowblock"})
|
||||
|
||||
else
|
||||
return
|
||||
end
|
||||
|
@ -517,52 +526,6 @@ minetest.register_tool("obsidianmese:shovel", {
|
|||
end
|
||||
})
|
||||
|
||||
-- dirt path node
|
||||
minetest.register_node("obsidianmese:path_dirt", {
|
||||
description = "Dirt Path",
|
||||
drawtype = "nodebox",
|
||||
tiles = {"obsidianmese_dirt_path_top.png", "obsidianmese_dirt_path_top.png", "obsidianmese_dirt_path_side.png"},
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {-1/2, -1/2, -1/2, 1/2, 1/2-1/16, 1/2},
|
||||
},
|
||||
drop = "default:dirt",
|
||||
is_ground_content = false,
|
||||
groups = {crumbly = 3, not_in_creative_inventory = 1},
|
||||
sounds = default.node_sound_dirt_defaults(),
|
||||
})
|
||||
|
||||
-- grass path node
|
||||
minetest.register_node("obsidianmese:path_grass", {
|
||||
description = "Grass Path",
|
||||
drawtype = "nodebox",
|
||||
tiles = {"obsidianmese_grass_path_top.png", "obsidianmese_dirt_path_top.png", "obsidianmese_dirt_path_side.png"},
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {-1/2, -1/2, -1/2, 1/2, 1/2-1/16, 1/2},
|
||||
},
|
||||
drop = "default:dirt",
|
||||
is_ground_content = false,
|
||||
groups = {crumbly = 3, not_in_creative_inventory = 1},
|
||||
sounds = default.node_sound_dirt_defaults({
|
||||
footstep = {name = "default_grass_footstep", gain = 0.25},
|
||||
}),
|
||||
})
|
||||
|
||||
-- sand path node
|
||||
minetest.register_node("obsidianmese:path_sand", {
|
||||
description = "Sand Path",
|
||||
drawtype = "nodebox",
|
||||
tiles = {"obsidianmese_sand_path_top.png", "obsidianmese_sand_path_top.png", "obsidianmese_sand_path_side.png"},
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {-1/2, -1/2, -1/2, 1/2, 1/2-1/16, 1/2},
|
||||
},
|
||||
drop = "default:desert_sand",
|
||||
groups = {crumbly = 3, falling_node = 1, not_in_creative_inventory = 1},
|
||||
sounds = default.node_sound_sand_defaults(),
|
||||
})
|
||||
|
||||
--
|
||||
-- Items
|
||||
--
|
||||
|
|
|
@ -0,0 +1,91 @@
|
|||
-- dirt path
|
||||
minetest.register_node("obsidianmese:path_dirt", {
|
||||
description = "Dirt Path",
|
||||
drawtype = "nodebox",
|
||||
tiles = {"obsidianmese_dirt_path_top.png", "obsidianmese_dirt_path_top.png", "obsidianmese_dirt_path_side.png"},
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {-1/2, -1/2, -1/2, 1/2, 1/2-1/16, 1/2},
|
||||
},
|
||||
drop = "default:dirt",
|
||||
is_ground_content = false,
|
||||
groups = {crumbly = 3, not_in_creative_inventory = 1},
|
||||
sounds = default.node_sound_dirt_defaults(),
|
||||
})
|
||||
|
||||
-- grass path
|
||||
minetest.register_node("obsidianmese:path_grass", {
|
||||
description = "Grass Path",
|
||||
drawtype = "nodebox",
|
||||
tiles = {"obsidianmese_grass_path_top.png", "obsidianmese_dirt_path_top.png", "obsidianmese_dirt_path_side.png"},
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {-1/2, -1/2, -1/2, 1/2, 1/2-1/16, 1/2},
|
||||
},
|
||||
drop = "default:dirt",
|
||||
is_ground_content = false,
|
||||
groups = {crumbly = 3, not_in_creative_inventory = 1},
|
||||
sounds = default.node_sound_dirt_defaults({
|
||||
footstep = {name = "default_grass_footstep", gain = 0.25},
|
||||
}),
|
||||
})
|
||||
|
||||
-- sand path
|
||||
minetest.register_node("obsidianmese:path_sand", {
|
||||
description = "Sand Path",
|
||||
drawtype = "nodebox",
|
||||
tiles = {"obsidianmese_sand_path_top.png", "obsidianmese_sand_path_top.png", "obsidianmese_sand_path_side.png"},
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {-1/2, -1/2, -1/2, 1/2, 1/2-1/16, 1/2},
|
||||
},
|
||||
drop = "default:sand",
|
||||
groups = {crumbly = 3, falling_node = 1, not_in_creative_inventory = 1},
|
||||
sounds = default.node_sound_sand_defaults(),
|
||||
})
|
||||
|
||||
-- desert sand path
|
||||
minetest.register_node("obsidianmese:path_desert_sand", {
|
||||
description = "Desert Sand Path",
|
||||
drawtype = "nodebox",
|
||||
tiles = {"obsidianmese_desert_sand_path_top.png", "obsidianmese_desert_sand_path_top.png", "obsidianmese_desert_sand_path_side.png"},
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {-1/2, -1/2, -1/2, 1/2, 1/2-1/16, 1/2},
|
||||
},
|
||||
drop = "default:desert_sand",
|
||||
groups = {crumbly = 3, falling_node = 1, not_in_creative_inventory = 1},
|
||||
sounds = default.node_sound_sand_defaults(),
|
||||
})
|
||||
|
||||
-- silver sand
|
||||
minetest.register_node("obsidianmese:path_silver_sand", {
|
||||
description = "Silver Sand Path",
|
||||
drawtype = "nodebox",
|
||||
tiles = {"obsidianmese_silver_sand_path_top.png", "obsidianmese_silver_sand_path_top.png", "obsidianmese_silver_sand_path_side.png"},
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {-1/2, -1/2, -1/2, 1/2, 1/2-1/16, 1/2},
|
||||
},
|
||||
drop = "default:silver_sand",
|
||||
groups = {crumbly = 3, falling_node = 1, not_in_creative_inventory = 1},
|
||||
sounds = default.node_sound_sand_defaults(),
|
||||
})
|
||||
|
||||
-- snow path
|
||||
minetest.register_node("obsidianmese:path_snowblock", {
|
||||
description = "Snow Path",
|
||||
drawtype = "nodebox",
|
||||
tiles = {"obsidianmese_snow_path_top.png", "obsidianmese_snow_path_top.png", "obsidianmese_snow_path_side.png"},
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {-1/2, -1/2, -1/2, 1/2, 1/2-1/16, 1/2},
|
||||
},
|
||||
drop = "default:snowblock",
|
||||
groups = {crumbly = 3, puts_out_fire = 1, cools_lava = 1, snowy = 1, not_in_creative_inventory = 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}
|
||||
}),
|
||||
})
|
After Width: | Height: | Size: 415 B |
After Width: | Height: | Size: 333 B |
Before Width: | Height: | Size: 415 B After Width: | Height: | Size: 322 B |
Before Width: | Height: | Size: 333 B After Width: | Height: | Size: 277 B |
After Width: | Height: | Size: 322 B |
After Width: | Height: | Size: 277 B |
After Width: | Height: | Size: 500 B |
After Width: | Height: | Size: 518 B |