LUA methods for Detection - LemADEC/WarpDrive GitHub Wiki
Cloaking core specific methods
isAssemblyValid
Check if the current assembly is valid.
isValid, message = cloakingCore.isAssemblyValid()
- isValid is a boolean. It's true if and only if all the necessary Cloaking coil could be found.
- message is a string describing the system integrity.
Radar specific methods
getResults
Returns all the scan results or nil if scan is not started or still ongoing.
results = { radar.getResults() }
countResults = #results
type, name, x, y, z, mass = results[1]
- results is an array, each line is similar to getResult().
Note: due to CC limitation, you might need to use getResult() instead of this method.
getResultsCount
Returns the number of results from the scan or -1 if scan is not started or still ongoing.
count = radar.getResultsCount()
getResult
Returns one of the result from the scan.
success, type, name, x, y, z, mass = radar.result(index)
- index starts from 0 for the first result
#Laser specific methods
##getScanResult
type, x, y, z, id, meta, res = laser.getScanResult()
returns the block the laser is currently pointing at (maximum range of 500 blocks).