2a3ece755c
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@76 127b21dd-08f5-0310-b4b7-95ae10353056
125 lines
2.0 KiB
Plaintext
125 lines
2.0 KiB
Plaintext
{
|
|
COLLECT_STUFF = {
|
|
ATTACKED = (
|
|
setTargetToPrimaryAggressor,
|
|
broadcastDistressMessage,
|
|
"setStateTo: FLEE"
|
|
);
|
|
CARGO_SCOOPED = (
|
|
checkForFullHold,
|
|
"setStateTo: LOOK_FOR_STUFF"
|
|
);
|
|
COLLISION = (
|
|
"setStateTo: LOOK_FOR_STUFF"
|
|
);
|
|
ENTER = (
|
|
performCollect
|
|
);
|
|
EXIT = (
|
|
);
|
|
FRUSTRATED = (
|
|
"setStateTo: LOOK_FOR_STUFF"
|
|
);
|
|
HOLD_FULL = (
|
|
"setStateTo: DOCK_WITH_STATION"
|
|
);
|
|
INCOMING_MISSILE = (
|
|
fightOrFleeMissile,
|
|
"setStateTo: FLEE"
|
|
);
|
|
TARGET_LOST = (
|
|
"setStateTo: LOOK_FOR_STUFF"
|
|
);
|
|
UPDATE = (
|
|
);
|
|
};
|
|
DOCK_WITH_STATION = {
|
|
ATTACKED = (
|
|
setTargetToPrimaryAggressor,
|
|
broadcastDistressMessage,
|
|
"setStateTo: ATTACK_SHIP"
|
|
);
|
|
DESIRED_RANGE_ACHIEVED = (
|
|
"setAITo: dockingAI.plist"
|
|
);
|
|
ENTER = (
|
|
setTargetToStation,
|
|
"setDesiredRangeTo: 5000.0",
|
|
performIntercept
|
|
);
|
|
EXIT = (
|
|
);
|
|
INCOMING_MISSILE = (
|
|
fightOrFleeMissile,
|
|
"setStateTo: FLEE"
|
|
);
|
|
UPDATE = (
|
|
);
|
|
};
|
|
FLEE = {
|
|
ENERGY_FULL = (
|
|
performIdle,
|
|
"setStateTo: LOOK_FOR_STUFF"
|
|
);
|
|
ENTER = (
|
|
"setDesiredRangeTo: 25600",
|
|
performFlee
|
|
);
|
|
EXIT = (
|
|
);
|
|
INCOMING_MISSILE = (
|
|
fightOrFleeMissile,
|
|
"setStateTo: FLEE"
|
|
);
|
|
REACHED_SAFETY = (
|
|
"setSpeedTo: 0.0",
|
|
performIdle
|
|
);
|
|
TARGET_LOST = (
|
|
performIdle,
|
|
"setStateTo: LOOK_FOR_STUFF"
|
|
);
|
|
UPDATE = (
|
|
);
|
|
};
|
|
GLOBAL = {
|
|
ENTER = (
|
|
"setSpeedFactorTo: 1.0",
|
|
"setStateTo: LOOK_FOR_STUFF"
|
|
);
|
|
EXIT = (
|
|
);
|
|
UPDATE = (
|
|
);
|
|
};
|
|
LOOK_FOR_STUFF = {
|
|
ATTACKED = (
|
|
setTargetToPrimaryAggressor,
|
|
broadcastDistressMessage,
|
|
"setStateTo: FLEE"
|
|
);
|
|
ENTER = (
|
|
performIdle
|
|
);
|
|
EXIT = (
|
|
);
|
|
HOLD_FULL = (
|
|
"setStateTo: DOCK_WITH_STATION"
|
|
);
|
|
INCOMING_MISSILE = (
|
|
fightOrFleeMissile,
|
|
"setStateTo: FLEE"
|
|
);
|
|
NOTHING_FOUND = (
|
|
"setStateTo: DOCK_WITH_STATION"
|
|
);
|
|
TARGET_FOUND = (
|
|
setTargetToFoundTarget,
|
|
"setStateTo: COLLECT_STUFF"
|
|
);
|
|
UPDATE = (
|
|
scanForRandomLoot,
|
|
"pauseAI: 10.0"
|
|
);
|
|
};
|
|
} |