Skip to content
Permalink
Browse files

Tidy up some side-effects of issue #93

  • Loading branch information
cim-- committed Jun 11, 2014
1 parent 1555bbf commit 6f8dc2d5fd7c711cd21f411cae0863616c3e97b1
Showing with 19 additions and 2 deletions.
  1. +10 −0 Resources/AIs/oolite-stationAI.js
  2. +9 −2 src/Core/Entities/OOPlanetEntity.m
@@ -29,6 +29,16 @@ MA 02110-1301, USA.
this.name = "Oolite Main Station AI";

this.aiStarted = function() {
/* This AI, unlike the others, can end up being started outside of
* the game when worldscripts are not loaded. If it's in that
* position, it can just act like the nullAI. OXP AIs which might
* end up as a main station AI for Lave should also do this
* check. */
if (!worldScripts["oolite-libPriorityAI"])
{
return;
}

var ai = new worldScripts["oolite-libPriorityAI"].PriorityAIController(this.ship);

ai.setParameter("oolite_flag_listenForDistressCall",true);
@@ -550,8 +550,15 @@ - (BOOL) planetHasStation

- (void) launchShuttle
{
if (_shuttlesOnGround == 0) return;

if (_shuttlesOnGround == 0)
{
return;
}
if ([PLAYER status] == STATUS_START_GAME)
{
// don't launch if game not started
return;
}
if (self != [UNIVERSE planet] && ![self planetHasStation])
{
// don't launch shuttles when no station is nearby.

0 comments on commit 6f8dc2d

Please sign in to comment.
You can’t perform that action at this time.