nil_core/world/cheat/
mod.rs1mod behavior;
5mod capital;
6mod city;
7mod infrastructure;
8mod market;
9mod military;
10mod npc;
11mod player;
12mod resources;
13mod round;
14
15pub use behavior::get_build_steps;
16pub use capital::{get_influence, set_influence};
17pub use city::{fill_world, get_city, set_stability, spawn_city};
18pub use infrastructure::{
19 get_academy_recruit_queue,
20 get_academy_recruit_queues,
21 get_all_academy_recruit_queues,
22 get_all_prefecture_build_queues,
23 get_all_stable_recruit_queues,
24 get_infrastructure,
25 get_prefecture_build_queue,
26 get_prefecture_build_queues,
27 get_stable_recruit_queue,
28 get_stable_recruit_queues,
29 get_storage_capacity,
30 set_building_level,
31 set_max_infrastructure,
32};
33pub use market::{set_market_fee, set_market_vault_resources};
34pub use military::{
35 get_idle_armies_at,
36 get_idle_personnel_at,
37 get_maneuvers,
38 get_maneuvers_of,
39 spawn_personnel,
40};
41pub use npc::{get_ethics, set_bot_ethics, spawn_bot};
42pub use player::{get_player, get_players};
43pub use resources::{
44 get_resources,
45 set_food,
46 set_iron,
47 set_max_food,
48 set_max_iron,
49 set_max_resources,
50 set_max_silo_resources,
51 set_max_stone,
52 set_max_warehouse_resources,
53 set_max_wood,
54 set_resources,
55 set_stone,
56 set_wood,
57};
58pub use round::skip_round;
59
60#[doc(hidden)]
61#[macro_export]
62macro_rules! bail_if_cheats_are_not_allowed {
63 ($world:expr) => {
64 if !$world.config.are_cheats_allowed() {
65 use $crate::error::Error;
66 return Err(Error::CheatingNotAllowed);
67 }
68 };
69}