79 Commits

Author SHA1 Message Date
Jens Ayton
ca8bdfa70e Return values and semicolons for all!
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@2890 127b21dd-08f5-0310-b4b7-95ae10353056
2009-12-17 07:33:10 +00:00
Marc
7c2a544db2 - oops!
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@2889 127b21dd-08f5-0310-b4b7-95ae10353056
2009-12-17 06:31:40 +00:00
Marc
b6826f47bc AddShips Part I:
* new js methods added system.addShips(), system.addGroup(), system.addShipsToRoute(), system.addGroupToRoute() if a ship is created near the witchpoint, it gets the witchspace rings, and its status is STATUS_LAUNCHING, otherwise it's STATUS_IN_FLIGHT, and no witchspace effect.
* tentatively fixed berlios bug #14626: 'AI is initialised twice since 1.71'
when entities are added to the universe, the AI state is set to GLOBAL only once after their ID is set. Seems to work.

- reworked witchpoint buoy to use multiple colour flashers.

git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@2888 127b21dd-08f5-0310-b4b7-95ae10353056
2009-12-17 06:25:41 +00:00
Eric Walch
8afb80c43c - Ship put in the launch queue now have the correct status: STATUS_DOCKED.
- Lowered the aft_eject_position of the boa_mk2 by 3 meters to avoid collision with escape pod.

git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@2859 127b21dd-08f5-0310-b4b7-95ae10353056
2009-12-07 21:41:44 +00:00
Marc
cd8e1ac956 - tweaked thargoids a bit more! If they're too tough, we can tweak their AI yet again!
- minor equipment.plist tidy-up.

git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@2844 127b21dd-08f5-0310-b4b7-95ae10353056
2009-12-05 19:54:05 +00:00
Jens Ayton
c17d4a389e Replaced horrible oolite-unknown-ship with more conceptually boring but non-horrible version.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@2821 127b21dd-08f5-0310-b4b7-95ae10353056
2009-12-01 21:27:31 +00:00
Jens Ayton
5675e4a911 Ressurected worms (oops)
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@2789 127b21dd-08f5-0310-b4b7-95ae10353056
2009-11-28 14:03:04 +00:00
Nikos Barkas
101813d321 Fixed an error in shipdata.plist.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@2788 127b21dd-08f5-0310-b4b7-95ae10353056
2009-11-28 11:13:48 +00:00
Jens Ayton
531dcc10bc Cleaned up contours of various models using a mix of smoothing groups and normal tweaking, use materials rather than duplicate models for identical ships with different textures, deleted obsolete models, some like_shippage in shipdata.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@2787 127b21dd-08f5-0310-b4b7-95ae10353056
2009-11-27 23:52:27 +00:00
Jens Ayton
76e3295f3a Set Asp's likely_cargo to 0, as its max_cargo is 0. While I was at it, cleaned up Asp's contours using smooth groups, and like_shipified its shipdata entry.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@2785 127b21dd-08f5-0310-b4b7-95ae10353056
2009-11-27 15:18:54 +00:00
Jens Ayton
31ae47c6f4 Fix for bogus is_template warning in verifier. Changed scanClass to scan_class in shipdata.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@2755 127b21dd-08f5-0310-b4b7-95ae10353056
2009-11-16 23:53:13 +00:00
Eric Walch
9d963a50b1 - Limited wormhole size in nova systems.
- Added scoop positions to all ships that can have fuel scoops.
- Raised asteroid and boulder density to 5. (To discourage boulder ramming)

git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@2748 127b21dd-08f5-0310-b4b7-95ae10353056
2009-11-14 22:40:43 +00:00
Jens Ayton
e390b42dbe Made buoys shinier, because I can.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@2572 127b21dd-08f5-0310-b4b7-95ae10353056
2009-09-21 22:46:36 +00:00
Jens Ayton
7237dcfcec Removed badly-thought-out supposedly-unique roles for built-in ships.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@2423 127b21dd-08f5-0310-b4b7-95ae10353056
2009-09-07 18:47:10 +00:00
Nikos Barkas
b1ecf44f55 Removed escorts=4 declaration from boa-mk2-player. This should stop some ship.escortSetup.wtf errors popping up in the shipyard screen. Thanks to Svengali for spotting it.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@2287 127b21dd-08f5-0310-b4b7-95ae10353056
2009-08-14 21:24:41 +00:00
Jens Ayton
58549d3c73 New subentity stuff now knows a dock when it sees it.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@2053 127b21dd-08f5-0310-b4b7-95ae10353056
2009-02-11 18:46:16 +00:00
Jens Ayton
14e48aad0e Removed unused port_radius attributes.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1978 127b21dd-08f5-0310-b4b7-95ae10353056
2009-01-07 23:49:45 +00:00
Nikos Barkas
d30e46fb02 Fix a little issue where docking clearance cancellation messages would appear on screen even if no clearance had been given, every second time player pressed 'L'. Reverted AI code fix from previous commit, as it was resulting in idle ships being launched from stations. Set default rock hermit docking clearance requirement to no. Adjusted a little the docking clearance messages to make sense also in the case the issuing station is not a main one.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1792 127b21dd-08f5-0310-b4b7-95ae10353056
2008-10-11 08:30:12 +00:00
Jens Ayton
3315272c00 Split JS Player object into Player and PlayerShip. Made curved sides of arc-detail smooth.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1710 127b21dd-08f5-0310-b4b7-95ae10353056
2008-07-28 17:34:37 +00:00
Jens Ayton
f2c07b5ee7 Fixed a few leaks.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1684 127b21dd-08f5-0310-b4b7-95ae10353056
2008-07-04 16:01:26 +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
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
Marc
96330a81a4 Demo2 bugfixes & changes: demo ships calculated at each update, missing/broken ship models displayed as question marks on demo screen, missing textures displayed as no-textures-material. Updated question mark mesh and no-textures-material. Hopefully did not introduce any new bugs.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1497 127b21dd-08f5-0310-b4b7-95ae10353056
2008-03-21 16:54:43 +00:00
Jens Ayton
197119ccc8 All scripts now JavaScript -- adopted somewhat twiddled versions of Eric's scripts, with the cleanup stuff removed (premature optimization is the root of all evil; I'll put it back in if anyone has profiling information indicating it's actually a win). Moved the mission screen function into global-prefix as a generally-available utility function. Wrote JS scripts for the two remaining ships using death_actions. Added Ship.explode(), which kills any ShipEntity through energy damage including the main station. Once again made blowing up the main station with blowUpMainStation (or explode()) work.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1473 127b21dd-08f5-0310-b4b7-95ae10353056
2008-03-10 00:01:30 +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
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
Nikos Barkas
74ae10a5c9 Resolution for bug #12659 (scripted cargo pods do not award cargo when scooped). Added the CLASS_CARGO scan class to alloy and splinter in shipdata.plist, so that they don't appear unscoopable and with legal status when spawned by scripts. Finally, yes, you guessed it, more strings externalized.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1448 127b21dd-08f5-0310-b4b7-95ae10353056
2008-03-03 06:46:40 +00:00
Jens Ayton
804b2fea93 Fix for Asps not having lasers when bought. Subentities no longer count as kills (trunk only).
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1305 127b21dd-08f5-0310-b4b7-95ae10353056
2008-01-09 01:11:38 +00:00
Nikos Barkas
665bba439c Fixed a problem in shipdata.plist, whereby the GNUstep parser was getting confused due to nested comment.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1245 127b21dd-08f5-0310-b4b7-95ae10353056
2007-11-25 21:24:13 +00:00
Jens Ayton
280f4d7828 Fixed some warnings in Windows build; switched cloaking device pod to use JavaScript implementation now that its script_actions are no longer needed for testing; fiddled with OOCollectionExtractors for a tool I'm fiddling with.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1243 127b21dd-08f5-0310-b4b7-95ae10353056
2007-11-24 15:58:15 +00:00
Jens Ayton
3fbc24887d * All ships now have a JavaScript script attached, allowing JS scripts to
add behaviours to any ship.
* Legacy script_actions, setup_actions, launch_actions and death_actions
  handled through default JavaScript script.
* In order to implement the above, JS Ship now has a runLegacyScriptActions
  method. This is not to be exposed as an "official" method, though, since
  we might want to change the mechanism -- for instance, to "compile"
  legacy scripts into JS. Handling dynamically-generated legacy scripts in
  that case would be a significant complication.
* Updates for Mac OS X 10.5 "Leopard".
  - Errors on reading/writing plist will not cause a crash if building
    against the Leopard SDK. (I have no intention of requiring Leopard any
    time soon, but future-proofing is good.)
  - OOWeakReference is now more efficient when running under Leopard, by
    implementing the new "fast forwarding" mechanism.
  - Threads now have names set under Leopard, which may provide debugging
    advantages.
  - Fixed some new build warnings for new version of apple-gcc.
  - Updated type declarations to identify Oolite saved games as property
    lists.
* Cleaned up PlayerEntityControls.m somewhat. Moved method declarations
  into files, fixed indentation, broke up monster giant method of doom.
* Script-generated asteroids now behave like system populator-generated
  asteroids (As Seen on BB[TM]).
* Minor optimizations and simplifications of legacy script engine.
* JS System.filteredEntities() now has sensible behaviour if predicate
  throws an exception: the predicate is not called again, and null is
  returned. The exception is reported and not rethrown.


git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1240 127b21dd-08f5-0310-b4b7-95ae10353056
2007-11-23 15:04:14 +00:00
Jens Ayton
44fd79dc64 Cache synthesized material dictionaries. Added sendScriptMessage: AI method.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1231 127b21dd-08f5-0310-b4b7-95ae10353056
2007-10-23 07:36:58 +00:00
Jens Ayton
9d9128bcb1 * Got Game Options submenu working under OS X.
* Save reduced detail, wireframe and shader settings in preferences.
* Implemented variable shader complexity support.
Added default shader, used for all otherwise-unshaded ships with full shaders on, and for smooth ships or ships with effect maps specified in material dictionary with simple shaders.
* All ships now drawn with slight specular highlight by default (shininess = 10, intensity = 0.2) except in reduced detail mode.
* (JS) Made Ship.shipDescription read-write (except for the player).
* (JS) Added global function ExpandDescription(string : String), to perform substitutions like %H, [commander_name] and so forth. 
* (JS) Added global function RandomName(), intended to be like %R substitution. In so doing, I discovered that %R is broken, but left it as-is so it will generate the same name for existing descriptions. Added %X to do the same thing, but without the bugs. RandomName() is different from either in that it doesn't use the "predictable" PRNG, so it will provide a new name each time. To use the "predictable" variant in JavaScript, use ExpandDescription("%X"). 
* Ships that hyperspace out are no longer replenished in interstellar space.

git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1228 127b21dd-08f5-0310-b4b7-95ae10353056
2007-10-22 12:18:18 +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
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
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
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
Jens Ayton
97211c9285 * Fixed backing up of log (OS X only).
* Only release plist parsing error messages under OS X (this is a documented requirement that doesn't follow normal usage, and isn't the right thing under GNUstep.)
* Work on shipdata.plist and model verifier stages.
* equipment_price_factor fixes: exploit when low equipment_price_factor doesn't affect refund prices, minimum equipment_price_factor of 0.5.
* Made fuel unsigned.
* Implemented property list schema verifier to simplify implementation of plist checkers.

git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1104 127b21dd-08f5-0310-b4b7-95ae10353056
2007-07-25 16:43:29 +00:00
Jens Ayton
b5d7ca37ee Work on shipdata.plist verifier stage; started fixing problems it reported with built-in shipdata.plist.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1103 127b21dd-08f5-0310-b4b7-95ae10353056
2007-07-21 11:03:32 +00:00
Jens Ayton
78275bee85 Implemented auto_ai ship attribute. Clamped laser head values for shaders. Tweaked logging to avoid sporadic 'logging not inited' message while quitting.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1074 127b21dd-08f5-0310-b4b7-95ae10353056
2007-07-12 11:33:26 +00:00
Jens Ayton
949cd8da04 Load screen now uses file extensions (urgh) to recognize saved games rather than trying to parse every file as a plist. Fixed display of giant question mark for unknown ship types (but it draws in the wrong place in wide windows, which probably also affects long ships).
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1069 127b21dd-08f5-0310-b4b7-95ae10353056
2007-07-09 14:58:33 +00:00
Jens Ayton
439d26be98 Fixed problem with traders that have pirate AI. Gave each non-player ship a unique role based on its dictionary key. Changed numbers like 0.65000000000000002 to 0.65.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1050 127b21dd-08f5-0310-b4b7-95ae10353056
2007-06-29 12:55:48 +00:00
Jens Ayton
741f48d34a Undid damage to shipdata.plist from last revision. Extended dummy joystick handler for OS X to reduce the number of #ifs in PlayerEntityControls.m.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1012 127b21dd-08f5-0310-b4b7-95ae10353056
2007-06-08 14:54:21 +00:00
Jens Ayton
9137ef4581 Clean-up of various methods in connection with documenting uniform binding mechanism. Tweak to syntax for said mechanism. Bumped version number to 1.69.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1011 127b21dd-08f5-0310-b4b7-95ae10353056
2007-06-08 12:59:08 +00:00
Jens Ayton
5572ddab50 Cache path should now be created properly under GNUstep, and XML should be used for cache (should change to GNUstep binary format once bugs are resolved). Added lots of debug messages to cache.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@995 127b21dd-08f5-0310-b4b7-95ae10353056
2007-06-03 09:32:06 +00:00
Jens Ayton
0382795518 Added support for flushing data cache by holding down shift at startup (needs testing under SDL!). Also, a question mark is now shown as a placeholder model on the Load screen if a saved game uses an unknown ship class.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@994 127b21dd-08f5-0310-b4b7-95ae10353056
2007-06-02 20:58:41 +00:00
Jens Ayton
6643d24da1 Implemented garish placeholder texture for meshes with no TEXTURES section. Fixed bug where StationEntites were not being initialized fully. Made tharglets unpiloted.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@966 127b21dd-08f5-0310-b4b7-95ae10353056
2007-05-14 15:54:13 +00:00
Jens Ayton
076bf6c4fa Lots of stuff I've been working on over the last few weeks - mainly moving ShipEntity rendering into new class (OOMesh); also work on robustness of plist handling and stuff. Texture caching management is currently buggy.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@954 127b21dd-08f5-0310-b4b7-95ae10353056
2007-05-08 15:24:13 +00:00