-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merged kfsone/tradedangerous into master
- Loading branch information
Showing
11 changed files
with
654 additions
and
211 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
# Provides an interface for correcting star/station names that | ||
# have changed in recent versions. | ||
|
||
from __future__ import absolute_import, with_statement, print_function, division, unicode_literals | ||
|
||
# Arbitrary, negative value to denote something that's been removed. | ||
DELETED = -111 | ||
|
||
systems = { | ||
'MANTOAC': "Mantóac", | ||
"NANTOAC": "Nantóac", | ||
"LIFTHRUTI": "Lífthruti", | ||
|
||
#ADD_SYSTEMS_HERE | ||
} | ||
|
||
stations = { | ||
"CHEMAKU/BARTOE PLATFORM": DELETED, | ||
|
||
#ADD_STATIONS_HERE | ||
} | ||
|
||
categories = { | ||
'DRUGS': 'Legal Drugs', | ||
} | ||
|
||
items = { | ||
'HYDROGEN FUELS': 'Hydrogen Fuel', | ||
'MARINE SUPPLIES': 'Marine Equipment', | ||
'TERRAIN ENRICH SYS': 'Land Enrichment Systems', | ||
'HEL-STATIC FURNACES': 'Microbial Furnaces', | ||
'REACTIVE ARMOR': 'Reactive Armour', | ||
} | ||
|
||
def correctSystem(oldName): | ||
try: | ||
return systems[oldName.upper()] | ||
except KeyError: | ||
return oldName | ||
|
||
|
||
def correctStation(systemName, oldName): | ||
try: | ||
return stations[systemName.upper() + "/" + oldName.upper()] | ||
except KeyError: | ||
pass | ||
try: | ||
return stations[oldName.upper()] | ||
except KeyError: | ||
return oldName | ||
|
||
|
||
def correctCategory(oldName): | ||
try: | ||
return categories[oldName.upper()] | ||
except KeyError: | ||
return oldName | ||
|
||
|
||
def correctItem(oldName): | ||
try: | ||
return items[oldName.upper()] | ||
except KeyError: | ||
return oldName | ||
|
Oops, something went wrong.