216 Commits

Author SHA1 Message Date
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
a11ce38786 Made JS player.orientation work properly. Fixed some extra-niggly warnings. Made various JS system properties return placeholder values in interstellar space. Added -[Universe inInterstellarSpace] method, and made -[Universe currentSystemData] return placeholder values in interstellar space. Two new localizable strings.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1661 127b21dd-08f5-0310-b4b7-95ae10353056
2008-05-29 19:12:31 +00:00
Jens Ayton
7a574a8b3e Long-lost nephew of the revenge of JavaScript error handling clean-up.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1651 127b21dd-08f5-0310-b4b7-95ae10353056
2008-05-23 19:38:43 +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
0bda7466a6 Changes to pave the way for JavaScript 1.8 upgrade.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1642 127b21dd-08f5-0310-b4b7-95ae10353056
2008-05-18 16:22:00 +00:00
Jens Ayton
d7badeebd4 Various twiddles while failing to fix corona bug: gDebugFlags now exposed through JS console (as console.debugFlags), added warning message for shipyard entries with no matching shipdata entry (but suppressed by default for compatibility with Realistic Shipyards), log on PPC Macs no longer reports incorrect Altivec availability information (we don't use Altivec anyway), removed unused shipdata ivar from Universe.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1621 127b21dd-08f5-0310-b4b7-95ae10353056
2008-05-08 19:48:22 +00:00
Jens Ayton
6444b5d5e9 Moved demo2 screen over to OOShipRegistry. No more blank spaces or crashes for empty lists, possibly.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1611 127b21dd-08f5-0310-b4b7-95ae10353056
2008-05-03 13:39:56 +00:00
Jens Ayton
30bce0b115 Great big lump o' stuff to deal with ship types and related things more cleanly.
OOShipRegistry parses shipdata.plist, shipyard.plist, demoships.plist and new shipdata-overrides.plist and shipyard-overrides.plist, resolves like_ship inheritance, does some sanity checking, filters out various sorts of invalid shipdata and shipyard entries and manages role->ship key mapping with probability weighting.

The latter is managed by OOProbabilitySet, which should probably be used by OORoleSet and OOProbabilisticTextureManager too. OOProbabilitySet is O(log n) for random selection instead of O(n) like the current linear-search code.

The next step is to start using OOShipRegistry everywhere.

git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1607 127b21dd-08f5-0310-b4b7-95ae10353056
2008-05-03 00:58:21 +00:00
Jens Ayton
ff322eafcb Fix for bounty and contract market credits display bugs. Fix for rounding of credits quantities. Added troubleshooting code to scanForNonThargoid. Suppress script.javaScript.context.create messages. Made property list extractors for strings auto-convert numbers.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1601 127b21dd-08f5-0310-b4b7-95ae10353056
2008-04-30 19:13:02 +00:00
Jens Ayton
4933fb7796 Fix for ship.sanityCheck.failed messages.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1595 127b21dd-08f5-0310-b4b7-95ae10353056
2008-04-28 17:10:36 +00:00
Jens Ayton
fba5cb83b1 Removed redundant [UNIVERSE gui] calls in PlayerEntityControls. Added Spotlight indexing of system name and made ship name visible in Get Info window (OS X only). Added new formatting functions for credit quantities, used throughout. DESC() now returns the key if no string can be found, to avoid exceptions. I18Ned OXP incompatibility message.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1581 127b21dd-08f5-0310-b4b7-95ae10353056
2008-04-23 16:56:23 +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
Jens Ayton
a56d0db571 Mac-specific spit and polish: stopped copying unused files in Xcode project, bumped version number of Spotlight indexer.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1570 127b21dd-08f5-0310-b4b7-95ae10353056
2008-04-20 16:13:52 +00:00
Jens Ayton
a3cd6cf6ca Stuff from r1565-r1566, now with not doing the svn in src/.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1567 127b21dd-08f5-0310-b4b7-95ae10353056
2008-04-20 15:02:38 +00:00
Jens Ayton
a09eb90389 Trimming down to four nebula textures, step 3 of 2 (syntax fix, updated Xcode project, updated contributors.txt).
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1559 127b21dd-08f5-0310-b4b7-95ae10353056
2008-04-18 13:36:01 +00:00
Jens Ayton
4c2f7efcb2 Updated dummy joystick handler to pretend to have yaw support.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1514 127b21dd-08f5-0310-b4b7-95ae10353056
2008-03-25 22:42:44 +00:00
Jens Ayton
8da875682b Fixed breakage in release build; made debug rendering of normals use a debug flag instead of a macro.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1509 127b21dd-08f5-0310-b4b7-95ae10353056
2008-03-24 17:14:00 +00:00
Jens Ayton
2daba8a6bf Several fixes for an exception when trying to use OXP verifier while a requires.plist-incompatible OXP is installed, due to use of DESC in generating incompatibility warnings (Universe is not set up when OXP verifier runs).
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1504 127b21dd-08f5-0310-b4b7-95ae10353056
2008-03-23 15:12:22 +00:00
Jens Ayton
8339f6a180 #ifdefed out all references to OOBrain and OOInstinct (which were never used and,as it turned out, were only being built under OS X), but left them there in case someone wants to pick up the AI stuff at some point.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1488 127b21dd-08f5-0310-b4b7-95ae10353056
2008-03-16 14:03:49 +00:00
Jens Ayton
86b976ca0f Updated standard Xcode project to match previous revision. Checked in a bunch of display management stuff I was workin g on earlier; won't be used in 1.71.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1474 127b21dd-08f5-0310-b4b7-95ae10353056
2008-03-10 00:27:26 +00:00
Jens Ayton
f68d550d8e Added JS Ship methods dumpCargo(), ejectItem() and ejectSpecificItem(). Spotlight indexer now indexes required.plist max_version for display in More Info. Fix for internal consistency in default fragment shader's handling of specular exponents.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1471 127b21dd-08f5-0310-b4b7-95ae10353056
2008-03-09 15:27:06 +00:00
Jens Ayton
3f74d1b923 Got Instruments working and fixed several small leaks. Currently mostly seeing occasional leaks of OOWeakReferences to ships (but the ships themselves aren't leaked and OOWeakReferences are only 8 bytes.) Cobbled together a class for handling groups of sources for related sounds, so that e.g. the number of simultanous scrape sounds is limited. Moved bits of player launching logic from pollDockedControls: to leaveDock: (which is also called from other places).
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1465 127b21dd-08f5-0310-b4b7-95ae10353056
2008-03-08 17:16:10 +00:00
Jens Ayton
2b89827eb3 Graphics fiddle: scarred alloy is now only scarred on one side, and has a specular intensity map (if shaders enabled); both types of alloy are now shinier.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1462 127b21dd-08f5-0310-b4b7-95ae10353056
2008-03-06 18:13:57 +00:00
Jens Ayton
5f09cc936a Fixed a bug where subentity relationships would be messed up by -becomeLargeExplosion (currently only used for the player). Better diagnostics for bad AIs.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1458 127b21dd-08f5-0310-b4b7-95ae10353056
2008-03-05 23:45:09 +00:00
Jens Ayton
4c3cf42f7e Fixed a small leak in the previous revision. Unified the various missile/ident locked-on strings. Made :: console macro work for methods with an argument string, as in :: playSound: boop.ogg.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1457 127b21dd-08f5-0310-b4b7-95ae10353056
2008-03-05 11:26:12 +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
Jens Ayton
ef3cb81251 Multi-texture skies are go.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1451 127b21dd-08f5-0310-b4b7-95ae10353056
2008-03-03 22:02:53 +00:00
Jens Ayton
959dc99d88 Added big fat deprecation warning for scriptActionOnTarget:. Added skanky code to avoid running world scripts more than once with certain player states (such as STATUS_EXITING_WITCHSPACE).
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1445 127b21dd-08f5-0310-b4b7-95ae10353056
2008-03-02 18:56:24 +00:00
Jens Ayton
fda95ca90a r1438 redux.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1440 127b21dd-08f5-0310-b4b7-95ae10353056
2008-03-01 22:05:11 +00:00
Jens Ayton
ddf50cf43e Fixed Xcode project to stop changing Basic-debug.oxp/requires.plist to require version 1.70 when building release builds; fiddled with project to reduce number of places version number is specified.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1439 127b21dd-08f5-0310-b4b7-95ae10353056
2008-03-01 21:01:00 +00:00
Jens Ayton
101f811d72 Fix for Mac builds when there are spaces in the project path.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1438 127b21dd-08f5-0310-b4b7-95ae10353056
2008-03-01 20:40:29 +00:00
Jens Ayton
cf87bfe72f Fix for argument-may-be-clobbered warning in optimized Mac builds.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1437 127b21dd-08f5-0310-b4b7-95ae10353056
2008-03-01 20:18:41 +00:00
Jens Ayton
9fb7456e20 (Woops, thought I did this last night.) Implemented stack for temporary local variables for non-world legacy scripts. (Previous approach was quite thoroughly broken, as it didn't allow reentrancy and broke locals for world scripts.) Moved -descriptionComponents and such into new OOCocoa.m, and added -shortDescription.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1433 127b21dd-08f5-0310-b4b7-95ae10353056
2008-02-29 15:48:00 +00:00
Jens Ayton
27d4002e2c Twiddled Xcode project to behave in the presence of system-wide libOgg/libVorbis installations.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1431 127b21dd-08f5-0310-b4b7-95ae10353056
2008-02-28 22:33:35 +00:00
Jens Ayton
cec97f0baf shipHitByECM() JS event now has a pulsesRemaining parameter.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1424 127b21dd-08f5-0310-b4b7-95ae10353056
2008-02-26 11:01:40 +00:00
Jens Ayton
e95e3fd521 Most AI reactToMessage: calls now also have a script event; see http://www.aegidian.org/bb/viewtopic.php?p=47620#47620 . Some cleanup and optimization. Added command-line hack to graph difference between Vector.random() and Vector.randomDirectionAndLength() as in http://wiki.alioth.net/index.php/Image:Randomvectordistribution.png .
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1423 127b21dd-08f5-0310-b4b7-95ae10353056
2008-02-26 01:54:26 +00:00
Jens Ayton
cc056a6a75 Legacy foo_actions can now have local variables, which are cleared when the _actions completes. Marked DebugConsole.py executable for unices. Fixed bugs in vector randomization code, and added a third randomizer which provides an even distribution of lengths (but uneven distribution in space).
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1420 127b21dd-08f5-0310-b4b7-95ae10353056
2008-02-25 16:22:15 +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
4b3a74e847 Added script events for planet and station proximity events. Fast PowerPC square root approximation is now actually used. Redefined nil and Nil to be type-pedantic under Cocoa (as they are under GNUstep). Waved a rubber chicken to appease the compiler.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1401 127b21dd-08f5-0310-b4b7-95ae10353056
2008-02-22 11:56:23 +00:00
Jens Ayton
0a1cd36e8d Made previously Mac-specific log header cross-platform (mostly; more information is included under OS X).
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1386 127b21dd-08f5-0310-b4b7-95ae10353056
2008-02-17 15:37:12 +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
0715cd3f1e * Random name generation once again uses typographic apostrophe (no, it's _not_ an acute accent), but now properly excludes it for system names.
* Removed pointless cache for relatively rarely used commodity display name lookup.
* Added playerEnteredNewGalaxy(newGalaxyNumber) script event.
* Changed descriptions.plist to OpenStep format.
* Descriptions.plist is now loaded before the first time it's used.
* -[Universe descriptionForKey:] and thus DESC() can now select a random string from an array.
* Added -[Universe descriptionForArrayKey:index:] for localization array lookups.
* Removed hard-to-localize [is-word] in favour of [system-description-string], and [adjusting-word] in favour of [clock-format] and [clock-format-adjusting].
* Removed redundant description strings [long-range-chart-find-planet] and [gameoptions-back].
* Moved mass-unit-to-string mapping to OOConstToString.

git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1376 127b21dd-08f5-0310-b4b7-95ae10353056
2008-02-14 17:23:24 +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
f11b6fae14 Implemented JS sound interface. Moved some more generic JS ObjC wrapper stuff into OOJavaScriptEngine.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1340 127b21dd-08f5-0310-b4b7-95ae10353056
2008-02-03 02:16:23 +00:00
Jens Ayton
07fc2a25b6 Fixed some bugs in OXP verifier.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1325 127b21dd-08f5-0310-b4b7-95ae10353056
2008-01-28 01:24:40 +00:00
Jens Ayton
c812e61ad9 More data-driven text rendering with eight-bit encoding support.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1323 127b21dd-08f5-0310-b4b7-95ae10353056
2008-01-27 23:37:56 +00:00
Jens Ayton
f2f194ee49 Fixed a bunch of warnings under Windows, some of which even made sense.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1294 127b21dd-08f5-0310-b4b7-95ae10353056
2008-01-02 14:35:54 +00:00
Jens Ayton
a97c9fd093 Fixed a few leaks, notably one that became serious on the short-range chart screen. Fixed some warnings when building for Windows.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1282 127b21dd-08f5-0310-b4b7-95ae10353056
2007-12-24 13:59:30 +00:00
Jens Ayton
4919cb197e Changed OOCreditsQuantity to uint64_t.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1274 127b21dd-08f5-0310-b4b7-95ae10353056
2007-12-13 11:53:25 +00:00
Jens Ayton
c1dd9c5b1a Fix for bug where awardEquipment:EQ_TRUMBLE while a trumble infection is in progress would innoculate the player against future trumble infections. Also added code to un-innoculate existing saved games.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1264 127b21dd-08f5-0310-b4b7-95ae10353056
2007-12-04 21:43:18 +00:00