GamesAnnounceFrame games.announce-frame@1

Generated at from openvibe-contracts v0.53.0 and openvibe-sdk v0.11.0.

Version
1.0.0
Owner
games
Visibility
first-party
Status
active
Compatibility
backward
Schema
https://openvibe.network/contracts/games/announce-frame.v1.json

games.announce-frame@1: the frame OpenVibe.Games broadcasts to every connected player for an announcement (gameServer broadcastAll): { t: announce, text }. A mod's announcement text is prefixed with its name in brackets ([Mod name] text); the binding itself returns nothing.

Fields

FieldTypeRequiredDescriptionConstraints
tconstyes
  • = "announce"
textstringyes
  • minLength 1

Examples

From the contract's own test fixtures: valid ones validate, rejected ones must fail.

Valid: mod
{
  "t": "announce",
  "text": "[Harbor Lights] The harbor lights come on at dusk."
}
Rejected: wrong-frame
{
  "t": "chat",
  "text": "x"
}

Validate

const contracts = require('openvibe-contracts');
contracts.validate('games.announce-frame@1', value);   // { valid, errors: [{ path, message }] }