Docking Queue - version 1.74.2

For test results, bug reports, announcements of new builds etc.

Moderators: winston, another_commander, Getafix

User avatar
Kaks
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 3009
Joined: Mon Jan 21, 2008 11:41 pm
Location: The Big Smoke

Post by Kaks »

Good find! :)
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Post by JensAyton »

Changing the AI seems preferable to changing the code. Could "dropMessages: APPROACH_COORDINATES" in an appropriate place fix this?
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Post by Eric Walch »

Ahruman wrote:
Changing the AI seems preferable to changing the code. Could "dropMessages: APPROACH_COORDINATES" in an appropriate place fix this?
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.

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.
Kaks wrote:
Good find!
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.
But, for docking clearance the code looks only at the size of the queue and clearance never comes.
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Post by JensAyton »

Fair enough.
JD
Deadly
Deadly
Posts: 182
Joined: Thu Nov 25, 2010 10:42 pm
Location: London, UK

Post by JD »

Excellent work Eric - I've added this code as advised:

Code: Select all

"APPROACH" = ("setStateTo: APPROACH");
I'll let you know if there are any further developments.

Cheers
John
Post Reply