2005-04-19 19:53:18 +00:00
|
|
|
{
|
2008-08-03 15:44:57 +00:00
|
|
|
GLOBAL =
|
|
|
|
{
|
|
|
|
ENTER = ("setSpeedFactorTo: 0.1", "setStateTo: LOOK_FOR_SPLINTERS");
|
|
|
|
};
|
|
|
|
"LOOK_FOR_ROCKS" =
|
|
|
|
{
|
|
|
|
ENTER = (performIdle);
|
|
|
|
"TARGET_FOUND" = (setTargetToFoundTarget, "setStateTo: BREAK_ROCKS");
|
|
|
|
"NOTHING_FOUND" = ("setStateTo: DOCK_WITH_STATION");
|
|
|
|
ATTACKED = (setTargetToPrimaryAggressor, broadcastDistressMessage, "setStateTo: FLEE");
|
|
|
|
"INCOMING_MISSILE" = (fightOrFleeMissile, "setStateTo: FLEE");
|
|
|
|
UPDATE = (scanForRocks, "pauseAI: 10.0");
|
|
|
|
};
|
|
|
|
"BREAK_ROCKS" =
|
|
|
|
{
|
|
|
|
ENTER = (performMining);
|
|
|
|
"TARGET_DESTROYED" = ("setStateTo: LOOK_FOR_SPLINTERS");
|
|
|
|
"TARGET_LOST" = ("setStateTo: LOOK_FOR_SPLINTERS");
|
|
|
|
ATTACKED = (setTargetToPrimaryAggressor, broadcastDistressMessage, "setStateTo: FLEE");
|
|
|
|
"INCOMING_MISSILE" = (fightOrFleeMissile, "setStateTo: FLEE");
|
|
|
|
};
|
|
|
|
"LOOK_FOR_SPLINTERS" =
|
|
|
|
{
|
2009-07-08 16:20:10 +00:00
|
|
|
ENTER = (performIdle, checkForFullHold);
|
2008-08-03 15:44:57 +00:00
|
|
|
"TARGET_FOUND" = (setTargetToFoundTarget, "setStateTo: COLLECT_STUFF");
|
|
|
|
"NOTHING_FOUND" = ("setStateTo: LOOK_FOR_ROCKS");
|
|
|
|
"HOLD_FULL" = ("setStateTo: DOCK_WITH_STATION");
|
2009-07-08 16:20:10 +00:00
|
|
|
"NO_CARGO_BAY" = ("setStateTo: DOCK_WITH_STATION");
|
2008-08-03 15:44:57 +00:00
|
|
|
ATTACKED = (setTargetToPrimaryAggressor, broadcastDistressMessage, "setStateTo: FLEE");
|
|
|
|
"INCOMING_MISSILE" = (fightOrFleeMissile, "setStateTo: FLEE");
|
|
|
|
UPDATE = (scanForRandomLoot, "pauseAI: 10.0");
|
|
|
|
};
|
|
|
|
"COLLECT_STUFF" =
|
|
|
|
{
|
|
|
|
ENTER = (performCollect);
|
|
|
|
FRUSTRATED = ("setStateTo: LOOK_FOR_SPLINTERS");
|
2009-07-08 16:20:10 +00:00
|
|
|
"CARGO_SCOOPED" = ("setStateTo: LOOK_FOR_SPLINTERS");
|
|
|
|
"HOLD_FULL" = ("setStateTo: DOCK_WITH_STATION");
|
2008-08-03 15:44:57 +00:00
|
|
|
"TARGET_LOST" = ("setStateTo: LOOK_FOR_SPLINTERS");
|
|
|
|
"COLLISION" = ("setStateTo: LOOK_FOR_SPLINTERS");
|
|
|
|
ATTACKED = (setTargetToPrimaryAggressor, broadcastDistressMessage, "setStateTo: FLEE");
|
|
|
|
"INCOMING_MISSILE" = (fightOrFleeMissile, "setStateTo: FLEE");
|
|
|
|
};
|
|
|
|
"DOCK_WITH_STATION" =
|
|
|
|
{
|
2005-06-08 10:22:59 +00:00
|
|
|
ENTER = (setTargetToStation, "setDesiredRangeTo: 5000.0", performIntercept);
|
|
|
|
"DESIRED_RANGE_ACHIEVED" = ("setAITo: dockingAI.plist");
|
2008-08-03 15:44:57 +00:00
|
|
|
ATTACKED = (setTargetToPrimaryAggressor, broadcastDistressMessage, "setStateTo: ATTACK_SHIP");
|
|
|
|
"INCOMING_MISSILE" = (fightOrFleeMissile, "setStateTo: FLEE");
|
|
|
|
};
|
|
|
|
FLEE =
|
|
|
|
{
|
|
|
|
ENTER = ("setDesiredRangeTo: 25600", performFlee);
|
|
|
|
"INCOMING_MISSILE" = (fightOrFleeMissile, "setStateTo: FLEE");
|
|
|
|
"REACHED_SAFETY" = ("setSpeedTo: 0.0", performIdle);
|
|
|
|
"ENERGY_FULL" = (performIdle, "setStateTo: LOOK_FOR_SPLINTERS");
|
|
|
|
"TARGET_LOST" = (performIdle, "setStateTo: LOOK_FOR_SPLINTERS");
|
|
|
|
};
|
2009-07-08 16:20:10 +00:00
|
|
|
}
|