hmm, what's the code look like? does sound perplexing
hmm, what's the code look like? does sound perplexing
function sys_RoomContents_Update(event)
--Create the table if it's not already there.
denizensHere = denizensHere or {}
--For QL/Entering a room.
if event == "gmcp.Char.Items.List" and gmcp.Char.Items.List.location ~= "inv" then
denizensHere = {}
local ignoreCount = 0
for i,v in pairs(gmcp.Char.Items.List.items) do
if v.attrib and v.attrib ~= "t" and v.attrib ~= "mdt" and not v.attrib:find("x") then
denizensHere[tonumber(v.id)] = v.name
end
endfunction stargui_updateRoomBox()
if not starsys.settings.usegui then return end
stargui.miDisp:clear()
stargui.miDisp:cecho("<a_blue>"..string.rep("-", 12).."<gold>#<grey> Denizen Data <gold>#<a_blue>"..string.rep("-", 11).."\n")
local tn = tonumber(target)
if table.is_empty(denizensHere) then
stargui.miDisp:cecho("\n<grey>"..string.rep(" ", 16).."<None>\n")
else
for num, denizen in pairs(denizensHere) do
if num == tn then
stargui.miDisp:cecho("\n<orange>"..string.rep(" ", 6-string.len(num))..num.."<white>| ")
cechoLink("stargui.miDisp","<grey>" ..truncate(denizen, 30):title(), [[send("consider ]] .. num .. [[")]], [[]]..denizen..[[]], true)
else
cechoLink("stargui.miDisp","\n<DeepSkyBlue>" ..string.rep(" ", 6-string.len(num))..num, [[changeTarget("]]..num..[[")]], [[Target ]]..denizen..[[]], true)
cechoLink("stargui.miDisp","<white>| <grey>" ..truncate(denizen, 30):title(), [[send("consider ]] .. num .. [[")]], [[]]..denizen..[[]], true)
end
end
end