4308 Commits

Author SHA1 Message Date
Chris Morris
ae84915d19 Some AI changes and related tidying:
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
2012-07-29 20:21:11 +00:00
Jens Ayton
267276263e [Mac] HiDPI icon for saved games.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5143 127b21dd-08f5-0310-b4b7-95ae10353056
2012-07-29 17:17:53 +00:00
Chris Morris
844e9139bc Fix typo preventing unmarking of systems by legacy script code
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5142 127b21dd-08f5-0310-b4b7-95ae10353056
2012-07-28 18:44:18 +00:00
Jens Ayton
dd8977752e Removed a test message left in by accident.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5141 127b21dd-08f5-0310-b4b7-95ae10353056
2012-07-28 17:23:43 +00:00
Jens Ayton
31129eaac4 Updated some currently unused Xcode settings to recommended defaults. Renamed shared Xcode schemes so as to stop confusing the poor mailing list commit hook.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5140 127b21dd-08f5-0310-b4b7-95ae10353056
2012-07-28 14:43:57 +00:00
Jens Ayton
90fe22a980 Updates for Xcode 4.4 and Apple LLVM Compiler 4.0 (~= clang 3.1):
* Fixed numerous format string problems, many of them real bugs.
* Added format attribute to OOLog, and fixed more format string problems.
* Cleaned up misuse of +[NSString stringWithString:].
* Updated OS X SDK to 10.7. Deployment target is still 10.5, although ideally
  it should bet 10.6 for 64-bit. (See also long comment in
  oolite-targets.xcconfig.)


git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5139 127b21dd-08f5-0310-b4b7-95ae10353056
2012-07-28 14:26:00 +00:00
Jens Ayton
f1273d4d19 Load logging-related preferences before triggering logging.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5138 127b21dd-08f5-0310-b4b7-95ae10353056
2012-07-27 20:45:16 +00:00
Jens Ayton
74309e7766 Cleanup.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5137 127b21dd-08f5-0310-b4b7-95ae10353056
2012-07-27 20:36:35 +00:00
Jens Ayton
b9d4225490 Logcontrol.plists can now be used in OXPs, with restrictions. Logcontrol.plist entries affect debug console display of log messages.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5136 127b21dd-08f5-0310-b4b7-95ae10353056
2012-07-27 20:17:20 +00:00
Chris Morris
1e8c28aef3 Remove stray semicolon
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5135 127b21dd-08f5-0310-b4b7-95ae10353056
2012-07-27 15:19:44 +00:00
Chris Morris
66cb3ffc84 Fix compiler warning
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5134 127b21dd-08f5-0310-b4b7-95ae10353056
2012-07-27 06:34:47 +00:00
Chris Morris
c907a2a7ec Allows the short range chart or long range chart to be specified as the background for a mission screen (background:"SHORT_RANGE_CHART" and background:"LONG_RANGE_CHART")
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5133 127b21dd-08f5-0310-b4b7-95ae10353056
2012-07-26 18:54:26 +00:00
Jens Ayton
6dc8108106 [Mac] Added app category metadata.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5132 127b21dd-08f5-0310-b4b7-95ae10353056
2012-07-26 15:30:38 +00:00
Chris Morris
2a7ac40e57 Add page support to the over-filled Manifest (F5 F5) screen.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5131 127b21dd-08f5-0310-b4b7-95ae10353056
2012-07-25 20:46:31 +00:00
Chris Morris
37703e68c3 Change allowPlayerDocking to disallowedDockingCollides (with approximately reversed meaning)
Fix some bugs with player docking clearance in new docking code
Disable logging of "ship could not launch because there aren't any launch docks"


git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5130 127b21dd-08f5-0310-b4b7-95ae10353056
2012-07-24 16:51:28 +00:00
Jens Ayton
002cbddf0a willOpenDockingPortFor() now includes both parameters.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5129 127b21dd-08f5-0310-b4b7-95ae10353056
2012-07-24 13:44:21 +00:00
Jens Ayton
72004f9109 Disabled debug drawing tied to reportAIMessages, which seldom if ever does anything useful.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5128 127b21dd-08f5-0310-b4b7-95ae10353056
2012-07-24 13:42:35 +00:00
Jens Ayton
722bd24b0d Build breakage.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5127 127b21dd-08f5-0310-b4b7-95ae10353056
2012-07-24 13:42:06 +00:00
Nikos Barkas
f25cce7108 Updated SDL source and external libraries build text to include the changes in the SDL library required for fixing a crash related to setting gamma. The fixed SDL.dll was committed with r4877.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5126 127b21dd-08f5-0310-b4b7-95ae10353056
2012-07-24 12:54:25 +00:00
Jens Ayton
0bdac75f71 Fixed an inaccurate comment.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5125 127b21dd-08f5-0310-b4b7-95ae10353056
2012-07-24 12:19:36 +00:00
Chris Morris
324311a78b Condition scripts for equipment, shipdata, shipyard.
Add condition_script = "file.js" line to entry
Then calls in that file
 - allowSpawnShip(shipkey) for shipdata.plist
 - allowOfferShip(shipkey) for shipyard.plist
 - allowAwardEquipment(eqkey,ship) for equipment.plist
if exists and returns false, prevents use. Otherwise existing behaviour including conditions from other sources.


git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5124 127b21dd-08f5-0310-b4b7-95ae10353056
2012-07-23 20:36:34 +00:00
Jens Ayton
d69513681f Added joystick buttons for target memory.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5123 127b21dd-08f5-0310-b4b7-95ae10353056
2012-07-22 22:00:47 +00:00
Chris Morris
eab89ef2b6 Fix typo in alertLevel calculation
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5122 127b21dd-08f5-0310-b4b7-95ae10353056
2012-07-22 15:10:47 +00:00
Chris Morris
bd013f5071 A couple more wormhole-related fixes for escorts
- escorts now enter wormhole if it ambushed their mothership
 - escorts now enter wormhole if clock adjustment while player docks makes it disappear (stops "lost" escorts hanging around station aegis)


git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5121 127b21dd-08f5-0310-b4b7-95ae10353056
2012-07-22 13:48:03 +00:00
Jens Ayton
e574cb0514 Weapons Offline now implies Missiles Safe.
With weapons offline, the Target key works like the Ident key, and the Missile Safe key always prints "Ident system deactivated" instead of "Missiles on safety".


git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5120 127b21dd-08f5-0310-b4b7-95ae10353056
2012-07-22 11:26:14 +00:00
Chris Morris
1fb6c671fa mission.markedSystems() to allow querying of which systems are set.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5119 127b21dd-08f5-0310-b4b7-95ae10353056
2012-07-21 21:34:04 +00:00
Jens Ayton
7572fbafc2 Fixed Mac build breakage and used more explicit types.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5118 127b21dd-08f5-0310-b4b7-95ae10353056
2012-07-21 21:05:03 +00:00
Chris Morris
adc611c395 Make mission.markSystem/unmarkSystem work on a per-worldscript basis.
All legacy scripts go into a single pot, as do marks from previous versions.
Unmarking removes from the legacy pot as well, for upgrade compatibility.


git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5117 127b21dd-08f5-0310-b4b7-95ae10353056
2012-07-21 20:48:12 +00:00
Jens Ayton
74f8da1c7f Cleanup.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5116 127b21dd-08f5-0310-b4b7-95ae10353056
2012-07-21 15:46:22 +00:00
Jens Ayton
3fad157c20 Cleanup.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5115 127b21dd-08f5-0310-b4b7-95ae10353056
2012-07-21 15:39:03 +00:00
Jens Ayton
ce69e6169f Fixed (squashed) exception when trying to right-arrow past end of joystick config screen.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5114 127b21dd-08f5-0310-b4b7-95ae10353056
2012-07-21 15:20:24 +00:00
Chris Morris
34673db0d5 A cornucopia of changes:
- Fix "ghost wormhole" bug most common around zero-distance doubles
 - Fix minor bug in handling of wormhole player carriers
 - Fix display bug with wormholes and sun
 - Fix other minor bugs with wormholes
 - Add "dayChanged" world script event
 - Remove some runaway bounties, and remove some player/NPC distinction in bounty awards
 - Offenders won't call for help, but may still beg for mercy
 - Traders may dump cargo when attacked by NPCs, not just the player (and sometimes they will escape as a result, too)
 - new "long-range-chart-title-N" descriptions.plist entries for individually-named galaxies.


git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5113 127b21dd-08f5-0310-b4b7-95ae10353056
2012-07-20 20:04:02 +00:00
Jens Ayton
abd2a35fb6 Removed a debug log statement
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5112 127b21dd-08f5-0310-b4b7-95ae10353056
2012-07-20 14:52:35 +00:00
Chris Morris
4040bf1080 Add OOWeakset to Linux/Windows build file
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5111 127b21dd-08f5-0310-b4b7-95ae10353056
2012-07-20 07:02:36 +00:00
Jens Ayton
5cafda59d9 Implemented OOWeakSet - like NSMutableSet, but uses weakrefs and cleans them up as needed.
Use OOWeakSet for _shipsOnHold in StationEntity.

This implementation is pretty naive. I have a "better" version, only it consistently crashes a lot.

Also, integrated unit tests (when building with Xcode 4). Tests are run at the end of TestRelease and Deployment builds, and can be run manually with Product -> Test.


git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5109 127b21dd-08f5-0310-b4b7-95ae10353056
2012-07-19 17:42:24 +00:00
Jens Ayton
3e6098fa3c Added ability to override script_info in subentity dictionaries.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5108 127b21dd-08f5-0310-b4b7-95ae10353056
2012-07-17 20:54:04 +00:00
Jens Ayton
2b4d080713 Cleanup.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5107 127b21dd-08f5-0310-b4b7-95ae10353056
2012-07-17 20:32:17 +00:00
Jens Ayton
20894d14fe Partial rollback of r5097 in an attempt to assuage the deity of Linux builds.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5106 127b21dd-08f5-0310-b4b7-95ae10353056
2012-07-17 19:26:48 +00:00
Jens Ayton
2378df9e35 Plist syntax nit.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5099 127b21dd-08f5-0310-b4b7-95ae10353056
2012-07-16 11:47:00 +00:00
Chris Morris
d77bee3a79 Fix missing "target lost" checks in new combat AIs, and related CTD bug.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5098 127b21dd-08f5-0310-b4b7-95ae10353056
2012-07-15 15:47:02 +00:00
Jens Ayton
03ad0e16a4 Since r5086 didn't break any builds, reap the benefit of tgmath.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5097 127b21dd-08f5-0310-b4b7-95ae10353056
2012-07-14 20:09:33 +00:00
Chris Morris
afbd5950f5 PS.takeInternalDamage()
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5096 127b21dd-08f5-0310-b4b7-95ae10353056
2012-07-14 11:26:22 +00:00
Chris Morris
725bd11ad9 Dock.accept[Docking|Launching]RequestFrom(ship) script events return BOOL
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5090 127b21dd-08f5-0310-b4b7-95ae10353056
2012-07-13 15:45:24 +00:00
Chris Morris
b8fff4d8f0 Dock.allowsDocking and allowsLaunching now R/W
Station.willOpenDockingPortFor(dock,ship) shipScript event returns BOOL, if true converts permreject into tempreject.


git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5089 127b21dd-08f5-0310-b4b7-95ae10353056
2012-07-13 15:10:34 +00:00
Jens Ayton
96221108ce Sneakily switching to tgmath.h to see if anyone explodes.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5086 127b21dd-08f5-0310-b4b7-95ae10353056
2012-07-13 13:33:28 +00:00
Chris Morris
8c9af66a0f Default value for allow_player_docking should be whatever allow_docking has ended up as.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5085 127b21dd-08f5-0310-b4b7-95ae10353056
2012-07-13 10:43:49 +00:00
Chris Morris
2f8c49c4a5 player.ship.currentWeapon helper property
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5084 127b21dd-08f5-0310-b4b7-95ae10353056
2012-07-12 21:34:06 +00:00
Jens Ayton
3c5ee8db1a Removed a TODO that's actually been done.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5083 127b21dd-08f5-0310-b4b7-95ae10353056
2012-07-12 19:28:52 +00:00
Chris Morris
2f3f504ea3 Prevent overshooting turns in combat at low frame rates / high TAF.
No noticeable effect at medium or high frame rates.


git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5082 127b21dd-08f5-0310-b4b7-95ae10353056
2012-07-12 16:15:43 +00:00
Chris Morris
9314a85771 Replace direct bounty setting with call to function
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5081 127b21dd-08f5-0310-b4b7-95ae10353056
2012-07-12 13:58:54 +00:00