Fix book not displaying contents properly
This commit is contained in:
parent
9d4bc87435
commit
f8ecf46736
@ -16,14 +16,14 @@ minetest.register_craftitem(
|
|||||||
|
|
||||||
on_use = function(itemstack, player, pointed_thing)
|
on_use = function(itemstack, player, pointed_thing)
|
||||||
local name = player:get_player_name()
|
local name = player:get_player_name()
|
||||||
local data = minetest.deserialize(itemstack:get_metadata())
|
local data = itemstack:get_meta()
|
||||||
|
|
||||||
local title = ""
|
local title = ""
|
||||||
local text = ""
|
local text = ""
|
||||||
|
|
||||||
if data then
|
if data then
|
||||||
text = data.text
|
text = data:get_string("book:text")
|
||||||
title = data.title
|
title = data:get_string("book:title")
|
||||||
end
|
end
|
||||||
|
|
||||||
local form = default.ui.get_page("default:notabs")
|
local form = default.ui.get_page("default:notabs")
|
||||||
|
Loading…
Reference in New Issue
Block a user