Sending color outline on connect
This commit is contained in:
@@ -65,6 +65,7 @@ export interface MessageUserJoined {
|
||||
visitCardUrl: string | null;
|
||||
companion: string | null;
|
||||
userUuid: string;
|
||||
outlineColor: number | undefined;
|
||||
}
|
||||
|
||||
export interface PositionInterface {
|
||||
|
||||
@@ -423,6 +423,7 @@ export class RoomConnection implements RoomConnection {
|
||||
position: ProtobufClientUtils.toPointInterface(position),
|
||||
companion: companion ? companion.getName() : null,
|
||||
userUuid: message.getUseruuid(),
|
||||
outlineColor: message.getHasoutline() ? message.getOutlinecolor() : undefined,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -683,6 +683,7 @@ export class GameScene extends DirtyScene {
|
||||
visitCardUrl: message.visitCardUrl,
|
||||
companion: message.companion,
|
||||
userUuid: message.userUuid,
|
||||
outlineColor: message.outlineColor,
|
||||
};
|
||||
this.addPlayer(userMessage);
|
||||
});
|
||||
@@ -1703,8 +1704,9 @@ ${escapedMessage}
|
||||
case "PlayerDetailsUpdated":
|
||||
this.doUpdatePlayerDetails(event.details);
|
||||
break;
|
||||
default:
|
||||
default: {
|
||||
const tmp: never = event;
|
||||
}
|
||||
}
|
||||
}
|
||||
// Let's move all users
|
||||
@@ -1778,6 +1780,9 @@ ${escapedMessage}
|
||||
addPlayerData.companion,
|
||||
addPlayerData.companion !== null ? lazyLoadCompanionResource(this.load, addPlayerData.companion) : undefined
|
||||
);
|
||||
if (addPlayerData.outlineColor !== undefined) {
|
||||
player.setOutlineColor(addPlayerData.outlineColor);
|
||||
}
|
||||
this.MapPlayers.add(player);
|
||||
this.MapPlayersByKey.set(player.userId, player);
|
||||
player.updatePosition(addPlayerData.position);
|
||||
|
||||
@@ -8,4 +8,5 @@ export interface PlayerInterface {
|
||||
companion: string | null;
|
||||
userUuid: string;
|
||||
color?: string;
|
||||
outlineColor?: number;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user