baplus package¶
Closed-source bits of ballistica.
This code concerns sensitive things like accounts and master-server communication, so the native C++ parts of it remain closed. Native precompiled static libraries of this portion are provided for those who want to compile the rest of the engine, or a fully open-source app can also be built by removing this feature-set.
- class baplus.CloudSubsystem[source]¶
Bases:
AppSubsystem
Manages communication with cloud components.
Access the shared single instance of this class via the
cloud
attr on thePlusAppSubsystem
class.- property connected: bool¶
Whether a connection to the cloud is present.
This is a good indicator (though not for certain) that sending messages will succeed.
- send_message(msg: Message) Response | None [source]¶
Synchronously send a message to the cloud.
Must be called from a background thread.
- async send_message_async(msg: Message) Response | None [source]¶
Asynchronously send a message to the cloud.
Must be called from the logic thread.
- send_message_cb(msg: Message, on_response: Callable[[Any], None]) None [source]¶
Asynchronously send a message to the cloud from the logic thread.
The provided
on_response
call will be run in the logic thread and passed either the response or the error that occurred.
- subscribe_classic_account_data(updatecall: Callable[[bacommon.bs.ClassicAccountLiveData], None]) babase.CloudSubscription [source]¶
Subscribe to classic account data.
- class baplus.PlusAppSubsystem[source]¶
Bases:
AppSubsystem
Subsystem for plus functionality in the app.
Access the single shared instance of this class via the
plus
attr on theApp
class. Note that it is possible for this to beNone
if the plus package is not present, so code should handle that case gracefully.- accounts: AccountV2Subsystem¶
- cloud: CloudSubsystem¶