mirror of
https://github.com/zoffline/zwift-offline.git
synced 2026-07-30 23:50:20 -07:00
Match bots rear and front wheels
This commit is contained in:
+11
-4
@@ -412,8 +412,16 @@ def load_game_dictionary():
|
||||
gd['bikeshoes'] = [int(x.get('signature')) for x in root.findall("./BIKESHOES/BIKESHOE")]
|
||||
gd['socks'] = [int(x.get('signature')) for x in root.findall("./SOCKS/SOCK")]
|
||||
gd['jerseys'] = [int(x.get('signature')) for x in root.findall("./JERSEYS/JERSEY")]
|
||||
gd['bikefrontwheels'] = [int(x.get('signature')) for x in root.findall("./BIKEFRONTWHEELS/BIKEFRONTWHEEL")]
|
||||
gd['bikerearwheels'] = [int(x.get('signature')) for x in root.findall("./BIKEREARWHEELS/BIKEREARWHEEL")]
|
||||
frontwheels = {}
|
||||
for x in root.findall("./BIKEFRONTWHEELS/BIKEFRONTWHEEL"):
|
||||
frontwheels[x.get('name')] = int(x.get('signature'))
|
||||
rearwheels = {}
|
||||
for x in root.findall("./BIKEREARWHEELS/BIKEREARWHEEL"):
|
||||
rearwheels[x.get('name')] = int(x.get('signature'))
|
||||
gd['wheels'] = []
|
||||
for wheel in rearwheels:
|
||||
if wheel in frontwheels:
|
||||
gd['wheels'].append((rearwheels[wheel], frontwheels[wheel]))
|
||||
gd['runshirts'] = [int(x.get('signature')) for x in root.findall("./RUNSHIRTS/RUNSHIRT")]
|
||||
gd['runshorts'] = [int(x.get('signature')) for x in root.findall("./RUNSHORTS/RUNSHORT")]
|
||||
gd['runshoes'] = [int(x.get('signature')) for x in root.findall("./RUNSHOES/RUNSHOE")]
|
||||
@@ -1966,8 +1974,7 @@ def random_profile(p):
|
||||
p.ride_shoes_type = random.choice(GD['bikeshoes'])
|
||||
p.ride_socks_type = random.choice(GD['socks'])
|
||||
p.ride_jersey = random.choice(GD['jerseys'])
|
||||
p.bike_wheel_front = random.choice(GD['bikefrontwheels'])
|
||||
p.bike_wheel_rear = random.choice(GD['bikerearwheels'])
|
||||
p.bike_wheel_rear, p.bike_wheel_front = random.choice(GD['wheels'])
|
||||
p.bike_frame = random.choice(list(GD['bikeframes'].keys()))
|
||||
p.run_shirt_type = random.choice(GD['runshirts'])
|
||||
p.run_shorts_type = random.choice(GD['runshorts'])
|
||||
|
||||
Reference in New Issue
Block a user