Docking Queue - version 1.74.2
Moderators: winston, another_commander, Getafix
- JensAyton
- Grand Admiral Emeritus
- Posts: 6657
- Joined: Sat Apr 02, 2005 2:43 pm
- Location: Sweden
- Contact:
Changing the AI seems preferable to changing the code. Could "dropMessages: APPROACH_COORDINATES" in an appropriate place fix this?
E-mail: [email protected]
- Eric Walch
- Slightly Grand Rear Admiral
- Posts: 5536
- Joined: Sat Jun 16, 2007 3:48 pm
- Location: Netherlands
No, I looked at it, but the ENTER message of the dockingAI.plist is executed before the "APPROACH_COORDINATES" is send to the ship. And on the first UPDATE will dropMessages: do nothing. And even when it would, at that point it could have been a legitimate message of the station.Ahruman wrote:Changing the AI seems preferable to changing the code. Could "dropMessages: APPROACH_COORDINATES" in an appropriate place fix this?
In the code it just needed the addition of a "return". And I had to set a "targetStation" in the code anyway.
An other way would be a full rewrite of the code. Not setting the AI to dockingAI.plist by the code, but just sending a new "PATROL_ENDED" message. Than could the planetPatrolAI.plist set the nearest station (will be its mother by definition) and do a setAITo: dockingAI.plist.
I even had written it that way but after finding the real cause of the bug I opted for the solution of leaving the AI unchanged.
Yes, these ships do not lock-up the docking queue for NPC ships, because the patrol ships hang in the first stage of the docking process. At that point they allow other ship to go first.Kaks wrote:Good find!
But, for docking clearance the code looks only at the size of the queue and clearance never comes.
UPS-Courier & DeepSpacePirates & others at the box and some older versions
Excellent work Eric - I've added this code as advised:
I'll let you know if there are any further developments.
Cheers
John
Code: Select all
"APPROACH" = ("setStateTo: APPROACH");
Cheers
John