Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function isInTable(tab, obj)
- for k, v in pairs(tab) do
- if (k == obj or v == obj) then
- return true
- end
- end
- return false
- end
- function isInSmeltery(TC, liquid)
- for _, liq in pairs(TC) do
- if liq.rawName == liquid then
- return true
- end
- end
- return false
- end
- function findPeripheral(peri)
- for _, side in pairs(rs.getSides()) do
- if peripheral.isPresent(side) and
- peripheral.getType(side) == peri then
- print(peri.." found at "..side)
- return side
- end
- end
- error(peri.." not found", 0)
- end
- function distanceTo(pos1, pos2)
- xDis = pos1.x - pos2.x
- yDis = pos1.y - pos2.y
- zDis = pos1.z - pos2.z
- return math.sqrt(xDis * xDis + yDis * yDis + zDis * zDis)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement