Skip to content

Commit

Permalink
Show all objects now pulls in Temples if within specific areas
Browse files Browse the repository at this point in the history
  • Loading branch information
savage13 committed May 5, 2024
1 parent 033d93e commit 1be5025
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions src/components/AppMap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1503,10 +1503,22 @@ export default class AppMap extends mixins(MixinUtil) {
} else if (layer == 'Surface' || layer == 'Depths') {
let mapType = (layer == "Surface") ? 'MainField' : 'MinusField';
const quad = map.pointToMapUnit(xyz);
this.searchAddGroup(`map:"${mapType}/${quad}"`, `Map: ${layer} ${quad}`);
let query = `map:"${mapType}/${quad}"`
if (layer == 'Surface' && quad == 'A-8') { // Thunder Temple
query += " OR LargeDungeonThunder"
} else if (layer == 'Depths' && Math.abs(latlng.lat - -2800) < 350 && Math.abs(latlng.lng - 1325) < 250) {
// Box around Fire Temple as it spans two Quads
query += " OR LargeDungeonFire"
}
this.searchAddGroup(query, `Map: ${layer} ${quad}`);
} else if (layer == 'Sky') {
const regions = await MapMgr.getInstance().getRegionFromPoint(layer, xyz);
const query = regions.map(region => `map: "MainField/Sky__${region}"`).join(" OR ");
let query = regions.map(region => `map: "MainField/Sky__${region}"`).join(" OR ");
if (regions.includes("Pln_Fld_Rito_SkyField_Start_01")) { // Wind Temple
query += " OR LargeDungeonWind"
} else if (regions.includes("Pln_Fld_Zora_SkyField_Before_DungeonWay")) { // Water Temple
query += " OR LargeDungeonWater"
}
const regionsStr = regions.join(" or ");
this.searchAddGroup(query, `Map: ${regionsStr}`);
}
Expand Down

0 comments on commit 1be5025

Please sign in to comment.