added send_untyped() and send_async_untyped() to messaging system

This commit is contained in:
Eric Froemling 2021-09-22 12:44:36 -05:00
parent 08ea737144
commit 43788993e6
No known key found for this signature in database
GPG Key ID: 89C93F0F8D6D5A98
3 changed files with 20 additions and 4 deletions

View File

@ -420,7 +420,7 @@
"assets/build/ba_data/audio/zoeOw.ogg": "https://files.ballistica.net/cache/ba1/14/f1/4f2995d78fc20dd79dfb39c5d554",
"assets/build/ba_data/audio/zoePickup01.ogg": "https://files.ballistica.net/cache/ba1/57/ac/6ed0caecd25dc23688debed24c45",
"assets/build/ba_data/audio/zoeScream01.ogg": "https://files.ballistica.net/cache/ba1/32/08/38dac4a79ab2acee76a75d32a310",
"assets/build/ba_data/data/langdata.json": "https://files.ballistica.net/cache/ba1/92/29/7452e88375b37e2e73929106d520",
"assets/build/ba_data/data/langdata.json": "https://files.ballistica.net/cache/ba1/1f/21/0f8b5de13f6bd5fb1e13564d7c58",
"assets/build/ba_data/data/languages/arabic.json": "https://files.ballistica.net/cache/ba1/0f/0e/7184059414320d32104463e41038",
"assets/build/ba_data/data/languages/belarussian.json": "https://files.ballistica.net/cache/ba1/e2/58/c2c5964370df118c51528dc4bfa2",
"assets/build/ba_data/data/languages/chinese.json": "https://files.ballistica.net/cache/ba1/28/96/397e5c164a595c2b6c2d3eb2d4f1",
@ -450,7 +450,7 @@
"assets/build/ba_data/data/languages/spanish.json": "https://files.ballistica.net/cache/ba1/bc/71/83c7c31a4f6467ed2ec8b86a4b71",
"assets/build/ba_data/data/languages/swedish.json": "https://files.ballistica.net/cache/ba1/50/9f/be006ba19be6a69a57837eb6dca0",
"assets/build/ba_data/data/languages/thai.json": "https://files.ballistica.net/cache/ba1/dd/de/c197fa9aff42e4422bc66b95ad88",
"assets/build/ba_data/data/languages/turkish.json": "https://files.ballistica.net/cache/ba1/a4/d9/93b754bae8c86791f6d8d3b600e1",
"assets/build/ba_data/data/languages/turkish.json": "https://files.ballistica.net/cache/ba1/65/e4/b9308f15437972209b4d3fce7abd",
"assets/build/ba_data/data/languages/ukrainian.json": "https://files.ballistica.net/cache/ba1/c3/61/d5bcf2bcad50104b26d22d3365a4",
"assets/build/ba_data/data/languages/venetian.json": "https://files.ballistica.net/cache/ba1/4b/da/7e444f86c768aee70779a0f7a28f",
"assets/build/ba_data/data/languages/vietnamese.json": "https://files.ballistica.net/cache/ba1/8b/65/adfbe450da3f61677bd909fff707",

View File

@ -1,5 +1,5 @@
<!-- THIS FILE IS AUTO GENERATED; DO NOT EDIT BY HAND -->
<h4><em>last updated on 2021-09-21 for Ballistica version 1.6.5 build 20393</em></h4>
<h4><em>last updated on 2021-09-22 for Ballistica version 1.6.5 build 20393</em></h4>
<p>This page documents the Python classes and functions in the 'ba' module,
which are the ones most relevant to modding in Ballistica. If you come across something you feel should be included here or could be better explained, please <a href="mailto:support@froemling.net">let me know</a>. Happy modding!</p>
<hr>

View File

@ -64,7 +64,7 @@ class ErrorResponse(Response):
instead results in a local exception being raised.
"""
error_message: Annotated[str, IOAttrs('m')]
error_type: Annotated[ErrorType, IOAttrs('t')]
error_type: Annotated[ErrorType, IOAttrs('e')]
@ioprepped
@ -581,6 +581,22 @@ class BoundMessageSender:
"""Protocol associated with this sender."""
return self._sender.protocol
def send_untyped(self, message: Message) -> Optional[Response]:
"""Send a message synchronously.
Whenever possible, use the send() call provided by generated
subclasses instead of this; it will provide better type safety.
"""
return self._sender.send(self._obj, message)
async def send_async_untyped(self, message: Message) -> Optional[Response]:
"""Send a message asynchronously.
Whenever possible, use the send_async() call provided by generated
subclasses instead of this; it will provide better type safety.
"""
return await self._sender.send_async(self._obj, message)
class MessageReceiver:
"""Facilitates receiving & responding to messages from a remote source.