Now much more possible for OXPs to add more comms messages.
Priority system to allow occasional messages on particular topics without overwhelming the comms with constant updates.
Also, fix my text editor using 2 tabs as the indent level for JS...
Rename a couple of inconsistent methods
Make the AILib object use private and prototype functions for efficiency
Start reorganising the AILib file to make it easier to edit in future
There's still a subtle bug in the logic somewhere that makes them sometimes return to attacking the player after having been paid off but before picking up all the cargo they've been given.
AI will receive Javascript events shortly after main ship script does. JS AI shi
ps use nullAI.plist as their state-machine AI for simplicity. Likewise there is a nullAI.js which does nothing for ships with plist AIs.
1) Make pirates with full holds (and other offenders using route1traderAI) less likely to go to main station, especially not fugitives. (Expansion of changes from r4770)
2) Experimentally ensure always at least one rock hermit in all non-nova systems. If normal generation does not place a hermit, one is added well away from all spacelanes.
3) New "ATTACKER_MISSED" AI event for when a ship tried to shoot a laser at its target but narrowly missed. Many stock AIs modified to treat this as a hostile action.
4) Tidy function/property names in docking code
5) Add checks for cloaking in some AI routines
6) Use weak refs rather than universal ID for targeting, and clean up
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5144 127b21dd-08f5-0310-b4b7-95ae10353056
Bug fixes:
1) Giving a ship an aft Thargoid laser and a forward Thargoid laser
now has a different effect to giving it just a forward Thargoid
laser. (It gives it double attack power with its laser; use sparingly!)
2) Thargoid laser rate of fire no longer depends on the frame rate.
AI upgrades:
1) Pilots with fear will attempt to flee from Q-Mines at top speed
2) Pilots without fear will attempt to blow up Q-Mines, then avoid the
cloud if unsuccessful.
3) Ships with a Thargoid laser fitted will use the fact that they have
an omnidirectional laser to their advantage in combat.
4) Ships with multidirectional weapons (thargoid lasers, plasma
turrets) can now track multiple targets with those weapons, which
need not be the primary target, and use these weapons as point
defense. New AI commands have been added for optimal use of point
defense, but even old AIs will do reasonably well.
New AI commands:
1) "addPrimaryAggressorAsDefenseTarget"
2) "addFoundTargetAsDefenseTarget"
3) "findNewDefenseTarget"
4) "clearDefenseTargets"
New AI alerts:
1) DEFENSE_TARGET_LOST
2) DEFENSE_TARGET_DESTROYED
3) CASCADE_WEAPON_DETECTED
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4899 127b21dd-08f5-0310-b4b7-95ae10353056
- new behaviour BEHAVIOUR_LAND_ON_PLANET that takes care of the whole landing and removal.
- AI command: performLandOnPlanet. Works only very close (500 meters) to the planet surface were APPROACHING_SURFACE has be send. Otherwise returns: NO_PLANET_NEARBY
- ship event: shipLandedOnPlanet(planet)
- changed the old AI message LANDED_ON_PLANET from normal to reactToMessage. The normal one never triggered because of ship removal in the same update.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4844 127b21dd-08f5-0310-b4b7-95ae10353056
- setTargetToRandomStation will select a random station from all stations within 'desiredRange'. Carriers and stations without npc_traffic are excluded. It returns "NO_STATION_IN_RANGE" or "STATION_FOUND"
- setTargetToLastStation sets the primary target to the last selected station. It returns "NO_STATION_FOUND" when the last station lo longer exists.
- Updated the route1traderAI.plist so that ships with bounty no longer go to the main station as default but start looking for a random station.
- Bugfix: Activating the fuel injector while deceleration from torus speed, no longer drops the speed immediately to max-injector speed.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4770 127b21dd-08f5-0310-b4b7-95ae10353056
- 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