1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-04-17 17:42:20 +03:00

station providers: Ensure the 'early station' functionality for all

* If you request docking successfully then show the station namd and
  have the link work.
* This is then only undone if you:
	1) Dock and undock
	2) Supercruise away
	3) Jump away
  It is *not* undone if you simply cancel the docking request.

Tested only with same provider for system and station for each of the
three, not the other 6 combinations.
This commit is contained in:
Athanasius 2020-08-26 11:55:23 +01:00
parent daed08d206
commit 113b6c427c
2 changed files with 11 additions and 0 deletions

View File

@ -57,6 +57,9 @@ STATION_UNDOCKED: str = '×' # "Station" name to display when not docked = U+00
# Main window clicks
def system_url(system_name):
if this.system_address:
return requests.utils.requote_uri(f'https://www.edsm.net/en/system?systemID64={this.system_address}')
if system_name:
return requests.utils.requote_uri(f'https://www.edsm.net/en/system?systemName={system_name}')
@ -66,6 +69,10 @@ def station_url(system_name, station_name):
if system_name and station_name:
return requests.utils.requote_uri(f'https://www.edsm.net/en/system?systemName={system_name}&stationName={station_name}')
# monitor state might think these are gone, but we don't yet
if this.system and this.station:
return requests.utils.requote_uri(f'https://www.edsm.net/en/system?systemName={this.system}&stationName={this.station}')
if system_name:
return requests.utils.requote_uri(f'https://www.edsm.net/en/system?systemName={system_name}&stationName=ALL')

View File

@ -137,6 +137,10 @@ def station_url(system_name, station_name):
if system_name and station_name:
return requests.utils.requote_uri(f'https://inara.cz/galaxy-station/?search={system_name}%20[{station_name}]')
# monitor state might think these are gone, but we don't yet
if this.system and this.station:
return requests.utils.requote_uri(f'https://inara.cz/galaxy-station/?search={this.system}%20[{this.station}]')
if system_name:
return system_url(system_name)