feat(minigames): implement buddy game bubbles

Introduce a bubble system that allows players to signal availability for
specific buddy games. Other players in the same room can click the
bubble to initiate a game. The implementation handles bubble visibility
for new arrivals and ensures bubbles are cleared when players leave
rooms or start other activities.
This commit is contained in:
Snipzil committed 2026-10-18 00:43:12 -04:00
1 parent bb532a78bb
commit 422719dade
3 files changed
+169 -5

No files matched your search

+7
View File
@@ -436,6 +436,7 @@ const sendAvatarCreate = (to, target) => {
if (target.invisible) {
to.sendXt("xiv", -1, target.id, 1);
}
minigames.showBubble(to, target);
};
// redraws `session`'s animal for everyone else in the room, for changes the
@@ -1190,6 +1191,7 @@ const leaveRoom = session => {
room.sessions.delete(session);
session.room = null;
session.pos = null;
minigames.roomLeft(session);
for (const other of room.sessions) {
// AvatarManager.avatarRemoveResponse
if (sees(other, session)) {
@@ -1629,6 +1631,11 @@ module.exports = {
return;
}
fields[1] = String(Number(fields[1]));
// A buddy game's bubble over the player's head (lib/minigames.js).
if (fields[1] === "12") {
minigames.bubble(session, fields[0], fields[2]);
return;
}
// typed chat shows as "..." over the sender until the server sends
// it back (UserCommXtCommManager.sendChatMessage); everything else
// the sender has already shown themselves.