mirror of
https://git.sdf.org/tamservo/robottas.git
synced 2025-11-13 09:33:46 -05:00
Changed to only report on the first notice of slippery conditions.
This commit is contained in:
@@ -125,6 +125,10 @@ class Robottas(commands.Bot):
|
|||||||
elif category == "OTHER":
|
elif category == "OTHER":
|
||||||
if self.session_type == "RACE" and "DELETED" in message['Message']:
|
if self.session_type == "RACE" and "DELETED" in message['Message']:
|
||||||
pass
|
pass
|
||||||
|
elif "SLIPPERY" in message['Message'] and \
|
||||||
|
not self.is_slippery_reported:
|
||||||
|
self.is_slippery_reported = True
|
||||||
|
report = "It's slippery out there!"
|
||||||
else:
|
else:
|
||||||
report = message['Message']
|
report = message['Message']
|
||||||
|
|
||||||
@@ -538,6 +542,7 @@ class Robottas(commands.Bot):
|
|||||||
|
|
||||||
async def start_collect(self):
|
async def start_collect(self):
|
||||||
self.is_collecting = True
|
self.is_collecting = True
|
||||||
|
self.is_slippery_reported = False
|
||||||
dir_path = os.path.dirname(os.path.realpath(__file__))
|
dir_path = os.path.dirname(os.path.realpath(__file__))
|
||||||
command_txt = os.path.join(dir_path, self.collector_command)
|
command_txt = os.path.join(dir_path, self.collector_command)
|
||||||
command_txt += self.collector_params
|
command_txt += self.collector_params
|
||||||
@@ -587,6 +592,9 @@ class Robottas(commands.Bot):
|
|||||||
# Hold weather info
|
# Hold weather info
|
||||||
self.weather = ""
|
self.weather = ""
|
||||||
|
|
||||||
|
# Hold weather we have reported on slippery track.
|
||||||
|
self.is_slippery_reported = False
|
||||||
|
|
||||||
# Hold lap info
|
# Hold lap info
|
||||||
self.current_lap = -1000
|
self.current_lap = -1000
|
||||||
self.total_laps = -1000
|
self.total_laps = -1000
|
||||||
|
|||||||
Reference in New Issue
Block a user