mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Address MR 2301 review comments.
- Replace tabs with spaces in map-related i18n. - Use `retain` in `remove_unloaded_chunks`.
This commit is contained in:
parent
e509a4207b
commit
6d3dcc3835
@ -13,8 +13,8 @@
|
||||
"hud.map.dungeons": "Dungeons",
|
||||
"hud.map.caves": "Caves",
|
||||
"hud.map.cave": "Cave",
|
||||
"hud.map.peaks": "Mountains",
|
||||
"hud.map.voxel_map": "Voxel map",
|
||||
"hud.map.peaks": "Mountains",
|
||||
"hud.map.voxel_map": "Voxel map",
|
||||
"hud.map.trees": "Giant Trees",
|
||||
"hud.map.tree": "Giant Tree",
|
||||
"hud.map.town": "Town",
|
||||
|
@ -210,15 +210,8 @@ impl VoxelMinimap {
|
||||
}
|
||||
|
||||
fn remove_unloaded_chunks(&mut self, terrain: &TerrainGrid) {
|
||||
let mut removals = Vec::new();
|
||||
for key in self.chunk_minimaps.keys() {
|
||||
if terrain.get_key(*key).is_none() {
|
||||
removals.push(*key);
|
||||
}
|
||||
}
|
||||
for key in removals.into_iter() {
|
||||
self.chunk_minimaps.remove(&key);
|
||||
}
|
||||
self.chunk_minimaps
|
||||
.retain(|key, _| terrain.get_key(*key).is_some());
|
||||
}
|
||||
|
||||
pub fn maintain(&mut self, client: &Client, ui: &mut Ui) {
|
||||
|
Loading…
Reference in New Issue
Block a user