Per-map default zoom levels: HaggaBasin 0%, DeepDesert 145%

- HaggaBasin defaults to 0% zoom for full map view
- DeepDesert defaults to 145% zoom since map is much smaller
- Zoom slider min changed from 25% to 0%
- Added default_zoom to map options in build_map_options
This commit is contained in:
Reditus committed 2026-05-16 13:55:38 +01:00
1 parent f23d4aa1f5
commit b9cf227d92
3 files changed
+11 -6

No files matched your search

+5 -3
View File
@@ -73,7 +73,7 @@ DEFAULTS = {
'renewal_days_before_expiry': 30,
},
'maps': {
'default_map': 'DeepDesert',
'default_map': 'HaggaBasin',
'DeepDesert': {
'image': 'maps/Deep_Desert_Map1.jpg',
'label': 'The Deep Desert',
@@ -84,7 +84,8 @@ DEFAULTS = {
'max_y': -620340
},
'flip_y': False,
'image_size': {'width': 683, 'height': 683}
'image_size': {'width': 683, 'height': 683},
'default_zoom': 1.45
},
'HaggaBasin': {
'image': 'maps/HaggaBasin_8k.webp',
@@ -96,7 +97,8 @@ DEFAULTS = {
'max_y': 237943
},
'flip_y': False,
'image_size': {'width': 8000, 'height': 8000}
'image_size': {'width': 8000, 'height': 8000},
'default_zoom': 0
}
},
}
+1
View File
@@ -504,6 +504,7 @@ def register_routes(app, services, settings):
'image': cfg.get('image'),
'width': image_size.get('width', 1000),
'height': image_size.get('height', 1000),
'default_zoom': cfg.get('default_zoom', 0.5),
'counts': {
'players': sum(1 for p in player_locations if p.get('map') == key and p.get('in_bounds')),
'vehicles': sum(1 for v in vehicle_locations if v.get('map') == key and v.get('in_bounds')),