change away to availability status
This commit is contained in:
@@ -146,7 +146,7 @@ export class GameRoom {
|
||||
position,
|
||||
false,
|
||||
this.positionNotifier,
|
||||
joinRoomMessage.getAway(),
|
||||
joinRoomMessage.getStatus(),
|
||||
socket,
|
||||
joinRoomMessage.getTagList(),
|
||||
joinRoomMessage.getVisitcardurl(),
|
||||
|
||||
@@ -5,6 +5,7 @@ import { Movable } from "../Model/Movable";
|
||||
import { PositionNotifier } from "../Model/PositionNotifier";
|
||||
import { ServerDuplexStream } from "grpc";
|
||||
import {
|
||||
AvailabilityStatus,
|
||||
BatchMessage,
|
||||
CompanionMessage,
|
||||
FollowAbortMessage,
|
||||
@@ -32,7 +33,7 @@ export class User implements Movable {
|
||||
private position: PointInterface,
|
||||
public silent: boolean,
|
||||
private positionNotifier: PositionNotifier,
|
||||
private away: boolean,
|
||||
private status: AvailabilityStatus,
|
||||
public readonly socket: UserSocket,
|
||||
public readonly tags: string[],
|
||||
public readonly visitCardUrl: string | null,
|
||||
@@ -90,8 +91,8 @@ export class User implements Movable {
|
||||
return this.outlineColor;
|
||||
}
|
||||
|
||||
public isAway(): boolean {
|
||||
return this.away;
|
||||
public getStatus(): AvailabilityStatus {
|
||||
return this.status;
|
||||
}
|
||||
|
||||
get following(): User | undefined {
|
||||
@@ -134,9 +135,9 @@ export class User implements Movable {
|
||||
}
|
||||
this.voiceIndicatorShown = details.getShowvoiceindicator()?.getValue();
|
||||
|
||||
const away = details.getAway();
|
||||
if (away) {
|
||||
this.away = away.getValue();
|
||||
const status = details.getStatus();
|
||||
if (status !== undefined) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
const playerDetails = new SetPlayerDetailsMessage();
|
||||
@@ -147,8 +148,8 @@ export class User implements Movable {
|
||||
if (this.voiceIndicatorShown !== undefined) {
|
||||
playerDetails.setShowvoiceindicator(new BoolValue().setValue(this.voiceIndicatorShown));
|
||||
}
|
||||
if (details.getAway() !== undefined) {
|
||||
playerDetails.setAway(new BoolValue().setValue(this.away));
|
||||
if (details.getStatus() !== undefined) {
|
||||
playerDetails.setStatus(details.getStatus());
|
||||
}
|
||||
|
||||
this.positionNotifier.updatePlayerDetails(this, playerDetails);
|
||||
|
||||
@@ -328,7 +328,7 @@ export class SocketManager {
|
||||
userJoinedZoneMessage.setUserid(thing.id);
|
||||
userJoinedZoneMessage.setUseruuid(thing.uuid);
|
||||
userJoinedZoneMessage.setName(thing.name);
|
||||
userJoinedZoneMessage.setAway(thing.isAway());
|
||||
userJoinedZoneMessage.setStatus(thing.getStatus());
|
||||
userJoinedZoneMessage.setCharacterlayersList(ProtobufUtils.toCharacterLayerMessages(thing.characterLayers));
|
||||
userJoinedZoneMessage.setPosition(ProtobufUtils.toPositionMessage(thing.getPosition()));
|
||||
userJoinedZoneMessage.setFromzone(this.toProtoZone(fromZone));
|
||||
@@ -656,7 +656,7 @@ export class SocketManager {
|
||||
userJoinedMessage.setUserid(thing.id);
|
||||
userJoinedMessage.setUseruuid(thing.uuid);
|
||||
userJoinedMessage.setName(thing.name);
|
||||
userJoinedMessage.setAway(thing.isAway());
|
||||
userJoinedMessage.setStatus(thing.getStatus());
|
||||
userJoinedMessage.setCharacterlayersList(ProtobufUtils.toCharacterLayerMessages(thing.characterLayers));
|
||||
userJoinedMessage.setPosition(ProtobufUtils.toPositionMessage(thing.getPosition()));
|
||||
if (thing.visitCardUrl) {
|
||||
|
||||
Reference in New Issue
Block a user