Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local component = require "component"
- local event = require "event"
- local term = require "term"
- local redstone = component.transposer
- local gpu = component.gpu
- local ingotMapping =
- {
- "**********AB****",
- "*******ABBCCB***"
- }
- local pixelA = 0X2C8000
- local pixelB = 0X2A7C00
- local pixelC = 0X3FC100
- local width, height = gpu.getResolution()
- ----------------------------------------------------------------
- function drawPixel(x, y, color)
- gpu.setBackground(color)
- gpu.fill(x, y, 1, 1, " ")
- end
- function drawIngot()
- for index, line in pairs(ingotMapping) do
- for j = 1, string.len(line) do
- currentPixel = string.sub(line, j, j + 1)
- if currentPixel == "A" then
- drawPixel(index, j, pixelA)
- elseif currentPixel == "B" then
- drawPixel(index, j, pixelB)
- elseif currentPixel == "C" then
- drawPixel(index, j, pixelC)
- else
- drawPixel(index, j, 0X000000)
- end
- end
- end
- end
- function touchEventHandler(_, _, x, y)
- end
- drawIngot()
- --[[while true do
- touchEventHandler(event.pull("touch"))
- end]]--
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement