oolite/Resources/AIs/risingShuttleAI.plist
2009-09-19 10:12:54 +00:00

52 lines
2.3 KiB
Plaintext

{
GLOBAL =
{
ENTER = ("setSpeedTo: 0.0", "setStateTo: LIFT_OFF");
};
"LIFT_OFF" =
{
ENTER = (setTakeOffFromPlanet, "setSpeedFactorTo: 1.0", performFlyToRangeFromDestination);
"DESIRED_RANGE_ACHIEVED" = ("setStateTo: GO_TO_STATION");
"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");
};
"GO_TO_STATION" =
{
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" =
{
ENTER = (setTargetToSystemStation, "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 = (setTargetToSystemStation, "setDesiredRangeTo: 5000.0",
setDestinationToTarget, checkCourseToDestination, "pauseAI: 5.0");
};
FLEE =
{
ENTER = ("setDesiredRangeTo: 25600", performFlee);
"TARGET_LOST" = (performIdle, "setStateTo: GLOBAL");
"INCOMING_MISSILE" = (fightOrFleeMissile, "setStateTo: FLEE");
ATTACKED = (setTargetToPrimaryAggressor, "setStateTo: FLEE");
"REACHED_SAFETY" = ("setSpeedTo: 0.0", performIdle, "pauseAI: 90.0", "messageSelf: TARGET_LOST");
};
}