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
5cef2b972d
Why can't you just read my mind, svn? (Missing file)
...
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4113 127b21dd-08f5-0310-b4b7-95ae10353056
2011-01-21 09:04:17 +00:00
Jens Ayton
bb8ee9280d
Work on scriptable number formatting for localization. (If this seems like overkill, you probably haven’t considered the problem in enough detail.) Currently supports integers and credits quantities, and is used for displaying credits quantites in UI.
...
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4112 127b21dd-08f5-0310-b4b7-95ae10353056
2011-01-21 01:00:25 +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
9a35273d39
[Mac] Build fix for JS profiling.
...
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4085 127b21dd-08f5-0310-b4b7-95ae10353056
2011-01-17 07:47:37 +00:00
Jens Ayton
f48c751092
Fixed timer sorting.
...
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4084 127b21dd-08f5-0310-b4b7-95ae10353056
2011-01-16 22:47:26 +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
Eric Walch
5bea193153
- Added the AI command 'setDesiredRangeForWaypoint' to set a flexible range instead of the fixed value of 50, so that slow turning ships also can use the standard 'gotoWaypointAI.plist'
...
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4070 127b21dd-08f5-0310-b4b7-95ae10353056
2011-01-15 10:36:54 +00:00
Jens Ayton
22e30e422f
JavaScript stack traces now include local variables. Stack trace configuration behaviour changed: instead of logcontrol.plist settings, traces for errors and warnings can be separately enabled/disabled through the debug console, or through preferences if debug OXP is not installed. Default is on with debug OXP, off otherwise. Settings in the debug console are persistent, as are showErrorLocations and showErrorLocationsDuringConsoleEval now.
...
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4055 127b21dd-08f5-0310-b4b7-95ae10353056
2011-01-14 15:48:05 +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
b5a207c598
Comm log messages are now spoken. (Feature request #4970 )
...
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4039 127b21dd-08f5-0310-b4b7-95ae10353056
2011-01-09 14:18:29 +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
473e4e5c5e
Mac startup messages now reflect reality, and are more fine-grained in debug builds.
...
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3976 127b21dd-08f5-0310-b4b7-95ae10353056
2011-01-03 17:25:11 +00:00
Marc
0b850bb061
undid wrongly committed change.
...
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3974 127b21dd-08f5-0310-b4b7-95ae10353056
2011-01-03 15:42:16 +00:00
Marc
36e064d1ee
Minor cleanup:
...
- changed strings returned by the new playerWillSaveGame event for consistency with the other Oolite specific strings: 'autoSave' is now 'AUTO_SAVE', etc...
- tidier / simpler to read fuel calculation code, made fuel price slightly more variable...
- rewrote a very misleading (wrong as per r3972) comment.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3973 127b21dd-08f5-0310-b4b7-95ae10353056
2011-01-03 15:34:28 +00:00
Marc
cb89afc4d4
Copyright date bonanza! Most - if not all - copyright notices are now updated to 2011.
...
Minor code cleanup:
- graphically cleaner windows resize for SDL systems.
- world event shipWillExit/ExitedWitchspace now also triggered if the escape capsule is rescued at a different system (via OXP override).
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3965 127b21dd-08f5-0310-b4b7-95ae10353056
2011-01-03 02:16:03 +00:00
Jens Ayton
a02272fdcd
Added bugzilla link for the use strict bug to comment in logcontrol.
...
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3964 127b21dd-08f5-0310-b4b7-95ae10353056
2011-01-03 00:44:01 +00:00
Jens Ayton
4fac70192f
Cleaned up oolite-default-ship-script.js for strict mode.
...
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3963 127b21dd-08f5-0310-b4b7-95ae10353056
2011-01-03 00:27:00 +00:00
Jens Ayton
dc07d56bf6
Disabled strict mode for oolite-default-ship-script.js for now.
...
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3962 127b21dd-08f5-0310-b4b7-95ae10353056
2011-01-03 00:16:23 +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
a987fe4844
Updated javascript-errors.plist for newjs.
...
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3941 127b21dd-08f5-0310-b4b7-95ae10353056
2011-01-01 00:08:48 +00:00
Eric Walch
552301c3c5
- planetPatrol ships do no longer block the docking queue
...
- new station key: has_patrol_ships
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3939 127b21dd-08f5-0310-b4b7-95ae10353056
2010-12-31 17:12:49 +00:00
Eric Walch
3873fdfe42
- Docking and launching ships now correct for the length of a docking corridor inside the station.
...
- Added an AI reactToMassage "STATION_LAUNCHED_SHIP", to allow an AI to react on a launch.
- fixed the missing "shipWillLaunchFromStation" event for NPC ships.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3923 127b21dd-08f5-0310-b4b7-95ae10353056
2010-12-30 09:27:44 +00:00
Jens Ayton
6d86b802e8
JS String and Number objects can now be coerced to NSString and NSNumber using JSObjectToObject(). In practical terms, this means callObjC() now works on them. Also cleaned up some error messages pertaining to callObjC().
...
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3910 127b21dd-08f5-0310-b4b7-95ae10353056
2010-12-26 14:04:32 +00:00
Jens Ayton
5bf81d659d
Joystick code cleanup
...
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3877 127b21dd-08f5-0310-b4b7-95ae10353056
2010-12-18 18:16:44 +00:00
Jens Ayton
3a463348bb
Joystick refactoring.
...
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3870 127b21dd-08f5-0310-b4b7-95ae10353056
2010-12-18 14:56:39 +00:00
Nikos Barkas
e14168201a
Enabled ability to take snapshot using joystick button assignment.
...
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3844 127b21dd-08f5-0310-b4b7-95ae10353056
2010-12-11 21:44:29 +00:00
Eric Walch
b8359a110b
- Added a JS script to pilots. On unloading at a station, the event "unloadCharacter()" is send to the pilot-script.
...
- Characters in character.plist now always do a basic setup. That way there is always a valid pilot when not using all character keys. This allows for partial randomisation of pilots for the unused keys.
- Added a JS script for the constrictor-pilot.
- Added default pilots to be used by oxps.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3841 127b21dd-08f5-0310-b4b7-95ae10353056
2010-11-30 20:11:45 +00:00
Eric Walch
029f2860fe
Added a "distresMessageReceived(agressor, sender)" event handler.
...
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3838 127b21dd-08f5-0310-b4b7-95ae10353056
2010-11-27 12:20:18 +00:00
cmdrjames
3dec932e3f
Add support for variable ranged turrets
...
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3834 127b21dd-08f5-0310-b4b7-95ae10353056
2010-11-22 23:28:59 +00:00
Michael Werle
6b405350cd
* Add player-wormholes (new AI function: enterPlayerWormhole).
...
* Refactored jump-code.
* Add minimum 0.1LY fuel consumption
* Fix cannot-jump-to-origin-system-from-interstellar-space bug
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3832 127b21dd-08f5-0310-b4b7-95ae10353056
2010-11-21 11:35:28 +00:00
Eric Walch
506770ba27
- better role checking for ships starting to escort. No check for role, but for primaryRole. Should prevent ships being escorted by wrong ships. (It use to be this way in older Oolite versions before 1.72?)
...
- translated some flashers to the new subentitie definition, allowing the viper flashers to be initially off.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3819 127b21dd-08f5-0310-b4b7-95ae10353056
2010-11-16 16:34:32 +00:00
getafix
f2b95b7606
Added the escape pod entry in the joystick configuration menu,
...
following to the changes introduced in r3808.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3818 127b21dd-08f5-0310-b4b7-95ae10353056
2010-11-15 23:10:31 +00:00
Michael Werle
0266a49b78
Commit various options of recharging shields & energy banks, as discussed.
...
By default, Eric's suggestion is enabled (Case 1). Case 0 is current
behaviour, and Case 2 is my suggestion.
Once a solution is picked, the others should be removed.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3814 127b21dd-08f5-0310-b4b7-95ae10353056
2010-11-14 18:40:28 +00:00
Eric Walch
85b8f95c8e
- Corrected two dodo flashers that were out of phase, as noticed by Commander McLane
...
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3811 127b21dd-08f5-0310-b4b7-95ae10353056
2010-11-14 10:05:47 +00:00
Marc
b3647b67bc
escape pods part II:
...
- player and NPCs can eject at all times now.
- if pod ejected in witchspace, it's game over for the player, unless overridden by oxp.
- if pod ejected in normal space, the player will always reappear at the main station, unless overridden by oxp!
- new worldScript event 'escapePodSequenceOver' to override escape pod behaviour: if at the end of the event player.ship.target is a dockable station, the player will reappear inside it, otherwise game over!
- new translation string: gameover-escape-pod
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3809 127b21dd-08f5-0310-b4b7-95ae10353056
2010-11-13 20:10:05 +00:00
Nikos Barkas
f81cfc21ae
Implemented the allowsAutoDocking property for stations and made it visible and read/write to scripts. Defaults to YES.
...
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3805 127b21dd-08f5-0310-b4b7-95ae10353056
2010-11-12 18:20:22 +00:00
Marc
ec4a512194
* Primable equipment! Use shift-n to select, and n to activate the equipment.
...
- New primed equipment key in savegames.
- Equipment scripts only respond to the activate event.
- Equipment scripts have access to this.equipmentKey, which contains the equipment type the script is associated to (e.g. 'EQ_WHATEVER')
* More commsMessage stuff:
- new parameter: ship.commsMessage(message [, toShip]) the second - optional - parameter now allows for narrowcast, as opposed to generic broadcast within scanner range - in crowded systems it's faster to narrowcast to a couple of ships, than to just broadcast the message to all ships in range!
- commsMessageReceived event: the ship sending the message is now passed as a second parameter to the event handler.
* new equipmentInfo property: scriptName
* new ship property: isPiloted
* assorted code cleanup...
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3799 127b21dd-08f5-0310-b4b7-95ae10353056
2010-11-10 21:49:23 +00:00
Eric Walch
4f38b58b2d
- Fixed a compiler warning in the last commit
...
- Added changes to interceptAI and policeInterceptAI
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3785 127b21dd-08f5-0310-b4b7-95ae10353056
2010-10-29 09:57:58 +00:00
Marc
d4f9c5b647
Added new keys to verifier files: couldn't find a reference to hudSchema.plist inside the code, though...
...
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3784 127b21dd-08f5-0310-b4b7-95ae10353056
2010-10-29 09:31:09 +00:00