1
0
mirror of https://github.com/mt-mods/homedecor_modpack.git synced 2025-07-21 06:40:23 +02:00

initial progress

This commit is contained in:
unknown
2022-04-02 16:32:44 -04:00
parent 3ba59dc2d5
commit 63439e19ea
24 changed files with 397 additions and 321 deletions

View File

@ -97,7 +97,7 @@ for _, c in ipairs(bookcolors) do
if data.title and data.title ~= "" then
meta:set_string("infotext", data.title)
end
if not creative.is_enabled_for(plname) then
if not minetest.is_creative_enabled(plname) then
itemstack:take_item()
end
return itemstack
@ -128,16 +128,15 @@ for _, c in ipairs(bookcolors) do
local owner = meta:get_string("owner") or ""
local formspec
if owner == "" or owner == player_name then
formspec = "size[8,8]"..default.gui_bg..default.gui_bg_img..
formspec = "size[8,8]"..
"field[0.5,1;7.5,0;title;Book title :;"..
minetest.formspec_escape(title).."]"..
"textarea[0.5,1.5;7.5,7;text;Book content :;"..
minetest.formspec_escape(text).."]"..
"button_exit[2.5,7.5;3,1;save;Save]"
else
formspec = "size[8,8]"..default.gui_bg..
formspec = "size[8,8]"..
"button_exit[7,0.25;1,0.5;close;X]"..
default.gui_bg_img..
"label[0.5,0.5;by "..owner.."]"..
"label[0.5,0;"..minetest.formspec_escape(title).."]"..
"textarea[0.5,1.5;7.5,7;;"..minetest.formspec_escape(text)..";]"
@ -167,7 +166,7 @@ for _, c in ipairs(bookcolors) do
output = "homedecor:book_"..color,
recipe = {
"dye:"..color,
"default:book"
homedecor.materials.book
},
})