2005-04-19 19:53:18 +00:00
|
|
|
{
|
2008-08-03 15:44:57 +00:00
|
|
|
GLOBAL =
|
|
|
|
{
|
2006-06-23 16:10:55 +00:00
|
|
|
ENTER = ("setSpeedTo: 0.0", "setStateTo: LIFT_OFF");
|
2008-08-03 15:44:57 +00:00
|
|
|
};
|
|
|
|
"LIFT_OFF" =
|
|
|
|
{
|
2006-06-23 16:10:55 +00:00
|
|
|
ENTER = (setTakeOffFromPlanet, "setSpeedFactorTo: 1.0", performFlyToRangeFromDestination);
|
|
|
|
"DESIRED_RANGE_ACHIEVED" = ("setStateTo: GO_TO_STATION");
|
2009-08-03 17:11:24 +00:00
|
|
|
"CLOSE_TO_MOON" = ("setStateTo: LIFT_OFF_FROM_SECONDARY_PLANET");
|
|
|
|
"CLOSE_TO_SECONDARY_PLANET" = ("setStateTo: LIFT_OFF_FROM_SECONDARY_PLANET");
|
|
|
|
"CLOSE_TO_MAIN_PLANET" = ("setStateTo: LIFT_OFF_FROM_MAIN_PLANET");
|
|
|
|
};
|
|
|
|
"LIFT_OFF_FROM_SECONDARY_PLANET" =
|
|
|
|
{
|
|
|
|
"DESIRED_RANGE_ACHIEVED" = ("setStateTo: GO_TO_STATION");
|
2008-08-03 15:44:57 +00:00
|
|
|
};
|
|
|
|
"GO_TO_STATION" =
|
2009-08-03 17:11:24 +00:00
|
|
|
{
|
|
|
|
ENTER = (setTargetToStation, "setDesiredRangeTo: 5000.0", setDestinationToTarget, checkCourseToDestination);
|
|
|
|
"WAYPOINT_SET" = ("setAITo: gotoWaypointAI.plist");
|
|
|
|
"COURSE_OK" = ("setSpeedFactorTo: 1.0", performFlyToRangeFromDestination);
|
|
|
|
"DESIRED_RANGE_ACHIEVED" = (setTargetToSystemStation, "setAITo: dockingAI.plist");
|
|
|
|
ATTACKED = (setTargetToPrimaryAggressor, broadcastDistressMessage, "setStateTo: FLEE");
|
|
|
|
"INCOMING_MISSILE" = (fightOrFleeMissile, "setStateTo: FLEE");
|
|
|
|
UPDATE = (setTargetToStation, "setDesiredRangeTo: 5000.0",
|
|
|
|
setDestinationToTarget, checkCourseToDestination, "pauseAI: 5.0");
|
|
|
|
};
|
|
|
|
"LIFT_OFF_FROM_MAIN_PLANET" =
|
|
|
|
{
|
|
|
|
"DESIRED_RANGE_ACHIEVED" = ("setStateTo: GO_TO_MAIN_STATION");
|
|
|
|
};
|
|
|
|
"GO_TO_MAIN_STATION" =
|
2008-08-03 15:44:57 +00:00
|
|
|
{
|
2006-06-23 10:19:27 +00:00
|
|
|
ENTER = (setTargetToSystemStation, "setDesiredRangeTo: 5000.0", setDestinationToTarget, checkCourseToDestination);
|
2006-06-23 16:10:55 +00:00
|
|
|
"WAYPOINT_SET" = ("setAITo: gotoWaypointAI.plist");
|
2005-06-08 10:22:59 +00:00
|
|
|
"COURSE_OK" = ("setSpeedFactorTo: 1.0", performFlyToRangeFromDestination);
|
2006-06-23 10:19:27 +00:00
|
|
|
"DESIRED_RANGE_ACHIEVED" = (setTargetToSystemStation, "setAITo: dockingAI.plist");
|
2008-08-03 15:44:57 +00:00
|
|
|
ATTACKED = (setTargetToPrimaryAggressor, broadcastDistressMessage, "setStateTo: FLEE");
|
|
|
|
"INCOMING_MISSILE" = (fightOrFleeMissile, "setStateTo: FLEE");
|
2009-07-08 16:20:10 +00:00
|
|
|
UPDATE = (setTargetToSystemStation, "setDesiredRangeTo: 5000.0",
|
|
|
|
setDestinationToTarget, checkCourseToDestination, "pauseAI: 5.0");
|
2008-08-03 15:44:57 +00:00
|
|
|
};
|
|
|
|
FLEE =
|
|
|
|
{
|
|
|
|
ENTER = ("setDesiredRangeTo: 25600", performFlee);
|
|
|
|
"TARGET_LOST" = (performIdle, "setStateTo: GLOBAL");
|
|
|
|
"INCOMING_MISSILE" = (fightOrFleeMissile, "setStateTo: FLEE");
|
2009-09-19 10:12:54 +00:00
|
|
|
ATTACKED = (setTargetToPrimaryAggressor, "setStateTo: FLEE");
|
|
|
|
"REACHED_SAFETY" = ("setSpeedTo: 0.0", performIdle, "pauseAI: 90.0", "messageSelf: TARGET_LOST");
|
2008-08-03 15:44:57 +00:00
|
|
|
};
|
2009-07-08 16:20:10 +00:00
|
|
|
}
|