Add new screens for game management, team management, and cache handling; implement caching logic and session management

This commit is contained in:
bobbert committed 2026-04-02 22:08:07 +01:00
1 parent 8686f0e1ff
commit 17ed120ce8
70 files changed
+2172 -3892

No files matched your search

+18
View File
@@ -0,0 +1,18 @@
import * as geolib from 'geolib';
const isWithinRadius = (playerCoords, cacheCoords, radius) => {
const distance = geolib.getDistance(playerCoords, cacheCoords);
return distance <= radius;
};
const isLookingAtCache = (playerHeading, playerCoords, cacheCoords, tolerance = 20) => {
if (playerHeading === null || playerHeading === undefined) {
return false;
}
const bearingToCache = geolib.getRhumbLineBearing(playerCoords, cacheCoords);
const diff = Math.abs(bearingToCache - playerHeading);
return diff <= tolerance || diff >= 360 - tolerance;
};
export { isWithinRadius, isLookingAtCache };