1
0
mirror of https://github.com/sys4-fr/server-nalc.git synced 2025-06-28 06:11:47 +02:00

[default & nether] Update book handling functions

- In sight of MinetestForFun/server-minetestforfun-skyblock#217
 - default/craftitems.lua : Merge changes made to the book and how it is handled ; updates
 - nether/nether/guide.lua : I don't remember ever modifying it but it was there and modified and it worked so wowie
This commit is contained in:
LeMagnesium
2017-09-06 21:48:27 +02:00
parent e13fb99494
commit 27a7195c52
2 changed files with 100 additions and 21 deletions

View File

@ -315,13 +315,13 @@ for n,data in ipairs(guide_infos) do
elseif typ == "x" then
x = math.max(x, content)
elseif typ == "text" then
local tab = minetest.splittext(content, guide_size.fx)
--local tab = minetest.splittext(content, guide_size.fx)
local l = guide_size.cx
for _,str in ipairs(tab) do
--[[for _,str in ipairs(tab) do
form = form.."label["..guide_size.cx ..","..guide_size.cy+y..";"..str.."]"
y = y+guide_size.fy
l = math.max(l, #str)
end
end]]
x = math.max(x, l/font_size)
elseif typ == "image" then
local w, h, texture_name, px, py = unpack(content)