39 Commits

Author SHA1 Message Date
cim
bc97187a11 Add read-only representation for wormholes (issue #34)
wormhole.arrivalTime
wormhole.expiryTime
wormhole.destination
wormhole.origin
entity.isWormhole
2013-06-30 10:22:15 +01:00
Nikos Barkas
afb09f9a7e Here goes another year. Happy 2013. The Reference Sheet and the Readme still need to have year references bumped.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5596 127b21dd-08f5-0310-b4b7-95ae10353056
2012-12-31 09:00:28 +00:00
Chris Morris
41294e1782 Fix compiler error
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5215 127b21dd-08f5-0310-b4b7-95ae10353056
2012-08-19 18:49:05 +00:00
Chris Morris
44f1494b13 Initial addition of "Visual Effect" entities.
- effectdata.plist defines them
 - VisualEffect JS representation
 - System.addVisualEffect()
 - System.breakPattern and Station.breakPattern properties to allow override of usual break pattern
 - No appearance on scanner yet
src/Core/Entities/OOVisualEffectEntity and src/Core/Scripting/OOJSVisualEffectEntity will need adding to XCode project, please.


git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5212 127b21dd-08f5-0310-b4b7-95ae10353056
2012-08-19 17:09:51 +00:00
Chris Morris
b66fbebcc0 Add basic JS representation of DockEntity
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5064 127b21dd-08f5-0310-b4b7-95ae10353056
2012-07-11 11:52:23 +00:00
Jens Ayton
fe5ac693dd Various minor issues exposed by Clang static analyzer, and associated cleanup.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4733 127b21dd-08f5-0310-b4b7-95ae10353056
2012-01-08 22:49:10 +00:00
Michael Werle
7312ad733c Bump copyright to 2012. Happy New Year!
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4692 127b21dd-08f5-0310-b4b7-95ae10353056
2012-01-03 16:08:14 +00:00
Nikos Barkas
1e566c3eea Hopefully fixed the long distance targeting bug for good this time. The primary target's distance from player is now checked on a per-frame basis and the target is released if the distance is higher than maximum scanner range.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4558 127b21dd-08f5-0310-b4b7-95ae10353056
2011-06-06 09:44:38 +00:00
Nikos Barkas
bfc8d51069 Better fix for long distance targeting bug (Berlios #18011). The previous targeting behaviour is now maintained.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4516 127b21dd-08f5-0310-b4b7-95ae10353056
2011-04-15 15:01:12 +00:00
Nikos Barkas
932e66ed34 Setting a target by script for the player ship now activates the ident computer. This resolves the distant targeting bug when a non-missile pylon weapon is selected, as per discussion in the mailing list.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4486 127b21dd-08f5-0310-b4b7-95ae10353056
2011-03-22 22:11:40 +00:00
Jens Ayton
435c218d6e JS audit: OOJSEntity. Also cleaned up some redundant [entity isPlanet] && ![entity isSun] checks - -[OOSunEntity isPlanet] is false.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4289 127b21dd-08f5-0310-b4b7-95ae10353056
2011-02-10 23:47:42 +00:00
Jens Ayton
150dd2b9a5 JavaScript console and global object are now rebuilt when resetting the game, to make it impossible to smuggle information across sections. There seem to be minor JS-related leaks as a result. Be on the lookout for exciting new crashers! As an arguably unfortunate side-effect, the console currently doesn't work when resetting into strict mode.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4210 127b21dd-08f5-0310-b4b7-95ae10353056
2011-02-01 21:12:38 +00:00
Jens Ayton
6e515e60ed Big renaming of JavaScript helpers for internal consistency and clarity.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@4004 127b21dd-08f5-0310-b4b7-95ae10353056
2011-01-05 12:58:27 +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
07c6aa06c9 Work on JavaScript API update.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3848 127b21dd-08f5-0310-b4b7-95ae10353056
2010-12-12 18:58:07 +00:00
Jens Ayton
1242dfdd67 Work on JavaScript API update.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3845 127b21dd-08f5-0310-b4b7-95ae10353056
2010-12-12 16:22:26 +00:00
Marc
15fcc13c8a - added new resource files to mac build
- brought most copyright notices up to date.

git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3361 127b21dd-08f5-0310-b4b7-95ae10353056
2010-05-15 23:50:35 +00:00
Jens Ayton
073b32262e Don't use named JS GC roots in release builds.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3290 127b21dd-08f5-0310-b4b7-95ae10353056
2010-05-05 17:11:11 +00:00
Jens Ayton
966ee404e4 Annotated clang static analyzer false positives, and fixed one genuine leak.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@3105 127b21dd-08f5-0310-b4b7-95ae10353056
2010-04-03 17:17:32 +00:00
Jens Ayton
1e2e56b4b1 NEW_PLANETS now applies to scripted planets. If NEW_PLANETS, the old PlanetEntity and TextureStore are now completely excluded. Most of the kludges for dealing with both types of planet are gone.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@2857 127b21dd-08f5-0310-b4b7-95ae10353056
2009-12-07 18:43:48 +00:00
Jens Ayton
6aaf7a1e75 Committed unspeakable necromancy on the graveyard of the repository.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@2331 127b21dd-08f5-0310-b4b7-95ae10353056
2009-08-29 23:09:22 +00:00
Jens Ayton
999fe7e969 Trying to convince svn that this deleted directory is really deleted.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@2330 127b21dd-08f5-0310-b4b7-95ae10353056
2009-08-29 22:50:59 +00:00
Jens Ayton
12e982fa06 Removed a bunch of temporarily #ifed-out stuff from previous commit.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@2029 127b21dd-08f5-0310-b4b7-95ae10353056
2009-02-06 16:42:22 +00:00
Jens Ayton
dbde672d01 "Small" change to group and escort handling, now with explicit group objects. I really must stop making "small" changes. (N.b.: JavaScript ShipGroup currently fails to work in interesting ways.)
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@2028 127b21dd-08f5-0310-b4b7-95ae10353056
2009-02-06 16:13:36 +00:00
cmdrjames
5260ef0ed6 Mostly cosmetic changes while looking into bug list. Code is now slightly easier to read, and a couple of very slight improvements, such as adding defaults to a switch/case
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1955 127b21dd-08f5-0310-b4b7-95ae10353056
2009-01-01 21:31:11 +00:00
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
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
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
c69733ac93 Changed to using a pool of JavaScript contexts instead of a single one, so that JS -> ObjC -> JS call chains work. I'm not sure I fully trust this, but it appears to work. Need to think up some serious stress tests.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1207 127b21dd-08f5-0310-b4b7-95ae10353056
2007-10-09 18:02:18 +00:00
Jens Ayton
160cd8b94d Implemented JS class Planet. Added JS System attributes mainPlanet, sun, planets and allShips, and methods shipsWithPrimaryRole(), shipsWithRole(), entitiesWithScanClass() and filteredEntities() (the latter disabled due to an architectural flaw -- we need more than one JSContext). In support of this, added/exposed generic predicate-based entity counters and getters to Universe.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1198 127b21dd-08f5-0310-b4b7-95ae10353056
2007-10-07 21:41:18 +00:00
Nikos Barkas
a677bc3744 Fixed a crash due to JavaScript root objects not being removed properly.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1180 127b21dd-08f5-0310-b4b7-95ae10353056
2007-09-20 15:45:39 +00:00
Jens Ayton
dfc8f99526 Implemented role set vs. primary role distinction in ShipEntity. Appears to work.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1166 127b21dd-08f5-0310-b4b7-95ae10353056
2007-09-07 17:16:36 +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
7194812ae8 Added JS Ship properties: entityPersonality, isBeacon, beaconCode, isFrangible, isCloaked, isJamming, groupID, potentialCollider, hasHostileTarget, weaponRange, scannerRange, reportAIMessages, withinStationAegis, maxCargo, speed, maxSpeed.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1124 127b21dd-08f5-0310-b4b7-95ae10353056
2007-08-04 11:07:51 +00:00
Jens Ayton
30b800a829 JavaScript: new Entity properties isValid, isShip, isStation, isPlayer, isPlanet. Deprecated Entity.valid() in favour of Entity.isValid. Added Ship.subEntities. Player.dockedStation is now null rather than undefined when not docked. Fixed bugs including crash when attempting to compare JS Entity subclass instances.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1123 127b21dd-08f5-0310-b4b7-95ae10353056
2007-08-03 16:31:17 +00:00
Jens Ayton
5c6e674fa2 Made OOJavaScriptConversion an informal protocol with a default implementation (returning JSVAL_NULL) for NSObject. Work on rewriting JS player proxy, moving properties up into Ship and Entity as appropriate. Reimplemented player.call(), allowing it to return values, and applying to entities in general. Ensured correct and consistent type conversion in JavaScript property getters/setters. Fixed bug where script-awarded missiles/mines would use two slots. Made blowUpStation actually blow up the station.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1119 127b21dd-08f5-0310-b4b7-95ae10353056
2007-08-02 16:41:55 +00:00
Jens Ayton
15255d19c0 JavaScript: entity class hierarchy now reflected in JS object prototype relationships (player is a Player is a Ship is an Entity). Fix for enery units being unbuyable; moved some hardcoded equipment requirements into equipment.plist; made -[PlayerEntity hasExtraEquipment:] accept arrays and sets of strings as well as individual strings.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1118 127b21dd-08f5-0310-b4b7-95ae10353056
2007-08-02 00:31:44 +00:00
Jens Ayton
c611e69a33 Implemented JavaScript quaternion. Much cleanup. Made various enumerations actual enum types. Made some other integer types dedicated types. Slightly reduced size of entity instances. Relatively high chance of breakage.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@912 127b21dd-08f5-0310-b4b7-95ae10353056
2007-04-07 18:03:50 +00:00
Jens Ayton
67138687af implemented JS Entity class (but not tested - there's no way to get an entity yet). Simplified JS Vector by removing the reference-to-object-property stuff.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@910 127b21dd-08f5-0310-b4b7-95ae10353056
2007-04-06 15:09:19 +00:00