mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2024-09-12 00:56:53 +02:00
Fix creative being stuck after page 3
This commit is contained in:
parent
89663cc6ac
commit
2bfad4061d
@ -278,7 +278,6 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
|
|||||||
local size = string.len(formspec)
|
local size = string.len(formspec)
|
||||||
local marker = string.sub(formspec,size-2)
|
local marker = string.sub(formspec,size-2)
|
||||||
marker = string.sub(marker,1)
|
marker = string.sub(marker,1)
|
||||||
local start_i
|
|
||||||
if marker ~= nil and marker == "p" then
|
if marker ~= nil and marker == "p" then
|
||||||
local page = string.sub(formspec,size-1)
|
local page = string.sub(formspec,size-1)
|
||||||
--minetest.chat_send_all(page)
|
--minetest.chat_send_all(page)
|
||||||
@ -287,11 +286,9 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
|
|||||||
start_i = tonumber(start_i) or 0
|
start_i = tonumber(start_i) or 0
|
||||||
if fields.creative_prev then
|
if fields.creative_prev then
|
||||||
start_i = start_i - 9*5
|
start_i = start_i - 9*5
|
||||||
page = tmp_page
|
|
||||||
end
|
end
|
||||||
if fields.creative_next then
|
if fields.creative_next then
|
||||||
start_i = start_i + 9*5
|
start_i = start_i + 9*5
|
||||||
page = tmp_page
|
|
||||||
end
|
end
|
||||||
if start_i < 0 then
|
if start_i < 0 then
|
||||||
start_i = start_i + 9*5
|
start_i = start_i + 9*5
|
||||||
|
Loading…
Reference in New Issue
Block a user