docs: Add example for event bus listener usage in README and documentation

This commit is contained in:
Jacob Schmidt 2026-05-16 17:27:08 -05:00
parent 3cadcce32a
commit 67ab1d744c
2 changed files with 8 additions and 0 deletions

View File

@ -78,6 +78,10 @@ Client sync and notification requests:
- `locker.va.sync.requested`
- `garage.vgarage.sync.requested`
### Example
Register a listener, emit an event, then remove the listener when it is no longer needed:
```sqf
private _token = EGVAR(common,EventBus) call ["on", [
"task.completed",

View File

@ -76,6 +76,10 @@ Client sync and notification requests:
- `locker.va.sync.requested`
- `garage.vgarage.sync.requested`
### Example
Register a listener, emit an event, then remove the listener when it is no longer needed:
```sqf
private _token = EGVAR(common,EventBus) call ["on", [
"task.completed",