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
Chris Morris
e59261e884
Allow setCustomView to specify weapon direction
...
Add resetCustomView to return to normal view
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5080 127b21dd-08f5-0310-b4b7-95ae10353056
2012-07-12 13:24:16 +00:00
Chris Morris
cbabc68986
Deal with permanent and temporary rejects from docking in correct order for multidock vessels
...
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5079 127b21dd-08f5-0310-b4b7-95ae10353056
2012-07-12 12:36:04 +00:00
Jens Ayton
6a52ff134f
Prefixing applies to us, too.
...
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5078 127b21dd-08f5-0310-b4b7-95ae10353056
2012-07-12 11:55:33 +00:00
Chris Morris
b56e4acb72
Add allow_player_docking property
...
Add a virtual dock subent to stations without dock subents. Proximity docking should now work as before
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5077 127b21dd-08f5-0310-b4b7-95ae10353056
2012-07-12 11:27:54 +00:00
Jens Ayton
80701e3522
Fixed particularly grating method name setFound_target:.
...
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5076 127b21dd-08f5-0310-b4b7-95ae10353056
2012-07-12 00:06:00 +00:00
Jens Ayton
126ba2fef2
More abstraction, less [self parentEntity].
...
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5075 127b21dd-08f5-0310-b4b7-95ae10353056
2012-07-11 22:40:49 +00:00
Jens Ayton
e147080bf0
Introduced StationEntity's shipsOnHold to the concept of a "set" of "objects". DockEntity could benefit from this, but it should probably be abstracted into a "weak set" first.
...
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5074 127b21dd-08f5-0310-b4b7-95ae10353056
2012-07-11 22:23:28 +00:00
Jens Ayton
6b29596522
Cleanup and renaming.
...
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5073 127b21dd-08f5-0310-b4b7-95ae10353056
2012-07-11 21:25:59 +00:00
Jens Ayton
568e0fe1a7
Cleanup.
...
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5072 127b21dd-08f5-0310-b4b7-95ae10353056
2012-07-11 21:02:02 +00:00
Chris Morris
10e080e3b4
Fix compiler warning
...
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5071 127b21dd-08f5-0310-b4b7-95ae10353056
2012-07-11 19:10:59 +00:00
Chris Morris
a4c82919cf
Improve multidock allocation when docking and launching both busy
...
Add Entity isDock to JS interface
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5070 127b21dd-08f5-0310-b4b7-95ae10353056
2012-07-11 18:25:10 +00:00
Jens Ayton
6a4a3a43ac
Typos.
...
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5069 127b21dd-08f5-0310-b4b7-95ae10353056
2012-07-11 17:15:41 +00:00
Jens Ayton
a7227e6458
Cleanup.
...
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5068 127b21dd-08f5-0310-b4b7-95ae10353056
2012-07-11 16:30:24 +00:00
Jens Ayton
e4f3779c74
Fixed two crashes when full up on entities.
...
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5067 127b21dd-08f5-0310-b4b7-95ae10353056
2012-07-11 16:27:29 +00:00
Chris Morris
544880d698
Player can now launch/dock with stations using legacy dock method. (NPCs still can't)
...
More efficient checks for no-launch stations in Station launchX methods
Remove magic number in DockEntity, and other cleanup
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5066 127b21dd-08f5-0310-b4b7-95ae10353056
2012-07-11 15:33:22 +00:00
Jens Ayton
6ba3d633ea
Fixed a sign mismatch issue. [Mac] Build system update for r5064.
...
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5065 127b21dd-08f5-0310-b4b7-95ae10353056
2012-07-11 12:43:28 +00:00
Chris Morris
b66fbebcc0
Add basic JS representation of DockEntity
...
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5064 127b21dd-08f5-0310-b4b7-95ae10353056
2012-07-11 11:52:23 +00:00
Chris Morris
52d44e1a58
Fix bug where carrier has multiple docks at different angles
...
Dock-only and launch-only docks now work properly
Some cleanup and bug fixes in station queue handling
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5063 127b21dd-08f5-0310-b4b7-95ae10353056
2012-07-11 10:39:44 +00:00
Chris Morris
2e0ee4070a
More docking changes:
...
- allocate launch queues better when incoming ships
- player only blocks allocated queue now
- fix clearance messages
- allow bays to be named; include bay names in messages (if >1 dock)
- allow bays to be marked launch-only / dock-only. Still some bugs in this bit
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5062 127b21dd-08f5-0310-b4b7-95ae10353056
2012-07-10 22:04:52 +00:00
Jens Ayton
92060a74af
Fixed a sign mismatch.
...
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5061 127b21dd-08f5-0310-b4b7-95ae10353056
2012-07-10 21:02:53 +00:00