emergency bugfix
This commit is contained in:
parent
fd63a2381a
commit
c75e97e2d4
|
@ -283,7 +283,7 @@ class league_structure(object):
|
|||
start_weather_duration = self.day - 1 if self.day > 1 else random.randint(start_weather.duration_range[0], start_weather.duration_range[1])
|
||||
self.weather_forecast[team_name] = [start_weather.name] * start_weather_duration
|
||||
forecasted_days = []
|
||||
for i in range(start_weather_duration, len(self.schedule.keys())):
|
||||
for i in range(start_weather_duration, len(self.schedule.keys()) * self.series_length):
|
||||
if i not in forecasted_days:
|
||||
prev_weather = self.weather_forecast[team_name][i-1] #get last weather name
|
||||
next_weather = WeatherChains.chain_weather(all_weathers()[prev_weather]) #ask weatherchains for next weather
|
||||
|
|
|
@ -1045,7 +1045,10 @@ class LeagueScheduleCommand(Command):
|
|||
for game in league.schedule[str(current_series+day)]:
|
||||
emojis = ""
|
||||
for day_offset in range((current_series+day - 1)*league.series_length, (current_series+day)*(league.series_length)):
|
||||
emojis += weather.all_weathers()[league.weather_forecast[game[1]][day_offset]].emoji + " "
|
||||
try:
|
||||
emojis += weather.all_weathers()[league.weather_forecast[game[1]][day_offset]].emoji + " "
|
||||
except:
|
||||
False
|
||||
schedule_text += f"**{game[0]}** @ **{game[1]}** {emojis}\n"
|
||||
teams.pop(teams.index(game[0]))
|
||||
teams.pop(teams.index(game[1]))
|
||||
|
|
Loading…
Reference in a new issue