201 Commits

Author SHA1 Message Date
Eric Walch
e5a6411d1a - using the js method 'launchPlayer()' during one of the two docking handlers has no longer any undesirable side effect.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4737 127b21dd-08f5-0310-b4b7-95ae10353056
2012-01-11 19:43:16 +00:00
Eric Walch
450c395138 - AI fix for homeAI. When multiple escape pods are launched, there is no longer a part suddenly disappearing.
- AI fix for looting to prevent a ship circling around a cargo pod as I witnessed the other day.

git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4673 127b21dd-08f5-0310-b4b7-95ae10353056
2011-12-02 17:18:30 +00:00
Eric Walch
cf7ed44372 - Launching traders with a 'sunskimmer' role now start with sufficient heat insulation for sunskimming.
- Added an AI command 'checkHeatInsulation' (returns either: INSULATION_OK or INSULATION_POOR)
- ship_temperature no longer becomes negative (and stays negative) after a witchspace jump from a hot area. (delta_t can be several seconds on the first update after a jump)

git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4647 127b21dd-08f5-0310-b4b7-95ae10353056
2011-11-15 19:41:46 +00:00
Eric Walch
8316cc2a1d - Docking/launching ships now look at totalBoundingBox instead of boundingBox to see if they fit in the dock. Same boundingBox to totalBoundingBox change for calculating needed orientating to the dock while docking.
- enteringTraderAI now checks for interstellar space (in case of a misjump).

git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4553 127b21dd-08f5-0310-b4b7-95ae10353056
2011-05-18 20:16:57 +00:00
Eric Walch
34b4427b41 - Ships disgorging from wormholes now also use witchspaceLeavingEffects
- Pirate Escorts now correctly follow their leaded trough a wormhole
- Added the AI message ACCEPTED_ESCORT to be able to send attack instructions to the escort when self in fight.

git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4523 127b21dd-08f5-0310-b4b7-95ae10353056
2011-04-24 10:07:33 +00:00
Eric Walch
5bea193153 - Added the AI command 'setDesiredRangeForWaypoint' to set a flexible range instead of the fixed value of 50, so that slow turning ships also can use the standard 'gotoWaypointAI.plist'
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4070 127b21dd-08f5-0310-b4b7-95ae10353056
2011-01-15 10:36:54 +00:00
Eric Walch
3873fdfe42 - Docking and launching ships now correct for the length of a docking corridor inside the station.
- Added an AI reactToMassage "STATION_LAUNCHED_SHIP", to allow an AI to react on a launch.
- fixed the missing "shipWillLaunchFromStation" event for NPC ships.

git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3923 127b21dd-08f5-0310-b4b7-95ae10353056
2010-12-30 09:27:44 +00:00
Eric Walch
029f2860fe Added a "distresMessageReceived(agressor, sender)" event handler.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3838 127b21dd-08f5-0310-b4b7-95ae10353056
2010-11-27 12:20:18 +00:00
Marc
b3647b67bc escape pods part II:
- player and NPCs can eject at all times now.
- if pod ejected in witchspace, it's game over for the player, unless overridden by oxp.
- if pod ejected in normal space, the player will always reappear at the main station, unless overridden by oxp!
- new worldScript event 'escapePodSequenceOver' to override escape pod behaviour: if at the end of the event player.ship.target is a dockable station, the player will reappear inside it, otherwise game over!
- new translation string: gameover-escape-pod

git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3809 127b21dd-08f5-0310-b4b7-95ae10353056
2010-11-13 20:10:05 +00:00
Eric Walch
4f38b58b2d - Fixed a compiler warning in the last commit
- Added changes to interceptAI and policeInterceptAI

git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3785 127b21dd-08f5-0310-b4b7-95ae10353056
2010-10-29 09:57:58 +00:00
Eric Walch
b4e88583c5 - changed code that made that every entity, including subentities got an escortGroup.
- further tweaks in jink setting for dealing with high speed approach
- added code to route1patrol that allows escorts in this AI to sometimes start escorting again.

git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3771 127b21dd-08f5-0310-b4b7-95ae10353056
2010-10-17 10:51:23 +00:00
Eric Walch
9838e68a1c - allow a player ship that is to big for a dock to launch.
- small changes to the jink values and test locations for proximity
- allow proximity warnings for stations in certain situations.

git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3764 127b21dd-08f5-0310-b4b7-95ae10353056
2010-10-02 15:27:06 +00:00
Eric Walch
5042c648eb - Added a size check for launching and docking ship.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3759 127b21dd-08f5-0310-b4b7-95ae10353056
2010-09-19 09:30:46 +00:00
Eric Walch
3c099b9a59 - Added AI command: thargonCheckMother for a more efficient thargon handling.
- Improved the thargletAI slightly.
- Changed policeInterceptAI so that launching ships without target immediately clear the launch area.
- Moved the constrictor script from shipData to the worldScript. (to prevent problems with bad oxp copies of the constrictor)

git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3752 127b21dd-08f5-0310-b4b7-95ae10353056
2010-09-16 20:13:01 +00:00
Jens Ayton
d16dc20f0b All scripts now use underscore prefix for custom properties. Also general cleanup and linting.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3732 127b21dd-08f5-0310-b4b7-95ae10353056
2010-07-30 21:54:50 +00:00
Eric Walch
6ee5ad11c4 Fixed bug with "exitting" pirates that wee blocked
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3677 127b21dd-08f5-0310-b4b7-95ae10353056
2010-07-17 16:35:16 +00:00
Eric Walch
aacb61e8fb behaviour_fly_from_destination now does let a ship fly in the correct direction.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3650 127b21dd-08f5-0310-b4b7-95ae10353056
2010-07-03 10:11:00 +00:00
Jens Ayton
df8e47ddf4 Fixed disappearing planet textures.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3459 127b21dd-08f5-0310-b4b7-95ae10353056
2010-06-04 11:27:24 +00:00
Eric Walch
8cf0067702 Set the player think time for AI from 60 back to 2 seconds.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3458 127b21dd-08f5-0310-b4b7-95ae10353056
2010-06-04 11:20:47 +00:00
Jens Ayton
084248f98f Tiny tweaks: renamed AI methods scanFor{Nearest|Random}Merchantmen to ...Merchantman (with compatibility aliases). Removed all Light 0 stuff from shaders. Belatedly bumped cache format version for changed dust shader.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3314 127b21dd-08f5-0310-b4b7-95ae10353056
2010-05-09 23:13:12 +00:00
Jens Ayton
46c40ec186 More graceful handling of disappearing docking target.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3308 127b21dd-08f5-0310-b4b7-95ae10353056
2010-05-09 15:21:06 +00:00
Eric Walch
c1a3e4c425 - Added some missing keys to verifyOxp.plist
- Minor AI changes.

git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3018 127b21dd-08f5-0310-b4b7-95ae10353056
2010-02-13 17:55:02 +00:00
Eric Walch
e8ae0f1f23 AI tweaks
- Added a few extra tests for OFFENCE_COMMITTED so attack on clean ships around the station are better registered.
- Raised the jump range for an exitingTrader to outside the mass lock range of a heavy torus station. (Won't affect other traders as ships should never reach this range.)

git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3003 127b21dd-08f5-0310-b4b7-95ae10353056
2010-02-02 21:06:21 +00:00
Eric Walch
6dcb052dc2 AI tweaks
- Added a few extra tests for OFFENCE_COMMITTED so attack on clean ships around the station are better registered.
- Raised the jump range for an exitingTrader to outside the mass lock range of a heavy torus station. (Won't affect other traders as ships should never reach this range.)

git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3002 127b21dd-08f5-0310-b4b7-95ae10353056
2010-02-02 21:05:10 +00:00
Eric Walch
f502f30e66 - planets now rotate around their poles, even script added ones
- changing orientation by JS script now correctly changes the rotation axis
- relocated the "stationLaunchedShip" handler
- escorts looking for a new master won't find masters that are busy targeting the escort.

git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@2923 127b21dd-08f5-0310-b4b7-95ae10353056
2010-01-01 11:19:14 +00:00
Eric Walch
cb41cf425d - Changed the default "defense_ship_role" of rock-stations from "police" to "hermit-ship".
- Added a boolean parameter to the JS command: launchShipWithRole(role : String [, abortAllDockings : boolean]) : shipEntity

git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@2880 127b21dd-08f5-0310-b4b7-95ae10353056
2009-12-12 21:31:32 +00:00
Marc
46896e81ed Oops! Added the missing TARGET_FOUND. & I should really stop tweaking this thing now!
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@2845 127b21dd-08f5-0310-b4b7-95ae10353056
2009-12-05 20:04:10 +00:00
Marc
cd8e1ac956 - tweaked thargoids a bit more! If they're too tough, we can tweak their AI yet again!
- minor equipment.plist tidy-up.

git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@2844 127b21dd-08f5-0310-b4b7-95ae10353056
2009-12-05 19:54:05 +00:00
Marc
0556a1e091 - attempted to get a slightly more challenging thargoid AI
- added js function clock.addSeconds(time offset)
- code cleanup: another tweak to coastlines, some ship functions now return more meaningful values.

git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@2843 127b21dd-08f5-0310-b4b7-95ae10353056
2009-12-05 18:18:25 +00:00
Eric Walch
8119a48c8b - Corrected bug in the 2 second AI delay for station launches
- Corrected escortAI.plist so it now follows their mother better after a station launch

git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@2741 127b21dd-08f5-0310-b4b7-95ae10353056
2009-11-14 13:19:26 +00:00
Jens Ayton
31a5c76622 sunSkimExitAI fixes: ATTACK_SHIP no longer tries to go to non-existent state HEAD_AWAY_FROM_PLANET on victory; it and FLEE instead go to a state that chooses between restarting and exiting based on current energy level.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@2739 127b21dd-08f5-0310-b4b7-95ae10353056
2009-11-12 18:15:27 +00:00
Jens Ayton
d76d50eb1d minerAI now goes to FLEE rather than non-existing ATTACK_SHIP if attacked in DOCK_WITH_STATION.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@2737 127b21dd-08f5-0310-b4b7-95ae10353056
2009-11-12 17:18:56 +00:00
Jens Ayton
bd634a4237 Excluded BEHAVIOUR_ATTACK_MINING_TARGET from hasHostileTarget.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@2736 127b21dd-08f5-0310-b4b7-95ae10353056
2009-11-12 16:23:01 +00:00
Jens Ayton
578a0f351f AI graphing now handles setAITo: and switchAITo:. TODO: handle returns from setAITo: and hyperspace. Also removed some redundant AI states/handers.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@2735 127b21dd-08f5-0310-b4b7-95ae10353056
2009-11-12 12:09:54 +00:00
Eric Walch
fd2789fa7a Added two new properties to ship:
* maxThrust  (read-only)
* thrust (read/write for npc, read-only for player and clamped between 0 and maxThrust)
Fixed bug with ships flying out of range when attacking with rear military laser.
Changed miner and scavenger AI to not get lost when flying out of a station scanner range.

git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@2726 127b21dd-08f5-0310-b4b7-95ae10353056
2009-11-07 11:21:04 +00:00
Eric Walch
d80f8a1bfd Added a AI command "setThrustFactorTo:" Re-added the group feature for missiles with Thargoid scanclass after having seen some friendly fire going on between a thargoid and a tharglet.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@2713 127b21dd-08f5-0310-b4b7-95ae10353056
2009-10-27 17:27:33 +00:00
Eric Walch
93ba473d78 fixed sanity check confusion with docked station during firing the playerWillDockStation. Now all places that lose a target while tracking targets will send a noteLostTarget and will go into performIdle. When noteLostTarget was called without a target, it still will notify the ship about losing a target.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@2673 127b21dd-08f5-0310-b4b7-95ae10353056
2009-10-15 17:09:38 +00:00
Eric Walch
55e21608d2 Scooping cargo no longer pushes 3 times an AI on stack. When previous scooped cargo is dumped or released after an explosion, it now continues in the AI were it was interrupted. This will mainly benefit escape-pods that continue flying home.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@2627 127b21dd-08f5-0310-b4b7-95ae10353056
2009-10-02 12:49:09 +00:00
Eric Walch
5e8ee68a8f Added a "messageMother: ESCORT_ATTACKED" to the escort AI for escorts busy escorting. Added a response to this message for mothers in ATTACK mode to selectively release escorts.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@2595 127b21dd-08f5-0310-b4b7-95ae10353056
2009-09-25 14:50:28 +00:00
Jens Ayton
3a35a277ed Scavengers no longer try to switch to non-existent ATTACK_SHIP state when attacked during docking.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@2582 127b21dd-08f5-0310-b4b7-95ae10353056
2009-09-23 16:58:10 +00:00
Eric Walch
19ad69a4f3 Added AI commands: setCoordinatesFromPosition and checkEnergy. Used these commands in pirateAI.plist to send pirates back to their original position after a fight so they keep together as a group.
Player now sends "CARGO_DUMPED" to all ships in range. Pirates with cargo room can now react on this.

git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@2518 127b21dd-08f5-0310-b4b7-95ae10353056
2009-09-19 10:12:54 +00:00
Eric Walch
ccfce445a3 Fixed missing a TARGET_LOST message in hardMissileAI leading to not reaction on cloaking. Instead added a deliberate short pause on missile and hardMissele explosions. It won't detonate anymore during that pause, but still can give scrap damage when colliding with missile.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@2493 127b21dd-08f5-0310-b4b7-95ae10353056
2009-09-13 14:18:43 +00:00
Marc
16a0d260fe - reduced the chances of two ships going for the same loot. Needs more work.
- system.info.sun_gone_nova will take effect immediately, making the sun go nova, and killing the whole population instantly. No save or load possible inside a nova system!
- minor code tidying up!

git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@2446 127b21dd-08f5-0310-b4b7-95ae10353056
2009-09-08 23:25:52 +00:00
Eric Walch
eba04c02fc Added an AI command "checkAegis" that recalls the aegis messages. When traders or patrols go into a wayPointAI.plist or an interceptAI.plist they sometime miss this message. Now they can use checkAegis on RESTART.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@2369 127b21dd-08f5-0310-b4b7-95ae10353056
2009-09-03 19:44:45 +00:00
Eric Walch
b585e1d0ed Added a JS method for player: addMessageToArrivalReport(message). Added a eventhandler that fires after the last arrivalReportScreen is shown. Changed the internal missions so they no longer overwrite this report.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@2276 127b21dd-08f5-0310-b4b7-95ae10353056
2009-08-06 20:24:25 +00:00
Eric Walch
900e439603 Limited checkcourseToDestination to scanner range so it only changes course when it actually "sees" something.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@2274 127b21dd-08f5-0310-b4b7-95ae10353056
2009-08-03 17:11:24 +00:00
Eric Walch
fb4f1d6690 Added AI command "setSpeedToCruiseSpeed". Populator no longer changes AI for ships with auto_ai is false. Bounty for script added pirates and traders follow now populator rules when auto_ai is true.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@2271 127b21dd-08f5-0310-b4b7-95ae10353056
2009-08-01 11:56:30 +00:00
Eric Walch
758a6d0b1c Added a checkOwnLegalStatus command and used it for a career selection for escorts. Added a playerBoughtNewShip eventhandler. Hardcoded Xeer back in missiontext were it revers to the previous galaxy.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@2266 127b21dd-08f5-0310-b4b7-95ae10353056
2009-07-26 11:20:42 +00:00
Eric Walch
7842440808 Added a new AI command launchIndependentShipWithRole. Gave sunskimmers heatshielding so they get a chance to jump. Added missile delay to sunskimmerAI.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@2259 127b21dd-08f5-0310-b4b7-95ae10353056
2009-07-24 19:51:37 +00:00
Eric Walch
13cd03aac2 Fixed bug with wrong pendingEscort count. launchTrader now launches traders with correct escorts, also group corrected. Added new slowdown criteria to prevent ships circling around their target. Fixed bug with big defined suns.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@2255 127b21dd-08f5-0310-b4b7-95ae10353056
2009-07-22 19:15:18 +00:00