new icons - thx LDD
This commit is contained in:
@@ -21,6 +21,17 @@
|
|||||||
\0300\0317else\140",
|
\0300\0317else\140",
|
||||||
run = "Script.lua",
|
run = "Script.lua",
|
||||||
},
|
},
|
||||||
|
c5497bca58468ae64aed6c0fd921109217988db3 = {
|
||||||
|
title = "Events",
|
||||||
|
category = "System",
|
||||||
|
icon = "\0304\031f \030 \0311e\
|
||||||
|
\030f\031f \0304 \030 \0311ee\031f \
|
||||||
|
\030f\031f \0304 \030 \0311e\031f ",
|
||||||
|
iconExt = "\0300\031f\159\135\030f\0310\156\0301\031f\159\030f\0311\144\0300\031f\147\139\030f\0310\144\
|
||||||
|
\0300\128\128\030f\149\0311\157\142\0300\031f\149\0310\128\128\
|
||||||
|
\130\139\141\0311\130\131\0310\142\135\129",
|
||||||
|
run = "Events.lua",
|
||||||
|
},
|
||||||
[ "7ef35cac539f84722b0a988caee03b2df734c56a" ] = {
|
[ "7ef35cac539f84722b0a988caee03b2df734c56a" ] = {
|
||||||
title = "AppStore",
|
title = "AppStore",
|
||||||
category = "System",
|
category = "System",
|
||||||
@@ -78,13 +89,16 @@
|
|||||||
requires = "turtle",
|
requires = "turtle",
|
||||||
},
|
},
|
||||||
--]]
|
--]]
|
||||||
[ "a0365977708b7387ee9ce2c13e5820e6e11732cb" ] = {
|
df485c871329671f46570634d63216761441bcd6 = {
|
||||||
title = "Pain",
|
title = "Devices",
|
||||||
category = "Apps",
|
category = "System",
|
||||||
icon = "\030 \031f\0307\031f\159\030 \159\030 \
|
icon = "\0304 \030 \
|
||||||
\030 \031f\0308\031f\135\0307\0318\144\140\030f\0317\159\143\031c\139\0302\135\030f\0312\157\
|
\030f \0304 \0307 \030 \031 \031f_\
|
||||||
\030 \031f\030f\0318\143\133\0312\136\0302\031f\159\159\143\131\030f\0312\132",
|
\030f \0304 \0307 \030 \031f/",
|
||||||
run = "http://pastebin.com/raw/wJQ7jav0",
|
iconExt = "\031f\128\128\128\0308\159\143\0300\0317\151\0307\0310\140\148\
|
||||||
|
\0314\151\131\0304\031f\148\030f\0318\138\148\0307\0310\138\131\129\
|
||||||
|
\0304\031f\138\143\133\030f\0318\131\129\031f\128\128\128",
|
||||||
|
run = "Devices.lua",
|
||||||
},
|
},
|
||||||
[ "114edfc04a1ab03541bdc80ce064f66a7cfcedbb" ] = {
|
[ "114edfc04a1ab03541bdc80ce064f66a7cfcedbb" ] = {
|
||||||
title = "Recorder",
|
title = "Recorder",
|
||||||
@@ -103,14 +117,6 @@
|
|||||||
run = "http://pastebin.com/raw/VXAyXqBv",
|
run = "http://pastebin.com/raw/VXAyXqBv",
|
||||||
requires = "turtle",
|
requires = "turtle",
|
||||||
},
|
},
|
||||||
[ "53a5d150062b1e03206b9e15854b81060e3c7552" ] = {
|
|
||||||
title = "Minesweeper",
|
|
||||||
category = "Games",
|
|
||||||
icon = "\030f\031f \03131\0308\031f \030f\031d2\
|
|
||||||
\030f\031f \031d2\03131\0308\031f \030f\03131\
|
|
||||||
\030f\03131\0308\031f \030f\03131\031e3",
|
|
||||||
run = "https://pastebin.com/raw/nsKrHTbN",
|
|
||||||
},
|
|
||||||
[ "a2accffe95b2c8be30e8a05e0c6ab7e8f5966f43" ] = {
|
[ "a2accffe95b2c8be30e8a05e0c6ab7e8f5966f43" ] = {
|
||||||
title = "Strafe",
|
title = "Strafe",
|
||||||
category = "Games",
|
category = "Games",
|
||||||
@@ -122,17 +128,6 @@
|
|||||||
\0300\128\030f\159\129\138\0300\031f\143\149\030f\0310\134",
|
\0300\128\030f\159\129\138\0300\031f\143\149\030f\0310\134",
|
||||||
run = "https://pastebin.com/raw/jyDH7mLH",
|
run = "https://pastebin.com/raw/jyDH7mLH",
|
||||||
},
|
},
|
||||||
[ "48d6857f6b2869d031f463b13aa34df47e18c548" ] = {
|
|
||||||
title = "Breakout",
|
|
||||||
category = "Games",
|
|
||||||
icon = "\0301\031f \0309 \030c \030b \030e \030c \0306 \
|
|
||||||
\030 \031f \
|
|
||||||
\030 \031f \0300 \0310 ",
|
|
||||||
iconExt = "\030 \031f\030f\0319\144\030d\031f\159\030b\159\030f\0311\144\031b\144\030c\031f\159\030f\0311\144\
|
|
||||||
\030 \031f\030f\0311\130\031b\129\0319\130\031e\130\0310\144\031d\129\0316\129\
|
|
||||||
\030 \031f\030f\0310\136\140\140\030 ",
|
|
||||||
run = "https://gist.github.com/LDDestroier/c7528d95bc0103545c2a/raw",
|
|
||||||
},
|
|
||||||
[ "58ec8d6e36e346d9f42eb43935652e3e58e2c829" ] = {
|
[ "58ec8d6e36e346d9f42eb43935652e3e58e2c829" ] = {
|
||||||
title = "Mwm",
|
title = "Mwm",
|
||||||
category = "Apps",
|
category = "Apps",
|
||||||
@@ -144,12 +139,4 @@
|
|||||||
\030 \031f\0304\031f\131\131\131\131\131\131\131\030e\0314\131",
|
\030 \031f\0304\031f\131\131\131\131\131\131\131\030e\0314\131",
|
||||||
run = "mwm.lua usr/config/mwm",
|
run = "mwm.lua usr/config/mwm",
|
||||||
},
|
},
|
||||||
[ "01c933b2a36ad8ed2d54089cb2903039046c1216" ] = {
|
|
||||||
title = "Enchat",
|
|
||||||
icon = "\030e\031f\151\030f\031e\156\0311\140\0314\140\0315\140\031d\140\031b\140\031a\132\
|
|
||||||
\030f\0314\128\030e\031f\132\030f\031e\132\0318nchat\
|
|
||||||
\030f\031e\138\141\0311\140\0314\140\0315\132\0317v\03183\031a\132",
|
|
||||||
category = "Apps",
|
|
||||||
run = "https://raw.githubusercontent.com/LDDestroier/enchat/master/enchat3.lua",
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,126 +0,0 @@
|
|||||||
requireInjector(getfenv(1))
|
|
||||||
|
|
||||||
local Event = require('event')
|
|
||||||
local Message = require('message')
|
|
||||||
local UI = require('ui')
|
|
||||||
local Util = require('util')
|
|
||||||
|
|
||||||
multishell.setTitle(multishell.getCurrent(), 'Log Monitor')
|
|
||||||
|
|
||||||
if not device.wireless_modem then
|
|
||||||
error('Wireless modem is required')
|
|
||||||
end
|
|
||||||
device.wireless_modem.open(59998)
|
|
||||||
|
|
||||||
local ids = { }
|
|
||||||
local messages = { }
|
|
||||||
local terminal = UI.term
|
|
||||||
|
|
||||||
if device.openperipheral_bridge then
|
|
||||||
|
|
||||||
UI.Glasses = require('glasses')
|
|
||||||
|
|
||||||
terminal = UI.Glasses({
|
|
||||||
x = 4,
|
|
||||||
y = 175,
|
|
||||||
height = 40,
|
|
||||||
width = 64,
|
|
||||||
textScale = .5,
|
|
||||||
backgroundOpacity = .65,
|
|
||||||
|
|
||||||
})
|
|
||||||
elseif device.monitor then
|
|
||||||
terminal = UI.Device({
|
|
||||||
deviceType = 'monitor',
|
|
||||||
textScale = .5
|
|
||||||
})
|
|
||||||
end
|
|
||||||
|
|
||||||
--[[-- ScrollingText --]]--
|
|
||||||
UI.ScrollingText = class(UI.Window)
|
|
||||||
UI.ScrollingText.defaults = {
|
|
||||||
UIElement = 'ScrollingText',
|
|
||||||
backgroundColor = colors.black,
|
|
||||||
buffer = { },
|
|
||||||
}
|
|
||||||
function UI.ScrollingText:appendLine(text)
|
|
||||||
if #self.buffer+1 >= self.height then
|
|
||||||
table.remove(self.buffer, 1)
|
|
||||||
end
|
|
||||||
table.insert(self.buffer, text)
|
|
||||||
end
|
|
||||||
|
|
||||||
function UI.ScrollingText:clear()
|
|
||||||
self.buffer = { }
|
|
||||||
UI.Window.clear(self)
|
|
||||||
end
|
|
||||||
|
|
||||||
function UI.ScrollingText:draw()
|
|
||||||
for k,text in ipairs(self.buffer) do
|
|
||||||
self:write(1, k, Util.widthify(text, self.width), self.backgroundColor)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
terminal:clear()
|
|
||||||
|
|
||||||
function getClient(id)
|
|
||||||
if not ids[id] then
|
|
||||||
ids[id] = {
|
|
||||||
titleBar = UI.TitleBar({ title = 'ID: ' .. id, parent = terminal }),
|
|
||||||
scrollingText = UI.ScrollingText({ parent = terminal })
|
|
||||||
}
|
|
||||||
local clientCount = Util.size(ids)
|
|
||||||
local clientHeight = math.floor((terminal.height - clientCount) / clientCount)
|
|
||||||
terminal:clear()
|
|
||||||
local y = 1
|
|
||||||
for k,v in pairs(ids) do
|
|
||||||
v.titleBar.y = y
|
|
||||||
y = y + 1
|
|
||||||
v.scrollingText.height = clientHeight
|
|
||||||
v.scrollingText.y = y
|
|
||||||
y = y + clientHeight
|
|
||||||
v.scrollingText:clear()
|
|
||||||
|
|
||||||
v.titleBar:draw()
|
|
||||||
v.scrollingText:draw()
|
|
||||||
end
|
|
||||||
end
|
|
||||||
return ids[id]
|
|
||||||
end
|
|
||||||
|
|
||||||
Event.on('logMessage', function()
|
|
||||||
local t = { }
|
|
||||||
while #messages > 0 do
|
|
||||||
local msg = messages[1]
|
|
||||||
table.remove(messages, 1)
|
|
||||||
local client = getClient(msg.id)
|
|
||||||
client.scrollingText:appendLine(string.format('%d %s', math.floor(os.clock()), msg.text))
|
|
||||||
t[msg.id] = client
|
|
||||||
end
|
|
||||||
for _,client in pairs(t) do
|
|
||||||
client.scrollingText:draw()
|
|
||||||
end
|
|
||||||
terminal:sync()
|
|
||||||
end)
|
|
||||||
|
|
||||||
Message.addHandler('log', function(h, id, msg)
|
|
||||||
table.insert(messages, { id = id, text = msg.contents })
|
|
||||||
os.queueEvent('logMessage')
|
|
||||||
end)
|
|
||||||
|
|
||||||
Event.on('monitor_touch', function()
|
|
||||||
terminal:reset()
|
|
||||||
ids = { }
|
|
||||||
end)
|
|
||||||
|
|
||||||
Event.on('mouse_click', function()
|
|
||||||
terminal:reset()
|
|
||||||
ids = { }
|
|
||||||
end)
|
|
||||||
|
|
||||||
Event.on('char', function()
|
|
||||||
Event.exitPullEvents()
|
|
||||||
end)
|
|
||||||
|
|
||||||
Event.pullEvents(logWriter)
|
|
||||||
terminal:reset()
|
|
||||||
@@ -1,50 +0,0 @@
|
|||||||
_G.requireInjector()
|
|
||||||
|
|
||||||
local itemDB = require('itemDB')
|
|
||||||
local json = require('json')
|
|
||||||
local Util = require('util')
|
|
||||||
|
|
||||||
local args = { ... }
|
|
||||||
local mod = args[1] or error('Syntax: namedb MOD')
|
|
||||||
|
|
||||||
--[[
|
|
||||||
"double_plant": {
|
|
||||||
"name": ["Sunflower",
|
|
||||||
"Lilac",
|
|
||||||
"Double Tallgrass",
|
|
||||||
"Large Fern",
|
|
||||||
"Rose Bush",
|
|
||||||
"Peony"],
|
|
||||||
},
|
|
||||||
--]]
|
|
||||||
|
|
||||||
local list = { }
|
|
||||||
|
|
||||||
for _,v in pairs(itemDB.data) do
|
|
||||||
local t = Util.split(v.name, '(.-):')
|
|
||||||
|
|
||||||
if t[1] == mod then
|
|
||||||
local name = t[2]
|
|
||||||
local damage = v.damage or 0
|
|
||||||
local entry = list[name]
|
|
||||||
if not entry then
|
|
||||||
entry = { }
|
|
||||||
list[name] = entry
|
|
||||||
end
|
|
||||||
if not entry.name and damage == 0 then
|
|
||||||
entry.name = v.displayName
|
|
||||||
else
|
|
||||||
if not entry.name then
|
|
||||||
entry.name = { }
|
|
||||||
elseif type(entry.name) == 'string' then
|
|
||||||
entry.name = { entry.name }
|
|
||||||
end
|
|
||||||
while #entry.name < damage do
|
|
||||||
entry.name[#entry.name + 1] = ''
|
|
||||||
end
|
|
||||||
entry.name[damage + 1] = v.displayName
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
json.encodeToFile(string.format('usr/etc/names/%s.json', mod), list)
|
|
||||||
@@ -3,11 +3,17 @@
|
|||||||
title = "Remote",
|
title = "Remote",
|
||||||
category = "Apps",
|
category = "Apps",
|
||||||
run = "MiloRemote",
|
run = "MiloRemote",
|
||||||
|
iconExt = "\0304\031f\135\129\0314\128\128\031f\130\030f\128\
|
||||||
|
\031f\128\031c\159\149\0300\0317\143\0304\031c\149\030f\0314\133\
|
||||||
|
\031f\128\030c\0310\142\030f\031c\149\030c\0310\139\030f\031c\149\031f\128",
|
||||||
},
|
},
|
||||||
[ "eea426f9baef72a8fcefd091e0cec5ab94a76698" ] = {
|
[ "eea426f9baef72a8fcefd091e0cec5ab94a76698" ] = {
|
||||||
title = "Milo",
|
title = "Milo",
|
||||||
category = "Apps",
|
category = "Apps",
|
||||||
run = "Milo",
|
run = "Milo",
|
||||||
requires = 'advancedTurtle',
|
requires = 'advancedTurtle',
|
||||||
|
iconExt = "\0304\031f\135\129\0314\128\128\031f\130\030f\128\
|
||||||
|
\031f\128\031c\159\149\0300\0317\143\0304\031c\149\030f\0314\133\
|
||||||
|
\031f\128\030c\0310\142\030f\031c\149\030c\0310\139\030f\031c\149\031f\128",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user