diff --git a/milo/plugins/shopView.lua b/milo/plugins/shopView.lua index 7518843..a9ca230 100644 --- a/milo/plugins/shopView.lua +++ b/milo/plugins/shopView.lua @@ -71,6 +71,7 @@ local function createPage(node) if node.header then self:centeredWrite(2, node.header, nil, colors.white) end + self:write(self.width - 15, 3, 'powered by Milo', nil, colors.lightGray) end function page.footer.info:draw() @@ -88,8 +89,8 @@ local function createPage(node) end function page.grid:getRowTextColor(row, selected) - if row.count == 0 then - return colors.lightGray + if selected then + return colors.yellow end return UI.Grid:getRowTextColor(row, selected) end @@ -147,6 +148,14 @@ local function createPage(node) page:sync() end + local chars = { '\183', '\7', '\186', '\7' } + Event.onInterval(1, function() + local ch = chars[math.floor(os.clock() % #chars) + 1] + page.header:write(2, 2, ch) + page.header:write(page.header.width - 1, 2, ch) + page:sync() + end) + UI:setPage(page) return page end @@ -162,7 +171,7 @@ Event.on('store_provide', function(_, item, quantity, uid) Milo:queueRequest({ }, function() local count = Milo:eject(itemDB:splitKey(item), quantity) os.queueEvent('store_provided', uid, count) - Sound.play('entity.villager.no') + Sound.play('entity.villager.yes') end) end) diff --git a/swshop/swshop.lua b/swshop/swshop.lua index 99389cf..d05faa0 100644 --- a/swshop/swshop.lua +++ b/swshop/swshop.lua @@ -77,7 +77,7 @@ local function handleTransaction(transaction) local count = math.floor(value / price) local uid = math.random() - print('requesting %d of %s', count, itemId) + print(string.format('requesting %d of %s', count, itemId)) os.queueEvent('store_provide', itemId, count, uid) local timerId = os.startTimer(5) while true do