Add function to obtain Metro cities in the area

This commit is contained in:
April 2022-11-04 20:45:08 -07:00
parent a0c142183a
commit 2d2f7dc5af
No known key found for this signature in database
GPG Key ID: 17A9A017FAA4DE5E

View File

@ -29,6 +29,14 @@ def getPrimaryLocations():
return locationIds
def getMetroCities():
""" Returns all Metro Map locations in the MPC """
locationIds = []
for i in data['Config']['ConfigDef']['ConfigItems']['ConfigItem']:
if 'MetroMapCity' in i['@key'] and i['@value'] != "":
locationIds.append(i['@value'].split("_")[2])
def getTideStations():
""" Returns all of the tide stations present in the MachineProductCfg """
stations = []