69 Commits

Author SHA1 Message Date
Jens Ayton
b346c2d28a [Mac] Dock tile plug-in now follows screen shots directory around.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4255 127b21dd-08f5-0310-b4b7-95ae10353056
2011-02-07 15:25:51 +00:00
Jens Ayton
11df41547a [Mac] Hopefully fixed horrible-loud-noise bug (bug #17214), and definitely fixed quieter popping noises at the end of sounds.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4187 127b21dd-08f5-0310-b4b7-95ae10353056
2011-01-29 21:40:03 +00:00
Jens Ayton
bce687613f Disabled TAF in deployment builds (and also shader debug hotkey, and extra info on FPSometer).
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4184 127b21dd-08f5-0310-b4b7-95ae10353056
2011-01-29 20:45:17 +00:00
Jens Ayton
b050faa3b2 Experimental support for letting station scripts determine whether a ship is physically able to dock. Disabled because of collision detection problems with inactive docking ports.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4165 127b21dd-08f5-0310-b4b7-95ae10353056
2011-01-27 19:50:13 +00:00
Jens Ayton
399e369606 Fixed default escort function (first four ships no longer try to fly inside mother).
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4119 127b21dd-08f5-0310-b4b7-95ae10353056
2011-01-22 20:38:44 +00:00
Jens Ayton
f99dd38018 Escort positions are now cached. Fixed copying of scripts under OS X.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4116 127b21dd-08f5-0310-b4b7-95ae10353056
2011-01-22 13:52:38 +00:00
Jens Ayton
c2059960be coordinatesForEscortPosition can now actually be overridden. Default implementation avoids bit-twiddling hacks.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4114 127b21dd-08f5-0310-b4b7-95ae10353056
2011-01-21 20:45:35 +00:00
Jens Ayton
c8d6b1cf44 Simplified default coordinatesForEscortPosition().
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4106 127b21dd-08f5-0310-b4b7-95ae10353056
2011-01-20 20:23:56 +00:00
Jens Ayton
214d87e63c Escort formations can now be defined in JavaScript by implementing coordinatesForEscortPosition().
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4105 127b21dd-08f5-0310-b4b7-95ae10353056
2011-01-20 19:52:01 +00:00
Jens Ayton
bd9000ee12 Console input is now reported as <console input> instead of oolite-debug-console.js:779 in stack dumps, profiles and traces.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4093 127b21dd-08f5-0310-b4b7-95ae10353056
2011-01-18 16:30:54 +00:00
Jens Ayton
3e8696a606 Redefined global.worldScriptNames in JavaScript.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4092 127b21dd-08f5-0310-b4b7-95ae10353056
2011-01-18 15:30:39 +00:00
Jens Ayton
08519fb6be JS special.jsWarning() now skips one stack frame as intended.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4077 127b21dd-08f5-0310-b4b7-95ae10353056
2011-01-16 14:04:17 +00:00
Jens Ayton
ded012d0e5 Put all of prefix script in a nice, sanitary closure.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4053 127b21dd-08f5-0310-b4b7-95ae10353056
2011-01-12 21:36:10 +00:00
Jens Ayton
ccd30cb8a9 Added compatibility accessors and warnings for misuse of JS System and Player.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4052 127b21dd-08f5-0310-b4b7-95ae10353056
2011-01-12 20:52:05 +00:00
Jens Ayton
48abeeedef Renamed Ship.prototype.roleProbabilities to Ship.prototype.roleWeights (with compatibility accessor).
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4050 127b21dd-08f5-0310-b4b7-95ae10353056
2011-01-12 14:29:55 +00:00
Jens Ayton
96a358bae1 Removed unused compatibility-accessor helpers in prefix script that would no longer work anyway. Ignore undefineds in debug console pretty-printing. Treat PlayerShip.prototype as stale entity ref in PlayerShipGetProperty().
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4044 127b21dd-08f5-0310-b4b7-95ae10353056
2011-01-11 22:14:03 +00:00
Jens Ayton
16a0e45f45 Handle method setup properly in prefix script, now that this works thanks to constructor cleanup. Made SoundSource.prototype.playSound() a JS wrapper.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4023 127b21dd-08f5-0310-b4b7-95ae10353056
2011-01-06 19:09:01 +00:00
Jens Ayton
3b16dd9438 Rearranged prefix script to work in oldjs builds.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4017 127b21dd-08f5-0310-b4b7-95ae10353056
2011-01-06 16:28:13 +00:00
Jens Ayton
926b2f81ea Made use of ECMAScript 5 meta-stuff; methods defined in prefix header are now non-enumerable and non-writeable just like native ones.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4016 127b21dd-08f5-0310-b4b7-95ae10353056
2011-01-06 12:05:16 +00:00
Jens Ayton
6a6ab8af5a Backported Array.isArray() for oldjs builds.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3986 127b21dd-08f5-0310-b4b7-95ae10353056
2011-01-04 12:51:33 +00:00
Jens Ayton
d1ae8972e5 Updating of strictly pointless copyright year thingies, yay!
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3960 127b21dd-08f5-0310-b4b7-95ae10353056
2011-01-02 20:27:12 +00:00
Jens Ayton
c34f7e03f1 Enabled ECMAScript 5 strict mode in all built-in scripts.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3958 127b21dd-08f5-0310-b4b7-95ae10353056
2011-01-02 17:54:54 +00:00
Jens Ayton
d16dc20f0b All scripts now use underscore prefix for custom properties. Also general cleanup and linting.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3732 127b21dd-08f5-0310-b4b7-95ae10353056
2010-07-30 21:54:50 +00:00
Jens Ayton
723846018e Exposed global object as property of itself, instead of fiddling around with silly functions where it's needed.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3730 127b21dd-08f5-0310-b4b7-95ae10353056
2010-07-30 20:00:46 +00:00
Marc
2448a4f38f - OK, now all copyright notices inside the code should be up to date!
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3654 127b21dd-08f5-0310-b4b7-95ae10353056
2010-07-03 18:45:37 +00:00
Jens Ayton
8e9e906b76 Backported generalization of SystemInfo.systemsInRange() (oops - intended to do that for 1.74.1). Don't use multi-texture materials on hardware which doesn't support it.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3639 127b21dd-08f5-0310-b4b7-95ae10353056
2010-06-28 18:15:31 +00:00
Jens Ayton
cf36d4f7fa Added JS system.scrambledPseudoRandomNumber().
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3614 127b21dd-08f5-0310-b4b7-95ae10353056
2010-06-26 15:46:26 +00:00
Jens Ayton
b5c5b5547d Tidied up prefix script a bit. Use longer timeout when loading scripts (accidentally omitted from r3550. Sorted JS Ship methods.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3566 127b21dd-08f5-0310-b4b7-95ae10353056
2010-06-19 09:42:04 +00:00
Jens Ayton
1055615ac3 Deleted all deprecated JS features. Re-enabled GC debugging in Mac TestRelease configuration for nightlies.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3520 127b21dd-08f5-0310-b4b7-95ae10353056
2010-06-13 16:47:07 +00:00
Jens Ayton
6bb2705216 Re-added ability to use SystemInfo.systemsInRange() as an instance method.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3519 127b21dd-08f5-0310-b4b7-95ae10353056
2010-06-13 16:00:30 +00:00
Jens Ayton
a7d96ce760 Bumpez les versions! (Except the ReadMe, because I don't have Word, and the Debian stuff, because it confused me.)
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3518 127b21dd-08f5-0310-b4b7-95ae10353056
2010-06-13 15:40:59 +00:00
Jens Ayton
50d7582bc8 Rolled back r3465-3466 until next release cycle.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3467 127b21dd-08f5-0310-b4b7-95ae10353056
2010-06-05 18:00:51 +00:00
Marc
69cb502117 - Oops: corrected one useless check in previous commit into a slightly more useful one. Mumble copy & paste mumble.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3466 127b21dd-08f5-0310-b4b7-95ae10353056
2010-06-05 15:24:56 +00:00
Marc
72e553706b - 'fixed' systemsInRange() according to the misinterpretation in bug report 17211. Might need to be rolled back.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3465 127b21dd-08f5-0310-b4b7-95ae10353056
2010-06-05 15:14:07 +00:00
Jens Ayton
5bad08f43d Fixed Ship.hasEquipment() compatibility method in cases where equipment is undefined.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3453 127b21dd-08f5-0310-b4b7-95ae10353056
2010-06-03 20:58:17 +00:00
Jens Ayton
badbc4b8c5 Restored old Ship.hasEquipment() behaviour, added deprecation warning.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3408 127b21dd-08f5-0310-b4b7-95ae10353056
2010-05-25 19:35:53 +00:00
Jens Ayton
766259e7bf Planet textures can again be changed via JavaScript.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3319 127b21dd-08f5-0310-b4b7-95ae10353056
2010-05-11 20:41:14 +00:00
Eric Walch
41d0d79ad7 - SystemInfo.systemsInRange now does not find the current system.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3000 127b21dd-08f5-0310-b4b7-95ae10353056
2010-01-30 17:26:51 +00:00
Marc
bb5e6e963d - fix: oolite.setScreenBackground() & oolite.setScreenOverlay() from rev2921 ( the latter was called .setScreenForeground() before ) now change background & overlay for as long as the current GUI screen is still active, as originally intended.
- change: mission.runScreen now accepts the 'overlay' parameter (was 'foreground', which isn't recognised anymore).
- fix: report_screens now call the guiScreenChanged() event too.
- new: added the following keys to screenbackgrounds.plist: 'mission_overlay', 'overlay', 'docked_overlay', 'paused_overlay', 'paused_docked_overlay'. If viewing a gui screen when pause was started, and paused_overlay/paused_docked_overlay produce a texture, the overlay texture is displayed instead of the 'Paused - press P' message.
- fix: save game screen now behaves more like other screens - it responds to the various F keys (while still allowing numbers to be typed in), and the [back] & [more] onscreen buttons work when clicked.

- bouns fixes: random bugfix to a deprecated function redirect, and the 'overwrite game?' mini screen now responds to the translated y/n keys instead of hardcoded ascii values.

git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@2928 127b21dd-08f5-0310-b4b7-95ae10353056
2010-01-04 06:22:35 +00:00
Marc
bf23119d18 - mission.setInstructionsKey fix (the global prefix implementation would not be able to tell which oxp it was called from)
- yet another windows DEP fix. There's something inside OOJSScript that windows doesn't like.

git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@2770 127b21dd-08f5-0310-b4b7-95ae10353056
2009-11-20 15:27:11 +00:00
Marc
3a92c0f7d1 - minor tweaks to missions, reworded one nova screen.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@2762 127b21dd-08f5-0310-b4b7-95ae10353056
2009-11-19 02:31:04 +00:00
Marc
116d83f955 missionScreen RFC part III
* yet more RFC bugfixes, there were quite a few not-quite-right bits, I _think_ I got all of them now...
* added titleKey as a mission.runScreen parameter, for use with missiontext.plist
* updated all internal missions to use the new mission API, some mission keys normalisation.
* fully tested & fixed both nova & trumbles missions.
* proper fix: no save when the sun is going nova!

git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@2759 127b21dd-08f5-0310-b4b7-95ae10353056
2009-11-18 21:58:32 +00:00
Marc
f7affbc01a MissionScreen RFC part II:
* missionScreenOpportunity now fires up after loading a savegame & at startup, as well as after docking.
* fixed a mission callback related crash.
* fixed clash with fines and mission screens.
* name change for new mission.runScreen parameter shipModel: is now showModel.
* the foreground & background images now display correctly in relation to the spinning demo ship.

- code cleanup
- added missing keys to the shipdata entry schema


git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@2758 127b21dd-08f5-0310-b4b7-95ae10353056
2009-11-17 18:27:11 +00:00
Marc
7bb627586f * New mission.setInstructions to go with mission.setInstructionsKey, analogous to the mission.addText / mission.addTextKey pair.
* mission RFC part I. Initial implementation of the changes proposed in the forum. Will need tweaking.
* added new parameters to mission: title & foregroundImage (identical to backgroundImage atm)
* assorted code tidying up.


git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@2750 127b21dd-08f5-0310-b4b7-95ae10353056
2009-11-15 00:24:23 +00:00
Jens Ayton
bc3a113b0f Incomplete support for general polygons in missile icons. (In case of splodey, setting the OLD_ICONS macro in HeadUpDisplay.m to 1 will revert to the old drawing code.)
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@2661 127b21dd-08f5-0310-b4b7-95ae10353056
2009-10-10 12:23:24 +00:00
Marc
47f9f2c920 * corrected manifest miscount when ship in flight.
* last change to player.ship.manifest: manifest.food & similar are now read/write manifest quantities. Internally all commodities are now going to be referenced by the canonical identifiers, commodities.plist still overrides the displayName - the .manifest.list array is unchanged, and still read-only.
* renamed 2 ship properties for consistency: ship.availableCargoSpace & ship.cargoCapacity now become ship.cargoSpaceAvailable & ship.cargoSpaceCapacity.

- more code tidying.

git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@2637 127b21dd-08f5-0310-b4b7-95ae10353056
2009-10-06 09:09:08 +00:00
Jens Ayton
0586f0a832 JS SystemInfo changes: added read-only properties coordinates, galaxyID and system, method distanceToSystem(), and static method filteredSystems(). Undefined SystemInfo properties are now undefined rather than null. Also added prefix helper function to get SystemInfo for all systems in a given range (default: 7 ly).
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@2403 127b21dd-08f5-0310-b4b7-95ae10353056
2009-09-05 18:19:23 +00:00
Jens Ayton
3c10a9b2be Bumped version number. Changed Mac system requirement to 10.4, and cleaned up target configuration in preparation for 64-bit support.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@2335 127b21dd-08f5-0310-b4b7-95ae10353056
2009-08-30 14:49:03 +00:00
Nikos Barkas
9309befa43 Commiting Frame's implementation of player.ship.galaxyCoordinates and player.ship.cursorCoordinates.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@2223 127b21dd-08f5-0310-b4b7-95ae10353056
2009-07-03 17:50:53 +00:00
Jens Ayton
1feeb63fd8 Ran all game scripts through JSLint (http://www.jslint.com/), but not console script because it's full of JavaScript 2-isms. The JavaScript 2 that isn't going to happen. Yay.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@2182 127b21dd-08f5-0310-b4b7-95ae10353056
2009-05-22 22:45:02 +00:00