79b17ebcef
- new behaviour BEHAVIOUR_LAND_ON_PLANET that takes care of the whole landing and removal. - AI command: performLandOnPlanet. Works only very close (500 meters) to the planet surface were APPROACHING_SURFACE has be send. Otherwise returns: NO_PLANET_NEARBY - ship event: shipLandedOnPlanet(planet) - changed the old AI message LANDED_ON_PLANET from normal to reactToMessage. The normal one never triggered because of ship removal in the same update. git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4844 127b21dd-08f5-0310-b4b7-95ae10353056
42 lines
1.5 KiB
Plaintext
42 lines
1.5 KiB
Plaintext
{
|
|
GLOBAL =
|
|
{
|
|
ENTER = ("setSpeedFactorTo: 1.0", "setStateTo: HEAD_FOR_PLANET");
|
|
};
|
|
"HEAD_FOR_PLANET" =
|
|
{
|
|
ENTER = (setCourseToPlanet, checkCourseToDestination);
|
|
"NO_PLANET_FOUND" = ("setStateTo: MOVE_AWAY");
|
|
"WAYPOINT_SET" = ("setStateTo: GO_TO_WAYPOINT");
|
|
"COURSE_OK" = ("setSpeedFactorTo: 1.0", performFlyToRangeFromDestination);
|
|
"DESIRED_RANGE_ACHIEVED" = ("setStateTo: APPROACH");
|
|
"APPROACHING_SURFACE" = ("setStateTo: LANDING");
|
|
UPDATE = (checkCourseToDestination, "pauseAI: 10.0");
|
|
};
|
|
"MOVE_AWAY" =
|
|
{
|
|
ENTER = (setDestinationToCurrentLocation, "setDesiredRangeTo: 7000.0", checkCourseToDestination);
|
|
"COURSE_OK" = ("setSpeedFactorTo: 1.0", performFlyToRangeFromDestination);
|
|
"DESIRED_RANGE_ACHIEVED" = ("setAITo: dumbAI.plist");
|
|
UPDATE = (checkCourseToDestination, "pauseAI: 10.0");
|
|
};
|
|
"GO_TO_WAYPOINT" =
|
|
{
|
|
ENTER = ("setSpeedFactorTo: 1.0", setDesiredRangeForWaypoint, checkCourseToDestination);
|
|
"WAYPOINT_SET" = (setDesiredRangeForWaypoint, checkCourseToDestination);
|
|
"APPROACHING_SURFACE" = ("setStateTo: LANDING");
|
|
"COURSE_OK" = ("setSpeedFactorTo: 0.8", performFlyToRangeFromDestination);
|
|
"DESIRED_RANGE_ACHIEVED" = ("setStateTo: HEAD_FOR_PLANET");
|
|
UPDATE = ("pauseAI: 10.0");
|
|
};
|
|
"APPROACH" = {
|
|
ENTER = (setCourseToPlanet, performFlyToRangeFromDestination);
|
|
"APPROACHING_SURFACE" = ("setStateTo: LANDING");
|
|
"DESIRED_RANGE_ACHIEVED" = ("setStateTo: LANDING");
|
|
};
|
|
"LANDING" = {
|
|
ENTER = (performLandOnPlanet);
|
|
"NO_PLANET_NEARBY" = ("setStateTo: APPROACH");
|
|
};
|
|
}
|