Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local b = peripheral.wrap("bottom")
- function getSpeed()
- t = b.analyze()
- speed = t["speed"]
- if speed >= 1.7 then return "Fastest"
- elseif speed >= 1.4 then return "Faster"
- elseif speed >= 1.2 then return "Fast"
- elseif speed >= 1.0 then return "Normal"
- elseif speed >= 0.8 then return "Slow"
- elseif speed >= 0.6 then return "Slower"
- else return "Slowest" end
- end
- function getLifespan()
- t = b.analyze()
- lifespan = t["lifespan"]
- if lifespan >= 70 then return "Longest"
- elseif lifespan >= 60 then return "Longer"
- elseif lifespan >= 50 then return "Long"
- elseif lifespan >= 45 then return "Elongated"
- elseif lifespan >= 40 then return "Normal"
- elseif lifespan >= 35 then return "Shortened"
- elseif lifespan >= 30 then return "Short"
- elseif lifespan >= 20 then return "Shorter"
- else return "Shortest" end
- end
- function getPrimarySpecies()
- t = b.analyze()
- return t["speciesPrimary"]
- end
- function getSecondarySpecies()
- t = b.analyze()
- return t["speciesSecondary"]
- end
- function getType()
- t = b.analyze()
- return t["type"]
- end
- function getTemperature()
- t = b.analyze()
- return t["temperature"]
- end
- function getTemperatureTolerance()
- t = b.analyze()
- return t["toleranceTemperature"]
- end
- function getHumidity()
- t = b.analyze()
- return t["humidity"]
- end
- function getHumidityTolerance()
- t = b.analyze()
- return t["toleranceHumidity"]
- end
- function getFlower()
- t = b.analyze()
- return t["flower"]
- end
- function getEffect()
- t = b.analyze()
- return t["effect"]
- end
- -- territories X Y Z
- function getTerritoryX()
- t = b.analyze()
- return t["territory"][1]
- end
- function getTerritoryY()
- t = b.analyze()
- return t["territory"][2]
- end
- function getTerritoryZ()
- t = b.analyze()
- return t["territory"][3]
- end
- function getFertility()
- t = b.analyze()
- return t["fertility"]
- end
- -- bool factors
- function isNocturnal()
- t = b.analyze()
- return t["nocturnal"]
- end
- function isFlyer()
- t = b.analyze()
- return t["tolerantFlyer"]
- end
- function isCaveDwelling()
- t = b.analyze()
- return t["caveDwelling"]
- end
- -- useful functions:
- function isPure()
- if getPrimarySpecies() == getSecondarySpecies() then
- return true
- else return false end
- end
- function isAnalyzedBee()
- t = b.analyze()
- if t ~= nil then return true
- else return false end
- end
Advertisement
Add Comment
Please, Sign In to add comment