asobi_world_chat (asobi v0.72.5)

View Source

Summary

Functions

Channel id of a game-wide chat channel. Deliberately carries no world id.

The game-wide channel names a chat config declares, deduplicated.

Functions

channel_id/3

-spec channel_id(binary(), atom(), term()) -> binary().

global_channel_id(Name)

-spec global_channel_id(binary()) -> binary().

Channel id of a game-wide chat channel. Deliberately carries no world id.

global_channels/1

-spec global_channels(term()) -> [binary()].

The game-wide channel names a chat config declares, deduplicated.

Shared with asobi_game_modes:global_chat_channels/0, which the chat ACL consults, so a name is auto-joined here exactly when it is authorised there. Malformed names are dropped loudly rather than silently minting a channel nothing can join.

init(WorldId, Config)

-spec init(binary(), map()) -> map().

player_joined/3

-spec player_joined(binary(), {integer(), integer()}, map()) -> ok.

player_left/3

-spec player_left(binary(), {integer(), integer()}, map()) -> ok.

player_zone_changed/5

-spec player_zone_changed(binary(),
                          {integer(), integer()},
                          {integer(), integer()},
                          non_neg_integer(),
                          map()) ->
                             ok.