diff options
author | Wuzzy <almikes@aol.com> | 2016-11-07 16:54:14 +0100 |
---|---|---|
committer | Wuzzy <almikes@aol.com> | 2016-11-07 16:54:14 +0100 |
commit | f80e10854f342069052854b4aeea3d6423c86072 (patch) | |
tree | 5d330f7f4886efdfeb6d17b0344967bc72b3c2c6 | |
parent | 0776ac64661bf8676f2aefac7a6f342462e441b9 (diff) |
Fix entry selection sometimes being lost in limbo
-rw-r--r-- | init.lua | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -792,6 +792,7 @@ function doc.process_form(player,formname,fields) doc.data.players[playername].catsel = nil doc.data.players[playername].category = cid doc.data.players[playername].entry = nil + doc.data.players[playername].entry_textlist_needs_updating = true local formspec = doc.formspec_core(2)..doc.formspec_category(cid, playername) minetest.show_formspec(playername, "doc:category", formspec) break @@ -810,6 +811,7 @@ function doc.process_form(player,formname,fields) doc.data.players[playername].catsel = nil doc.data.players[playername].category = cid doc.data.players[playername].entry = nil + doc.data.players[playername].entry_textlist_needs_updating = true local formspec = doc.formspec_core(2)..doc.formspec_category(cid, playername) minetest.show_formspec(playername, "doc:category", formspec) end @@ -819,6 +821,7 @@ function doc.process_form(player,formname,fields) local cid = doc.data.players[playername].category doc.data.players[playername].catsel = nil doc.data.players[playername].entry = nil + doc.data.players[playername].entry_textlist_needs_updating = true local formspec = doc.formspec_core(2)..doc.formspec_category(cid, playername) minetest.show_formspec(playername, "doc:category", formspec) end @@ -845,6 +848,7 @@ function doc.process_form(player,formname,fields) if event.type == "CHG" then doc.data.players[playername].catsel = event.index doc.data.players[playername].entry = doc.data.players[playername].entry_ids[event.index] + doc.data.players[playername].entry_textlist_needs_updating = true elseif event.type == "DCL" then local cid = doc.data.players[playername].category local eid = nil @@ -853,6 +857,7 @@ function doc.process_form(player,formname,fields) eid = eids[catsel] end doc.mark_entry_as_viewed(playername, cid, eid) + doc.data.players[playername].entry_textlist_needs_updating = true local formspec = doc.formspec_core(3)..doc.formspec_entry(cid, eid) minetest.show_formspec(playername, "doc:entry", formspec) end |