Skip to main content

nil_core/world/infrastructure/
mod.rs

1// Copyright (C) Call of Nil contributors
2// SPDX-License-Identifier: AGPL-3.0-only
3
4mod building;
5mod storage;
6
7use crate::city::City;
8use crate::continent::ContinentKey;
9use crate::error::Result;
10use crate::infrastructure::Infrastructure;
11use crate::world::World;
12
13impl World {
14  #[inline]
15  pub fn infrastructure(&self, key: impl ContinentKey) -> Result<&Infrastructure> {
16    self.city(key).map(City::infrastructure)
17  }
18}