70 Commits

Author SHA1 Message Date
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
6fe5f8347f Register JS Station class at set-up time.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1120 127b21dd-08f5-0310-b4b7-95ae10353056
2007-08-02 16:52:56 +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
b3b04859ab Enabled more warning flags (-Wextra -Wno-unused-parameter -Wno-missing-field-initializers) in OS X build, and fixed several hundred resulting warnings (mostly by using more appropriate types). Bumped version number to 1.69.1. Fixed unable-to-buy-in-shipyard bug. Attempt to fix dockEscorts crash bugs (needs testing). Sundry cleanup, especially of AI and GuiDisplayGen; all exception throws now in standard form. Removed some dead code. Use correct key for Advanced Nav Array if no keyconfig.plist found. Changed OOCollectionExtractors to always clamp integer values to the requested type's range rather than truncating like NSNumber. Removed inconsistently-used and apparently-unneeded NSLock from AI.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1063 127b21dd-08f5-0310-b4b7-95ae10353056
2007-07-07 15:44:50 +00:00
Jens Ayton
f0b1addbeb Fixed legacy script method awardCredits: always setting the player's balance to 0. Fixed JS script method system.legacyAddShipsWithinRadius() ignoring radius parameter. Made JS methods that use legacy script methods always set the legacy script system script target to ensure consistent behaviour.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1059 127b21dd-08f5-0310-b4b7-95ae10353056
2007-07-04 12:12:58 +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
7192a86ec6 Removed entity recycling (and associated bugs) from demo screen code. Work on unifying damage-taking code. World scripts now get notifications of cause of death; set up for similar effect for NPC scripts.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@921 127b21dd-08f5-0310-b4b7-95ae10353056
2007-04-09 17:55:19 +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
ca593a0a1e Error reporting for JS Vector and Entity methods.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@911 127b21dd-08f5-0310-b4b7-95ae10353056
2007-04-06 17:35:42 +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
Jens Ayton
935e8be1bd Implemented Vector JavaScript class.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@909 127b21dd-08f5-0310-b4b7-95ae10353056
2007-04-05 23:53:48 +00:00
Jens Ayton
cc175c75b9 Changed references to PlayerEntityScripting to PlayerEntityLegacyScriptEngine. Cleanup of Entity.h led to making universe a global (UNIVERSE) because having lots of references to it and passing it around is silly, and it's used many thousand times per frame.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@906 127b21dd-08f5-0310-b4b7-95ae10353056
2007-04-05 16:46:46 +00:00
Jens Ayton
0a828d664f Removed JS universe global, accidentally left in as a duplicate of system.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@904 127b21dd-08f5-0310-b4b7-95ae10353056
2007-04-04 21:30:28 +00:00
Jens Ayton
0f356d5154 OOLogging now merges logcontrol.plist from the root search paths. This is hopefully the last touch on 1.68-mac.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@896 127b21dd-08f5-0310-b4b7-95ae10353056
2007-04-03 00:14:21 +00:00
Jens Ayton
d327cb7b38 Fiddled with JavaScript loading and error reporting: unicode savvy, should load on all platforms.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@891 127b21dd-08f5-0310-b4b7-95ae10353056
2007-04-02 19:59:43 +00:00
dajt
98bbda198b Fixing compilation errors for GNUstep build.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@889 127b21dd-08f5-0310-b4b7-95ae10353056
2007-04-01 23:44:13 +00:00
Jens Ayton
1a18ca735e More scripting tweaks. Moved all of universe into system, and removed universe.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@888 127b21dd-08f5-0310-b4b7-95ae10353056
2007-04-01 18:41:47 +00:00
Jens Ayton
7db1aebda6 Added some missingg JS methods; added systemEconomy_string; implemented willLaunch() event.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@887 127b21dd-08f5-0310-b4b7-95ae10353056
2007-04-01 16:56:17 +00:00
Jens Ayton
d1ef0aa3b6 Moving and renaming scripting files, step 2
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@883 127b21dd-08f5-0310-b4b7-95ae10353056
2007-04-01 14:59:09 +00:00