change away to availability status
This commit is contained in:
@@ -18,6 +18,7 @@ import {
|
||||
ErrorMessage,
|
||||
PlayerDetailsUpdatedMessage,
|
||||
SetPlayerDetailsMessage,
|
||||
AvailabilityStatus,
|
||||
} from "../Messages/generated/messages_pb";
|
||||
import { ClientReadableStream } from "grpc";
|
||||
import { PositionDispatcher } from "../Model/PositionDispatcher";
|
||||
@@ -49,7 +50,7 @@ export class UserDescriptor {
|
||||
private name: string,
|
||||
private characterLayers: CharacterLayerMessage[],
|
||||
private position: PositionMessage,
|
||||
private away: boolean,
|
||||
private status: AvailabilityStatus,
|
||||
private visitCardUrl: string | null,
|
||||
private companion?: CompanionMessage,
|
||||
private outlineColor?: number
|
||||
@@ -70,7 +71,7 @@ export class UserDescriptor {
|
||||
message.getName(),
|
||||
message.getCharacterlayersList(),
|
||||
position,
|
||||
message.getAway(),
|
||||
message.getStatus(),
|
||||
message.getVisitcardurl(),
|
||||
message.getCompanion(),
|
||||
message.getHasoutline() ? message.getOutlinecolor() : undefined
|
||||
@@ -91,9 +92,9 @@ export class UserDescriptor {
|
||||
} else {
|
||||
this.outlineColor = playerDetails.getOutlinecolor()?.getValue();
|
||||
}
|
||||
const away = playerDetails.getAway();
|
||||
if (away) {
|
||||
this.away = away.getValue();
|
||||
const status = playerDetails.getStatus();
|
||||
if (status !== undefined) {
|
||||
this.status = status;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -104,7 +105,7 @@ export class UserDescriptor {
|
||||
userJoinedMessage.setName(this.name);
|
||||
userJoinedMessage.setCharacterlayersList(this.characterLayers);
|
||||
userJoinedMessage.setPosition(this.position);
|
||||
userJoinedMessage.setAway(this.away);
|
||||
userJoinedMessage.setStatus(this.status);
|
||||
if (this.visitCardUrl) {
|
||||
userJoinedMessage.setVisitcardurl(this.visitCardUrl);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user