mirror of
https://github.com/luanti-org/minetest_game.git
synced 2025-06-06 05:44:26 -04:00
Merge 92298a21f1
into 00a0d9a5d4
This commit is contained in:
commit
5486b2d089
1 changed files with 10 additions and 3 deletions
|
@ -30,10 +30,10 @@ local function book_on_use(itemstack, user, pointed_thing)
|
|||
else
|
||||
formspec = "size[8,8]"..default.gui_bg..
|
||||
default.gui_bg_img..
|
||||
"label[0.5,0.5;by "..owner.."]"..
|
||||
"label[0.5,0.7;by "..owner.."]"..
|
||||
"label[0.5,0;"..minetest.formspec_escape(title).."]"..
|
||||
"tableoptions[background=#00000000;highlight=#00000000;border=false]"..
|
||||
"table[0.5,1.5;7.5,7;;"..minetest.formspec_escape(text):gsub("\n", ",")..";1]"
|
||||
"textarea[0.5,1.5;7.5,7;text;;"..
|
||||
minetest.formspec_escape(text).."]"
|
||||
end
|
||||
minetest.show_formspec(user:get_player_name(), "default:book", formspec)
|
||||
end
|
||||
|
@ -96,6 +96,13 @@ minetest.register_craft({
|
|||
recipe = { "default:book", "default:book_written" }
|
||||
})
|
||||
|
||||
-- clear book recipe
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = "default:book",
|
||||
recipe = {"default:book_written", "dye:white"},
|
||||
})
|
||||
|
||||
minetest.register_on_craft(function(itemstack, player, old_craft_grid, craft_inv)
|
||||
if itemstack:get_name() ~= "default:book_written" then
|
||||
return
|
||||
|
|
Loading…
Add table
Reference in a new issue