Skip to content

Commit

Permalink
Bugfix: Fix compatibility with unexpected update of the scripted API …
Browse files Browse the repository at this point in the history
…for TM2020 in round_start callback. (#1288)
  • Loading branch information
tomvlk committed Oct 3, 2023
1 parent eaf934b commit 208988f
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 27 deletions.
2 changes: 1 addition & 1 deletion pyplanet/apps/contrib/live_rankings/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ async def map_start(self, map, restarted, **kwargs):
await self.get_points_repartition()
await self.widget.display()

async def round_start(self, count, time):
async def round_start(self, count, time, valid=None):
await self.get_points_repartition()
await self.race_widget.hide()

Expand Down
51 changes: 26 additions & 25 deletions pyplanet/apps/core/maniaplanet/callbacks/flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ async def handle_map_loading(source, signal, **kwargs):
target=handle_generic,
)
"""
:Signal:
:Signal:
Server Start signal
:Code:
``maniaplanet:server_start``
Expand All @@ -38,7 +38,7 @@ async def handle_map_loading(source, signal, **kwargs):
target=handle_generic,
)
"""
:Signal:
:Signal:
Server Start signal (end of event).
:Code:
``maniaplanet:server_start__end``
Expand All @@ -59,7 +59,7 @@ async def handle_map_loading(source, signal, **kwargs):
target=handle_generic,
)
"""
:Signal:
:Signal:
Server End signal
:Code:
``maniaplanet:server_end``
Expand All @@ -80,7 +80,7 @@ async def handle_map_loading(source, signal, **kwargs):
target=handle_generic,
)
"""
:Signal:
:Signal:
Server End signal (end event)
:Code:
``maniaplanet:server_end__end``
Expand All @@ -101,7 +101,7 @@ async def handle_map_loading(source, signal, **kwargs):
target=handle_generic,
)
"""
:Signal:
:Signal:
Match Start.
:Code:
``maniaplanet:match_start``
Expand All @@ -122,7 +122,7 @@ async def handle_map_loading(source, signal, **kwargs):
target=handle_generic,
)
"""
:Signal:
:Signal:
Match Start. (End event)
:Code:
``maniaplanet:match_start__end``
Expand All @@ -143,7 +143,7 @@ async def handle_map_loading(source, signal, **kwargs):
target=handle_generic,
)
"""
:Signal:
:Signal:
Match End.
:Code:
``maniaplanet:match_end``
Expand All @@ -164,7 +164,7 @@ async def handle_map_loading(source, signal, **kwargs):
target=handle_generic,
)
"""
:Signal:
:Signal:
Match End. (End event)
:Code:
``maniaplanet:match_end__end``
Expand All @@ -185,7 +185,7 @@ async def handle_map_loading(source, signal, **kwargs):
target=handle_generic,
)
"""
:Signal:
:Signal:
Round Start.
:Code:
``maniaplanet:round_start``
Expand All @@ -196,6 +196,7 @@ async def handle_map_loading(source, signal, **kwargs):
:param count: Each time this section is played, this number is incremented by one.
:param time: Server time when callback has been sent.
:param valid: Number of valid rounds, only on newer TM2020 dedicated servers.
"""


Expand All @@ -206,7 +207,7 @@ async def handle_map_loading(source, signal, **kwargs):
target=handle_generic,
)
"""
:Signal:
:Signal:
Round Start. (End event)
:Code:
``maniaplanet:round_start__end``
Expand All @@ -227,7 +228,7 @@ async def handle_map_loading(source, signal, **kwargs):
target=handle_generic,
)
"""
:Signal:
:Signal:
Round Start.
:Code:
``maniaplanet:round_end``
Expand All @@ -248,7 +249,7 @@ async def handle_map_loading(source, signal, **kwargs):
target=handle_generic,
)
"""
:Signal:
:Signal:
Round Start. (End event)
:Code:
``maniaplanet:round_end__end``
Expand All @@ -269,7 +270,7 @@ async def handle_map_loading(source, signal, **kwargs):
target=handle_generic,
)
"""
:Signal:
:Signal:
Turn Start.
:Code:
``maniaplanet:turn_start``
Expand All @@ -290,7 +291,7 @@ async def handle_map_loading(source, signal, **kwargs):
target=handle_generic,
)
"""
:Signal:
:Signal:
Turn Start. (End event).
:Code:
``maniaplanet:turn_start__end``
Expand All @@ -311,7 +312,7 @@ async def handle_map_loading(source, signal, **kwargs):
target=handle_generic,
)
"""
:Signal:
:Signal:
Turn End.
:Code:
``maniaplanet:turn_end``
Expand All @@ -332,7 +333,7 @@ async def handle_map_loading(source, signal, **kwargs):
target=handle_generic,
)
"""
:Signal:
:Signal:
Turn End. (End event)
:Code:
``maniaplanet:turn_end__end``
Expand All @@ -353,7 +354,7 @@ async def handle_map_loading(source, signal, **kwargs):
target=handle_generic,
)
"""
:Signal:
:Signal:
Play Loop Start.
:Code:
``maniaplanet:play_loop_start``
Expand All @@ -374,7 +375,7 @@ async def handle_map_loading(source, signal, **kwargs):
target=handle_generic,
)
"""
:Signal:
:Signal:
Play Loop End.
:Code:
``maniaplanet:play_loop_end``
Expand All @@ -395,7 +396,7 @@ async def handle_map_loading(source, signal, **kwargs):
target=handle_generic
)
"""
:Signal:
:Signal:
Loading Map start.
:Code:
``maniaplanet:loading_map_start``
Expand All @@ -415,7 +416,7 @@ async def handle_map_loading(source, signal, **kwargs):
target=handle_map_loading
)
"""
:Signal:
:Signal:
Loading Map end.
:Code:
``maniaplanet:loading_map_end``
Expand All @@ -436,7 +437,7 @@ async def handle_map_loading(source, signal, **kwargs):
target=handle_map_loading
)
"""
:Signal:
:Signal:
Unloading of the Map starts.
:Code:
``maniaplanet:unloading_map_start``
Expand All @@ -457,7 +458,7 @@ async def handle_map_loading(source, signal, **kwargs):
target=handle_generic
)
"""
:Signal:
:Signal:
Unloading of the Map ends.
:Code:
``maniaplanet:unloading_map_end``
Expand All @@ -478,7 +479,7 @@ async def handle_map_loading(source, signal, **kwargs):
target=handle_generic
)
"""
:Signal:
:Signal:
Podium start.
:Code:
``maniaplanet:podium_start``
Expand All @@ -498,7 +499,7 @@ async def handle_map_loading(source, signal, **kwargs):
target=handle_generic
)
"""
:Signal:
:Signal:
Podium end.
:Code:
``maniaplanet:podium_end``
Expand Down Expand Up @@ -532,7 +533,7 @@ async def handle_map_loading(source, signal, **kwargs):
target=handle_generic,
)
"""
:Signal:
:Signal:
Server Status Changed.
:Code:
``maniaplanet:status_changed``
Expand Down
3 changes: 2 additions & 1 deletion pyplanet/utils/log.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,8 @@ def handle_exception(exception=None, module_name=None, func_name=None, extra_dat

# Send to sentry.
exc_info = sys.exc_info()
Raven.get_client().captureException(exc_info=exc_info)
# Disable raven for now.
# Raven.get_client().captureException(exc_info=exc_info)


class RequireDebugFalse(logging.Filter):
Expand Down

0 comments on commit 208988f

Please sign in to comment.