Has anybody ever noticed the Cobra Clipper SAR from Murgh had a major bug? I didn't until today.
I was just looking at his AI file and noticed the ship will hang after scooping an escape capsule. This looked strange as I never noticed this in reality and I have it installed for at least a full year.
I looked at it deeper and tried to let it scoop up a pod by adding them close together in the system. Nothing happened, the AI always returned NOTHING_FOUND. The AI for finding the pod looked correct so I dove into Oolites source code for the scanning function. The AI was scanning for a ship with role "escape-capsule". However the source explicit excludes objects with scan class CARGO from its findings. (I also checked with 1.65 source code that already used the same CARGO exclusion. I now updated the wiki info for that scan function) So it was correct it couldn't find anything.
But that means it never has found those pods in the past! And that means the ship has a major bug as rescuing those pods is the main task of the ship. Murgh must have noticed this before or after release, but search in this forum gave no report of this. Also the retrieval of the pods to a station didn't work. This suggest that this part of the AI also never was tested. It only worked when the pod was scooped up in scanner range of a station.
With old legacy code there was no solution to this. (Only by giving the ship scanclass police there would be a possibility with legacy coding). With JS one can write its own scanning functions, so I gave the ship a custom script for escape-capsule scanning. On my computer it now works flawless. New version uploaded as v1.1 on the box.
I added a link to the new version to the clipper page on the wiki as version 1.1
CobraClipper.oxp
Moderators: winston, another_commander
- Eric Walch
- Slightly Grand Rear Admiral
- Posts: 5536
- Joined: Sat Jun 16, 2007 3:48 pm
- Location: Netherlands
CobraClipper.oxp
UPS-Courier & DeepSpacePirates & others at the box and some older versions