
Security News
PEP 810 Proposes Explicit Lazy Imports for Python 3.15
An opt-in lazy import keyword aims to speed up Python startups, especially CLIs, without the ecosystem-wide risks that sank PEP 690.
@goodgamestudios/cxf-events
Advanced tools
💬 Unified events for CXF extensions
Games exchange messages in different formats and with different IDs. For example, a login command looks different on BigFarm and Empire. cxf-events
normalizes & standardizes basic events in a game-agnostic way. Your CXF extension can subscribe to cxf.*
events and work in almost all games.
+------------------+
| |
| LOGIN_BASIC_DATA |--->------+
| | becomes
+------------------+ ↓
+---------------+
| |
| cxf.login |---→ your CXF Extension
| |
+---------------+
+------------------+ ↑
| | becomes
| gbd |--->------+
| |
+------------------+
@goodgamestudios/cxf-events
in @goodgamestudios/cxf-plugins
// Wait for cxf to be ready
require('@goodgamestudios/cxf-ready').then(cxf => {
// Subscribe to relevant events
cxf.on(CxfEvents.Login, loginData => {
// do something on login
})
})
cxf.login
Emitted after a successful player login.
In addition to sending the login arguments with the event, cxf.login
also stores them in cxf.playerId
, cxf.instanceId
, cxf.networkId
, cxf.gameId
and cxf.language
.
cxf.login
{ playerId, instanceId, networkId, gameId, language }
require('@goodgamestudios/cxf-ready').then(cxf => {
cxf.on(CxfEvents.Login, loginData => {
// do something on login
})
})
To be able to listen for a new event from bigfarm, you will need to either listen to its descriptive event or its ID event. For instance: If you want to listen for the SUBSCRIPTION_INFO event (ID 460) you will need to:
To be able to listen for a new event from bigfarm, you will need to either listen to its descriptive event and also its ID event. For instance, if you want to listen for the SUBSCRIPTION_INFO event (ID 460) you will need to:
// Just listening for this event is not enough
cxf.once('SUBSCRIPTION_INFO', (e: BigfarmEvent<BigfarmSubscriptionEvent>) => {
// Your code here
});
// Subscribing to event id, so the first event will be fowarded to CXF
cxf.on('460', () => {});
FAQs
Unified events for BigFarm, Empire and others
We found that @goodgamestudios/cxf-events demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 29 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
An opt-in lazy import keyword aims to speed up Python startups, especially CLIs, without the ecosystem-wide risks that sank PEP 690.
Security News
Socket CEO Feross Aboukhadijeh discusses the recent npm supply chain attacks on PodRocket, covering novel attack vectors and how developers can protect themselves.
Security News
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.