Jens Ayton
e10591c31a
Renamed JS Vector to Vector3D to avoid namespace issues in JavaScript 2.0. Added bounty property back to JS player. Oversight of player vs. player.ship in built-in scripts.
...
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1727 127b21dd-08f5-0310-b4b7-95ae10353056
2008-08-07 08:06:08 +00:00
cmdrjames
89d837daaf
reduce deprecation warnings by changing player.docked to player.ship.docked
...
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1717 127b21dd-08f5-0310-b4b7-95ae10353056
2008-08-02 20:16:22 +00:00
Jens Ayton
87d724fc8a
Fix for bug in prefix script adding player compatibility aliases to all objects.
...
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1716 127b21dd-08f5-0310-b4b7-95ae10353056
2008-08-02 19:19:01 +00:00
Jens Ayton
3315272c00
Split JS Player object into Player and PlayerShip. Made curved sides of arc-detail smooth.
...
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1710 127b21dd-08f5-0310-b4b7-95ae10353056
2008-07-28 17:34:37 +00:00
Jens Ayton
d5fad77a34
Added JS Ship properties cargoSpaceUsed, availableCargoSpace, passengerCount and passengerCapacity; renamed maxCargo to cargoCapacity (and added compatibility getter in prefix script).
...
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1693 127b21dd-08f5-0310-b4b7-95ae10353056
2008-07-15 14:50:25 +00:00
Jens Ayton
a8b39c4c9a
Refactored equipment restriction tests, and apply them in addEquipmentItem: as well as the shopping screen. Added new class representing equipment types, currently only used in these tests. Added new equipment restrictions: requires_free_passenger_berth, requires_full_fuel, requires_non_full_fuel.
...
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1689 127b21dd-08f5-0310-b4b7-95ae10353056
2008-07-10 20:45:02 +00:00
Jens Ayton
53e5244d68
Fixes for patrol AIs (bug #14160 ). Marked Naval Energy Unit incompatible with standard unit. Check docked status in mission scripts for compatibility with scripts that force immediate launch.
...
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1686 127b21dd-08f5-0310-b4b7-95ae10353056
2008-07-08 23:15:33 +00:00
Nikos Barkas
a4dd5f4043
Modified the Thargoid Plans mission script to remove the standard energy unit - damaged or not - before awarding the naval one.
...
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1680 127b21dd-08f5-0310-b4b7-95ae10353056
2008-06-19 15:47:12 +00:00
Jens Ayton
20e62f3151
Removed junk lines from nova script.
...
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1670 127b21dd-08f5-0310-b4b7-95ae10353056
2008-06-03 10:21:34 +00:00
Jens Ayton
6110052f8a
Added JS system.info property and System.infoForSystem() function to replace setPlanetInfo: and setSpecificPlanetInfo:. Currently these are write-only, should be read/write.
...
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1668 127b21dd-08f5-0310-b4b7-95ae10353056
2008-06-03 10:16:40 +00:00
Jens Ayton
b148cfd85d
More work on JavaScript error checking. More rigourous! More informative! More not buggy! And, conversely, probably also more buggy. I've almost certainly broken something silly. Also moved JS nova-related functionality into Sun.
...
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1648 127b21dd-08f5-0310-b4b7-95ae10353056
2008-05-23 07:51:00 +00:00
Jens Ayton
12dc18297b
Changed oolite-constrictor mission version to match release version.
...
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1588 127b21dd-08f5-0310-b4b7-95ae10353056
2008-04-26 14:21:34 +00:00
Jens Ayton
30ee81765c
Fixed script error in cloaking device mission.
...
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1587 127b21dd-08f5-0310-b4b7-95ae10353056
2008-04-26 13:52:18 +00:00
Jens Ayton
01c7ccbc10
Bumped version numbers (trunk to 1.72, 1.71-maintenance to 1.71.1). #ifed out redundant like_ship check in ShipEntity, with log message in event of it turning out not to be redundant.
...
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1577 127b21dd-08f5-0310-b4b7-95ae10353056
2008-04-22 10:44:26 +00:00
Nikos Barkas
56a8907cb5
Checking in Eric's fix for the Constrictor mission incorrectly resetting mission briefing after the Constrictor has been destroyed.
...
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1556 127b21dd-08f5-0310-b4b7-95ae10353056
2008-04-18 09:43:22 +00:00
Jens Ayton
10ea62d940
Fix for subentity matrix glitch. Added debug drawing stuff for ships with reportAIMessages set.
...
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1485 127b21dd-08f5-0310-b4b7-95ae10353056
2008-03-15 16:42:39 +00:00
Jens Ayton
b478d8a435
Nova mission now blows up all stations, not just the main one. Universe addEntity: now returns NO rather than throwing an exception if no slot can be found. Tweaks to autopilot docking behaviour.
...
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1484 127b21dd-08f5-0310-b4b7-95ae10353056
2008-03-15 15:09:18 +00:00
Jens Ayton
2709fd910f
Commented on importance of correct ordering in mission response scripts. (Oh, and r1479 _is_ a fix for the nova problem, I wasn't reading it right.)
...
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1481 127b21dd-08f5-0310-b4b7-95ae10353056
2008-03-14 18:23:13 +00:00
Marc
c809a1fe07
Bugfix: made nova mission work properly.
...
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1479 127b21dd-08f5-0310-b4b7-95ae10353056
2008-03-12 22:34:42 +00:00
Jens Ayton
f67b87aa0d
Ahruman's dazzling distraction attack strikes again. All beep, boop and click sounds now go through customsounds.plist. Setting the player's target through JS now works more or less as expected (locks on ident, with UI feedback, unless a missile is selected in which case current missile is locked on to the new target). Custom sound tags can now expand to other custom sound tags (with recursion checking), and final results are cached. No actual progress on the nova script I thought I was working on.
...
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1477 127b21dd-08f5-0310-b4b7-95ae10353056
2008-03-11 19:49:46 +00:00
Jens Ayton
197119ccc8
All scripts now JavaScript -- adopted somewhat twiddled versions of Eric's scripts, with the cleanup stuff removed (premature optimization is the root of all evil; I'll put it back in if anyone has profiling information indicating it's actually a win). Moved the mission screen function into global-prefix as a generally-available utility function. Wrote JS scripts for the two remaining ships using death_actions. Added Ship.explode(), which kills any ShipEntity through energy damage including the main station. Once again made blowing up the main station with blowUpMainStation (or explode()) work.
...
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1473 127b21dd-08f5-0310-b4b7-95ae10353056
2008-03-10 00:01:30 +00:00
Jens Ayton
e2a2be7f46
Started looking at laser drawing bug, ended up doing lots of cleanup of subentity handling instead.
...
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1456 127b21dd-08f5-0310-b4b7-95ae10353056
2008-03-05 00:06:05 +00:00
Marc
8db171cf6a
bugfix for cloaking device mission, new string added: 'autosave-commander-name'
...
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1447 127b21dd-08f5-0310-b4b7-95ae10353056
2008-03-02 20:41:07 +00:00
Jens Ayton
1fd76123cc
JS mission.choice is now read-write, mission.resetMissionChoice() deprecated.
...
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1430 127b21dd-08f5-0310-b4b7-95ae10353056
2008-02-27 22:50:40 +00:00
Jens Ayton
fe22632e96
More of the same bug fix to prefix script. Added JS systemNameForID() and systemIDForName() methods.
...
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1426 127b21dd-08f5-0310-b4b7-95ae10353056
2008-02-26 18:07:17 +00:00
Marc
d528e563d4
Bugfix for player.dockedStationName
...
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1425 127b21dd-08f5-0310-b4b7-95ae10353056
2008-02-26 14:20:12 +00:00
Jens Ayton
a420a4dbe6
Global JavaScript methods (which aren't constructors) now have names starting with lowercase letters, in accordance with JavaScript norms. There are compatibility aliases for the old forms. Log() and LogWithClass() merged into single log(). All JavaScript compatibility aliases for deprecated forms are now implemented in JavaScript, in the new oolite-global-prefix.js script. Changed all copyright notices regarding the project as a whole from 2004-2007 to 2004-2008.
...
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1414 127b21dd-08f5-0310-b4b7-95ae10353056
2008-02-24 21:07:20 +00:00
Jens Ayton
8a940f724c
Mission choices are now sorted. Converted missiontext.plist to OpenStep syntax, and hotted it up with proper quotation marks and apostrophes. Changed magic numbers in -checkForAegis from integer to float literals. Hid entity.linkedList.verify.error message by default.
...
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1402 127b21dd-08f5-0310-b4b7-95ae10353056
2008-02-22 15:26:40 +00:00
Jens Ayton
b73d9d98ec
Work on replacing two different matrix types with different problems with one type that may have less problems. (I need the matrix to implement generalized cameras. I need the cameras to implement generalized lights. I need the lights to solve a problem with shaders. There might be an additional advantage or two to being able to place a camera anywhere rather than attached to the player, though.)
...
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1385 127b21dd-08f5-0310-b4b7-95ae10353056
2008-02-17 00:50:01 +00:00
Jens Ayton
cba45c8e05
Broke music control out into a separate controller in preparation for JavaScript music interface. As a side effect, mission music should work on SDL builds, and the theme music should loop. I hope. To do: add music Off/On/iTunes control to config menu.
...
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1343 127b21dd-08f5-0310-b4b7-95ae10353056
2008-02-03 15:44:24 +00:00
Jens Ayton
907340dfc8
Fix for missionScreenEnded not being called when launching during a mission screen.
...
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1339 127b21dd-08f5-0310-b4b7-95ae10353056
2008-02-03 00:27:44 +00:00
Jens Ayton
d3db589df3
Added 'don't use runLegacyScriptActions()'.
...
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1335 127b21dd-08f5-0310-b4b7-95ae10353056
2008-02-01 18:27:54 +00:00
Nikos Barkas
40007231b6
Fixed a problem where a ship having a script pre-assigned would not get its scriptactions set. Ships getting destroyed now can respond to whom and why queries for shipDied. Removed hardcoded text from trumbles script. Fixed a typo in descriptions.plist.
...
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1318 127b21dd-08f5-0310-b4b7-95ae10353056
2008-01-21 07:29:31 +00:00
Jens Ayton
a877783cea
Bumped versions for trunk and 1.70-maintenance to 1.71 and 1.70.1 respectively to help avoid confusing them.
...
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1259 127b21dd-08f5-0310-b4b7-95ae10353056
2007-12-03 18:05:21 +00:00
Jens Ayton
df05fbd65f
Updated version numbers.
...
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1250 127b21dd-08f5-0310-b4b7-95ae10353056
2007-12-02 20:43:08 +00:00
Jens Ayton
56eb8f1738
Renamed a bunch of script handlers and gave NPC scripts some events that only player scripts got before. Added compatibility mechanism to point out uses of old handlers.
...
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1247 127b21dd-08f5-0310-b4b7-95ae10353056
2007-12-02 00:50:06 +00:00
Jens Ayton
280f4d7828
Fixed some warnings in Windows build; switched cloaking device pod to use JavaScript implementation now that its script_actions are no longer needed for testing; fiddled with OOCollectionExtractors for a tool I'm fiddling with.
...
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1243 127b21dd-08f5-0310-b4b7-95ae10353056
2007-11-24 15:58:15 +00:00
Jens Ayton
3fbc24887d
* All ships now have a JavaScript script attached, allowing JS scripts to
...
add behaviours to any ship.
* Legacy script_actions, setup_actions, launch_actions and death_actions
handled through default JavaScript script.
* In order to implement the above, JS Ship now has a runLegacyScriptActions
method. This is not to be exposed as an "official" method, though, since
we might want to change the mechanism -- for instance, to "compile"
legacy scripts into JS. Handling dynamically-generated legacy scripts in
that case would be a significant complication.
* Updates for Mac OS X 10.5 "Leopard".
- Errors on reading/writing plist will not cause a crash if building
against the Leopard SDK. (I have no intention of requiring Leopard any
time soon, but future-proofing is good.)
- OOWeakReference is now more efficient when running under Leopard, by
implementing the new "fast forwarding" mechanism.
- Threads now have names set under Leopard, which may provide debugging
advantages.
- Fixed some new build warnings for new version of apple-gcc.
- Updated type declarations to identify Oolite saved games as property
lists.
* Cleaned up PlayerEntityControls.m somewhat. Moved method declarations
into files, fixed indentation, broke up monster giant method of doom.
* Script-generated asteroids now behave like system populator-generated
asteroids (As Seen on BB[TM]).
* Minor optimizations and simplifications of legacy script engine.
* JS System.filteredEntities() now has sensible behaviour if predicate
throws an exception: the predicate is not called again, and null is
returned. The exception is reported and not rethrown.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1240 127b21dd-08f5-0310-b4b7-95ae10353056
2007-11-23 15:04:14 +00:00
Jens Ayton
9c2f6c8ea4
Implemented portableish TCP-based JavaScript debug console. Some rearranging needed for it to be actually usable (I'll get on it tomorrow). Cleaned up Trumbles script.
...
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1189 127b21dd-08f5-0310-b4b7-95ae10353056
2007-10-03 22:54:57 +00:00
Jens Ayton
ed757081ba
Added missing file. Removed some commented out junk code. Fixed invalid XML comment.
...
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1188 127b21dd-08f5-0310-b4b7-95ae10353056
2007-09-30 10:21:49 +00:00
Jens Ayton
3c16a7cdaf
Added clearMissionScreen scripting method (legacy and JS). Scripting tweaks. Ported trumble mission to JavaScript. Attempted to address JS Ship.escorts bug but couldn't reproduce it.
...
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1187 127b21dd-08f5-0310-b4b7-95ae10353056
2007-09-29 12:27:31 +00:00
Jens Ayton
a3cee138b8
Bumped version number to 1.69.2. Removed support for deprecated shader features. Added caching of GL texture names to avoid expensive glGenTextures()/glDeleteTextures() call. Set texture cache size to something sensible (50 at the moment), but textures are being leaked. Fixed loss-of-precision bug in OOCollectionExtractors' double methods. Added collection extractor methods for vectors, quaternions, and non-negative floats/doubles. Switched on -Werror for OS X build.
...
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1088 127b21dd-08f5-0310-b4b7-95ae10353056
2007-07-17 10:42:36 +00:00
Jens Ayton
1f8d82b8ee
Switched to JavaScript implementation of cloaking device mission.
...
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1085 127b21dd-08f5-0310-b4b7-95ae10353056
2007-07-14 13:53:50 +00:00
Jens Ayton
b3b04859ab
Enabled more warning flags (-Wextra -Wno-unused-parameter -Wno-missing-field-initializers) in OS X build, and fixed several hundred resulting warnings (mostly by using more appropriate types). Bumped version number to 1.69.1. Fixed unable-to-buy-in-shipyard bug. Attempt to fix dockEscorts crash bugs (needs testing). Sundry cleanup, especially of AI and GuiDisplayGen; all exception throws now in standard form. Removed some dead code. Use correct key for Advanced Nav Array if no keyconfig.plist found. Changed OOCollectionExtractors to always clamp integer values to the requested type's range rather than truncating like NSNumber. Removed inconsistently-used and apparently-unneeded NSLock from AI.
...
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1063 127b21dd-08f5-0310-b4b7-95ae10353056
2007-07-07 15:44:50 +00:00
Jens Ayton
9137ef4581
Clean-up of various methods in connection with documenting uniform binding mechanism. Tweak to syntax for said mechanism. Bumped version number to 1.69.
...
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1011 127b21dd-08f5-0310-b4b7-95ae10353056
2007-06-08 12:59:08 +00:00
Jens Ayton
8a55bc63a2
Xcode project tweak. Moved script out into Scripts folder (preparation for JavaScript translations).
...
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@898 127b21dd-08f5-0310-b4b7-95ae10353056
2007-04-03 17:37:40 +00:00