From d4f5dc6d3529efff37f2395e32d6db7195a88699 Mon Sep 17 00:00:00 2001
From: Piotr 'pwh' Hanusiak
Date: Tue, 12 Apr 2022 12:47:45 +0200
Subject: [PATCH] moved focusable property handling away from gamescene
---
.../Phaser/Game/GameMapPropertiesListener.ts | 371 ++++++++++--------
front/src/Phaser/Game/GameScene.ts | 30 --
maps/tests/tiled_objects.json | 148 ++++++-
3 files changed, 354 insertions(+), 195 deletions(-)
diff --git a/front/src/Phaser/Game/GameMapPropertiesListener.ts b/front/src/Phaser/Game/GameMapPropertiesListener.ts
index 950172d2..37fad9ab 100644
--- a/front/src/Phaser/Game/GameMapPropertiesListener.ts
+++ b/front/src/Phaser/Game/GameMapPropertiesListener.ts
@@ -29,6 +29,8 @@ interface OpenCoWebsite {
export interface ITiledPlace {
name: string;
properties?: ITiledMapProperty[];
+ x?: number;
+ y?: number;
width?: number;
height?: number;
}
@@ -208,115 +210,8 @@ export class GameMapPropertiesListener {
private onEnterPlaceHandler(places: ITiledPlace[]): void {
places.forEach((place) => {
- if (!place.properties) {
- return;
- }
-
- let openWebsiteProperty: string | undefined;
- let allowApiProperty: boolean | undefined;
- let websitePolicyProperty: string | undefined;
- let websiteWidthProperty: number | undefined;
- let websitePositionProperty: number | undefined;
- let websiteTriggerProperty: string | undefined;
- let websiteTriggerMessageProperty: string | undefined;
-
- place.properties.forEach((property) => {
- switch (property.name) {
- case GameMapProperties.OPEN_WEBSITE:
- openWebsiteProperty = property.value as string | undefined;
- break;
- case GameMapProperties.OPEN_WEBSITE_ALLOW_API:
- allowApiProperty = property.value as boolean | undefined;
- break;
- case GameMapProperties.OPEN_WEBSITE_POLICY:
- websitePolicyProperty = property.value as string | undefined;
- break;
- case GameMapProperties.OPEN_WEBSITE_WIDTH:
- websiteWidthProperty = property.value as number | undefined;
- break;
- case GameMapProperties.OPEN_WEBSITE_POSITION:
- websitePositionProperty = property.value as number | undefined;
- break;
- case GameMapProperties.OPEN_WEBSITE_TRIGGER:
- websiteTriggerProperty = property.value as string | undefined;
- break;
- case GameMapProperties.OPEN_WEBSITE_TRIGGER_MESSAGE:
- websiteTriggerMessageProperty = property.value as string | undefined;
- break;
- }
- });
-
- if (!openWebsiteProperty) {
- return;
- }
-
- const actionId = "openWebsite-" + (Math.random() + 1).toString(36).substring(7);
-
- if (this.coWebsitesOpenByPlace.has(place)) {
- return;
- }
-
- const coWebsiteOpen: OpenCoWebsite = {
- actionId: actionId,
- };
-
- this.coWebsitesOpenByPlace.set(place, coWebsiteOpen);
-
- const loadCoWebsiteFunction = (coWebsite: CoWebsite) => {
- coWebsiteManager.loadCoWebsite(coWebsite).catch(() => {
- console.error("Error during loading a co-website: " + coWebsite.getUrl());
- });
-
- layoutManagerActionStore.removeAction(actionId);
- };
-
- const openCoWebsiteFunction = () => {
- const coWebsite = new SimpleCoWebsite(
- new URL(openWebsiteProperty ?? "", this.scene.MapUrlFile),
- allowApiProperty,
- websitePolicyProperty,
- websiteWidthProperty,
- false
- );
-
- coWebsiteOpen.coWebsite = coWebsite;
-
- coWebsiteManager.addCoWebsiteToStore(coWebsite, websitePositionProperty);
-
- loadCoWebsiteFunction(coWebsite);
- };
-
- if (localUserStore.getForceCowebsiteTrigger() || websiteTriggerProperty === ON_ACTION_TRIGGER_BUTTON) {
- if (!websiteTriggerMessageProperty) {
- websiteTriggerMessageProperty = get(LL).trigger.cowebsite();
- }
-
- this.coWebsitesActionTriggerByPlace.set(place, actionId);
-
- layoutManagerActionStore.addAction({
- uuid: actionId,
- type: "message",
- message: websiteTriggerMessageProperty,
- callback: () => openCoWebsiteFunction(),
- userInputManager: this.scene.userInputManager,
- });
- } else if (websiteTriggerProperty === ON_ICON_TRIGGER_BUTTON) {
- const coWebsite = new SimpleCoWebsite(
- new URL(openWebsiteProperty ?? "", this.scene.MapUrlFile),
- allowApiProperty,
- websitePolicyProperty,
- websiteWidthProperty,
- false
- );
-
- coWebsiteOpen.coWebsite = coWebsite;
-
- coWebsiteManager.addCoWebsiteToStore(coWebsite, websitePositionProperty);
- }
-
- if (!websiteTriggerProperty) {
- openCoWebsiteFunction();
- }
+ this.handleOpenWebsitePropertiesOnEnter(place);
+ this.handleFocusablePropertiesOnEnter(place);
});
}
@@ -326,59 +221,211 @@ export class GameMapPropertiesListener {
return;
}
- let openWebsiteProperty: string | undefined;
- let websiteTriggerProperty: string | undefined;
-
- place.properties.forEach((property) => {
- switch (property.name) {
- case GameMapProperties.OPEN_WEBSITE:
- openWebsiteProperty = property.value as string | undefined;
- break;
- case GameMapProperties.OPEN_WEBSITE_TRIGGER:
- websiteTriggerProperty = property.value as string | undefined;
- break;
- }
- });
-
- if (!openWebsiteProperty) {
- return;
- }
-
- const coWebsiteOpen = this.coWebsitesOpenByPlace.get(place);
-
- if (!coWebsiteOpen) {
- return;
- }
-
- const coWebsite = coWebsiteOpen.coWebsite;
-
- if (coWebsite) {
- coWebsiteManager.closeCoWebsite(coWebsite);
- }
-
- this.coWebsitesOpenByPlace.delete(place);
-
- if (!websiteTriggerProperty) {
- return;
- }
-
- const actionStore = get(layoutManagerActionStore);
- const actionTriggerUuid = this.coWebsitesActionTriggerByPlace.get(place);
-
- if (!actionTriggerUuid) {
- return;
- }
-
- const action =
- actionStore && actionStore.length > 0
- ? actionStore.find((action) => action.uuid === actionTriggerUuid)
- : undefined;
-
- if (action) {
- layoutManagerActionStore.removeAction(actionTriggerUuid);
- }
-
- this.coWebsitesActionTriggerByPlace.delete(place);
+ this.handleOpenWebsitePropertiesOnLeave(place);
+ this.handleFocusablePropertiesOnLeave(place);
});
}
+
+ private handleOpenWebsitePropertiesOnEnter(place: ITiledPlace): void {
+ if (!place.properties) {
+ return;
+ }
+ let openWebsiteProperty: string | undefined;
+ let allowApiProperty: boolean | undefined;
+ let websitePolicyProperty: string | undefined;
+ let websiteWidthProperty: number | undefined;
+ let websitePositionProperty: number | undefined;
+ let websiteTriggerProperty: string | undefined;
+ let websiteTriggerMessageProperty: string | undefined;
+
+ place.properties.forEach((property) => {
+ switch (property.name) {
+ case GameMapProperties.OPEN_WEBSITE:
+ openWebsiteProperty = property.value as string | undefined;
+ break;
+ case GameMapProperties.OPEN_WEBSITE_ALLOW_API:
+ allowApiProperty = property.value as boolean | undefined;
+ break;
+ case GameMapProperties.OPEN_WEBSITE_POLICY:
+ websitePolicyProperty = property.value as string | undefined;
+ break;
+ case GameMapProperties.OPEN_WEBSITE_WIDTH:
+ websiteWidthProperty = property.value as number | undefined;
+ break;
+ case GameMapProperties.OPEN_WEBSITE_POSITION:
+ websitePositionProperty = property.value as number | undefined;
+ break;
+ case GameMapProperties.OPEN_WEBSITE_TRIGGER:
+ websiteTriggerProperty = property.value as string | undefined;
+ break;
+ case GameMapProperties.OPEN_WEBSITE_TRIGGER_MESSAGE:
+ websiteTriggerMessageProperty = property.value as string | undefined;
+ break;
+ }
+ });
+
+ if (!openWebsiteProperty) {
+ return;
+ }
+
+ const actionId = "openWebsite-" + (Math.random() + 1).toString(36).substring(7);
+
+ if (this.coWebsitesOpenByPlace.has(place)) {
+ return;
+ }
+
+ const coWebsiteOpen: OpenCoWebsite = {
+ actionId: actionId,
+ };
+
+ this.coWebsitesOpenByPlace.set(place, coWebsiteOpen);
+
+ const loadCoWebsiteFunction = (coWebsite: CoWebsite) => {
+ coWebsiteManager.loadCoWebsite(coWebsite).catch(() => {
+ console.error("Error during loading a co-website: " + coWebsite.getUrl());
+ });
+
+ layoutManagerActionStore.removeAction(actionId);
+ };
+
+ const openCoWebsiteFunction = () => {
+ const coWebsite = new SimpleCoWebsite(
+ new URL(openWebsiteProperty ?? "", this.scene.MapUrlFile),
+ allowApiProperty,
+ websitePolicyProperty,
+ websiteWidthProperty,
+ false
+ );
+
+ coWebsiteOpen.coWebsite = coWebsite;
+
+ coWebsiteManager.addCoWebsiteToStore(coWebsite, websitePositionProperty);
+
+ loadCoWebsiteFunction(coWebsite);
+ };
+
+ if (localUserStore.getForceCowebsiteTrigger() || websiteTriggerProperty === ON_ACTION_TRIGGER_BUTTON) {
+ if (!websiteTriggerMessageProperty) {
+ websiteTriggerMessageProperty = get(LL).trigger.cowebsite();
+ }
+
+ this.coWebsitesActionTriggerByPlace.set(place, actionId);
+
+ layoutManagerActionStore.addAction({
+ uuid: actionId,
+ type: "message",
+ message: websiteTriggerMessageProperty,
+ callback: () => openCoWebsiteFunction(),
+ userInputManager: this.scene.userInputManager,
+ });
+ } else if (websiteTriggerProperty === ON_ICON_TRIGGER_BUTTON) {
+ const coWebsite = new SimpleCoWebsite(
+ new URL(openWebsiteProperty ?? "", this.scene.MapUrlFile),
+ allowApiProperty,
+ websitePolicyProperty,
+ websiteWidthProperty,
+ false
+ );
+
+ coWebsiteOpen.coWebsite = coWebsite;
+
+ coWebsiteManager.addCoWebsiteToStore(coWebsite, websitePositionProperty);
+ }
+
+ if (!websiteTriggerProperty) {
+ openCoWebsiteFunction();
+ }
+ }
+
+ private handleFocusablePropertiesOnEnter(place: ITiledPlace): void {
+ if (!place.properties) {
+ return;
+ }
+ if (place.x === undefined || place.y === undefined || !place.height || !place.width) {
+ return;
+ }
+ const focusable = place.properties.find((property) => property.name === GameMapProperties.FOCUSABLE);
+ if (focusable && focusable.value === true) {
+ const zoomMargin = place.properties.find((property) => property.name === GameMapProperties.ZOOM_MARGIN);
+ this.scene.getCameraManager().enterFocusMode(
+ {
+ x: place.x + place.width * 0.5,
+ y: place.y + place.height * 0.5,
+ width: place.width,
+ height: place.height,
+ },
+ zoomMargin ? Math.max(0, Number(zoomMargin.value)) : undefined
+ );
+ }
+ }
+
+ private handleOpenWebsitePropertiesOnLeave(place: ITiledPlace): void {
+ if (!place.properties) {
+ return;
+ }
+
+ let openWebsiteProperty: string | undefined;
+ let websiteTriggerProperty: string | undefined;
+
+ place.properties.forEach((property) => {
+ switch (property.name) {
+ case GameMapProperties.OPEN_WEBSITE:
+ openWebsiteProperty = property.value as string | undefined;
+ break;
+ case GameMapProperties.OPEN_WEBSITE_TRIGGER:
+ websiteTriggerProperty = property.value as string | undefined;
+ break;
+ }
+ });
+
+ if (!openWebsiteProperty) {
+ return;
+ }
+
+ const coWebsiteOpen = this.coWebsitesOpenByPlace.get(place);
+
+ if (!coWebsiteOpen) {
+ return;
+ }
+
+ const coWebsite = coWebsiteOpen.coWebsite;
+
+ if (coWebsite) {
+ coWebsiteManager.closeCoWebsite(coWebsite);
+ }
+
+ this.coWebsitesOpenByPlace.delete(place);
+
+ if (!websiteTriggerProperty) {
+ return;
+ }
+
+ const actionStore = get(layoutManagerActionStore);
+ const actionTriggerUuid = this.coWebsitesActionTriggerByPlace.get(place);
+
+ if (!actionTriggerUuid) {
+ return;
+ }
+
+ const action =
+ actionStore && actionStore.length > 0
+ ? actionStore.find((action) => action.uuid === actionTriggerUuid)
+ : undefined;
+
+ if (action) {
+ layoutManagerActionStore.removeAction(actionTriggerUuid);
+ }
+
+ this.coWebsitesActionTriggerByPlace.delete(place);
+ }
+
+ private handleFocusablePropertiesOnLeave(place: ITiledPlace): void {
+ if (!place.properties) {
+ return;
+ }
+ const focusable = place.properties.find((property) => property.name === GameMapProperties.FOCUSABLE);
+ if (focusable && focusable.value === true) {
+ this.scene.getCameraManager().leaveFocusMode(this.scene.CurrentPlayer, 1000);
+ }
+ }
}
diff --git a/front/src/Phaser/Game/GameScene.ts b/front/src/Phaser/Game/GameScene.ts
index a17159b2..87a9bee2 100644
--- a/front/src/Phaser/Game/GameScene.ts
+++ b/front/src/Phaser/Game/GameScene.ts
@@ -892,43 +892,13 @@ export class GameScene extends DirtyScene {
});
});
- // TODO: Move to GameMapPropertiesListener?
this.gameMap.onEnterArea((areas) => {
- for (const area of areas) {
- const focusable = area.properties?.find(
- (property) => property.name === GameMapProperties.FOCUSABLE
- );
- if (focusable && focusable.value === true) {
- const zoomMargin = area.properties?.find(
- (property) => property.name === GameMapProperties.ZOOM_MARGIN
- );
- this.cameraManager.enterFocusMode(
- {
- x: area.x + area.width * 0.5,
- y: area.y + area.height * 0.5,
- width: area.width,
- height: area.height,
- },
- zoomMargin ? Math.max(0, Number(zoomMargin.value)) : undefined
- );
- break;
- }
- }
areas.forEach((area) => {
iframeListener.sendEnterAreaEvent(area.name);
});
});
this.gameMap.onLeaveArea((areas) => {
- for (const area of areas) {
- const focusable = area.properties?.find(
- (property) => property.name === GameMapProperties.FOCUSABLE
- );
- if (focusable && focusable.value === true) {
- this.cameraManager.leaveFocusMode(this.CurrentPlayer, 1000);
- break;
- }
- }
areas.forEach((area) => {
iframeListener.sendLeaveAreaEvent(area.name);
});
diff --git a/maps/tests/tiled_objects.json b/maps/tests/tiled_objects.json
index d939a961..3f029b41 100644
--- a/maps/tests/tiled_objects.json
+++ b/maps/tests/tiled_objects.json
@@ -27,7 +27,7 @@
"y":0
},
{
- "data":[201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 223, 223, 223, 223, 223, 223, 201, 201, 201, 201, 201, 234, 234, 234, 234, 234, 234, 201, 201, 201, 201, 201, 201, 201, 223, 223, 223, 201, 201, 201, 201, 223, 223, 223, 223, 223, 223, 201, 201, 201, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 201, 201, 201, 201, 201, 223, 223, 223, 201, 201, 201, 201, 223, 223, 223, 223, 223, 223, 201, 201, 201, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 223, 223, 223, 223, 223, 223, 201, 201, 201, 201, 201, 234, 234, 234, 234, 234, 234, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 234, 234, 234, 234, 234, 234, 234, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 234, 234, 234, 234, 234, 234, 234, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 234, 234, 234, 234, 234, 234, 234, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201],
+ "data":[201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 223, 223, 223, 223, 223, 223, 201, 201, 201, 201, 201, 234, 234, 234, 234, 234, 234, 201, 201, 201, 201, 201, 201, 201, 223, 223, 223, 201, 201, 201, 201, 223, 223, 223, 223, 223, 223, 201, 201, 201, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 201, 201, 201, 201, 201, 223, 223, 223, 201, 201, 201, 201, 223, 223, 223, 223, 223, 223, 201, 201, 201, 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 223, 223, 223, 223, 223, 223, 201, 201, 201, 201, 201, 234, 234, 234, 234, 234, 234, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 223, 223, 223, 223, 223, 223, 223, 223, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 223, 223, 223, 223, 223, 223, 223, 223, 201, 234, 234, 234, 234, 234, 234, 234, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 223, 223, 223, 223, 223, 223, 223, 223, 201, 234, 234, 234, 234, 234, 234, 234, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 223, 223, 223, 223, 223, 223, 223, 223, 201, 234, 234, 234, 234, 234, 234, 234, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201, 201],
"height":17,
"id":4,
"name":"floor",
@@ -39,7 +39,7 @@
"y":0
},
{
- "data":[49, 58, 58, 58, 58, 58, 58, 42, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 42, 57, 57, 57, 57, 57, 57, 57, 50, 45, 63, 63, 63, 63, 63, 63, 45, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 45, 63, 63, 63, 63, 63, 63, 63, 45, 45, 73, 73, 73, 73, 73, 73, 45, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 45, 73, 73, 73, 73, 73, 73, 73, 45, 45, 0, 0, 0, 0, 0, 0, 45, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 45, 0, 0, 0, 0, 0, 0, 0, 45, 45, 0, 0, 0, 0, 0, 0, 56, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 56, 0, 0, 0, 0, 0, 0, 0, 45, 45, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 45, 45, 0, 0, 0, 0, 0, 0, 73, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 73, 0, 0, 0, 0, 0, 0, 0, 45, 45, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 45, 45, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 45, 45, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 45, 45, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 45, 45, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 46, 0, 0, 0, 0, 0, 0, 0, 45, 45, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 45, 0, 0, 0, 0, 0, 0, 0, 45, 45, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 45, 0, 0, 0, 0, 0, 0, 0, 45, 59, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 32, 58, 58, 58, 58, 58, 58, 58, 60, 83, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 84, 93, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 94],
+ "data":[49, 58, 58, 58, 58, 58, 58, 42, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 42, 57, 57, 57, 57, 57, 57, 57, 50, 45, 63, 63, 63, 63, 63, 63, 45, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 45, 63, 63, 63, 63, 63, 63, 63, 45, 45, 73, 73, 73, 73, 73, 73, 45, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 45, 73, 73, 73, 73, 73, 73, 73, 45, 45, 0, 0, 0, 0, 0, 0, 45, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 45, 0, 0, 0, 0, 0, 0, 0, 45, 45, 0, 0, 0, 0, 0, 0, 56, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 56, 0, 0, 0, 0, 0, 0, 0, 45, 45, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 45, 45, 0, 0, 0, 0, 0, 0, 73, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 73, 0, 0, 0, 0, 0, 0, 0, 45, 45, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 45, 45, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 45, 45, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 45, 45, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 45, 45, 212, 212, 212, 212, 212, 212, 212, 212, 212, 212, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 46, 0, 0, 0, 0, 0, 0, 0, 45, 45, 212, 212, 212, 212, 212, 212, 212, 212, 212, 212, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 45, 0, 0, 0, 0, 0, 0, 0, 45, 45, 212, 212, 212, 212, 212, 212, 212, 212, 212, 212, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 45, 0, 0, 0, 0, 0, 0, 0, 45, 59, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 32, 58, 58, 58, 58, 58, 58, 58, 60, 83, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 84, 93, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 94],
"height":17,
"id":9,
"name":"walls",
@@ -117,6 +117,11 @@
"id":13,
"name":"",
"properties":[
+ {
+ "name":"focusable",
+ "type":"bool",
+ "value":true
+ },
{
"name":"openWebsite",
"type":"string",
@@ -128,6 +133,143 @@
"width":96.736386420597,
"x":799.205285942128,
"y":96.736386420597
+ },
+ {
+ "height":124.762816131237,
+ "id":15,
+ "name":"",
+ "properties":[
+ {
+ "name":"focusable",
+ "type":"bool",
+ "value":true
+ },
+ {
+ "name":"zoom_margin",
+ "type":"float",
+ "value":0.5
+ }],
+ "rotation":0,
+ "type":"area",
+ "visible":true,
+ "width":254.95010252905,
+ "x":448.422875370244,
+ "y":320.947824105719
+ },
+ {
+ "height":19,
+ "id":17,
+ "name":"",
+ "rotation":0,
+ "text":
+ {
+ "text":"FOCUSABLE ",
+ "wrap":true
+ },
+ "type":"",
+ "visible":true,
+ "width":93.848940533151,
+ "x":529.877534745956,
+ "y":358.459899749373
+ },
+ {
+ "height":19,
+ "id":18,
+ "name":"",
+ "rotation":0,
+ "text":
+ {
+ "text":"JITSI ON TRIGGER",
+ "wrap":true
+ },
+ "type":"",
+ "visible":true,
+ "width":164.367053998633,
+ "x":408.731032125769,
+ "y":150.521872863978
+ },
+ {
+ "height":19,
+ "id":19,
+ "name":"",
+ "rotation":0,
+ "text":
+ {
+ "text":"JITSI",
+ "wrap":true
+ },
+ "type":"",
+ "visible":true,
+ "width":43.2205513784461,
+ "x":100.440305308726,
+ "y":147.80963773069
+ },
+ {
+ "height":102.175210754158,
+ "id":20,
+ "name":"",
+ "rotation":0,
+ "text":
+ {
+ "halign":"center",
+ "text":"OPEN WEBSITE AND FOCUSABLE",
+ "wrap":true
+ },
+ "type":"",
+ "visible":true,
+ "width":99.2734107997265,
+ "x":796.580656185919,
+ "y":102.605718842561
+ },
+ {
+ "height":19,
+ "id":21,
+ "name":"",
+ "rotation":0,
+ "text":
+ {
+ "text":"SILENT ZONE",
+ "wrap":true
+ },
+ "type":"",
+ "visible":true,
+ "width":112.834586466165,
+ "x":799.292891319207,
+ "y":391.910799726589
+ },
+ {
+ "height":95.892082727209,
+ "id":22,
+ "name":"",
+ "properties":[
+ {
+ "name":"focusable",
+ "type":"bool",
+ "value":true
+ }],
+ "rotation":359.800363945476,
+ "type":"",
+ "visible":true,
+ "width":318.187448731897,
+ "x":32.4024392837801,
+ "y":352.890077348834
+ },
+ {
+ "height":43.4101161995899,
+ "id":23,
+ "name":"",
+ "rotation":0,
+ "text":
+ {
+ "halign":"center",
+ "text":"THIS SHOULD NOT TRIGGER ANYTHING (TYPE IS NOT 'AREA')",
+ "wrap":true
+ },
+ "type":"",
+ "visible":true,
+ "width":288.225791752108,
+ "x":41.6752107541581,
+ "y":381.965937571201
}],
"opacity":1,
"type":"objectgroup",
@@ -136,7 +278,7 @@
"y":0
}],
"nextlayerid":39,
- "nextobjectid":15,
+ "nextobjectid":24,
"orientation":"orthogonal",
"properties":[
{