diff --git a/mods/beds/api.lua b/mods/beds/api.lua index 0c27c4e3..be3cb97e 100644 --- a/mods/beds/api.lua +++ b/mods/beds/api.lua @@ -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) 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") diff --git a/mods/bones/init.lua b/mods/bones/init.lua index 808233b6..32163d19 100644 --- a/mods/bones/init.lua +++ b/mods/bones/init.lua @@ -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 diff --git a/mods/default/README.txt b/mods/default/README.txt index 048b4c0a..975f58a1 100644 --- a/mods/default/README.txt +++ b/mods/default/README.txt @@ -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 diff --git a/mods/default/craftitems.lua b/mods/default/craftitems.lua index 09ebeccf..31d85c9b 100644 --- a/mods/default/craftitems.lua +++ b/mods/default/craftitems.lua @@ -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" +}) + diff --git a/mods/default/models/character.b3d b/mods/default/models/character.b3d index f411f471..0a0ca629 100644 Binary files a/mods/default/models/character.b3d and b/mods/default/models/character.b3d differ diff --git a/mods/default/textures/character.png b/mods/default/models/character.png similarity index 100% rename from mods/default/textures/character.png rename to mods/default/models/character.png diff --git a/mods/default/nodes.lua b/mods/default/nodes.lua index 50c33cd6..5a2e1a3d 100644 --- a/mods/default/nodes.lua +++ b/mods/default/nodes.lua @@ -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"}, diff --git a/mods/default/textures/default_desert_cobble.png b/mods/default/textures/default_desert_cobble.png index f914c987..184a9d88 100644 Binary files a/mods/default/textures/default_desert_cobble.png and b/mods/default/textures/default_desert_cobble.png differ diff --git a/mods/default/textures/default_flint.png b/mods/default/textures/default_flint.png new file mode 100644 index 00000000..3211db15 Binary files /dev/null and b/mods/default/textures/default_flint.png differ diff --git a/mods/doors/README.txt b/mods/doors/README.txt index deff667c..b1c1363e 100644 --- a/mods/doors/README.txt +++ b/mods/doors/README.txt @@ -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 diff --git a/mods/doors/init.lua b/mods/doors/init.lua index 9300e6ff..dd7ab726 100644 --- a/mods/doors/init.lua +++ b/mods/doors/init.lua @@ -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}, }) diff --git a/mods/doors/models/doors_fencegate_closed.obj b/mods/doors/models/doors_fencegate_closed.obj index 60eb4d74..0050f70e 100644 --- a/mods/doors/models/doors_fencegate_closed.obj +++ b/mods/doors/models/doors_fencegate_closed.obj @@ -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 diff --git a/mods/doors/models/doors_fencegate_open.obj b/mods/doors/models/doors_fencegate_open.obj index 6c6a9cf4..3fb727f4 100644 --- a/mods/doors/models/doors_fencegate_open.obj +++ b/mods/doors/models/doors_fencegate_open.obj @@ -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 diff --git a/mods/doors/sounds/doors_steel_door_close.ogg b/mods/doors/sounds/doors_steel_door_close.ogg new file mode 100644 index 00000000..aea7be67 Binary files /dev/null and b/mods/doors/sounds/doors_steel_door_close.ogg differ diff --git a/mods/doors/sounds/doors_steel_door_open.ogg b/mods/doors/sounds/doors_steel_door_open.ogg new file mode 100644 index 00000000..de874770 Binary files /dev/null and b/mods/doors/sounds/doors_steel_door_open.ogg differ diff --git a/mods/doors/textures/doors_item_glass.png b/mods/doors/textures/doors_item_glass.png index 49ec245c..791a58ab 100644 Binary files a/mods/doors/textures/doors_item_glass.png and b/mods/doors/textures/doors_item_glass.png differ diff --git a/mods/doors/textures/doors_item_obsidian_glass.png b/mods/doors/textures/doors_item_obsidian_glass.png index c3277204..1026d437 100644 Binary files a/mods/doors/textures/doors_item_obsidian_glass.png and b/mods/doors/textures/doors_item_obsidian_glass.png differ diff --git a/mods/fire/README.txt b/mods/fire/README.txt index bf143e5c..14022f03 100644 --- a/mods/fire/README.txt +++ b/mods/fire/README.txt @@ -30,3 +30,7 @@ fire_large.ogg sampled from: fire_basic_flame_animated.png: Muadtralk + +fire_flint_steel.png + Gambit (WTFPL) + diff --git a/mods/fire/init.lua b/mods/fire/init.lua index 28f68e98..1fc942b8 100644 --- a/mods/fire/init.lua +++ b/mods/fire/init.lua @@ -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, diff --git a/mods/fire/textures/fire_flint_steel.png b/mods/fire/textures/fire_flint_steel.png new file mode 100644 index 00000000..624f5565 Binary files /dev/null and b/mods/fire/textures/fire_flint_steel.png differ diff --git a/mods/walls/init.lua b/mods/walls/init.lua index e3c1d68f..0b51bdb0 100644 --- a/mods/walls/init.lua +++ b/mods/walls/init.lua @@ -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_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", is_ground_content = false, tiles = { wall_texture, },