[Add] Empty StarSystem and made ai use it!

This commit is contained in:
Allanis 2013-03-10 16:31:55 +00:00
parent 46109626a4
commit d31b9dad30
2 changed files with 31 additions and 1 deletions

View File

@ -23,6 +23,7 @@
<fleet chance="40">Sml Merchant Convoy</fleet>
</fleets>
<jumps>
<jump>NCG-7291</jump>
<jump>SaraSys</jump>
</jumps>
</ssys>
@ -45,6 +46,30 @@
<fleet chance="60">Merchant Ship</fleet>
</fleets>
<jumps>
<jump>NCG-7291</jump>
<jump>KonoSys</jump>
</jumps>
</ssys>
<ssys name="NCG-7291">
<pos>
<x>23</x>
<y>24</y>
</pos>
<general>
<stars>230</stars>
<asteroids>0</asteroids>
<interference>0</interference>
</general>
<planets>
</planets>
<fleets>
<fleet chance="80">Merchant Ship</fleet>
<fleet chance="60">Merchant Mule</fleet>
<fleet chance="60">Pirate</fleet>
<fleet chance="60">Pirate</fleet>
</fleets>
<jumps>
<jump>SaraSys</jump>
<jump>KonoSys</jump>
</jumps>
</ssys>

View File

@ -12,7 +12,12 @@ function control()
end
elseif task == "none" then
planet = ai.rndplanet()
ai.pushtask(0, "go", planet)
-- Planet must exist.
if planet == nil then
ai.pushtask(0, "hyperspace")
else
ai.pushtask(0, "go", planet)
end
end
end