Skip to content

Commit

Permalink
dump client data 05/08/24
Browse files Browse the repository at this point in the history
  • Loading branch information
christoabrown committed May 8, 2024
1 parent f9ed100 commit 27e1cb4
Show file tree
Hide file tree
Showing 172 changed files with 87 additions and 56 deletions.
24 changes: 24 additions & 0 deletions server/collection_log_info.json
Original file line number Diff line number Diff line change
Expand Up @@ -4754,6 +4754,10 @@
"id": 21064,
"name": "Graceful cape"
},
{
"id": 29482,
"name": "Brimhaven voucher"
},
{
"id": 21067,
"name": "Graceful top"
Expand Down Expand Up @@ -5732,14 +5736,30 @@
"name": "Volcanic Mine",
"completion_labels": [],
"items": [
{
"id": 29472,
"name": "Prospector helmet"
},
{
"id": 21697,
"name": "Ash covered tome"
},
{
"id": 29474,
"name": "Prospector jacket"
},
{
"id": 29476,
"name": "Prospector legs"
},
{
"id": 21541,
"name": "Volcanic mine teleport"
},
{
"id": 29478,
"name": "Prospector boots"
},
{
"id": 25615,
"name": "Large water container"
Expand Down Expand Up @@ -7112,6 +7132,10 @@
"id": 4111,
"name": "Mystic robe top (light)"
},
{
"id": 29455,
"name": "Teleport anchoring scroll"
},
{
"id": 23056,
"name": "Mystic gloves (dusk)"
Expand Down
2 changes: 1 addition & 1 deletion site/public/data/item_data.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion site/public/data/map.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion site/public/data/map_icons.json

Large diffs are not rendered by default.

Binary file modified site/public/icons/items/28826.webp
Binary file not shown.
Binary file modified site/public/icons/items/28828.webp
Binary file not shown.
Binary file modified site/public/icons/items/28830.webp
Binary file not shown.
Binary file modified site/public/icons/items/28902.webp
Binary file not shown.
Binary file modified site/public/icons/items/28904.webp
Binary file not shown.
Binary file modified site/public/icons/items/28906.webp
Binary file not shown.
Binary file modified site/public/icons/items/28947.webp
Binary file not shown.
Binary file modified site/public/icons/items/28949.webp
Binary file not shown.
Binary file modified site/public/icons/items/28951.webp
Binary file not shown.
Binary file modified site/public/icons/items/28953.webp
Binary file not shown.
Binary file modified site/public/icons/items/28955.webp
Binary file not shown.
Binary file modified site/public/icons/items/28957.webp
Binary file not shown.
Binary file modified site/public/icons/items/29004.webp
Binary file not shown.
Binary file modified site/public/icons/items/29031.webp
Binary file not shown.
Binary file modified site/public/icons/items/29049.webp
Binary file not shown.
Binary file modified site/public/icons/items/29299.webp
Binary file not shown.
Binary file modified site/public/icons/items/29303.webp
Binary file not shown.
Binary file added site/public/icons/items/29462.webp
Binary file not shown.
Binary file added site/public/icons/items/29464.webp
Binary file not shown.
Binary file added site/public/icons/items/29466.webp
Binary file not shown.
Binary file added site/public/icons/items/29468.webp
Binary file not shown.
Binary file added site/public/icons/items/29470.webp
Binary file not shown.
Binary file added site/public/icons/items/29472.webp
Binary file not shown.
Binary file added site/public/icons/items/29474.webp
Binary file not shown.
Binary file added site/public/icons/items/29476.webp
Binary file not shown.
Binary file added site/public/icons/items/29478.webp
Binary file not shown.
Binary file added site/public/icons/items/29480.webp
Binary file not shown.
Binary file added site/public/icons/items/29482.webp
Binary file not shown.
Binary file added site/public/icons/items/29484.webp
Binary file not shown.
Binary file added site/public/icons/items/29485.webp
Binary file not shown.
Binary file modified site/public/map/0_23_59.webp
Binary file not shown.
Binary file modified site/public/map/0_23_60.webp
Binary file not shown.
Binary file modified site/public/map/0_24_59.webp
Binary file not shown.
Binary file modified site/public/map/0_24_60.webp
Binary file not shown.
Binary file modified site/public/map/0_24_61.webp
Binary file not shown.
Binary file modified site/public/map/0_25_51.webp
Binary file not shown.
Binary file modified site/public/map/0_25_59.webp
Binary file not shown.
Binary file modified site/public/map/0_25_60.webp
Binary file not shown.
Binary file modified site/public/map/0_25_61.webp
Binary file not shown.
Binary file modified site/public/map/0_26_51.webp
Binary file not shown.
Binary file modified site/public/map/0_26_59.webp
Binary file not shown.
Binary file modified site/public/map/0_26_60.webp
Binary file not shown.
Binary file modified site/public/map/0_26_61.webp
Binary file not shown.
Binary file modified site/public/map/0_27_51.webp
Binary file not shown.
Binary file modified site/public/map/0_28_48.webp
Binary file not shown.
Binary file modified site/public/map/0_29_46.webp
Binary file not shown.
Binary file modified site/public/map/0_29_47.webp
Binary file not shown.
Binary file modified site/public/map/0_45_145.webp
Binary file not shown.
Binary file modified site/public/map/0_46_46.webp
Binary file not shown.
Binary file modified site/public/map/0_46_47.webp
Binary file not shown.
Binary file modified site/public/map/0_46_50.webp
Binary file not shown.
Binary file modified site/public/map/0_47_46.webp
Binary file not shown.
Binary file modified site/public/map/0_49_149.webp
Binary file not shown.
Binary file modified site/public/map/0_49_50.webp
Binary file not shown.
Binary file modified site/public/map/0_51_45.webp
Binary file not shown.
Binary file modified site/public/map/0_51_53.webp
Binary file not shown.
Binary file modified site/public/map/0_51_54.webp
Binary file not shown.
Binary file modified site/public/map/0_54_158.webp
Binary file not shown.
Binary file modified site/public/map/0_55_157.webp
Binary file not shown.
Binary file modified site/public/map/0_55_158.webp
Binary file not shown.
Binary file modified site/public/map/0_57_51.webp
Binary file not shown.
Binary file modified site/public/map/0_60_88.webp
Binary file not shown.
Binary file modified site/public/map/1_23_59.webp
Binary file not shown.
Binary file modified site/public/map/1_23_60.webp
Binary file not shown.
Binary file modified site/public/map/1_24_59.webp
Binary file not shown.
Binary file modified site/public/map/1_24_60.webp
Binary file not shown.
Binary file modified site/public/map/1_24_61.webp
Binary file not shown.
Binary file modified site/public/map/1_25_51.webp
Binary file not shown.
Binary file modified site/public/map/1_25_59.webp
Binary file not shown.
Binary file modified site/public/map/1_25_60.webp
Binary file not shown.
Binary file modified site/public/map/1_25_61.webp
Binary file not shown.
Binary file modified site/public/map/1_26_51.webp
Binary file not shown.
Binary file modified site/public/map/1_26_59.webp
Binary file not shown.
Binary file modified site/public/map/1_26_60.webp
Binary file not shown.
Binary file modified site/public/map/1_26_61.webp
Binary file not shown.
Binary file modified site/public/map/1_27_51.webp
Binary file not shown.
Binary file modified site/public/map/1_28_48.webp
Binary file not shown.
Binary file modified site/public/map/1_29_46.webp
Binary file not shown.
Binary file modified site/public/map/1_29_47.webp
Binary file not shown.
Binary file modified site/public/map/1_31_68.webp
Binary file not shown.
Binary file modified site/public/map/1_45_145.webp
Binary file not shown.
Binary file modified site/public/map/1_46_46.webp
Binary file not shown.
Binary file modified site/public/map/1_46_47.webp
Binary file not shown.
Binary file modified site/public/map/1_46_50.webp
Binary file not shown.
Binary file modified site/public/map/1_47_46.webp
Binary file not shown.
Binary file modified site/public/map/1_49_149.webp
Binary file not shown.
Binary file modified site/public/map/1_49_50.webp
Binary file not shown.
Binary file modified site/public/map/1_51_45.webp
Binary file not shown.
Binary file modified site/public/map/1_51_53.webp
Binary file not shown.
Binary file modified site/public/map/1_51_54.webp
Binary file not shown.
Binary file modified site/public/map/1_53_56.webp
Binary file not shown.
Binary file modified site/public/map/1_54_150.webp
Binary file not shown.
Binary file modified site/public/map/1_54_158.webp
Binary file not shown.
Binary file modified site/public/map/1_55_157.webp
Binary file not shown.
Binary file modified site/public/map/1_55_158.webp
Binary file not shown.
Binary file modified site/public/map/1_57_51.webp
Binary file not shown.
Binary file modified site/public/map/1_60_88.webp
Binary file not shown.
Binary file modified site/public/map/2_23_59.webp
Binary file not shown.
Binary file modified site/public/map/2_23_60.webp
Binary file not shown.
Binary file modified site/public/map/2_24_59.webp
Binary file not shown.
Binary file modified site/public/map/2_24_60.webp
Binary file not shown.
Binary file modified site/public/map/2_24_61.webp
Binary file not shown.
Binary file modified site/public/map/2_25_51.webp
Binary file not shown.
Binary file modified site/public/map/2_25_59.webp
Binary file not shown.
Binary file modified site/public/map/2_25_60.webp
Binary file not shown.
Binary file modified site/public/map/2_25_61.webp
Binary file not shown.
Binary file modified site/public/map/2_26_51.webp
Binary file not shown.
Binary file modified site/public/map/2_26_59.webp
Binary file not shown.
Binary file modified site/public/map/2_26_60.webp
Binary file not shown.
Binary file modified site/public/map/2_26_61.webp
Binary file not shown.
Binary file modified site/public/map/2_27_51.webp
Binary file not shown.
Binary file modified site/public/map/2_28_48.webp
Binary file not shown.
Binary file modified site/public/map/2_29_46.webp
Binary file not shown.
Binary file modified site/public/map/2_29_47.webp
Binary file not shown.
Binary file modified site/public/map/2_31_68.webp
Binary file not shown.
Binary file modified site/public/map/2_45_145.webp
Binary file not shown.
Binary file modified site/public/map/2_46_46.webp
Binary file not shown.
Binary file modified site/public/map/2_46_47.webp
Binary file not shown.
Binary file modified site/public/map/2_46_50.webp
Binary file not shown.
Binary file modified site/public/map/2_47_46.webp
Binary file not shown.
Binary file modified site/public/map/2_49_149.webp
Binary file not shown.
Binary file modified site/public/map/2_49_50.webp
Binary file not shown.
Binary file modified site/public/map/2_51_45.webp
Binary file not shown.
Binary file modified site/public/map/2_51_53.webp
Binary file not shown.
Binary file modified site/public/map/2_51_54.webp
Binary file not shown.
Binary file modified site/public/map/2_53_56.webp
Binary file not shown.
Binary file modified site/public/map/2_54_150.webp
Binary file not shown.
Binary file modified site/public/map/2_54_158.webp
Binary file not shown.
Binary file modified site/public/map/2_55_157.webp
Binary file not shown.
Binary file modified site/public/map/2_55_158.webp
Binary file not shown.
Binary file modified site/public/map/2_57_51.webp
Binary file not shown.
Binary file modified site/public/map/2_60_88.webp
Binary file not shown.
Binary file modified site/public/map/3_23_59.webp
Binary file not shown.
Binary file modified site/public/map/3_23_60.webp
Binary file not shown.
Binary file modified site/public/map/3_24_59.webp
Binary file not shown.
Binary file modified site/public/map/3_24_60.webp
Binary file not shown.
Binary file modified site/public/map/3_24_61.webp
Binary file not shown.
Binary file modified site/public/map/3_25_51.webp
Binary file not shown.
Binary file modified site/public/map/3_25_59.webp
Binary file not shown.
Binary file modified site/public/map/3_25_60.webp
Binary file not shown.
Binary file modified site/public/map/3_25_61.webp
Binary file not shown.
Binary file modified site/public/map/3_26_51.webp
Binary file not shown.
Binary file modified site/public/map/3_26_59.webp
Binary file not shown.
Binary file modified site/public/map/3_26_60.webp
Binary file not shown.
Binary file modified site/public/map/3_26_61.webp
Binary file not shown.
Binary file modified site/public/map/3_27_51.webp
Binary file not shown.
Binary file modified site/public/map/3_28_48.webp
Binary file not shown.
Binary file modified site/public/map/3_29_46.webp
Binary file not shown.
Binary file modified site/public/map/3_29_47.webp
Binary file not shown.
Binary file modified site/public/map/3_30_68.webp
Binary file not shown.
Binary file modified site/public/map/3_31_68.webp
Binary file not shown.
Binary file modified site/public/map/3_45_145.webp
Binary file not shown.
Binary file modified site/public/map/3_46_46.webp
Binary file not shown.
Binary file modified site/public/map/3_46_47.webp
Binary file not shown.
Binary file modified site/public/map/3_46_50.webp
Binary file not shown.
Binary file modified site/public/map/3_47_46.webp
Binary file not shown.
Binary file modified site/public/map/3_49_149.webp
Binary file not shown.
Binary file modified site/public/map/3_49_50.webp
Binary file not shown.
Binary file modified site/public/map/3_51_45.webp
Binary file not shown.
Binary file modified site/public/map/3_51_54.webp
Binary file not shown.
Binary file modified site/public/map/3_53_56.webp
Binary file not shown.
Binary file modified site/public/map/3_54_150.webp
Binary file not shown.
Binary file modified site/public/map/3_54_158.webp
Binary file not shown.
Binary file modified site/public/map/3_55_157.webp
Binary file not shown.
Binary file modified site/public/map/3_55_158.webp
Binary file not shown.
Binary file modified site/public/map/3_57_51.webp
Binary file not shown.
Binary file modified site/public/map/3_60_88.webp
Binary file not shown.
113 changes: 60 additions & 53 deletions site/src/canvas-map/canvas-map.js
Original file line number Diff line number Diff line change
Expand Up @@ -280,9 +280,22 @@ export class CanvasMap extends BaseElement {
Math.abs((this.camera.y.target - this.camera.y.current) / this.camera.y.time)) /
this.camera.zoom.current;
const isPanningABigDistance = !zooming && distanceLeftToTravel > 10;
this.drawTilesInCurrentView(!isPanningABigDistance);

const s = this.tileSize * this.camera.zoom.current;
const top = this.camera.y.current / s;
const left = this.camera.x.current / s;
const right = left + this.canvas.width / s;
const bottom = top - this.canvas.height / s;
this.view = {
left: Math.floor(left),
right: Math.ceil(right),
top: Math.ceil(top),
bottom: Math.floor(bottom),
};

this.drawMapSquaresInView(!isPanningABigDistance);
this.drawLocations();
this.drawMapAreaLabels();
this.drawMapAreaLabels(!isPanningABigDistance);

this.drawTileMarkers(this.playerMarkers.values(), {
fillColor: "#348feb",
Expand Down Expand Up @@ -429,65 +442,53 @@ export class CanvasMap extends BaseElement {
}
}

drawMapAreaLabels() {
drawMapAreaLabels(loadNewImages) {
if (!this.mapLabels) return;
this.mapLabelImages = this.mapLabelImages || new Map();
const scale = Math.min(this.camera.zoom.current, 2);

for (const tile of this.tilesInView) {
const labels = this.mapLabels[tile.regionX]?.[tile.regionY]?.[this.plane - 1];
if (labels) {
for (let i = 0; i < labels.length; i += 3) {
const [x, y] = this.gamePositionToCanvas(labels[i], labels[i + 1]);
const labelId = labels[i + 2];

const key = this.cantor(x, y);
let mapLabelImage = this.mapLabelImages.get(key);
if (!mapLabelImage) {
mapLabelImage = new Image();
mapLabelImage.src = `/map/labels/${labelId}.webp`;
this.mapLabelImages.set(key, mapLabelImage);
}
for (let tileX = this.view.left - 1; tileX < this.view.right + 1; ++tileX) {
for (let tileY = this.view.top + 1; tileY > this.view.bottom; --tileY) {
const labels = this.mapLabels[tileX]?.[tileY]?.[this.plane - 1];
if (labels) {
for (let i = 0; i < labels.length; i += 3) {
const [x, y] = this.gamePositionToCanvas(labels[i], labels[i + 1]);
const labelId = labels[i + 2];

const key = this.cantor(x, y);
let mapLabelImage = this.mapLabelImages.get(key);
if (!mapLabelImage && loadNewImages) {
mapLabelImage = new Image();
mapLabelImage.src = `/map/labels/${labelId}.webp`;
this.mapLabelImages.set(key, mapLabelImage);
} else if (!mapLabelImage && !loadNewImages) {
continue;
}

mapLabelImage.loaded = mapLabelImage.loaded || mapLabelImage.complete;
if (mapLabelImage.loaded) {
const width = mapLabelImage.width / scale;
const height = mapLabelImage.height / scale;
const shiftX = width / 2;

this.ctx.drawImage(mapLabelImage, Math.round(x - shiftX), y, Math.round(width), Math.round(height));
} else if (!mapLabelImage.onload) {
mapLabelImage.onload = (...args) => {
mapLabelImage.loaded = true;
this.requestUpdate();
};
mapLabelImage.loaded = mapLabelImage.loaded || mapLabelImage.complete;
if (mapLabelImage.loaded) {
const width = mapLabelImage.width / scale;
const height = mapLabelImage.height / scale;
const shiftX = width / 2;

this.ctx.drawImage(mapLabelImage, Math.round(x - shiftX), y, Math.round(width), Math.round(height));
} else if (!mapLabelImage.onload) {
mapLabelImage.onload = (...args) => {
mapLabelImage.loaded = true;
this.requestUpdate();
};
}
}
}
}
}
}

drawTilesInCurrentView(loadNewTiles) {
const s = this.tileSize * this.camera.zoom.current;
const top = this.camera.y.current / s;
const left = this.camera.x.current / s;
const right = left + this.canvas.width / s;
const bottom = top - this.canvas.height / s;
const region = {
left: Math.floor(left),
right: Math.ceil(right),
top: Math.ceil(top),
bottom: Math.floor(bottom),
};
this.drawTilesInRegion(region, loadNewTiles);
this.ctx.globalAlpha = 1;
}

drawTilesInRegion(region, loadNewTiles) {
const top = region.top;
const left = region.left;
const right = region.right;
const bottom = region.bottom;
drawMapSquaresInView(loadNewTiles) {
const top = this.view.top;
const left = this.view.left;
const right = this.view.right;
const bottom = this.view.bottom;
const tiles = this.tiles[this.plane - 1];
const imageSize = this.tileSize;
this.tilesInView = [];
Expand Down Expand Up @@ -539,6 +540,8 @@ export class CanvasMap extends BaseElement {
}
}
}

this.ctx.globalAlpha = 1;
}

showPlane(plane) {
Expand Down Expand Up @@ -727,11 +730,15 @@ export class CanvasMap extends BaseElement {

let newZoom;
if (options.zoom === undefined) {
// mouse zoom
// Calculate a zoom change that keeps this.tileSize * zoom an integer value.
// We don't want the canvas to have a zoom in the transform that makes the map tiles
// a non integer size or it will cause black border to show around them.
const targetTileSize = this.tileSize * options.delta;
const delta = Math.round(targetTileSize) / this.tileSize;
if (options.delta > 0) {
newZoom = Math.min(Math.max(Math.round(this.camera.zoom.target) + 1, this.camera.minZoom), this.camera.maxZoom);
newZoom = Math.min(Math.max(this.camera.zoom.target + delta, this.camera.minZoom), this.camera.maxZoom);
} else {
newZoom = Math.min(Math.max(Math.round(this.camera.zoom.target) - 1, this.camera.minZoom), this.camera.maxZoom);
newZoom = Math.min(Math.max(this.camera.zoom.target + delta, this.camera.minZoom), this.camera.maxZoom);
}
} else {
// touch zoom
Expand Down

0 comments on commit 27e1cb4

Please sign in to comment.