SHOW:
|
|
- or go back to the newest paste.
| 1 | local streetSigns = {peripheral.find('monitor')}
| |
| 2 | ||
| 3 | local streetNames={
| |
| 4 | ['monitor_1']='Dragair Avenue', | |
| 5 | ['monitor_2']='Wall Street', | |
| 6 | ['monitor_3']='Shopping District', | |
| 7 | ['monitor_4']='Spawn Street', | |
| 8 | } | |
| 9 | ||
| 10 | local backgroundColor=colors.green | |
| 11 | local foregroundColor=colors.white | |
| 12 | ||
| 13 | for i,v in pairs(streetSigns) do | |
| 14 | if streetNames[peripheral.getName(v)] then --make sure its an actual sign lul | |
| 15 | v.setBackgroundColor(backgroundColor) | |
| 16 | v.setTextColor(foregroundColor) | |
| 17 | v.clear() | |
| 18 | v.setTextScale(2) | |
| 19 | local x,y = v.getSize() | |
| 20 | local text = streetNames[peripheral.getName(v)] | |
| 21 | v.setCursorPos((x/2)-(#text/2),2) | |
| 22 | v.write(text) | |
| 23 | end | |
| 24 | end |