fd073849fe
- The scoop icon now correctly shows a full cargo hold when special cargo is transported. - Added code that points the ships towards the station during stationkeeping. Main reason is that the player has something to watch when waiting. git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4744 127b21dd-08f5-0310-b4b7-95ae10353056
92 lines
3.8 KiB
Plaintext
92 lines
3.8 KiB
Plaintext
{
|
|
GLOBAL =
|
|
{
|
|
ENTER =
|
|
(
|
|
"dropMessages: DOCKING_ABORTED,FACING_DESTINATION",
|
|
"setSpeedTo: 0.0",
|
|
requestDockingCoordinates,
|
|
"setStateTo: AWAIT_COORDS"
|
|
);
|
|
};
|
|
"AWAIT_COORDS" =
|
|
{
|
|
"APPROACH" = ("setStateTo: APPROACH");
|
|
"APPROACH_COORDINATES" = ("setStateTo: GO_TO_COORDS");
|
|
"BACK_OFF" = ("setStateTo: RETREAT");
|
|
"HOLD_POSITION" = ("setStateTo: STATIONKEEPING");
|
|
"DOCKING_ABORTED" = ("setStateTo: ABORT");
|
|
"TRY_AGAIN_LATER" = ("pauseAI: 30.0", "setStateTo: ABORT");
|
|
"COLLISION" = ("setStateTo: ABORT");
|
|
"RESTART_DOCKING" = ("setStateTo: GLOBAL");
|
|
"TOO_BIG_TO_DOCK" = ("exitAIWithMessage: DOCKING_REFUSED");
|
|
DOCKED = ("setStateTo: EXIT_SYSTEM");
|
|
"NO_STATION_FOUND" = ("setStateTo: EXIT_SYSTEM");
|
|
UPDATE = ("pauseAI: 2");
|
|
};
|
|
STATIONKEEPING =
|
|
{
|
|
ENTER = (setDestinationToTarget, performFaceDestination, "setSpeedTo: 0.0", "pauseAI: 10.0");
|
|
ATTACKED = ("setStateTo: ATTACK_SHIP");
|
|
"OFFENCE_COMMITTED" = (setTargetToFoundTarget, "markTargetForOffence: 7", "setStateTo: ATTACK_SHIP");
|
|
"GROUP_ATTACK_TARGET" = ("setStateTo: ATTACK_SHIP");
|
|
UPDATE = (requestDockingCoordinates, "setStateTo: AWAIT_COORDS");
|
|
};
|
|
APPROACH =
|
|
{
|
|
ENTER = (recallDockingInstructions, "setSpeedFactorTo: 1.0", performFlyToRangeFromDestination);
|
|
"DESIRED_RANGE_ACHIEVED" = (requestDockingCoordinates, "setStateTo: AWAIT_COORDS");
|
|
"DOCKING_ABORTED" = ("setStateTo: ABORT");
|
|
"COLLISION" = ("setStateTo: ABORT");
|
|
ATTACKED = ("setStateTo: ATTACK_SHIP");
|
|
"OFFENCE_COMMITTED" = (setTargetToFoundTarget, "markTargetForOffence: 7", "setStateTo: ATTACK_SHIP");
|
|
"GROUP_ATTACK_TARGET" = ("setStateTo: ATTACK_SHIP");
|
|
"RESTART_DOCKING" = ("setStateTo: GLOBAL");
|
|
};
|
|
RETREAT =
|
|
{
|
|
ENTER = (recallDockingInstructions, "setSpeedTo: 0.0", setDestinationToDockingAbort, performFaceDestination);
|
|
"FACING_DESTINATION" = ("setSpeedFactorTo: 1.0", "setDesiredRangeTo: 500.0", performFlyToRangeFromDestination);
|
|
"DESIRED_RANGE_ACHIEVED" = ("setSpeedTo: 0.0", requestDockingCoordinates, "setStateTo: AWAIT_COORDS");
|
|
ATTACKED = ("setStateTo: ATTACK_SHIP");
|
|
"OFFENCE_COMMITTED" = (setTargetToFoundTarget, "markTargetForOffence: 7", "setStateTo: ATTACK_SHIP");
|
|
"GROUP_ATTACK_TARGET" = ("setStateTo: ATTACK_SHIP");
|
|
"DOCKING_ABORTED" = ("setStateTo: ABORT");
|
|
"COLLISION" = ("setStateTo: ABORT");
|
|
"RESTART_DOCKING" = ("setStateTo: GLOBAL");
|
|
};
|
|
"GO_TO_COORDS" =
|
|
{
|
|
ENTER = (performFaceDestination, dockEscorts);
|
|
"FRUSTRATED" = (performFaceDestination);
|
|
"FACING_DESTINATION" = ("setSpeedFactorTo: 1.0", recallDockingInstructions, performFlyToRangeFromDestination);
|
|
ATTACKED = ("setStateTo: ATTACK_SHIP");
|
|
"OFFENCE_COMMITTED" = (setTargetToFoundTarget, "markTargetForOffence: 7", "setStateTo: ATTACK_SHIP");
|
|
"GROUP_ATTACK_TARGET" = ("setStateTo: ATTACK_SHIP");
|
|
"DESIRED_RANGE_ACHIEVED" = (requestDockingCoordinates, "setStateTo: AWAIT_COORDS");
|
|
"DOCKING_ABORTED" = ("setStateTo: ABORT");
|
|
"COLLISION" = ("setStateTo: ABORT");
|
|
"RESTART_DOCKING" = ("setStateTo: GLOBAL");
|
|
DOCKED = ("setStateTo: EXIT_SYSTEM");
|
|
};
|
|
ABORT =
|
|
{
|
|
ENTER = (abortDocking, "setSpeedTo: 0.0", setDestinationToDockingAbort, "setDesiredRangeTo: 500.0", performFaceDestination);
|
|
"FACING_DESTINATION" = ("setSpeedFactorTo: 1.0", "setDesiredRangeTo: 500.0", performFlyToRangeFromDestination);
|
|
"RESTART_DOCKING" = ("setStateTo: GLOBAL");
|
|
"REACHED_SAFETY" = (performIdle, "setStateTo: GLOBAL");
|
|
"DESIRED_RANGE_ACHIEVED" = (performIdle, "setStateTo: GLOBAL");
|
|
ATTACKED = ("setStateTo: ATTACK_SHIP");
|
|
"OFFENCE_COMMITTED" = (setTargetToFoundTarget, "markTargetForOffence: 7", "setStateTo: ATTACK_SHIP");
|
|
"GROUP_ATTACK_TARGET" = ("setStateTo: ATTACK_SHIP");
|
|
};
|
|
"ATTACK_SHIP" =
|
|
{
|
|
ENTER = (abortDocking, setTargetToFoundTarget, "setAITo: interceptAI.plist");
|
|
RESTARTED = (performIdle, "setStateTo: GLOBAL");
|
|
};
|
|
"EXIT_SYSTEM" =
|
|
{
|
|
ENTER = (exitAI);
|
|
};
|
|
} |