@ -1,3 +1,27 @@
|
|||||||
|
|
||||||
|
local reverse = true
|
||||||
|
|
||||||
|
local function destruct_bed(pos, n)
|
||||||
|
local node = minetest.get_node(pos)
|
||||||
|
local other
|
||||||
|
|
||||||
|
if n == 2 then
|
||||||
|
local dir = minetest.facedir_to_dir(node.param2)
|
||||||
|
other = vector.subtract(pos, dir)
|
||||||
|
elseif n == 1 then
|
||||||
|
local dir = minetest.facedir_to_dir(node.param2)
|
||||||
|
other = vector.add(pos, dir)
|
||||||
|
end
|
||||||
|
|
||||||
|
if reverse then
|
||||||
|
reverse = not reverse
|
||||||
|
minetest.remove_node(other)
|
||||||
|
nodeupdate(other)
|
||||||
|
else
|
||||||
|
reverse = not reverse
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
function beds.register_bed(name, def)
|
function beds.register_bed(name, def)
|
||||||
minetest.register_node(name .. "_bottom", {
|
minetest.register_node(name .. "_bottom", {
|
||||||
description = def.description,
|
description = def.description,
|
||||||
@ -39,14 +63,7 @@ function beds.register_bed(name, def)
|
|||||||
end,
|
end,
|
||||||
|
|
||||||
on_destruct = function(pos)
|
on_destruct = function(pos)
|
||||||
local n = minetest.get_node_or_nil(pos)
|
destruct_bed(pos, 1)
|
||||||
if not n then return end
|
|
||||||
local dir = minetest.facedir_to_dir(n.param2)
|
|
||||||
local p = vector.add(pos, dir)
|
|
||||||
local n2 = minetest.get_node(p)
|
|
||||||
if minetest.get_item_group(n2.name, "bed") == 2 and n.param2 == n2.param2 then
|
|
||||||
minetest.remove_node(p)
|
|
||||||
end
|
|
||||||
end,
|
end,
|
||||||
|
|
||||||
on_rightclick = function(pos, node, clicker)
|
on_rightclick = function(pos, node, clicker)
|
||||||
@ -95,10 +112,14 @@ function beds.register_bed(name, def)
|
|||||||
pointable = false,
|
pointable = false,
|
||||||
groups = {snappy = 1, choppy = 2, oddly_breakable_by_hand = 2, flammable = 3, bed = 2},
|
groups = {snappy = 1, choppy = 2, oddly_breakable_by_hand = 2, flammable = 3, bed = 2},
|
||||||
sounds = default.node_sound_wood_defaults(),
|
sounds = default.node_sound_wood_defaults(),
|
||||||
|
drop = name .. "_bottom",
|
||||||
node_box = {
|
node_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = def.nodebox.top,
|
fixed = def.nodebox.top,
|
||||||
},
|
},
|
||||||
|
on_destruct = function(pos)
|
||||||
|
destruct_bed(pos, 2)
|
||||||
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_alias(name, name .. "_bottom")
|
minetest.register_alias(name, name .. "_bottom")
|
||||||
|
@ -5,7 +5,7 @@ bones = {}
|
|||||||
|
|
||||||
local function is_owner(pos, name)
|
local function is_owner(pos, name)
|
||||||
local owner = minetest.get_meta(pos):get_string("owner")
|
local owner = minetest.get_meta(pos):get_string("owner")
|
||||||
if owner == "" or owner == name or minetest.check_player_privs(placer, "protection_bypass") then
|
if owner == "" or owner == name or minetest.check_player_privs(name, "protection_bypass") then
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
return false
|
return false
|
||||||
|
@ -178,6 +178,7 @@ Gambit (WTFPL):
|
|||||||
default_diamond_block.png
|
default_diamond_block.png
|
||||||
default_ladder_steel.png
|
default_ladder_steel.png
|
||||||
default_sign_wall_wood.png
|
default_sign_wall_wood.png
|
||||||
|
default_flint.png
|
||||||
|
|
||||||
asl97 (WTFPL):
|
asl97 (WTFPL):
|
||||||
default_ice.png
|
default_ice.png
|
||||||
|
@ -190,3 +190,9 @@ minetest.register_craftitem("default:obsidian_shard", {
|
|||||||
description = "Obsidian Shard",
|
description = "Obsidian Shard",
|
||||||
inventory_image = "default_obsidian_shard.png",
|
inventory_image = "default_obsidian_shard.png",
|
||||||
})
|
})
|
||||||
|
|
||||||
|
minetest.register_craftitem("default:flint", {
|
||||||
|
description = "Flint",
|
||||||
|
inventory_image = "default_flint.png"
|
||||||
|
})
|
||||||
|
|
||||||
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.7 KiB |
@ -353,9 +353,15 @@ minetest.register_node("default:gravel", {
|
|||||||
footstep = {name = "default_gravel_footstep", gain = 0.5},
|
footstep = {name = "default_gravel_footstep", gain = 0.5},
|
||||||
dug = {name = "default_gravel_footstep", gain = 1.0},
|
dug = {name = "default_gravel_footstep", gain = 1.0},
|
||||||
}),
|
}),
|
||||||
|
drop = {
|
||||||
|
max_items = 1,
|
||||||
|
items = {
|
||||||
|
{items = {'default:flint'}, rarity = 16},
|
||||||
|
{items = {'default:gravel'}}
|
||||||
|
}
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
minetest.register_node("default:clay", {
|
minetest.register_node("default:clay", {
|
||||||
description = "Clay",
|
description = "Clay",
|
||||||
tiles = {"default_clay.png"},
|
tiles = {"default_clay.png"},
|
||||||
|
Before Width: | Height: | Size: 235 B After Width: | Height: | Size: 280 B |
BIN
mods/default/textures/default_flint.png
Normal file
After Width: | Height: | Size: 3.0 KiB |
@ -75,4 +75,7 @@ fencegate_open.ogg:
|
|||||||
fencegate_close.ogg:
|
fencegate_close.ogg:
|
||||||
http://www.freesound.org/people/BarkersPinhead/sounds/274807/ - CC-BY-3.0
|
http://www.freesound.org/people/BarkersPinhead/sounds/274807/ - CC-BY-3.0
|
||||||
http://www.freesound.org/people/rivernile7/sounds/249573/ - CC-BY-3.0
|
http://www.freesound.org/people/rivernile7/sounds/249573/ - CC-BY-3.0
|
||||||
|
Steel door sounds (open & close (CC-BY-3.0) by HazMatt
|
||||||
|
- http://www.freesound.org/people/HazMattt/sounds/187283/
|
||||||
|
doors_steel_door_open.ogg
|
||||||
|
doors_steel_door_close.ogg
|
||||||
|
@ -287,6 +287,9 @@ function doors.register(name, def)
|
|||||||
if not def.protected then
|
if not def.protected then
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
if minetest.check_player_privs(digger, "protection_bypass") then
|
||||||
|
return true
|
||||||
|
end
|
||||||
local meta = minetest.get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
local name = ""
|
local name = ""
|
||||||
if digger then
|
if digger then
|
||||||
@ -438,6 +441,8 @@ doors.register("door_steel", {
|
|||||||
inventory_image = "doors_item_steel.png",
|
inventory_image = "doors_item_steel.png",
|
||||||
protected = true,
|
protected = true,
|
||||||
groups = { snappy = 1, bendy = 2, cracky = 1, melty = 2, level = 2 },
|
groups = { snappy = 1, bendy = 2, cracky = 1, melty = 2, level = 2 },
|
||||||
|
sound_open = "doors_steel_door_open",
|
||||||
|
sound_close = "doors_steel_door_close",
|
||||||
recipe = {
|
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"},
|
||||||
@ -628,6 +633,8 @@ doors.register_trapdoor("doors:trapdoor_steel", {
|
|||||||
tile_front = "doors_trapdoor_steel.png",
|
tile_front = "doors_trapdoor_steel.png",
|
||||||
tile_side = "doors_trapdoor_steel_side.png",
|
tile_side = "doors_trapdoor_steel_side.png",
|
||||||
protected = true,
|
protected = true,
|
||||||
|
sound_open = "doors_steel_door_open",
|
||||||
|
sound_close = "doors_steel_door_close",
|
||||||
groups = {snappy=1, bendy=2, cracky=1, melty=2, level=2, door=1},
|
groups = {snappy=1, bendy=2, cracky=1, melty=2, level=2, door=1},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -3,21 +3,21 @@
|
|||||||
mtllib gate_closed.mtl
|
mtllib gate_closed.mtl
|
||||||
o Cube_Cube.001
|
o Cube_Cube.001
|
||||||
v -0.625000 -0.500000 0.125000
|
v -0.625000 -0.500000 0.125000
|
||||||
v -0.625000 0.500000 0.125000
|
v -0.625000 0.500100 0.125000
|
||||||
v -0.625000 -0.500000 -0.125000
|
v -0.625000 -0.500000 -0.125000
|
||||||
v -0.625000 0.500000 -0.125000
|
v -0.625000 0.500100 -0.125000
|
||||||
v -0.375000 -0.500000 0.125000
|
v -0.375000 -0.500000 0.125000
|
||||||
v -0.375000 0.500000 0.125000
|
v -0.375000 0.500100 0.125000
|
||||||
v -0.375000 -0.500000 -0.125000
|
v -0.375000 -0.500000 -0.125000
|
||||||
v -0.375000 0.500000 -0.125000
|
v -0.375000 0.500100 -0.125000
|
||||||
v 0.375000 -0.500000 0.125000
|
v 0.375000 -0.500000 0.125000
|
||||||
v 0.375000 0.500000 0.125000
|
v 0.375000 0.500100 0.125000
|
||||||
v 0.375000 -0.500000 -0.125000
|
v 0.375000 -0.500000 -0.125000
|
||||||
v 0.375000 0.500000 -0.125000
|
v 0.375000 0.500100 -0.125000
|
||||||
v 0.625000 -0.500000 0.125000
|
v 0.625000 -0.500000 0.125000
|
||||||
v 0.625000 0.500000 0.125000
|
v 0.625000 0.500100 0.125000
|
||||||
v 0.625000 -0.500000 -0.125000
|
v 0.625000 -0.500000 -0.125000
|
||||||
v 0.625000 0.500000 -0.125000
|
v 0.625000 0.500100 -0.125000
|
||||||
v -0.375000 0.187500 0.062500
|
v -0.375000 0.187500 0.062500
|
||||||
v -0.375000 0.312500 0.062500
|
v -0.375000 0.312500 0.062500
|
||||||
v -0.375000 0.187500 -0.062500
|
v -0.375000 0.187500 -0.062500
|
||||||
|
@ -3,21 +3,21 @@
|
|||||||
mtllib gate_open.mtl
|
mtllib gate_open.mtl
|
||||||
o Cube_Cube.001
|
o Cube_Cube.001
|
||||||
v -0.625000 -0.500000 0.125000
|
v -0.625000 -0.500000 0.125000
|
||||||
v -0.625000 0.500000 0.125000
|
v -0.625000 0.500100 0.125000
|
||||||
v -0.625000 -0.500000 -0.125000
|
v -0.625000 -0.500000 -0.125000
|
||||||
v -0.625000 0.500000 -0.125000
|
v -0.625000 0.500100 -0.125000
|
||||||
v -0.375000 -0.500000 0.125000
|
v -0.375000 -0.500000 0.125000
|
||||||
v -0.375000 0.500000 0.125000
|
v -0.375000 0.500100 0.125000
|
||||||
v -0.375000 -0.500000 -0.125000
|
v -0.375000 -0.500000 -0.125000
|
||||||
v -0.375000 0.500000 -0.125000
|
v -0.375000 0.500100 -0.125000
|
||||||
v 0.375000 -0.500000 0.125000
|
v 0.375000 -0.500000 0.125000
|
||||||
v 0.375000 0.500000 0.125000
|
v 0.375000 0.500100 0.125000
|
||||||
v 0.375000 -0.500000 -0.125000
|
v 0.375000 -0.500000 -0.125000
|
||||||
v 0.375000 0.500000 -0.125000
|
v 0.375000 0.500100 -0.125000
|
||||||
v 0.625000 -0.500000 0.125000
|
v 0.625000 -0.500000 0.125000
|
||||||
v 0.625000 0.500000 0.125000
|
v 0.625000 0.500100 0.125000
|
||||||
v 0.625000 -0.500000 -0.125000
|
v 0.625000 -0.500000 -0.125000
|
||||||
v 0.625000 0.500000 -0.125000
|
v 0.625000 0.500100 -0.125000
|
||||||
v 0.434859 0.187500 -0.872359
|
v 0.434859 0.187500 -0.872359
|
||||||
v 0.434859 0.312500 -0.872359
|
v 0.434859 0.312500 -0.872359
|
||||||
v 0.559859 0.187500 -0.872359
|
v 0.559859 0.187500 -0.872359
|
||||||
|
BIN
mods/doors/sounds/doors_steel_door_close.ogg
Normal file
BIN
mods/doors/sounds/doors_steel_door_open.ogg
Normal file
Before Width: | Height: | Size: 128 B After Width: | Height: | Size: 186 B |
Before Width: | Height: | Size: 130 B After Width: | Height: | Size: 186 B |
@ -30,3 +30,7 @@ fire_large.ogg sampled from:
|
|||||||
|
|
||||||
fire_basic_flame_animated.png:
|
fire_basic_flame_animated.png:
|
||||||
Muadtralk
|
Muadtralk
|
||||||
|
|
||||||
|
fire_flint_steel.png
|
||||||
|
Gambit (WTFPL)
|
||||||
|
|
||||||
|
@ -8,7 +8,6 @@ fire = {}
|
|||||||
-- Register flame nodes
|
-- Register flame nodes
|
||||||
|
|
||||||
minetest.register_node("fire:basic_flame", {
|
minetest.register_node("fire:basic_flame", {
|
||||||
description = "Basic Flame",
|
|
||||||
drawtype = "firelike",
|
drawtype = "firelike",
|
||||||
tiles = {
|
tiles = {
|
||||||
{
|
{
|
||||||
@ -28,7 +27,7 @@ minetest.register_node("fire:basic_flame", {
|
|||||||
buildable_to = true,
|
buildable_to = true,
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
damage_per_second = 4,
|
damage_per_second = 4,
|
||||||
groups = {igniter = 2, dig_immediate = 3},
|
groups = {igniter = 2, dig_immediate = 3, not_in_creative_inventory = 1},
|
||||||
drop = "",
|
drop = "",
|
||||||
|
|
||||||
on_construct = function(pos)
|
on_construct = function(pos)
|
||||||
@ -71,6 +70,34 @@ minetest.register_node("fire:permanent_flame", {
|
|||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
minetest.register_tool("fire:flint_and_steel", {
|
||||||
|
description = "Flint and Steel",
|
||||||
|
inventory_image = "fire_flint_steel.png",
|
||||||
|
on_use = function(itemstack, user, pointed_thing)
|
||||||
|
local player_name = user:get_player_name()
|
||||||
|
local pt = pointed_thing
|
||||||
|
|
||||||
|
if pt.type == "node" and minetest.get_node(pt.above).name == "air" then
|
||||||
|
if not minetest.is_protected(pt.above, player_name) then
|
||||||
|
minetest.set_node(pt.above, {name="fire:basic_flame"})
|
||||||
|
else
|
||||||
|
minetest.chat_send_player(player_name, "This area is protected")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if not minetest.setting_getbool("creative_mode") then
|
||||||
|
itemstack:add_wear(1000)
|
||||||
|
return itemstack
|
||||||
|
end
|
||||||
|
end
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = "fire:flint_and_steel",
|
||||||
|
recipe = {
|
||||||
|
{"default:flint", "default:steel_ingot"}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
-- Get sound area of position
|
-- Get sound area of position
|
||||||
|
|
||||||
@ -227,14 +254,13 @@ else
|
|||||||
catch_up = false,
|
catch_up = false,
|
||||||
action = function(p0, node, _, _)
|
action = function(p0, node, _, _)
|
||||||
-- If there are no flammable nodes around flame, remove flame
|
-- If there are no flammable nodes around flame, remove flame
|
||||||
if not minetest.find_node_near(p0, 1, {"group:flammable"}) then
|
local p = minetest.find_node_near(p0, 1, {"group:flammable"})
|
||||||
|
if not p then
|
||||||
minetest.remove_node(p0)
|
minetest.remove_node(p0)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
if math.random(1, 4) == 1 then
|
if math.random(1, 4) == 1 then
|
||||||
-- remove flammable nodes around flame
|
-- remove flammable nodes around flame
|
||||||
local p = minetest.find_node_near(p0, 1, {"group:flammable"})
|
|
||||||
if p then
|
|
||||||
local node = minetest.get_node(p)
|
local node = minetest.get_node(p)
|
||||||
local def = minetest.registered_nodes[node.name]
|
local def = minetest.registered_nodes[node.name]
|
||||||
if def.on_burn then
|
if def.on_burn then
|
||||||
@ -244,7 +270,6 @@ else
|
|||||||
nodeupdate(p)
|
nodeupdate(p)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
BIN
mods/fire/textures/fire_flint_steel.png
Normal file
After Width: | Height: | Size: 3.0 KiB |
@ -29,7 +29,7 @@ walls.register = function(wall_name, wall_desc, wall_texture, wall_mat, wall_sou
|
|||||||
connect_back = {{-3/16, -1/2, 1/4, 3/16, 3/8, 1/2}},
|
connect_back = {{-3/16, -1/2, 1/4, 3/16, 3/8, 1/2}},
|
||||||
connect_right = {{ 1/4, -1/2, -3/16, 1/2, 3/8, 3/16}},
|
connect_right = {{ 1/4, -1/2, -3/16, 1/2, 3/8, 3/16}},
|
||||||
},
|
},
|
||||||
connects_to = { "group:cracky", "group:wall", "group:stone" },
|
connects_to = { "group:wall", "group:stone" },
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
tiles = { wall_texture, },
|
tiles = { wall_texture, },
|
||||||
|