Fix a little issue where docking clearance cancellation messages would appear on screen even if no clearance had been given, every second time player pressed 'L'. Reverted AI code fix from previous commit, as it was resulting in idle ships being launched from stations. Set default rock hermit docking clearance requirement to no. Adjusted a little the docking clearance messages to make sense also in the case the issuing station is not a main one.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1792 127b21dd-08f5-0310-b4b7-95ae10353056
This commit is contained in:
parent
579e97ef82
commit
d30e46fb02
@ -1008,20 +1008,20 @@
|
||||
// Space station docking clearance
|
||||
"please-wait-until-d-ships-have-completed-their-approach"
|
||||
= (
|
||||
"Please wait until all ships have completed their approach. Your queue position is %d",
|
||||
"We have inbound traffic, commander. Please stand by. You queue position is %d.",
|
||||
"We cannot clear you for docking due to prioritized incoming traffic. Your queue position is %d",
|
||||
"We have ships on approach to %H station. Please hold for clearance."
|
||||
"Please wait until all ships have completed their approach. Your queue position is %d.",
|
||||
"We have inbound traffic, commander. Please stand by. You are number %d in the queue.",
|
||||
"We cannot clear you for docking due to prioritized incoming traffic. Your queue position is %d.",
|
||||
"We have ships on approach to station. Please hold for clearance."
|
||||
);
|
||||
|
||||
"please-wait-until-d-launching-ships-have-cleared-H-station"
|
||||
"please-wait-until-d-launching-ships-have-cleared-station"
|
||||
= (
|
||||
"Please wait until launching ships have cleared %H Station. Your queue position is %d.",
|
||||
"Please wait until launching ships have cleared the docking corridor. Your queue position is %d.",
|
||||
"We have outbound traffic, Commander. Please stand by.",
|
||||
"Clearance cannot be granted at this moment, due to prioritized outgoing traffic. Please hold station.",
|
||||
"There are ships in the launching queue. Your queue position is %d - please hold.",
|
||||
);
|
||||
"H-station-does-not-require-docking-clearance"
|
||||
"station-does-not-require-docking-clearance"
|
||||
= (
|
||||
"We do not require docking clearance, Commander. Feel free to dock at any time.",
|
||||
"Docking clearance not required.",
|
||||
|
@ -2208,6 +2208,7 @@
|
||||
model = "new-rock.dat";
|
||||
name = "Rock Hermit";
|
||||
port_radius = 250;
|
||||
requires_docking_clearance = no;
|
||||
roles = "rockhermit station oolite-rock-hermit";
|
||||
smooth = yes;
|
||||
subentities = (
|
||||
|
@ -1866,7 +1866,7 @@ static NSDictionary* instructions(int station_id, Vector coords, float speed, fl
|
||||
// TODO: We're potentially cancelling docking at another station, so
|
||||
// ensure we clear the timer to allow NPC traffic. If we
|
||||
// don't, normal traffic will resume once the timer runs out.
|
||||
[self sendExpandedMessage:DESC(@"H-station-does-not-require-docking-clearance") toShip:other];
|
||||
[self sendExpandedMessage:DESC(@"station-does-not-require-docking-clearance") toShip:other];
|
||||
if ([other isPlayer])
|
||||
[player setDockingClearanceStatus:DOCKING_CLEARANCE_STATUS_NONE];
|
||||
result = @"DOCKING_CLEARANCE_NOT_REQUIRED";
|
||||
@ -1886,7 +1886,7 @@ static NSDictionary* instructions(int station_id, Vector coords, float speed, fl
|
||||
[player setDockingClearanceStatus:DOCKING_CLEARANCE_STATUS_GRANTED];
|
||||
result = @"DOCKING_CLEARANCE_EXTENDED";
|
||||
}
|
||||
else if ([player getDockingClearanceStatus] > DOCKING_CLEARANCE_STATUS_NONE)
|
||||
else if ([player getDockingClearanceStatus] > DOCKING_CLEARANCE_STATUS_REQUESTED)
|
||||
{
|
||||
last_launch_time = timeNow;
|
||||
[self sendExpandedMessage:DESC(@"docking-clearance-cancelled") toShip:other];
|
||||
@ -1919,18 +1919,14 @@ static NSDictionary* instructions(int station_id, Vector coords, float speed, fl
|
||||
[self sendExpandedMessage:[NSString stringWithFormat:
|
||||
DESC(@"please-wait-until-d-ships-have-completed-their-approach"),
|
||||
[shipsOnApproach count]+1] toShip:other];
|
||||
//[self sendExpandedMessage:[NSString stringWithFormat:@"You are in queue position %d.", [shipsOnApproach count]+1] toShip:other];
|
||||
// No need to set status to REQUESTED as we've already done that earlier.
|
||||
result = @"DOCKING_CLEARANCE_DENIED_TRAFFIC_INBOUND";
|
||||
}
|
||||
if (result == nil && [launchQueue count] && last_launch_time < timeNow)
|
||||
{
|
||||
//[self sendExpandedMessage:DESC(@"please-wait-until-launching-ships-have-cleared-H-station") toShip:other];
|
||||
//[self sendExpandedMessage:[NSString stringWithFormat:@"You are in queue position %d.", [launchQueue count]+1] toShip:other];
|
||||
[self sendExpandedMessage:[NSString stringWithFormat:
|
||||
DESC(@"please-wait-until-d-launching-ships-have-cleared-H-station"),
|
||||
DESC(@"please-wait-until-d-launching-ships-have-cleared-station"),
|
||||
[launchQueue count]+1] toShip:other];
|
||||
//[self sendExpandedMessage:[NSString stringWithFormat:@"You are in queue position %d.", [launchQueue count]+1] toShip:other];
|
||||
// No need to set status to REQUESTED as we've already done that earlier.
|
||||
result = @"DOCKING_CLEARANCE_DENIED_TRAFFIC_OUTBOUND";
|
||||
}
|
||||
|
@ -4078,6 +4078,7 @@ static BOOL MaintainLinkedLists(Universe* uni)
|
||||
{
|
||||
ShipEntity* se = (ShipEntity *)entity;
|
||||
[[se getAI] setOwner:se];
|
||||
[[se getAI] setState:@"GLOBAL"];
|
||||
if ([se isBeacon])
|
||||
{
|
||||
[self setNextBeacon:se];
|
||||
|
Loading…
x
Reference in New Issue
Block a user