306 Commits

Author SHA1 Message Date
Jens Ayton
164fd3f2e9 Implemented whitelisting for legacy script conditions, and accidentally optimized evaluation while at it. Conditions for world scripts are currently sanitized (i.e. whitelisted, aliases resolved, syntax checked and partially tokenized) on the fly; this will be cached once sanitizing is implemented for actions. Deleted unused class OOLegacyEventHandlerScript.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1998 127b21dd-08f5-0310-b4b7-95ae10353056
2009-01-16 01:24:01 +00:00
Jens Ayton
b02f108735 Implemented AI validation OXP verifier stage. Removed invalid and unused shuttleAI.plist.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1993 127b21dd-08f5-0310-b4b7-95ae10353056
2009-01-12 18:04:02 +00:00
Jens Ayton
3b1db9072d Work towards securing legacy scripts, AIs and shader uniform bindings by whitelisting methods. Game will now print an error message if non-whitelisted methods are used in AIs; in 1.74, this will be changed to dropping non-whitelisted commands from AI actions. My intention is to have similiar mechanisms in place for scripts and uniform bindings by 1.73 release.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1991 127b21dd-08f5-0310-b4b7-95ae10353056
2009-01-11 15:53:01 +00:00
Jens Ayton
c434cb64f1 Implemented AI method scanForNearestShipMatchingPredicate:.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1977 127b21dd-08f5-0310-b4b7-95ae10353056
2009-01-07 23:27:49 +00:00
Jens Ayton
8f0900ea10 Fixed uninitialized variable warning from r1955/1966.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1972 127b21dd-08f5-0310-b4b7-95ae10353056
2009-01-05 17:03:41 +00:00
Jens Ayton
5456372c05 Cleanup.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1960 127b21dd-08f5-0310-b4b7-95ae10353056
2009-01-03 14:19:44 +00:00
Jens Ayton
9a1db3fe0b shipWillLaunchFromStation event is now sent while player.dockedStation is still valid (bug #14976).
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1935 127b21dd-08f5-0310-b4b7-95ae10353056
2008-12-30 09:55:44 +00:00
Jens Ayton
4a67f75297 Fixed variable-may-be-used-uninitialized warning in optimized builds (not a real problem).
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1934 127b21dd-08f5-0310-b4b7-95ae10353056
2008-12-29 17:08:59 +00:00
Jens Ayton
c9f22eacfb Hot new data-driven crosshairs.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1911 127b21dd-08f5-0310-b4b7-95ae10353056
2008-12-17 00:40:09 +00:00
Jens Ayton
a00a7f495c Implemented --export-sysdesc and --compile-sysdesc command-line options for translators. Improved robustness of system_description parsing and allow entries with other than five elements.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1908 127b21dd-08f5-0310-b4b7-95ae10353056
2008-12-14 18:30:52 +00:00
Jens Ayton
a26e612250 Minor tweaks to Mac startup screen; added code for preloading/caching of all meshes, disabled until I finish some refactoring of OOMesh.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1899 127b21dd-08f5-0310-b4b7-95ae10353056
2008-12-10 19:23:01 +00:00
Jens Ayton
1b092b002d Allow looped music via JavaScript. Added %N to SystemDescription.dot dump. Added :qotd console macro for moments of boredom.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1894 127b21dd-08f5-0310-b4b7-95ae10353056
2008-12-06 11:34:01 +00:00
Jens Ayton
4e900975c8 OOMeshes are now dynamically sized.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1890 127b21dd-08f5-0310-b4b7-95ae10353056
2008-12-04 15:20:43 +00:00
Jens Ayton
1cb2df40dd Cleaned up shaders slightly.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1886 127b21dd-08f5-0310-b4b7-95ae10353056
2008-11-28 20:20:58 +00:00
Jens Ayton
ab24d9efd3 Rewrote default shader to work in tangent space and support normal mapping.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1885 127b21dd-08f5-0310-b4b7-95ae10353056
2008-11-28 19:37:47 +00:00
Jens Ayton
dd1ac56784 Simpler, more efficient equipment shopping code using OOEquipmentItem, with side effect that available_for_all now parses its value correctly.. Corrected use of fuzzyBooleanForKey: in r1855.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1856 127b21dd-08f5-0310-b4b7-95ae10353056
2008-11-15 01:10:01 +00:00
Jens Ayton
c5af9b124b Enable docking clearance for non-debug Mac builds (oops). Fixed a potential crash when calling JS player.ship.setGalacticHyperspaceBehaviour() with an invalid argument.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1829 127b21dd-08f5-0310-b4b7-95ae10353056
2008-11-03 21:48:41 +00:00
Jens Ayton
bbd9c0ef23 Ye bigge version number bumpe. Also removed deprecated JS stuff that's been around for two versions, and added :logOn and :logOff console macros.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1828 127b21dd-08f5-0310-b4b7-95ae10353056
2008-11-03 17:55:32 +00:00
Jens Ayton
9ad01ddc33 Fix for octree generation bug.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1821 127b21dd-08f5-0310-b4b7-95ae10353056
2008-11-01 13:40:56 +00:00
Jens Ayton
5468ad980f Added CARGO_CARRIED to shipdataEntrySchema.plist. Rearranged IsPlanetPredicate() for better branch prediction.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1818 127b21dd-08f5-0310-b4b7-95ae10353056
2008-10-31 15:54:40 +00:00
Jens Ayton
2158de017c Made JS missionVariables (and script converter) stricter about what they consider to be numbers. Stuff like 2HRS_TO_ZERO are no longer converted to numbers when they shouldn't be. Deleted toos/ScriptCompiler since we no longer support .oos scripts.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1810 127b21dd-08f5-0310-b4b7-95ae10353056
2008-10-25 14:50:30 +00:00
Jens Ayton
f575d75530 Added JS EquipmentInfo, wrapper around OOEquipementType.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1796 127b21dd-08f5-0310-b4b7-95ae10353056
2008-10-16 22:04:29 +00:00
Jens Ayton
fa182670a7 Mac build now has docking clearance enabled.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1783 127b21dd-08f5-0310-b4b7-95ae10353056
2008-10-03 18:41:50 +00:00
Jens Ayton
6c0d0cc761 Upgraded to Smart Crash Reports SDK 1.5 (for Leopard support). Mac OS X TestRelease configuration will not build without the updated SDK (download from smartcrashreports.com). Also included: a missing file from r1777.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1778 127b21dd-08f5-0310-b4b7-95ae10353056
2008-09-29 21:04:01 +00:00
Jens Ayton
a9f7317991 Logging to ~/.Oolite/Logs/Latest.log instead of stderr under Linux, part 2 of 2.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1775 127b21dd-08f5-0310-b4b7-95ae10353056
2008-09-29 09:36:17 +00:00
Jens Ayton
ee4e599ebf Fixed memory management bug in modified texture code. Simplified code by adding singleton OONullTexture. Minor tweaks to reduce clang static analyzer messages.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1764 127b21dd-08f5-0310-b4b7-95ae10353056
2008-09-18 23:09:56 +00:00
Jens Ayton
379bd91c6d Fixed JS system.filteredEntities(), entitiesWithScanClass() and shipsWithRole() (all were completely non-functional). Added groovy new entity-finding console macros: :nearest, :tnearest, :find, :findS, :target (see debugConfig.plist).
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1750 127b21dd-08f5-0310-b4b7-95ae10353056
2008-08-30 01:43:00 +00:00
Jens Ayton
c3da65606f Fixed some OXP verifier issues, twiddled OOCocoa.h so clang static analysis works again.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1749 127b21dd-08f5-0310-b4b7-95ae10353056
2008-08-29 20:44:06 +00:00
Jens Ayton
61e4d9f989 New SDL sound code. Architecturally more similar to Mac code; main feature is that the same sound can be playing on more than one channel at once. Written without test builds, built almost without fixes and worked straight away, so there are almost certainly lurking bugs waiting to bite.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1739 127b21dd-08f5-0310-b4b7-95ae10353056
2008-08-24 21:59:52 +00:00
Jens Ayton
35d09e3f75 Updated remaining old-style sound code. Afterburner loop fixed to use a single sound file instead of two identical ones.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1736 127b21dd-08f5-0310-b4b7-95ae10353056
2008-08-21 20:48:24 +00:00
Jens Ayton
585a1bb940 Fix for OS X-specific build issues (recommend deleting build folder and rebuilding all). Missiles now respond to ECM during initial launch.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1722 127b21dd-08f5-0310-b4b7-95ae10353056
2008-08-03 13:25:30 +00:00
Jens Ayton
dee4989151 Catch exceptions when reading cache and rebuild instead of crashing.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1720 127b21dd-08f5-0310-b4b7-95ae10353056
2008-08-02 20:49:23 +00:00
Jens Ayton
87d724fc8a Fix for bug in prefix script adding player compatibility aliases to all objects.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1716 127b21dd-08f5-0310-b4b7-95ae10353056
2008-08-02 19:19:01 +00:00
Jens Ayton
369f588d08 Raised joystick limits.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1712 127b21dd-08f5-0310-b4b7-95ae10353056
2008-07-29 09:41:18 +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
f2fae7fef0 Fixed 64-bit little-endian mip-map generation bug and updated associated test code.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1708 127b21dd-08f5-0310-b4b7-95ae10353056
2008-07-27 17:34:36 +00:00
Jens Ayton
175ff0c484 Upgraded OS X sound system to libVorbis 1.2.0. 64-bit build now functional, with texture glitch (almost certainly in mipmap generation). Looking forward to interesting subtle bugs.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1705 127b21dd-08f5-0310-b4b7-95ae10353056
2008-07-26 20:16:46 +00:00
Jens Ayton
3d700aaa6e Changes to make Oolite compile in 64-bit for OS X. Does not link yet due to library issues.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1704 127b21dd-08f5-0310-b4b7-95ae10353056
2008-07-26 17:54:29 +00:00
Jens Ayton
f16c5b3629 Various minor fixes I've forgotten about. Much too little work on camera system. JS shipLaunchedEscapePod called (for player) before resetting legal status and trumbles.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1701 127b21dd-08f5-0310-b4b7-95ae10353056
2008-07-25 13:18:56 +00:00
Jens Ayton
a8b39c4c9a Refactored equipment restriction tests, and apply them in addEquipmentItem: as well as the shopping screen. Added new class representing equipment types, currently only used in these tests. Added new equipment restrictions: requires_free_passenger_berth, requires_full_fuel, requires_non_full_fuel.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1689 127b21dd-08f5-0310-b4b7-95ae10353056
2008-07-10 20:45:02 +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
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
7a574a8b3e Long-lost nephew of the revenge of JavaScript error handling clean-up.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1651 127b21dd-08f5-0310-b4b7-95ae10353056
2008-05-23 19:38:43 +00:00
Jens Ayton
b148cfd85d More work on JavaScript error checking. More rigourous! More informative! More not buggy! And, conversely, probably also more buggy. I've almost certainly broken something silly. Also moved JS nova-related functionality into Sun.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1648 127b21dd-08f5-0310-b4b7-95ae10353056
2008-05-23 07:51:00 +00:00
Jens Ayton
0bda7466a6 Changes to pave the way for JavaScript 1.8 upgrade.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1642 127b21dd-08f5-0310-b4b7-95ae10353056
2008-05-18 16:22:00 +00:00
Jens Ayton
d7badeebd4 Various twiddles while failing to fix corona bug: gDebugFlags now exposed through JS console (as console.debugFlags), added warning message for shipyard entries with no matching shipdata entry (but suppressed by default for compatibility with Realistic Shipyards), log on PPC Macs no longer reports incorrect Altivec availability information (we don't use Altivec anyway), removed unused shipdata ivar from Universe.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1621 127b21dd-08f5-0310-b4b7-95ae10353056
2008-05-08 19:48:22 +00:00
Jens Ayton
6444b5d5e9 Moved demo2 screen over to OOShipRegistry. No more blank spaces or crashes for empty lists, possibly.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1611 127b21dd-08f5-0310-b4b7-95ae10353056
2008-05-03 13:39:56 +00:00
Jens Ayton
30bce0b115 Great big lump o' stuff to deal with ship types and related things more cleanly.
OOShipRegistry parses shipdata.plist, shipyard.plist, demoships.plist and new shipdata-overrides.plist and shipyard-overrides.plist, resolves like_ship inheritance, does some sanity checking, filters out various sorts of invalid shipdata and shipyard entries and manages role->ship key mapping with probability weighting.

The latter is managed by OOProbabilitySet, which should probably be used by OORoleSet and OOProbabilisticTextureManager too. OOProbabilitySet is O(log n) for random selection instead of O(n) like the current linear-search code.

The next step is to start using OOShipRegistry everywhere.

git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1607 127b21dd-08f5-0310-b4b7-95ae10353056
2008-05-03 00:58:21 +00:00
Jens Ayton
ff322eafcb Fix for bounty and contract market credits display bugs. Fix for rounding of credits quantities. Added troubleshooting code to scanForNonThargoid. Suppress script.javaScript.context.create messages. Made property list extractors for strings auto-convert numbers.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1601 127b21dd-08f5-0310-b4b7-95ae10353056
2008-04-30 19:13:02 +00:00
Jens Ayton
4933fb7796 Fix for ship.sanityCheck.failed messages.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1595 127b21dd-08f5-0310-b4b7-95ae10353056
2008-04-28 17:10:36 +00:00