SHOW:
|
|
- or go back to the newest paste.
| 1 | function getNewColors(oldState,newState) | |
| 2 | local ret = {}
| |
| 3 | if oldState ~= newState then | |
| 4 | - | local change = bxor(rState,rs.getBundledInput(rSide)) |
| 4 | + | |
| 5 | local bit = bit.blshift(1,i-1) | |
| 6 | if not bit.band(bit,newState) and bit.band(bit,oldState) then table.insert(ret,bit) end | |
| 7 | - | if bit.band(bit,change) and not bit.band(bit,oldState) then table.insert(ret,bit) end |
| 7 | + | |
| 8 | end | |
| 9 | end | |
| 10 | return ret | |
| 11 | end |