nil-core 0.5.6

Multiplayer strategy game
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// Copyright (C) Call of Nil contributors
// SPDX-License-Identifier: AGPL-3.0-only

mod building;
mod storage;

use crate::city::City;
use crate::continent::ContinentKey;
use crate::error::Result;
use crate::infrastructure::Infrastructure;
use crate::world::World;

impl World {
  #[inline]
  pub fn infrastructure(&self, key: impl ContinentKey) -> Result<&Infrastructure> {
    self.city(key).map(City::infrastructure)
  }
}