This introduces some fancy new macros:
- :nearest role — find nearest ship with specified role.
- :tnearest role — target nearest ship with specified role.
- :find expr — find entities matching expr; for example, “:find entity.isShip” to find all ships.
- :findS expr — find ships matching expr; for example, “:find ship.scanClass == 'CLASS_BUOY'”.
- :target expr — target closest ship matching expr.
There are also new functions to control logging, but I appear to have forgotten to add convenience macros. The functions are:
- console.displayMessagesInClass(class : String) : Boolean — true if log messages of the specified class are being logged, false otherwise.
- console.setDisplayMessagesInClass(class : String, flag : Boolean) — enable or disable logging for the specified log message class.
Code: Select all
:setM logOn console.setDisplayMessagesInClass(PARAM, true)
:setM logOff console.setDisplayMessagesInClass(PARAM, false)
There is also a new property console.debugFlags (and a corresponding menu item under Mac OS X). I don’t think this will be of any interest if you’re not hacking on Oolite, but there’s some documentation in oolite-debug-console.js.
Edit: Actually, enabling display of normals might be useful if you’re debugging lighting issues. “console.debugFlags ^= 0x100” will toggle normals.
Edit 2: Also, as per release notes, “Debug console now allows definitions to be split over several lines; for instance, you can type "this.test = function() {" on one line and "return 3: }" on the next. Enter an empty line to cancel multi-line input. Lines which are considered "incomplete" are echoed with a _ prefix instead of >. (Mac-only: the integrated console also supports multi-line input using option-return, as it always has.)”