Fixed yaw control. (Keyboard only; default to , and ., aka < and > on US and UK keyboards.) Disabled in strict mode.
Advanced Navigation Array can now actually be purchased (for any ship).
Work out why mouse control sometimes isn't working.
The data cache will be rebuilt when OXPs are added or removed. Specifically, it will be rebuilt if the folders Oolite searches for files change, or if any of their modification dates change. Adding or removing a file within an OXP should trigger this; changing a file generally won't, so OXP developers may still hit stale cache problems, but users will not.
The cache has changed format (as if you care) and, under Mac OS X only, moved to ~/Library/Caches/org.aegidian.oolite/Data Cache.plist. The old cache will be deleted.
The cache is now flushed (written to disk) after startup loading and every time you dock, rather than when you save the game. I only mention this because someone once expressed bafflement at getting repeated "data cache must be rebuilt" messages.
There is one problem: I added so many options to the joystick config page they no longer all fit on the screen. Haven't looked into fixing this, either.
I have one suggestion on the yaw (don't know if this is the right place): make it much less effective than pitch. Dogfighting was WAY to easy, at least with a joystick. I could see where the keyboard would be a bit more difficult, but I still think yaw effectiveness should be reduced.
Changed and unified capatalization conventions. All identifiers are written in camelCase. Methods, properties and global variables start with a lowercase letter. Classes and global functions start with a capital.
Changed some semantics. In particular, player.call(), Log(), LogWithClass(), mission.markSystems() and mission.unmarkSystems() can now take an arbitrary number of parameters, and awardCargo() now takes the type before the quantity (although ideally this would be exposed as player.cargo[type] += quantity instead).
I also added notes on things that are likely to change, and cases where I'm not sure of the design.
Handlers for events that have an instantaneous effect are called didFoo(). For events that take time – mostly tunnel effects – there are willFoo()/didFoo() pairs.
// This was originally written by dajt, but almost all the original script has been replaced.
// Called after all OXPs are launched, before the game has begun.
// Called when saved game is loaded, or player respawns after dying.
// Called when alert status changes.
// Called before launch tunnel effect.
// Called at end of docking tunnel effect.
// Called after launch tunnel effect.
// Called when player initiates witchspace countdown.
this.didBeginJumpCountDown = function(type)	// Type is one of: "standard", "galactic". Others may be added in future.
// Called if player cancels witchspace countdown.
// Called at end of witchspace countdown, if unsuccessful.
this.didFailToJump = function(reason)	// Reason is one of: "blocked", "too far", "insufficient fuel". Others may be added in future.
// Called at end of witchspace countdown, if successful, or on entring wormhole.
this.willEnterWitchSpace = function(cause)	// cause is one of: "standard jump", "galactic jump", "wormhole". Others may be added in future.
// Called at beginning of witchspace tunnel effect; the destination system is already set up at this time.
// Called after witchspace tunnel effect.
// Called when auto-docking sequence begins (but not for insta-dock).
// Called when player cancels auto-docking sequence.
// Station says player can't dock on account of being naughty.
// Called periodically, more or less.
Known to be missing: enter/exit aegis; target changed; cloaking device events. What else?
Excellent work, if I may say so.
And so I gave myself to God. There was a pregnant pause before He said "OK"
Not specifically LoB… it's an overexposure to Terry Pratchett fans that makes me write like that, although there's certainly a lot of Monty Python culture in that crowd.
In a completely un-scripting-related move, I've experimented with additive blending of glowy effects. This basically means that glowy bits can't make things darker, which increases realism and mostly makes things look subtly better, although the engine glow will need adjusting and I expect to get complaints about the lasers.
It also has the potential to be faster than alpha blending.
More fun with minor fix-ups: I've noticably improved performance of startup, respawn and script execution with about five lines of code. Specifically, for any passing coders, by caching the return value of -[Universe generateSystemData]. Who'd'a thunk it? Those profiler thingies are useful. :-) This should reduce periodic, combat, and ship-spawn stutter somewhat.
The same error occurs even with the simple script template shown in the wiki page. Any ideas?
Firstly, the idea is to put it in an OXP, not in Oolite itself. Doing that will effectively replace the standard script, which is not generally desireable. That's not the source of your problem, though.
"can't open o:" seems to be the gist of it. It's getting "o" instead of "oolite.app/Resources/Config/script.js". The most likely reason I can see is that -[NSString fileSystemRepresentation] is doing the wrong thing… which is weird, since (looking at the GNUstep source) it appears to be doing the right thing, or at least something insufficiently wrong for that problem to occur.
2007-04-01 18:05:34.000 oolite.exe [temp.jsload]: Loading JS from "oolite.app/Resources/Config/script.js", fileSystemRepresentation is "o".
There seems to be a pattern. The path name of the script to load seems to be getting set to its first character only. So, oolite.app\etc.etc would become "o" and Addons\myoxp.oxp\etc.etc. would become "A". Not sure if this helps at all, though.
That's… pretty damn weird. Is your GNUstep-base up to date?
Success! UTF8String does the trick. Script loads and executes flawlessly. Thanks Ahruman. For the record, I am using GNUstep-base version 1.13.0.
In the interest of hunting this down, here's a test case I'd like you to run. Replacing main.m in Oolite should do it (make backups, yadda yadda).