Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local streetSigns = {peripheral.find('monitor')}
- local streetNames={
- ['monitor_1']='Dragair Avenue',
- ['monitor_2']='Wall Street',
- ['monitor_3']='Shopping District',
- ['monitor_4']='Spawn Street',
- }
- local backgroundColor=colors.green
- local foregroundColor=colors.white
- for i,v in pairs(streetSigns) do
- if streetNames[peripheral.getName(v)] then --make sure its an actual sign lul
- v.setBackgroundColor(backgroundColor)
- v.setTextColor(foregroundColor)
- v.clear()
- v.setTextScale(2)
- local x,y = v.getSize()
- local text = streetNames[peripheral.getName(v)]
- v.setCursorPos((x/2)-(#text/2),2)
- v.write(text)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement