Skip to content
Snippets Groups Projects
Commit 02c87c3b authored by Milan's avatar Milan
Browse files
parents 28976d3e d90a0817
No related branches found
No related tags found
No related merge requests found
Showing
with 113 additions and 40 deletions
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)
minetest.register_node(name .. "_bottom", {
description = def.description,
......@@ -39,14 +63,7 @@ function beds.register_bed(name, def)
end,
on_destruct = function(pos)
local n = minetest.get_node_or_nil(pos)
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
destruct_bed(pos, 1)
end,
on_rightclick = function(pos, node, clicker)
......@@ -95,10 +112,14 @@ function beds.register_bed(name, def)
pointable = false,
groups = {snappy = 1, choppy = 2, oddly_breakable_by_hand = 2, flammable = 3, bed = 2},
sounds = default.node_sound_wood_defaults(),
drop = name .. "_bottom",
node_box = {
type = "fixed",
fixed = def.nodebox.top,
},
on_destruct = function(pos)
destruct_bed(pos, 2)
end,
})
minetest.register_alias(name, name .. "_bottom")
......
......@@ -5,7 +5,7 @@ bones = {}
local function is_owner(pos, name)
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
end
return false
......
......@@ -178,6 +178,7 @@ Gambit (WTFPL):
default_diamond_block.png
default_ladder_steel.png
default_sign_wall_wood.png
default_flint.png
asl97 (WTFPL):
default_ice.png
......
......@@ -190,3 +190,9 @@ minetest.register_craftitem("default:obsidian_shard", {
description = "Obsidian Shard",
inventory_image = "default_obsidian_shard.png",
})
minetest.register_craftitem("default:flint", {
description = "Flint",
inventory_image = "default_flint.png"
})
No preview for this file type
......@@ -353,9 +353,15 @@ minetest.register_node("default:gravel", {
footstep = {name = "default_gravel_footstep", gain = 0.5},
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", {
description = "Clay",
tiles = {"default_clay.png"},
......
mods/default/textures/default_desert_cobble.png

235 B | W: | H:

mods/default/textures/default_desert_cobble.png

280 B | W: | H:

mods/default/textures/default_desert_cobble.png
mods/default/textures/default_desert_cobble.png
mods/default/textures/default_desert_cobble.png
mods/default/textures/default_desert_cobble.png
  • 2-up
  • Swipe
  • Onion skin
mods/default/textures/default_flint.png

2.97 KiB

......@@ -75,4 +75,7 @@ fencegate_open.ogg:
fencegate_close.ogg:
http://www.freesound.org/people/BarkersPinhead/sounds/274807/ - 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
return true
end
if minetest.check_player_privs(digger, "protection_bypass") then
return true
end
local meta = minetest.get_meta(pos)
local name = ""
if digger then
......@@ -438,6 +441,8 @@ doors.register("door_steel", {
inventory_image = "doors_item_steel.png",
protected = true,
groups = { snappy = 1, bendy = 2, cracky = 1, melty = 2, level = 2 },
sound_open = "doors_steel_door_open",
sound_close = "doors_steel_door_close",
recipe = {
{"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_side = "doors_trapdoor_steel_side.png",
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},
})
......
......@@ -3,21 +3,21 @@
mtllib gate_closed.mtl
o Cube_Cube.001
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.500100 -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.500100 -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.500100 -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.500100 -0.125000
v -0.375000 0.187500 0.062500
v -0.375000 0.312500 0.062500
v -0.375000 0.187500 -0.062500
......
......@@ -3,21 +3,21 @@
mtllib gate_open.mtl
o Cube_Cube.001
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.500100 -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.500100 -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.500100 -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.500100 -0.125000
v 0.434859 0.187500 -0.872359
v 0.434859 0.312500 -0.872359
v 0.559859 0.187500 -0.872359
......
File added
File added
mods/doors/textures/doors_item_glass.png

128 B | W: | H:

mods/doors/textures/doors_item_glass.png

186 B | W: | H:

mods/doors/textures/doors_item_glass.png
mods/doors/textures/doors_item_glass.png
mods/doors/textures/doors_item_glass.png
mods/doors/textures/doors_item_glass.png
  • 2-up
  • Swipe
  • Onion skin
mods/doors/textures/doors_item_obsidian_glass.png

130 B | W: | H:

mods/doors/textures/doors_item_obsidian_glass.png

186 B | W: | H:

mods/doors/textures/doors_item_obsidian_glass.png
mods/doors/textures/doors_item_obsidian_glass.png
mods/doors/textures/doors_item_obsidian_glass.png
mods/doors/textures/doors_item_obsidian_glass.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -30,3 +30,7 @@ fire_large.ogg sampled from:
fire_basic_flame_animated.png:
Muadtralk
fire_flint_steel.png
Gambit (WTFPL)
......@@ -8,7 +8,6 @@ fire = {}
-- Register flame nodes
minetest.register_node("fire:basic_flame", {
description = "Basic Flame",
drawtype = "firelike",
tiles = {
{
......@@ -28,7 +27,7 @@ minetest.register_node("fire:basic_flame", {
buildable_to = true,
sunlight_propagates = true,
damage_per_second = 4,
groups = {igniter = 2, dig_immediate = 3},
groups = {igniter = 2, dig_immediate = 3, not_in_creative_inventory = 1},
drop = "",
on_construct = function(pos)
......@@ -71,6 +70,34 @@ minetest.register_node("fire:permanent_flame", {
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
......@@ -227,22 +254,20 @@ else
catch_up = false,
action = function(p0, node, _, _)
-- 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)
return
end
if math.random(1, 4) == 1 then
-- 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 def = minetest.registered_nodes[node.name]
if def.on_burn then
def.on_burn(p)
else
minetest.remove_node(p)
nodeupdate(p)
end
local node = minetest.get_node(p)
local def = minetest.registered_nodes[node.name]
if def.on_burn then
def.on_burn(p)
else
minetest.remove_node(p)
nodeupdate(p)
end
end
end,
......
mods/fire/textures/fire_flint_steel.png

3.04 KiB

0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment