Posted: Sun Nov 08, 2009 11:58 am
When you are on a mac you could try to get the plist editor that shipped with Tiger. That one placed the ending comma in a way that it works on all platforms. Even Tiger refuses to open the open-step plist files saved with the newer plist editor that ships with Leopard. When you only want to use the code yourself, you can use the new one and its better features but when you want to share the saved plists with others, better try getting the old one or maybe switch to plistEditPro. When you save in XML format, there is no problem with the newer mac plistEdit between platforms.
On the "checkEnergy"; it is future code. Maybe I should have written it even more clear that it is future code, or only add it after 1.74 becomes a release. But my experience it that when you don't add the the documentation immediately in the wiki after adding it to the code, it tends to get forgotten to add it at all.
In your case you don't need it at all because oolite itself is already sending a "ENERGY_LOW" message every time you ships gets a hit under low energy conditions.
I added this new command in Oolite to improve future pirateAI. In the next Oolite version, pirates that have fled into space will return to their original position in the spacelane after their energy has recovered. In current Oolite, a pirate can flee for a missile while undamaged himself. So there currently is no guarantee that he always receives a "ENERGY_FULL" message after fleeing. Therefor I added the "checkEnergy" command to query the energy state. For an "ENERGY_LOW" while under attack you don't need it, Oolite already sends it on every hit.
On the "checkEnergy"; it is future code. Maybe I should have written it even more clear that it is future code, or only add it after 1.74 becomes a release. But my experience it that when you don't add the the documentation immediately in the wiki after adding it to the code, it tends to get forgotten to add it at all.
In your case you don't need it at all because oolite itself is already sending a "ENERGY_LOW" message every time you ships gets a hit under low energy conditions.
I added this new command in Oolite to improve future pirateAI. In the next Oolite version, pirates that have fled into space will return to their original position in the spacelane after their energy has recovered. In current Oolite, a pirate can flee for a missile while undamaged himself. So there currently is no guarantee that he always receives a "ENERGY_FULL" message after fleeing. Therefor I added the "checkEnergy" command to query the energy state. For an "ENERGY_LOW" while under attack you don't need it, Oolite already sends it on every hit.