diff options
author | Wuzzy <almikes@aol.com> | 2015-03-11 19:01:51 +0100 |
---|---|---|
committer | Wuzzy <almikes@aol.com> | 2015-03-11 19:01:51 +0100 |
commit | 786d7a7d5d406e0e206062ac168308ec595844de (patch) | |
tree | 40d6dacdaa084e6d5de6815d65a0558d35341e94 | |
parent | 3d816fcb18194563d604cd13a8ec2c3adbb13c43 (diff) |
Update entry_list for new category
-rw-r--r-- | init.lua | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -52,13 +52,13 @@ function doc.formspec_main() return formstring end -function doc.generate_entry_list(id, playername) +function doc.generate_entry_list(cid, playername) local formstring - if doc.data.players[playername].entry_textlist == nil then + if doc.data.players[playername].entry_textlist == nil or doc.data.players[playername].category ~= cid then local entry_textlist = "textlist[0,1;11,7;doc_catlist;" local counter = 0 doc.data.players[playername].entry_ids = {} - for eid,entry in pairs(doc.data.categories[id].entries) do + for eid,entry in pairs(doc.data.categories[cid].entries) do table.insert(doc.data.players[playername].entry_ids, eid) entry_textlist = entry_textlist .. entry.name .. "," counter = counter + 1 |