Skip to main content

nil_core/world/
capital.rs

1// Copyright (C) Call of Nil contributors
2// SPDX-License-Identifier: AGPL-3.0-only
3
4use crate::error::Result;
5use crate::ruler::Ruler;
6use crate::world::World;
7use tap::Pipe;
8
9impl World {
10  pub fn get_city_limit<R>(&self, ruler: R) -> Result<u32>
11  where
12    R: Into<Ruler>,
13  {
14    let ruler: Ruler = ruler.into();
15    self
16      .ruler(&ruler)?
17      .influence()
18      .city_limit()
19      .pipe(Ok)
20  }
21}