From 731cc4e82e650fa7ffb497fb9d0496bc874a3b73 Mon Sep 17 00:00:00 2001 From: Ombridride Date: Tue, 3 Mar 2015 21:01:25 +0100 Subject: [PATCH] Delete old beds mod and add new beds mod (from mt_game) --- .../mods}/beds/Changelog.txt | 4 + .../mods}/beds/README.txt | 6 +- minetestforfun_game/mods/beds/api.lua | 78 +++++++ minetestforfun_game/mods/beds/beds.lua | 87 ++++++++ .../mods}/beds/depends.txt | 2 +- .../mods/beds/functions.lua | 32 +-- minetestforfun_game/mods/beds/init.lua | 16 ++ .../mods}/beds/spawns.lua | 24 +-- .../mods}/beds/textures/beds_bed.png | Bin .../mods}/beds/textures/beds_bed_fancy.png | Bin .../mods}/beds/textures/beds_bed_foot.png | Bin .../mods}/beds/textures/beds_bed_head.png | Bin .../mods}/beds/textures/beds_bed_side1.png | Bin .../mods}/beds/textures/beds_bed_side2.png | Bin .../beds/textures/beds_bed_side_bottom.png | Bin .../beds/textures/beds_bed_side_bottom_r.png | Bin .../mods}/beds/textures/beds_bed_side_top.png | Bin .../beds/textures/beds_bed_side_top_r.png | Bin .../mods}/beds/textures/beds_bed_top1.png | Bin .../mods}/beds/textures/beds_bed_top2.png | Bin .../beds/textures/beds_bed_top_bottom.png | Bin .../mods}/beds/textures/beds_bed_top_top.png | Bin .../mods}/beds/textures/beds_transparent.png | Bin mods/beds/nodes.lua | 195 ------------------ worlds/minetestforfun/world.mt | 1 - 25 files changed, 209 insertions(+), 236 deletions(-) rename {mods => minetestforfun_game/mods}/beds/Changelog.txt (82%) rename {mods => minetestforfun_game/mods}/beds/README.txt (94%) create mode 100755 minetestforfun_game/mods/beds/api.lua create mode 100755 minetestforfun_game/mods/beds/beds.lua rename {mods => minetestforfun_game/mods}/beds/depends.txt (61%) rename mods/beds/init.lua => minetestforfun_game/mods/beds/functions.lua (88%) create mode 100755 minetestforfun_game/mods/beds/init.lua rename {mods => minetestforfun_game/mods}/beds/spawns.lua (78%) rename {mods => minetestforfun_game/mods}/beds/textures/beds_bed.png (100%) rename {mods => minetestforfun_game/mods}/beds/textures/beds_bed_fancy.png (100%) rename {mods => minetestforfun_game/mods}/beds/textures/beds_bed_foot.png (100%) rename {mods => minetestforfun_game/mods}/beds/textures/beds_bed_head.png (100%) rename {mods => minetestforfun_game/mods}/beds/textures/beds_bed_side1.png (100%) rename {mods => minetestforfun_game/mods}/beds/textures/beds_bed_side2.png (100%) rename {mods => minetestforfun_game/mods}/beds/textures/beds_bed_side_bottom.png (100%) rename {mods => minetestforfun_game/mods}/beds/textures/beds_bed_side_bottom_r.png (100%) rename {mods => minetestforfun_game/mods}/beds/textures/beds_bed_side_top.png (100%) rename {mods => minetestforfun_game/mods}/beds/textures/beds_bed_side_top_r.png (100%) rename {mods => minetestforfun_game/mods}/beds/textures/beds_bed_top1.png (100%) rename {mods => minetestforfun_game/mods}/beds/textures/beds_bed_top2.png (100%) rename {mods => minetestforfun_game/mods}/beds/textures/beds_bed_top_bottom.png (100%) rename {mods => minetestforfun_game/mods}/beds/textures/beds_bed_top_top.png (100%) rename {mods => minetestforfun_game/mods}/beds/textures/beds_transparent.png (100%) delete mode 100755 mods/beds/nodes.lua diff --git a/mods/beds/Changelog.txt b/minetestforfun_game/mods/beds/Changelog.txt similarity index 82% rename from mods/beds/Changelog.txt rename to minetestforfun_game/mods/beds/Changelog.txt index be97d522..988db2af 100755 --- a/mods/beds/Changelog.txt +++ b/minetestforfun_game/mods/beds/Changelog.txt @@ -12,3 +12,7 @@ - Allow players always to detach from bed (by donat-b) - If more than 50% of players want sleep they can skip the night - Don't show sleep dialog in singleplayer + +1.1.1 +----- +- Prevent possbile crash by trying to reposition leaving players diff --git a/mods/beds/README.txt b/minetestforfun_game/mods/beds/README.txt similarity index 94% rename from mods/beds/README.txt rename to minetestforfun_game/mods/beds/README.txt index eac46f0a..20893b81 100755 --- a/mods/beds/README.txt +++ b/minetestforfun_game/mods/beds/README.txt @@ -1,8 +1,8 @@ Minetest mod "Beds" =================== -by BlockMen (c) 2014 +by BlockMen (c) 2014-2015 -Version: 1.1 +Version: 1.1.1 About ~~~~~ @@ -34,7 +34,7 @@ Notice: You can use any color of wood or wool, mixing different is also possible License of source code, textures: WTFPL --------------------------------------- -(c) Copyright BlockMen (2014) +(c) Copyright BlockMen (2014-2015) diff --git a/minetestforfun_game/mods/beds/api.lua b/minetestforfun_game/mods/beds/api.lua new file mode 100755 index 00000000..320fcfb3 --- /dev/null +++ b/minetestforfun_game/mods/beds/api.lua @@ -0,0 +1,78 @@ +function beds.register_bed(name, def) + minetest.register_node(name .. "_bottom", { + description = def.description, + inventory_image = def.inventory_image, + wield_image = def.wield_image, + drawtype = "nodebox", + tiles = def.tiles.bottom, + paramtype = "light", + paramtype2 = "facedir", + stack_max = 1, + groups = {snappy = 1, choppy = 2, oddly_breakable_by_hand = 2, flammable = 3, bed = 1}, + sounds = default.node_sound_wood_defaults(), + node_box = { + type = "fixed", + fixed = def.nodebox.bottom, + }, + selection_box = { + type = "fixed", + fixed = def.selectionbox, + + }, + after_place_node = function(pos, placer, itemstack) + local n = minetest.get_node_or_nil(pos) + if not n or not n.param2 then + minetest.remove_node(pos) + return true + end + local dir = minetest.facedir_to_dir(n.param2) + local p = {x=pos.x+dir.x,y=pos.y,z=pos.z+dir.z} + local n2 = minetest.get_node_or_nil(p) + local def = minetest.registered_items[n2.name] or nil + if not n2 or not def or not def.buildable_to then + minetest.remove_node(pos) + return true + end + minetest.set_node(p, {name = n.name:gsub("%_bottom", "_top"), param2 = n.param2}) + return false + 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 = {x=pos.x+dir.x,y=pos.y,z=pos.z+dir.z} + 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, + on_rightclick = function(pos, node, clicker) + beds.on_rightclick(pos, clicker) + end, + }) + + minetest.register_node(name .. "_top", { + drawtype = "nodebox", + tiles = def.tiles.top, + paramtype = "light", + paramtype2 = "facedir", + groups = {snappy = 1, choppy = 2, oddly_breakable_by_hand = 2, flammable = 3, bed = 2}, + sounds = default.node_sound_wood_defaults(), + node_box = { + type = "fixed", + fixed = def.nodebox.top, + }, + selection_box = { + type = "fixed", + fixed = {0, 0, 0, 0, 0, 0}, + }, + }) + + minetest.register_alias(name, name .. "_bottom") + + -- register recipe + minetest.register_craft({ + output = name, + recipe = def.recipe + }) +end diff --git a/minetestforfun_game/mods/beds/beds.lua b/minetestforfun_game/mods/beds/beds.lua new file mode 100755 index 00000000..acff444c --- /dev/null +++ b/minetestforfun_game/mods/beds/beds.lua @@ -0,0 +1,87 @@ +-- fancy shaped bed +beds.register_bed("beds:fancy_bed", { + description = "Fancy Bed", + inventory_image = "beds_bed_fancy.png", + wield_image = "beds_bed_fancy.png", + tiles = { + bottom = { + "beds_bed_top1.png", + "default_wood.png", + "beds_bed_side1.png", + "beds_bed_side1.png^[transformFX", + "default_wood.png", + "beds_bed_foot.png", + }, + top = { + "beds_bed_top2.png", + "default_wood.png", + "beds_bed_side2.png", + "beds_bed_side2.png^[transformFX", + "beds_bed_head.png", + "default_wood.png", + } + }, + nodebox = { + bottom = { + {-0.5, -0.5, -0.5, -0.375, -0.065, -0.4375}, + {0.375, -0.5, -0.5, 0.5, -0.065, -0.4375}, + {-0.5, -0.375, -0.5, 0.5, -0.125, -0.4375}, + {-0.5, -0.375, -0.5, -0.4375, -0.125, 0.5}, + {0.4375, -0.375, -0.5, 0.5, -0.125, 0.5}, + {-0.4375, -0.3125, -0.4375, 0.4375, -0.0625, 0.5}, + }, + top = { + {-0.5, -0.5, 0.4375, -0.375, 0.1875, 0.5}, + {0.375, -0.5, 0.4375, 0.5, 0.1875, 0.5}, + {-0.5, 0, 0.4375, 0.5, 0.125, 0.5}, + {-0.5, -0.375, 0.4375, 0.5, -0.125, 0.5}, + {-0.5, -0.375, -0.5, -0.4375, -0.125, 0.5}, + {0.4375, -0.375, -0.5, 0.5, -0.125, 0.5}, + {-0.4375, -0.3125, -0.5, 0.4375, -0.0625, 0.4375}, + } + }, + selectionbox = {-0.5, -0.5, -0.5, 0.5, 0.06, 1.5}, + recipe = { + {"wool:red", "wool:white", "group:stick"}, + {"group:wood", "group:wood", "group:wood"}, + }, +}) + +-- simple shaped bed +beds.register_bed("beds:bed", { + description = "Simple Bed", + inventory_image = "beds_bed.png", + wield_image = "beds_bed.png", + tiles = { + bottom = { + "beds_bed_top_bottom.png^[transformR90", + "default_wood.png", + "beds_bed_side_bottom_r.png", + "beds_bed_side_bottom_r.png^[transformfx", + "beds_transparent.png", + "beds_bed_side_bottom.png" + }, + top = { + "beds_bed_top_top.png^[transformR90", + "default_wood.png", + "beds_bed_side_top_r.png", + "beds_bed_side_top_r.png^[transformfx", + "beds_bed_side_top.png", + "beds_transparent.png", + } + }, + nodebox = { + bottom = {-0.5, -0.5, -0.5, 0.5, 0.06, 0.5}, + top = {-0.5, -0.5, -0.5, 0.5, 0.06, 0.5}, + }, + selectionbox = {-0.5, -0.5, -0.5, 0.5, 0.06, 1.5}, + recipe = { + {"wool:red", "wool:red", "wool:white"}, + {"group:wood", "group:wood", "group:wood"} + }, + +}) + +-- aliases for PA's beds mod +minetest.register_alias("beds:bed_bottom_red", "beds:bed_bottom") +minetest.register_alias("beds:bed_top_red", "beds:bed_top") diff --git a/mods/beds/depends.txt b/minetestforfun_game/mods/beds/depends.txt similarity index 61% rename from mods/beds/depends.txt rename to minetestforfun_game/mods/beds/depends.txt index be420a35..470ec30b 100755 --- a/mods/beds/depends.txt +++ b/minetestforfun_game/mods/beds/depends.txt @@ -1,2 +1,2 @@ default -wool \ No newline at end of file +wool diff --git a/mods/beds/init.lua b/minetestforfun_game/mods/beds/functions.lua similarity index 88% rename from mods/beds/init.lua rename to minetestforfun_game/mods/beds/functions.lua index ef3f7655..ea3d3af8 100755 --- a/mods/beds/init.lua +++ b/minetestforfun_game/mods/beds/functions.lua @@ -1,16 +1,8 @@ -beds = {} -beds.player = {} -beds.pos = {} -beds.spawn = {} - -local is_sp = minetest.is_singleplayer() or false local player_in_bed = 0 -local form = "size[8,15;true]".. - "bgcolor[#080808BB; true]".. - "button_exit[2,12;4,0.75;leave;Leave Bed]" +local is_sp = minetest.is_singleplayer() --- help functions +-- helper functions local function get_look_yaw(pos) local n = minetest.get_node(pos) @@ -25,7 +17,6 @@ local function get_look_yaw(pos) end end - local function check_in_beds(players) local in_bed = beds.player if not players then @@ -42,7 +33,7 @@ local function check_in_beds(players) return true end -local function lay_down(player, pos, bed_pos, state) +local function lay_down(player, pos, bed_pos, state, skip) local name = player:get_player_name() local hud_flags = player:hud_get_flags() @@ -57,6 +48,10 @@ local function lay_down(player, pos, bed_pos, state) beds.player[name] = nil player_in_bed = player_in_bed - 1 end + -- skip here to prevent sending player specific changes (used for leaving players) + if skip then + return + end if p then player:setpos(p) end @@ -97,10 +92,10 @@ local function update_formspecs(finished) local is_majority = (ges/2) < player_in_bed if finished then - form_n = form .. + form_n = beds.formspec .. "label[2.7,11; Good morning.]" else - form_n = form .. + form_n = beds.formspec .. "label[2.2,11;"..tostring(player_in_bed).." of "..tostring(ges).." players are in bed]" if is_majority then form_n = form_n .. @@ -152,7 +147,7 @@ function beds.on_rightclick(pos, player) update_formspecs(false) end - -- skip the night and let all stand up + -- skip the night and let all players stand up if check_in_beds() then minetest.after(2, function() beds.skip_night() @@ -182,7 +177,7 @@ end) minetest.register_on_leaveplayer(function(player) local name = player:get_player_name() - lay_down(player, nil, nil, false) + lay_down(player, nil, nil, false, true) beds.player[name] = nil if check_in_beds() then minetest.after(2, function() @@ -208,8 +203,3 @@ minetest.register_on_player_receive_fields(function(player, formname, fields) beds.kick_players() end end) - - --- nodes and respawn function -dofile(minetest.get_modpath("beds").."/nodes.lua") -dofile(minetest.get_modpath("beds").."/spawns.lua") diff --git a/minetestforfun_game/mods/beds/init.lua b/minetestforfun_game/mods/beds/init.lua new file mode 100755 index 00000000..09982c24 --- /dev/null +++ b/minetestforfun_game/mods/beds/init.lua @@ -0,0 +1,16 @@ +beds = {} +beds.player = {} +beds.pos = {} +beds.spawn = {} + +beds.formspec = "size[8,15;true]".. + "bgcolor[#080808BB; true]".. + "button_exit[2,12;4,0.75;leave;Leave Bed]" + +local modpath = minetest.get_modpath("beds") + +-- load files +dofile(modpath.."/functions.lua") +dofile(modpath.."/api.lua") +dofile(modpath.."/beds.lua") +dofile(modpath.."/spawns.lua") diff --git a/mods/beds/spawns.lua b/minetestforfun_game/mods/beds/spawns.lua similarity index 78% rename from mods/beds/spawns.lua rename to minetestforfun_game/mods/beds/spawns.lua index 63f55faf..39da21c2 100755 --- a/mods/beds/spawns.lua +++ b/minetestforfun_game/mods/beds/spawns.lua @@ -2,7 +2,6 @@ local world_path = minetest.get_worldpath() local org_file = world_path .. "/beds_spawns" local file = world_path .. "/beds_spawns" local bkwd = false -local writing = true -- check for PA's beds mod spawns local cf = io.open(world_path .. "/beds_player_spawns", "r") @@ -11,25 +10,20 @@ if cf ~= nil then file = world_path .. "/beds_player_spawns" bkwd = true end -writing = false - function beds.read_spawns() - while writing do - -- wait until spawns are safed - end local spawns = beds.spawn local input = io.open(file, "r") if input and not bkwd then repeat - local x = input:read("*n") - if x == nil then - break - end - local y = input:read("*n") - local z = input:read("*n") - local name = input:read("*l") - spawns[name:sub(2)] = {x = x, y = y, z = z} + local x = input:read("*n") + if x == nil then + break + end + local y = input:read("*n") + local z = input:read("*n") + local name = input:read("*l") + spawns[name:sub(2)] = {x = x, y = y, z = z} until input:read(0) == nil io.close(input) elseif input and bkwd then @@ -63,4 +57,4 @@ function beds.set_spawns() beds.spawn[name] = p end beds.save_spawns() -end \ No newline at end of file +end diff --git a/mods/beds/textures/beds_bed.png b/minetestforfun_game/mods/beds/textures/beds_bed.png similarity index 100% rename from mods/beds/textures/beds_bed.png rename to minetestforfun_game/mods/beds/textures/beds_bed.png diff --git a/mods/beds/textures/beds_bed_fancy.png b/minetestforfun_game/mods/beds/textures/beds_bed_fancy.png similarity index 100% rename from mods/beds/textures/beds_bed_fancy.png rename to minetestforfun_game/mods/beds/textures/beds_bed_fancy.png diff --git a/mods/beds/textures/beds_bed_foot.png b/minetestforfun_game/mods/beds/textures/beds_bed_foot.png similarity index 100% rename from mods/beds/textures/beds_bed_foot.png rename to minetestforfun_game/mods/beds/textures/beds_bed_foot.png diff --git a/mods/beds/textures/beds_bed_head.png b/minetestforfun_game/mods/beds/textures/beds_bed_head.png similarity index 100% rename from mods/beds/textures/beds_bed_head.png rename to minetestforfun_game/mods/beds/textures/beds_bed_head.png diff --git a/mods/beds/textures/beds_bed_side1.png b/minetestforfun_game/mods/beds/textures/beds_bed_side1.png similarity index 100% rename from mods/beds/textures/beds_bed_side1.png rename to minetestforfun_game/mods/beds/textures/beds_bed_side1.png diff --git a/mods/beds/textures/beds_bed_side2.png b/minetestforfun_game/mods/beds/textures/beds_bed_side2.png similarity index 100% rename from mods/beds/textures/beds_bed_side2.png rename to minetestforfun_game/mods/beds/textures/beds_bed_side2.png diff --git a/mods/beds/textures/beds_bed_side_bottom.png b/minetestforfun_game/mods/beds/textures/beds_bed_side_bottom.png similarity index 100% rename from mods/beds/textures/beds_bed_side_bottom.png rename to minetestforfun_game/mods/beds/textures/beds_bed_side_bottom.png diff --git a/mods/beds/textures/beds_bed_side_bottom_r.png b/minetestforfun_game/mods/beds/textures/beds_bed_side_bottom_r.png similarity index 100% rename from mods/beds/textures/beds_bed_side_bottom_r.png rename to minetestforfun_game/mods/beds/textures/beds_bed_side_bottom_r.png diff --git a/mods/beds/textures/beds_bed_side_top.png b/minetestforfun_game/mods/beds/textures/beds_bed_side_top.png similarity index 100% rename from mods/beds/textures/beds_bed_side_top.png rename to minetestforfun_game/mods/beds/textures/beds_bed_side_top.png diff --git a/mods/beds/textures/beds_bed_side_top_r.png b/minetestforfun_game/mods/beds/textures/beds_bed_side_top_r.png similarity index 100% rename from mods/beds/textures/beds_bed_side_top_r.png rename to minetestforfun_game/mods/beds/textures/beds_bed_side_top_r.png diff --git a/mods/beds/textures/beds_bed_top1.png b/minetestforfun_game/mods/beds/textures/beds_bed_top1.png similarity index 100% rename from mods/beds/textures/beds_bed_top1.png rename to minetestforfun_game/mods/beds/textures/beds_bed_top1.png diff --git a/mods/beds/textures/beds_bed_top2.png b/minetestforfun_game/mods/beds/textures/beds_bed_top2.png similarity index 100% rename from mods/beds/textures/beds_bed_top2.png rename to minetestforfun_game/mods/beds/textures/beds_bed_top2.png diff --git a/mods/beds/textures/beds_bed_top_bottom.png b/minetestforfun_game/mods/beds/textures/beds_bed_top_bottom.png similarity index 100% rename from mods/beds/textures/beds_bed_top_bottom.png rename to minetestforfun_game/mods/beds/textures/beds_bed_top_bottom.png diff --git a/mods/beds/textures/beds_bed_top_top.png b/minetestforfun_game/mods/beds/textures/beds_bed_top_top.png similarity index 100% rename from mods/beds/textures/beds_bed_top_top.png rename to minetestforfun_game/mods/beds/textures/beds_bed_top_top.png diff --git a/mods/beds/textures/beds_transparent.png b/minetestforfun_game/mods/beds/textures/beds_transparent.png similarity index 100% rename from mods/beds/textures/beds_transparent.png rename to minetestforfun_game/mods/beds/textures/beds_transparent.png diff --git a/mods/beds/nodes.lua b/mods/beds/nodes.lua deleted file mode 100755 index 98a7d94d..00000000 --- a/mods/beds/nodes.lua +++ /dev/null @@ -1,195 +0,0 @@ --- help functions - -local function remove_top(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 = {x=pos.x+dir.x,y=pos.y,z=pos.z+dir.z} - 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 - -local function add_top(pos) - local n = minetest.get_node_or_nil(pos) - if not n or not n.param2 then - minetest.remove_node(pos) - return true - end - local dir = minetest.facedir_to_dir(n.param2) - local p = {x=pos.x+dir.x,y=pos.y,z=pos.z+dir.z} - local n2 = minetest.get_node_or_nil(p) - local def = minetest.registered_items[n2.name] or nil - if not n2 or not def or not def.buildable_to then - minetest.remove_node(pos) - return true - end - minetest.set_node(p, {name = n.name:gsub("%_bottom", "_top"), param2 = n.param2}) - return false -end - - --- register nodes -function beds.register_bed(name, def) - minetest.register_node(name .. "_bottom", { - description = def.description, - inventory_image = def.inventory_image, - wield_image = def.wield_image, - drawtype = "nodebox", - tiles = def.tiles.bottom, - paramtype = "light", - paramtype2 = "facedir", - stack_max = 1, - groups = {snappy = 1, choppy = 2, oddly_breakable_by_hand = 2, flammable = 3, bed = 1}, - sounds = default.node_sound_wood_defaults(), - node_box = { - type = "fixed", - fixed = def.nodebox.bottom, - }, - selection_box = { - type = "fixed", - fixed = def.selectionbox, - - }, - after_place_node = function(pos, placer, itemstack) - return add_top(pos) - end, - on_destruct = function(pos) - remove_top(pos) - end, - on_rightclick = function(pos, node, clicker) - beds.on_rightclick(pos, clicker) - end, - }) - - minetest.register_node(name .. "_top", { - drawtype = "nodebox", - tiles = def.tiles.top, - paramtype = "light", - paramtype2 = "facedir", - groups = {snappy = 1, choppy = 2, oddly_breakable_by_hand = 2, flammable = 3, bed = 2}, - sounds = default.node_sound_wood_defaults(), - node_box = { - type = "fixed", - fixed = def.nodebox.top, - }, - selection_box = { - type = "fixed", - fixed = {0, 0, 0, 0, 0, 0}, - }, - }) - - minetest.register_alias(name, name .. "_bottom") - - -- register recipe - minetest.register_craft({ - output = name, - recipe = def.recipe - }) -end - --- fancy shaped -beds.register_bed("beds:fancy_bed", { - description = "Fancy Bed", - inventory_image = "beds_bed_fancy.png", - wield_image = "beds_bed_fancy.png", - tiles = { - bottom = { - "beds_bed_top1.png", - "default_wood.png", - "beds_bed_side1.png", - "beds_bed_side1.png^[transformFX", - "default_wood.png", - "beds_bed_foot.png", - }, - top = { - "beds_bed_top2.png", - "default_wood.png", - "beds_bed_side2.png", - "beds_bed_side2.png^[transformFX", - "beds_bed_head.png", - "default_wood.png", - } - }, - nodebox = { - bottom = { - {-0.5, -0.5, -0.5, -0.375, -0.065, -0.4375}, - {0.375, -0.5, -0.5, 0.5, -0.065, -0.4375}, - {-0.5, -0.375, -0.5, 0.5, -0.125, -0.4375}, - {-0.5, -0.375, -0.5, -0.4375, -0.125, 0.5}, - {0.4375, -0.375, -0.5, 0.5, -0.125, 0.5}, - {-0.4375, -0.3125, -0.4375, 0.4375, -0.0625, 0.5}, - }, - top = { - {-0.5, -0.5, 0.4375, -0.375, 0.1875, 0.5}, - {0.375, -0.5, 0.4375, 0.5, 0.1875, 0.5}, - {-0.5, 0, 0.4375, 0.5, 0.125, 0.5}, - {-0.5, -0.375, 0.4375, 0.5, -0.125, 0.5}, - {-0.5, -0.375, -0.5, -0.4375, -0.125, 0.5}, - {0.4375, -0.375, -0.5, 0.5, -0.125, 0.5}, - {-0.4375, -0.3125, -0.5, 0.4375, -0.0625, 0.4375}, - } - }, - selectionbox = {-0.5, -0.5, -0.5, 0.5, 0.06, 1.5}, - recipe = { - {"group:wool", "group:wool", "group:stick"}, - {"group:wood", "group:wood", "group:wood"}, - }, -}) - --- simple (default) -beds.register_bed("beds:bed", { - description = "Simple Bed", - inventory_image = "beds_bed.png", - wield_image = "beds_bed.png", - tiles = { - bottom = { - "beds_bed_top_bottom.png^[transformR90", - "default_wood.png", - "beds_bed_side_bottom_r.png", - "beds_bed_side_bottom_r.png^[transformfx", - "beds_transparent.png", - "beds_bed_side_bottom.png" - }, - top = { - "beds_bed_top_top.png^[transformR90", - "default_wood.png", - "beds_bed_side_top_r.png", - "beds_bed_side_top_r.png^[transformfx", - "beds_bed_side_top.png", - "beds_transparent.png", - } - }, - nodebox = { - bottom = {-0.5, -0.5, -0.5, 0.5, 0.06, 0.5}, - top = {-0.5, -0.5, -0.5, 0.5, 0.06, 0.5}, - }, - selectionbox = {-0.5, -0.5, -0.5, 0.5, 0.06, 1.5}, - recipe = { - {"group:wool", "group:wool", "group:wool"}, - {"group:wood", "group:wood", "group:wood"} - }, - -}) - --- aliases for PA's beds mod -minetest.register_alias("beds:bed_bottom_red", "beds:bed_bottom") -minetest.register_alias("beds:bed_bottom_orange", "beds:bed_bottom") -minetest.register_alias("beds:bed_bottom_yellow", "beds:bed_bottom") -minetest.register_alias("beds:bed_bottom_green", "beds:bed_bottom") -minetest.register_alias("beds:bed_bottom_blue", "beds:bed_bottom") -minetest.register_alias("beds:bed_bottom_violet", "beds:bed_bottom") -minetest.register_alias("beds:bed_bottom_black", "beds:bed_bottom") -minetest.register_alias("beds:bed_bottom_grey", "beds:bed_bottom") -minetest.register_alias("beds:bed_bottom_white", "beds:bed_bottom") - -minetest.register_alias("beds:bed_top_red", "beds:bed_top") -minetest.register_alias("beds:bed_top_orange", "beds:bed_top") -minetest.register_alias("beds:bed_top_yellow", "beds:bed_top") -minetest.register_alias("beds:bed_top_green", "beds:bed_top") -minetest.register_alias("beds:bed_top_blue", "beds:bed_top") -minetest.register_alias("beds:bed_top_violet", "beds:bed_top") -minetest.register_alias("beds:bed_top_black", "beds:bed_top") -minetest.register_alias("beds:bed_top_grey", "beds:bed_top") -minetest.register_alias("beds:bed_top_white", "beds:bed_top") diff --git a/worlds/minetestforfun/world.mt b/worlds/minetestforfun/world.mt index 282bf59a..15ce2824 100644 --- a/worlds/minetestforfun/world.mt +++ b/worlds/minetestforfun/world.mt @@ -35,7 +35,6 @@ load_mod_stained_glass = true load_mod_lavalamp = true load_mod_lantern = true load_mod_money = true -load_mod_beds = true load_mod_throwing = true load_mod_3d_armor = true load_mod_shields = true