fix ReportMenu (#1397)
This commit is contained in:
parent
d7b552a513
commit
19baf7f582
@ -21,7 +21,7 @@
|
||||
if (reportScreenStore != null) {
|
||||
userName = reportScreenStore.userName;
|
||||
userUUID = playersStore.getPlayerById(reportScreenStore.userId)?.userUuid;
|
||||
if (userUUID === undefined) {
|
||||
if (userUUID === undefined && reportScreenStore !== userReportEmpty) {
|
||||
console.error("Could not find UUID for user with ID " + reportScreenStore.userId);
|
||||
}
|
||||
}
|
||||
|
@ -4,7 +4,6 @@ import {Character} from "../Entity/Character";
|
||||
import type { PlayerAnimationDirections } from "../Player/Animation";
|
||||
import { requestVisitCardsStore } from "../../Stores/GameStore";
|
||||
|
||||
|
||||
/**
|
||||
* Class representing the sprite of a remote player (a player that plays on another computer)
|
||||
*/
|
||||
@ -25,15 +24,29 @@ export class RemotePlayer extends Character {
|
||||
companion: string | null,
|
||||
companionTexturePromise?: Promise<string>
|
||||
) {
|
||||
super(Scene, x, y, texturesPromise, name, direction, moving, 1, !!visitCardUrl, companion, companionTexturePromise);
|
||||
super(
|
||||
Scene,
|
||||
x,
|
||||
y,
|
||||
texturesPromise,
|
||||
name,
|
||||
direction,
|
||||
moving,
|
||||
1,
|
||||
!!visitCardUrl,
|
||||
companion,
|
||||
companionTexturePromise
|
||||
);
|
||||
|
||||
//set data
|
||||
this.userId = userId;
|
||||
this.visitCardUrl = visitCardUrl;
|
||||
|
||||
this.on('pointerdown', () => {
|
||||
this.on("pointerdown", (event: Phaser.Input.Pointer) => {
|
||||
if (event.downElement.nodeName === "CANVAS") {
|
||||
requestVisitCardsStore.set(this.visitCardUrl);
|
||||
})
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
updatePosition(position: PointInterface): void {
|
||||
|
@ -1,11 +1,12 @@
|
||||
import { derived } from "svelte/store";
|
||||
import { menuInputFocusStore } from "./MenuStore";
|
||||
import { chatInputFocusStore } from "./ChatStore";
|
||||
import { showReportScreenStore, userReportEmpty } from "./ShowReportScreenStore";
|
||||
|
||||
//derived from the focus on Menu, ConsoleGlobal, Chat and ...
|
||||
export const enableUserInputsStore = derived(
|
||||
[menuInputFocusStore, chatInputFocusStore],
|
||||
([$menuInputFocusStore, $chatInputFocusStore]) => {
|
||||
return !$menuInputFocusStore && !$chatInputFocusStore;
|
||||
[menuInputFocusStore, chatInputFocusStore, showReportScreenStore],
|
||||
([$menuInputFocusStore, $chatInputFocusStore, $showReportScreenStore]) => {
|
||||
return !$menuInputFocusStore && !$chatInputFocusStore && !($showReportScreenStore !== userReportEmpty);
|
||||
}
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user