920 Commits

Author SHA1 Message Date
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
ff941ad9ff More explicit message about the need to set JS_C_STRINGS_ARE_UTF8. Explicitly set scanClass of 'barrel' to CLASS_CARGO for scripted creation.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1186 127b21dd-08f5-0310-b4b7-95ae10353056
2007-09-29 09:08:31 +00:00
Nikos Barkas
53a0d0c1c0 Made awardFuel and setFuelLeak act on the appropriate script target entity rather than always on the player.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1185 127b21dd-08f5-0310-b4b7-95ae10353056
2007-09-27 06:03:34 +00:00
Jens Ayton
8b098b3b76 Implemented Player.commsMessage() and player.consoleMessage() JS methods. Mucked about with key_dump_target_state -- now debug/test build only.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1183 127b21dd-08f5-0310-b4b7-95ae10353056
2007-09-23 14:32:40 +00:00
Jens Ayton
ce2080f402 Implemented quaternion_rotate_vector properly.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1182 127b21dd-08f5-0310-b4b7-95ae10353056
2007-09-23 10:44:34 +00:00
Jens Ayton
7d99e403a5 Experimental support for caching of compiled JavaScript (can be disabled with -DOO_CACHE_JS_SCRIPTS=0). Implemented JS Vector.rotateBy(quaternionExpression).
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1181 127b21dd-08f5-0310-b4b7-95ae10353056
2007-09-22 15:16:40 +00:00
Nikos Barkas
a677bc3744 Fixed a crash due to JavaScript root objects not being removed properly.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1180 127b21dd-08f5-0310-b4b7-95ae10353056
2007-09-20 15:45:39 +00:00
Jens Ayton
2d12522675 Fixed bug #11780 (Nebulae interact badly with atmosphere).
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1179 127b21dd-08f5-0310-b4b7-95ae10353056
2007-09-16 13:21:12 +00:00
Jens Ayton
fca7042527 More consistent use of JS-friendly description mechanism. Cleaned out redundant and unused particle types, and improved encapsulation of ParticleEntity.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1178 127b21dd-08f5-0310-b4b7-95ae10353056
2007-09-16 11:58:13 +00:00
Nikos Barkas
9051c61d31 Fixed a compile error when ALLOW_PROCEDURAL_PLANETS was defined. Eliminated some build warnings.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1177 127b21dd-08f5-0310-b4b7-95ae10353056
2007-09-16 11:01:16 +00:00
Jens Ayton
8f887ebfce Work on setting up mission screens from JavaScript (no new model at the moment, though). Added clock.clockStringForTime() JS method. Fixed bug where all a station's patrol ships would be launched at once (introduced when fixing bug #11684).
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1176 127b21dd-08f5-0310-b4b7-95ae10353056
2007-09-15 23:19:03 +00:00
Jens Ayton
7e4b1b0880 Implemented JS clock global object, unbroke makefile.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1175 127b21dd-08f5-0310-b4b7-95ae10353056
2007-09-15 15:09:19 +00:00
Jens Ayton
75259572d1 Renamed some JS timer methods, removed junk from OOJSGlobal.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1174 127b21dd-08f5-0310-b4b7-95ae10353056
2007-09-15 14:28:45 +00:00
Jens Ayton
0da77044e5 Implemented JS Timer object. Updated priority queue test case.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1173 127b21dd-08f5-0310-b4b7-95ae10353056
2007-09-15 13:53:30 +00:00
Jens Ayton
7b061ad0f7 Work on script timers.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1172 127b21dd-08f5-0310-b4b7-95ae10353056
2007-09-14 15:21:06 +00:00
Nikos Barkas
e9dbb8d38e Fixed a bug where items from the Equip Ship screen menu, like Passenger Berth and pylon items removal, would appear on the status screen after having been selected.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1171 127b21dd-08f5-0310-b4b7-95ae10353056
2007-09-14 07:48:22 +00:00
Jens Ayton
bcc03fff2b Fiddling with debug OXP silliness again.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1170 127b21dd-08f5-0310-b4b7-95ae10353056
2007-09-13 17:18:59 +00:00
Jens Ayton
77df587d1a Split out remaining JS classes from OOJavaScriptEngine.* into new files. Added expandable pirate-victim recognition via pirate-victim-roles.plist. Added a number of AI methods for searching for entities by role and scan class.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1169 127b21dd-08f5-0310-b4b7-95ae10353056
2007-09-12 17:00:59 +00:00
Nikos Barkas
ab372e5568 Fixed a problem with anyRole method not selecting weighted roles correctly. Fixed a bug where market commodities list was not generated correctly. Fixed a possible memory leak (elimination of 'OOTexture' may not respond to '-release' and 'OORoleSet' may not respond to '-release' warnings).
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1168 127b21dd-08f5-0310-b4b7-95ae10353056
2007-09-10 05:57:06 +00:00
Nikos Barkas
4ffb4ab24b Eliminated 'StationEntity' may not respond to '-name' warning. Fix crash in primaryRole method. Minor fix in error message in anyRole method.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1167 127b21dd-08f5-0310-b4b7-95ae10353056
2007-09-09 11:34:03 +00:00
Jens Ayton
dfc8f99526 Implemented role set vs. primary role distinction in ShipEntity. Appears to work.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1166 127b21dd-08f5-0310-b4b7-95ae10353056
2007-09-07 17:16:36 +00:00
Jens Ayton
693c27e2c2 Added OORoleSet to manage sets of ship roles and probabilities. Now used in -[Universe newShipWithRole:]. Next step: replace ShipEntity.roles with an OORoleSet. Future step: store role sets -- and other attributes -- in 'ship type' objects instead of parsing on the fly.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1165 127b21dd-08f5-0310-b4b7-95ae10353056
2007-09-07 10:14:30 +00:00
Jens Ayton
d47bf18321 Refactored debug OXP into a client-server design, potentially allowing external versions of the JavaScript console over Distributed Objects or TCP/IP.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1164 127b21dd-08f5-0310-b4b7-95ae10353056
2007-09-06 22:56:58 +00:00
Jens Ayton
77c4cbc6ce Fixed bug with OOTrumble not retaining texture, leading to crash.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1162 127b21dd-08f5-0310-b4b7-95ae10353056
2007-09-06 21:04:48 +00:00
Nikos Barkas
5b4f34de0b Updated the Windows versions of js32.dll and libjs32.a to 1.70. Replaced older libjs32 headers required for the Win32 build with the new ones. Added OOJSOolite.m to the GNUstep project.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1161 127b21dd-08f5-0310-b4b7-95ae10353056
2007-09-06 15:24:58 +00:00
Jens Ayton
1228bf1bc4 Fixed release build under OS X -- although it still produces annoying error messages due to not being able to copy Debug.oxp. Duplicated OOJavaScriptConsoleController in preparation for splitting it into a client/server design, as a step towards enabling JS consoles for other platforms.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1160 127b21dd-08f5-0310-b4b7-95ae10353056
2007-09-05 15:10:23 +00:00
Jens Ayton
51afdc0a40 Fixes for minor build problems.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1159 127b21dd-08f5-0310-b4b7-95ae10353056
2007-09-05 14:43:53 +00:00
Jens Ayton
a265c06344 * Work on generic-ish JavaScript object bridging.
* Fixed potential crashing bug in JS memory management (OOJSScript was not releasing its JS GC root).
* Fixed bug with several shipdata.plist settings being ignored in StationEntitys (bug #11684).
* Added JS Oolite object for app and JS version number checking; may add other facilities.
* Require latest version of SpiderMonkey (Gecko 1.8/FireFox 2 version) with JavaScript 1.7 support, built with JS_C_STRINGS_ARE_UTF8. 
*Made SpiderMonkey build as a subproject in Xcode for ease of debugging.
* Further fiddling with Mac debug console.
* Added has_npc_traffic attribute to StationEntity.


git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1157 127b21dd-08f5-0310-b4b7-95ae10353056
2007-09-04 23:04:09 +00:00
Jens Ayton
09ae998842 Converted shipdata.plist to OpenStep format and merged in Commander McLane's tweaks to views, external views and laser positions.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1156 127b21dd-08f5-0310-b4b7-95ae10353056
2007-09-02 18:45:44 +00:00
Jens Ayton
2df17375b1 Missing files from r1153.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1154 127b21dd-08f5-0310-b4b7-95ae10353056
2007-09-01 12:07:02 +00:00
Nikos Barkas
1afa377d76 Fixed a bug where planetinfo overrides would be loaded from a dictionary named local_planetinfo_overrides, but would be subsequently saved under localPlanetInfoOverrides, thus becoming unusable at next load. Also fixed usage of escape pod not clearing the player's legal status.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1152 127b21dd-08f5-0310-b4b7-95ae10353056
2007-08-31 06:11:22 +00:00
Jens Ayton
803aa63c67 Mac JS console: implemented history (option-up/down arrow).
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1150 127b21dd-08f5-0310-b4b7-95ae10353056
2007-08-28 16:55:52 +00:00
Nikos Barkas
5dbd357ac1 Fix ship zooming past screen during intro (not exactly the way Ahruman has proposed, but it seems to work and should be OK until we can come up with something more proper). Fix a bug where fuel would refuse to appear in the equipment items list.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1149 127b21dd-08f5-0310-b4b7-95ae10353056
2007-08-28 06:22:40 +00:00
Jens Ayton
6980e1d9d6 Various JS scripting fixes. Threw out all Convert ops and replaced them with toString methods, which is simpler and actually works.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1148 127b21dd-08f5-0310-b4b7-95ae10353056
2007-08-28 00:22:12 +00:00
Jens Ayton
699e5f5ff6 Fixed bug where player's dockedStation was nil at startup (due to circular dependencies). Added Build All target to Xcode project to avoid circular dependency between Oolite and Debug.oxp. (The Oolite target now no longer builds Debug.oxp. Build All builds Oolite, then builds Debug.oxp, then copies Debug.oxp into AddOns.)
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1147 127b21dd-08f5-0310-b4b7-95ae10353056
2007-08-27 13:17:43 +00:00
Jens Ayton
b455b2b8fd Interactive JS console working, with some bugs (failure to convert certain types to string, bugs in Oolite NSArray <-> JS array bridge). Basic macro system (implemented in JavaScript) works. A few debugging functions.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1146 127b21dd-08f5-0310-b4b7-95ae10353056
2007-08-25 18:15:41 +00:00
Jens Ayton
3cb87b1aab Fixed Mac breakage due to previous fix for non-Mac breakage.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1145 127b21dd-08f5-0310-b4b7-95ae10353056
2007-08-25 02:21:31 +00:00
Jens Ayton
fc14be32a3 Fixed probable breakage in non-Mac builds, part 2 of 2.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1144 127b21dd-08f5-0310-b4b7-95ae10353056
2007-08-25 02:17:30 +00:00
Jens Ayton
9a2dbbc6ae Fixed memory leak in debug OXP, probable breakage in non-Mac builds.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1143 127b21dd-08f5-0310-b4b7-95ae10353056
2007-08-25 02:17:01 +00:00
Jens Ayton
a1451d4a3e Dicking around with Mac-specific debug stuff instead of doing real work. Added JavaScript console window (intended to be interactive, but isn't yet; shows errors, warnings and JS-generated log messages a bit more prettily than the standard log). Added F-Script support (F-Script is not yet another OXP scripting language, it's an interactive language integrated with the ObjC runtime, making a useful debug tool for poking around).
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1141 127b21dd-08f5-0310-b4b7-95ae10353056
2007-08-25 01:15:40 +00:00
Nikos Barkas
f71bd524ed Replaced bcopy calls in PlanetEntity.m with memmove ones for portability reasons (linking on Windows was failing with unresolved references to bcopy).
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1140 127b21dd-08f5-0310-b4b7-95ae10353056
2007-08-24 15:36:05 +00:00
Jens Ayton
f5e3b4894e Made Mac debug OXP a loadable module instead of including code in Oolite itself.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1139 127b21dd-08f5-0310-b4b7-95ae10353056
2007-08-23 20:18:22 +00:00
Jens Ayton
ba7cf39b2d Fix for NPCs being able to launch escape pods even when there's no main station (bug #11693). Submitted by Cmdr James.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1138 127b21dd-08f5-0310-b4b7-95ae10353056
2007-08-22 21:26:01 +00:00
Jens Ayton
79e5a218e3 New planetinfo.plist keys: percent_cloud, cloud_alpha, clear_sky_color, cloud_color, polar_clear_scky_color, polar_cloud_colour, atmosphere_rotational_velocity.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1137 127b21dd-08f5-0310-b4b7-95ae10353056
2007-08-22 15:08:08 +00:00
Jens Ayton
0ffb248771 For the past two weeks I've been procrastinating from fixing a double-free bug in the JS accessor for Ship.escorts (or, more precisely, in the code constructing a JS array). The bug was in r1129, so not checking stuff in doesn't really make much sense.
Fixes in that time:
* Clean, integrated model for JS ship scripts and world scripts.
* Player ships support JS ship scripts (but not ones synthesized from legacy actions).
* Subentity shader uniform bindings bind to owning ship as intended.
* Fixed like_ship recursion limiter in -[Universe getDictionaryForShip:].
* Fixed a bug in material configuration parsing.
* Fixed a material bug where a shader material with textures, followed by a shader material with no textures, followed by a basic material with no textures would leave a texture bound.
* Cleaned up NSArray -> JS array conversion, without fixing aforementioned bug.
* Made JS Ship property "target" read/write, and made property setting work.
* Added JS Quaternion.random() static method.


git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1136 127b21dd-08f5-0310-b4b7-95ae10353056
2007-08-19 23:05:48 +00:00
Nikos Barkas
abe8cea08f Fix showShipModel not displaying the ship model.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1135 127b21dd-08f5-0310-b4b7-95ae10353056
2007-08-16 17:41:21 +00:00
Nikos Barkas
3d8cc4cd7d Same comments as revision 1133, only this time I will hopefully be able to commit something that actually works.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1134 127b21dd-08f5-0310-b4b7-95ae10353056
2007-08-14 16:16:39 +00:00
Nikos Barkas
16f4ed9afb Maintain compatibility with older saved games (see previous commit) by keeping the old local_planetinfo_overrides name for the dictionary that contains these overrides.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1133 127b21dd-08f5-0310-b4b7-95ae10353056
2007-08-14 15:57:30 +00:00
Nikos Barkas
159b9e0522 Maintain compatibility with pre-SVN 1112 saved games that contain local planetinfo overrides.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1132 127b21dd-08f5-0310-b4b7-95ae10353056
2007-08-14 08:30:23 +00:00
Nikos Barkas
e557dbb6ec Fix for scripts not running.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1131 127b21dd-08f5-0310-b4b7-95ae10353056
2007-08-10 06:31:21 +00:00