TypeName
Does things like an Asteroid have a TypeName?
Im trying to make the long range scanner more useful, The Red Green Blue bar, and the easiest way is to tidy up the readings.
So Im reducing everything to Zero with a
"for _, obj in ipairs(getAllObjects()) do
obj:setRadarSignatureInfo(0, 0, 0)
if obj:getTypeName() == "Asteroid" then
obj:setRadarSignatureInfo(1.0, 1.0, 1.0)
end
end "
And then go though and set certain things to certain levels.
Im trying to make the long range scanner more useful, The Red Green Blue bar, and the easiest way is to tidy up the readings.
So Im reducing everything to Zero with a
"for _, obj in ipairs(getAllObjects()) do
obj:setRadarSignatureInfo(0, 0, 0)
if obj:getTypeName() == "Asteroid" then
obj:setRadarSignatureInfo(1.0, 1.0, 1.0)
end
end "
And then go though and set certain things to certain levels.
Comments
obj.typeName == "Asteroid", bit inconsitent, I know, and the documentation used to be wrong on this, should be fixed in the latest release.
https://github.com/daid/EmptyEpsilon/search?l=Lua&q=typeName
at the beginning sorted by there shipTemplate-TypeName eg:
if randomship:getTypeName() == "Atlantis X23" then
randomship.class = 1
end
or directly take the TypeNames as classes.