Пример #1
0
 async def change_race_info(self, command_args: list):
     new_race_info = raceinfo.parse_args_modify(
         command_args, raceinfo.RaceInfo.copy(self._race_info))
     if new_race_info:
         self._race_info = new_race_info
         if self.current_race.before_race:
             self.current_race.race_info = raceinfo.RaceInfo.copy(
                 self._race_info)
         await self.write('Changed rules for the next race.')
         await self.update()
Пример #2
0
 async def change_race_info(self, command_args: list) -> None:
     """Change the RaceInfo for this room by parsing the input args"""
     new_race_info = raceinfo.parse_args_modify(
         command_args, raceinfo.RaceInfo.copy(self.match.race_info))
     if new_race_info:
         self.match.set_race_info(new_race_info)
         if self.current_race.before_race:
             self.current_race.race_info = raceinfo.RaceInfo.copy(
                 self.match.race_info)
         await self.write('Changed rules for the next race.')
         await self.update()
Пример #3
0
def parse_args(args):
    race_private_info = PrivateRaceInfo()
    race_private_info.race_info = raceinfo.RaceInfo()
    race_private_info.race_info.can_be_solo = True
    race_private_info.race_info.post_results = False
    race_private_info.race_info.private_race = True
    race_private_info.race_info = raceinfo.parse_args_modify(
        args, race_private_info.race_info)
    if race_private_info.race_info is None:
        return None

    return race_private_info