From 2ef734b7c346ee7aaa55464d4137a206da42a039 Mon Sep 17 00:00:00 2001
From: TurtIeSocks <58572875+TurtIeSocks@users.noreply.github.com>
Date: Sun, 3 Jul 2022 22:40:14 -0400
Subject: [PATCH 1/2] Extra Ranges
- Adds 40m lure range
- Adds 300m gym range
Resolves #526
Resolves #499
---
public/base-locales/en.json | 4 +++-
server/src/configs/default.json | 2 ++
server/src/services/ui/clientOptions.js | 2 ++
src/components/tiles/Gym.jsx | 9 +++++++++
src/components/tiles/Pokestop.jsx | 8 ++++++++
5 files changed, 24 insertions(+), 1 deletion(-)
diff --git a/public/base-locales/en.json b/public/base-locales/en.json
index cd3acd484..8b35aeba2 100644
--- a/public/base-locales/en.json
+++ b/public/base-locales/en.json
@@ -546,5 +546,7 @@
"poi_color": "POI Color",
"quest_condition": "Quest Condition",
"always_show_labels": "Always Show Labels",
- "scan_areas_options": "Scan Areas Options"
+ "scan_areas_options": "Scan Areas Options",
+ "300m_range": "300m Range",
+ "lure_range": "Lure Range"
}
diff --git a/server/src/configs/default.json b/server/src/configs/default.json
index 718171d47..e5858484a 100644
--- a/server/src/configs/default.json
+++ b/server/src/configs/default.json
@@ -230,6 +230,7 @@
"clustering": true,
"raidTimers": false,
"interactionRanges": false,
+ "300mRange": false,
"showExBadge": false,
"showArBadge": false,
"raidLevelBadges": false,
@@ -240,6 +241,7 @@
"invasionTimers": false,
"lureTimers": false,
"interactionRanges": false,
+ "lureRange": false,
"madQuestText": false,
"hasQuestIndicator": true,
"showArBadge": false
diff --git a/server/src/services/ui/clientOptions.js b/server/src/services/ui/clientOptions.js
index 34aa9c947..b6eaad6e6 100644
--- a/server/src/services/ui/clientOptions.js
+++ b/server/src/services/ui/clientOptions.js
@@ -17,6 +17,7 @@ module.exports = function clientOptions(perms) {
clustering: { type: 'bool', perm: ['gyms', 'raids'] },
raidTimers: { type: 'bool', perm: ['raids'] },
interactionRanges: { type: 'bool', perm: ['gyms', 'raids'] },
+ "300mRange": { type: 'bool', perm: ['raids'] },
showExBadge: { type: 'bool', perm: ['gyms'] },
showArBadge: { type: 'bool', perm: ['gyms'] },
raidLevelBadges: { type: 'bool', perm: ['raids'] },
@@ -27,6 +28,7 @@ module.exports = function clientOptions(perms) {
invasionTimers: { type: 'bool', perm: ['invasions'] },
lureTimers: { type: 'bool', perm: ['lures'] },
interactionRanges: { type: 'bool', perm: ['pokestops'] },
+ lureRange: { type: 'bool', perm: ['lures'] },
hasQuestIndicator: { type: 'bool', perm: ['quests'] },
showArBadge: { type: 'bool', perm: ['pokestops'] },
},
diff --git a/src/components/tiles/Gym.jsx b/src/components/tiles/Gym.jsx
index 1f40adf18..c02d8d63c 100644
--- a/src/components/tiles/Gym.jsx
+++ b/src/components/tiles/Gym.jsx
@@ -32,6 +32,8 @@ const GymTile = ({
params,
showCircles,
setParams,
+ config,
+ zoom,
}) => {
const markerRef = useRef({})
const [done, setDone] = useState(false)
@@ -116,6 +118,13 @@ const GymTile = ({
pathOptions={{ color: getColor(item.team_id), weight: 1 }}
/>
)}
+ {userSettings['300mRange'] && zoom >= config.interactionRangeZoom && (
+
+ )}
)
)
diff --git a/src/components/tiles/Pokestop.jsx b/src/components/tiles/Pokestop.jsx
index 0130ccf20..58957ab83 100644
--- a/src/components/tiles/Pokestop.jsx
+++ b/src/components/tiles/Pokestop.jsx
@@ -21,6 +21,7 @@ const PokestopTile = ({
showCircles,
config,
setParams,
+ zoom,
}) => {
const markerRef = useRef({})
const [done, setDone] = useState(false)
@@ -107,6 +108,13 @@ const PokestopTile = ({
pathOptions={{ color: '#0DA8E7', weight: 1 }}
/>
)}
+ {userSettings.lureRange && zoom >= config.interactionRangeZoom && (
+
+ )}
)
)
From f3a6677546eea0fe25bd98bb5fd08d2caa913f6f Mon Sep 17 00:00:00 2001
From: TurtIeSocks
Date: Mon, 4 Jul 2022 02:40:40 +0000
Subject: [PATCH 2/2] Synced docker env vars with latest config
Files changed:\nM server/src/configs/custom-environment-variables.json
---
server/src/configs/custom-environment-variables.json | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/server/src/configs/custom-environment-variables.json b/server/src/configs/custom-environment-variables.json
index 0efb11b23..6648dfaa1 100644
--- a/server/src/configs/custom-environment-variables.json
+++ b/server/src/configs/custom-environment-variables.json
@@ -529,6 +529,10 @@
"__name": "CLIENT_SIDE_OPTIONS_GYMS_INTERACTION_RANGES",
"__format": "boolean"
},
+ "300mRange": {
+ "__name": "CLIENT_SIDE_OPTIONS_GYMS_300M_RANGE",
+ "__format": "boolean"
+ },
"showExBadge": {
"__name": "CLIENT_SIDE_OPTIONS_GYMS_SHOW_EX_BADGE",
"__format": "boolean"
@@ -563,6 +567,10 @@
"__name": "CLIENT_SIDE_OPTIONS_POKESTOPS_INTERACTION_RANGES",
"__format": "boolean"
},
+ "lureRange": {
+ "__name": "CLIENT_SIDE_OPTIONS_POKESTOPS_LURE_RANGE",
+ "__format": "boolean"
+ },
"madQuestText": {
"__name": "CLIENT_SIDE_OPTIONS_POKESTOPS_MAD_QUEST_TEXT",
"__format": "boolean"