oolite/Resources/AIs/homeAI.plist

44 lines
1.6 KiB
Plaintext
Raw Normal View History

{
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");
RESTARTED = ("setSpeedFactorTo: 1.0", "setStateTo: HEAD_FOR_PLANET");
UPDATE = ("pauseAI: 10.0");
};
"APPROACH" = {
ENTER = (setCourseToPlanet, performFlyToRangeFromDestination);
RESTARTED = (setCourseToPlanet, performFlyToRangeFromDestination);
"APPROACHING_SURFACE" = ("setStateTo: LANDING");
"DESIRED_RANGE_ACHIEVED" = ("setStateTo: LANDING");
};
"LANDING" = {
ENTER = (performLandOnPlanet);
"NO_PLANET_NEARBY" = ("setStateTo: APPROACH");
};
}