src/main.rs 2 K · 85 lines · raw · history

1 mod actions;
2 mod animals;
3 mod building;
4 mod camera;
5 mod climate;
6 mod colonist;
7 mod designations;
8 mod economy;
9 mod family;
10 mod farming;
11 mod food;
12 mod items;
13 mod jobs;
14 mod light;
15 mod mood;
16 mod needs;
17 mod noise;
18 mod panel;
19 mod pathfinding;
20 mod paths;
21 mod plants;
22 mod population;
23 mod rng;
24 mod save;
25 mod selection;
26 mod sim;
27 mod structures;
28 mod tilemap;
29 mod ui;
30 mod world;
31 mod worldgen;
32 mod zones;
33
34 use bevy::prelude::*;
35
36 fn main() {
37 App::new()
38 .add_plugins(
39 DefaultPlugins
40 .set(ImagePlugin::default_nearest())
41 .set(WindowPlugin {
42 primary_window: Some(Window {
43 title: "Simulator".into(),
44 canvas: Some("#bevy".into()),
45 fit_canvas_to_parent: true,
46 ..default()
47 }),
48 ..default()
49 }),
50 )
51 .insert_resource(ClearColor(Color::srgb(0.08, 0.08, 0.1)))
52 .add_plugins((
53 actions::ActionsPlugin,
54 sim::SimPlugin,
55 worldgen::WorldGenPlugin,
56 tilemap::TilemapPlugin,
57 camera::CameraPlugin,
58 colonist::ColonistPlugin,
59 items::ItemsPlugin,
60 jobs::JobsPlugin,
61 light::LightPlugin,
62 structures::StructuresPlugin,
63 building::BuildingPlugin,
64 needs::NeedsPlugin,
65 ))
66 .add_plugins((
67 food::FoodPlugin,
68 animals::AnimalsPlugin,
69 farming::FarmingPlugin,
70 paths::PathsPlugin,
71 economy::EconomyPlugin,
72 population::PopulationPlugin,
73 family::FamilyPlugin,
74 designations::DesignationsPlugin,
75 mood::MoodPlugin,
76 panel::PanelPlugin,
77 plants::PlantsPlugin,
78 climate::ClimatePlugin,
79 selection::SelectionPlugin,
80 zones::ZonesPlugin,
81 ui::HudPlugin,
82 ))
83 .add_plugins(save::SavePlugin)
84 .run();
85 }