summaryrefslogtreecommitdiff
path: root/homedecor
diff options
context:
space:
mode:
Diffstat (limited to 'homedecor')
-rw-r--r--homedecor/books.lua16
-rw-r--r--homedecor/crafts.lua4
-rw-r--r--homedecor/depends.txt1
-rw-r--r--homedecor/models/homedecor_block_with_overlay.obj44
-rw-r--r--homedecor/textures/homedecor_glowlight_cube_sides_ceiling.pngbin93 -> 0 bytes
-rw-r--r--homedecor/textures/homedecor_glowlight_cube_sides_ceiling_overlay.pngbin209 -> 0 bytes
6 files changed, 16 insertions, 49 deletions
diff --git a/homedecor/books.lua b/homedecor/books.lua
index a480d68..20b1e39 100644
--- a/homedecor/books.lua
+++ b/homedecor/books.lua
@@ -156,13 +156,20 @@ for _, c in ipairs(bookcolors) do
end
minetest.register_on_player_receive_fields(function(player, form_name, fields)
- if form_name ~= BOOK_FORMNAME or not fields.save then
- return
+ if form_name ~= BOOK_FORMNAME then
+ return false
end
local player_name = player:get_player_name()
local pos = player_current_book[player_name]
- if not pos then return end
+ if not pos then
+ return true
+ end
local meta = minetest.get_meta(pos)
+ local owner = meta:get_string("owner")
+ if owner ~= "" and player_name ~= owner or not fields.save then
+ player_current_book[player_name] = nil
+ return true
+ end
meta:set_string("title", fields.title or "")
meta:set_string("text", fields.text or "")
meta:set_string("owner", player_name)
@@ -171,6 +178,9 @@ minetest.register_on_player_receive_fields(function(player, form_name, fields)
end
minetest.log("action", S("@1 has written in a book (title: \"@2\"): \"@3\" at location @4",
player:get_player_name(), fields.title, fields.text, minetest.pos_to_string(player:getpos())))
+
+ player_current_book[player_name] = nil
+ return true
end)
minetest.register_alias("homedecor:book", "homedecor:book_grey")
diff --git a/homedecor/crafts.lua b/homedecor/crafts.lua
index a0b9bfb..e59fc2d 100644
--- a/homedecor/crafts.lua
+++ b/homedecor/crafts.lua
@@ -2920,7 +2920,7 @@ minetest.register_craft({
recipe = {
{ "", "technic:brass_ingot", ""},
{ "", "homedecor:chainlink_brass", ""},
- { "default:glass", "homedecor:glowlight_small", "default:glass"}
+ { "default:glass", "homedecor:glowlight_small_cube", "default:glass"}
},
})
@@ -2928,7 +2928,7 @@ minetest.register_craft({
output = "homedecor:ceiling_lamp",
recipe = {
{ "", "chains:chain_top_brass", ""},
- { "default:glass", "homedecor:glowlight_small", "default:glass"}
+ { "default:glass", "homedecor:glowlight_small_cube", "default:glass"}
},
})
diff --git a/homedecor/depends.txt b/homedecor/depends.txt
index ef16206..7070b02 100644
--- a/homedecor/depends.txt
+++ b/homedecor/depends.txt
@@ -1,6 +1,7 @@
default
unifieddyes
homedecor_i18n
+creative
building_blocks?
signs_lib?
moreblocks?
diff --git a/homedecor/models/homedecor_block_with_overlay.obj b/homedecor/models/homedecor_block_with_overlay.obj
deleted file mode 100644
index 9c70760..0000000
--- a/homedecor/models/homedecor_block_with_overlay.obj
+++ /dev/null
@@ -1,44 +0,0 @@
-# Blender v2.72 (sub 0) OBJ File: 'unifiedbricks_brick_block.blend'
-# www.blender.org
-o Cube
-v 0.496092 0.496092 0.496092
-v 0.496092 0.496092 -0.496092
-v -0.496092 0.496092 -0.496092
-v -0.496092 0.496092 0.496092
-v 0.496092 -0.496092 0.496092
-v 0.496092 -0.496092 -0.496092
-v -0.496092 -0.496092 -0.496092
-v -0.496092 -0.496092 0.496092
-v 0.499750 0.499750 0.499750
-v 0.499750 0.499750 -0.499750
-v -0.499750 0.499750 -0.499750
-v -0.499750 0.499750 0.499750
-v 0.499750 -0.499750 0.499750
-v 0.499750 -0.499750 -0.499750
-v -0.499750 -0.499750 -0.499750
-v -0.499750 -0.499750 0.499750
-vt 1.000000 0.000000
-vt 1.000000 1.000000
-vt 0.000000 1.000000
-vt 0.000000 0.000000
-vn 0.000000 -1.000000 0.000000
-vn -1.000000 0.000000 0.000000
-vn 0.000000 1.000000 0.000000
-vn 1.000000 0.000000 0.000000
-vn 0.000000 0.000000 -1.000000
-vn 0.000000 0.000000 1.000000
-g Cube_Cube_base
-s off
-f 8/1/1 7/2/1 6/3/1 5/4/1
-f 4/2/2 3/3/2 7/4/2 8/1/2
-f 1/3/3 2/4/3 3/1/3 4/2/3
-f 2/2/4 1/3/4 5/4/4 6/1/4
-f 3/2/5 2/3/5 6/4/5 7/1/5
-f 1/2/6 4/3/6 8/4/6 5/1/6
-g Cube_Cube_overlay
-f 16/1/1 15/2/1 14/3/1 13/4/1
-f 12/2/2 11/3/2 15/4/2 16/1/2
-f 9/3/3 10/4/3 11/1/3 12/2/3
-f 10/2/4 9/3/4 13/4/4 14/1/4
-f 11/2/5 10/3/5 14/4/5 15/1/5
-f 9/2/6 12/3/6 16/4/6 13/1/6
diff --git a/homedecor/textures/homedecor_glowlight_cube_sides_ceiling.png b/homedecor/textures/homedecor_glowlight_cube_sides_ceiling.png
deleted file mode 100644
index 7960828..0000000
--- a/homedecor/textures/homedecor_glowlight_cube_sides_ceiling.png
+++ /dev/null
Binary files differ
diff --git a/homedecor/textures/homedecor_glowlight_cube_sides_ceiling_overlay.png b/homedecor/textures/homedecor_glowlight_cube_sides_ceiling_overlay.png
deleted file mode 100644
index b50bec0..0000000
--- a/homedecor/textures/homedecor_glowlight_cube_sides_ceiling_overlay.png
+++ /dev/null
Binary files differ