Skip to content

Commit

Permalink
move descriptions to prototypes module
Browse files Browse the repository at this point in the history
  • Loading branch information
Uriopass committed Jan 11, 2024
1 parent 012be7b commit f827e00
Show file tree
Hide file tree
Showing 16 changed files with 36 additions and 12 deletions.
12 changes: 12 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ members = [
"headless",
"native_app",
"networking",
"prototypes",
]

resolver = "2"
Expand Down
3 changes: 2 additions & 1 deletion assets_gui/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ inline_tweak = "1.0.8"
egui = { workspace = true }
yakui = { git = "https://github.com/SecondHalfGames/yakui" }
goryak = { path = "../goryak" }
meshopt2 = "0.2.0"
meshopt2 = "0.2.0"
prototypes = { path = "../prototypes" }
2 changes: 1 addition & 1 deletion assets_gui/src/companies.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use common::descriptions::GoodsCompanyDescriptionJSON;
use common::saveload::Encoder;
use prototypes::GoodsCompanyDescriptionJSON;
use std::io;

pub struct Companies {
Expand Down
2 changes: 1 addition & 1 deletion assets_gui/src/yakui_gui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ use yakui::{
Constraints, CrossAxisAlignment, MainAxisAlignment, MainAxisSize, Response, Vec2,
};

use common::descriptions::{BuildingGen, CompanyKind};
use engine::meshload::CPUMesh;
use engine::wgpu::RenderPass;
use engine::{set_cursor_icon, CursorIcon, Drawable, GfxContext, InstancedMesh, Mesh, SpriteBatch};
Expand All @@ -16,6 +15,7 @@ use goryak::{
set_theme, stretch_width, surface, surface_variant, use_changed, CountGrid, Draggable,
MainAxisAlignItems, RoundRect, Theme,
};
use prototypes::{BuildingGen, CompanyKind};

use crate::companies::Companies;
use crate::lod::LodGenerateParams;
Expand Down
1 change: 0 additions & 1 deletion common/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,6 @@ where
}

mod chunkid;
pub mod descriptions;
pub mod history;
pub mod logger;
pub mod rand;
Expand Down
1 change: 1 addition & 0 deletions native_app/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ engine = { path = "../engine" }
common = { path = "../common" }
networking = { path = "../networking", optional=true }
egui-inspect = { path = "../egui-inspect" }
prototypes = { path = "../prototypes" }
egui = { workspace = true }
egui_extras = { workspace = true }
egui_plot = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion native_app/src/gui/topgui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ use crate::gui::windows::GUIWindows;
use crate::gui::{ErrorTooltip, PotentialCommands, RoadBuildResource, Tool, UiTextures};
use crate::inputmap::{InputAction, InputMap};
use crate::uiworld::{SaveLoadState, UiWorld};
use common::descriptions::BuildingGen;
use common::saveload::Encoder;
use egui::load::SizedTexture;
use egui::{
Expand All @@ -19,6 +18,7 @@ use egui::{
};
use egui_inspect::{Inspect, InspectArgs};
use geom::{Polygon, Vec2};
use prototypes::BuildingGen;
use serde::{Deserialize, Serialize};
use simulation::economy::{Government, Item, ItemRegistry, Money};
use simulation::map::{
Expand Down
11 changes: 11 additions & 0 deletions prototypes/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[package]
name = "prototypes"
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
serde = "1.0.195"
geom = { path = "../geom" }
egui-inspect = { path = "../egui-inspect" }
File renamed without changes.
1 change: 1 addition & 0 deletions simulation/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ egui-inspect = { path = "../egui-inspect"}
flat_spatial = { workspace = true, features=["serde"] }
geom = { path = "../geom" }
common = { path = "../common" }
prototypes = { path = "../prototypes" }
slotmapd = { version = "1.0", default-features = false, features = ["serde", "unstable"] }
rayon = "1.6"
profiling = { version = "1.0.5", default-features = false }
Expand Down
2 changes: 1 addition & 1 deletion simulation/src/map/map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ use crate::map::{
SubscriberChunkID, TerraformKind, UpdateType, Zone,
};
use crate::utils::time::Tick;
use common::descriptions::BuildingGen;
use geom::OBB;
use geom::{Spline3, Vec2, Vec3};
use ordered_float::OrderedFloat;
use prototypes::BuildingGen;
use serde::{Deserialize, Serialize};
use slotmapd::HopSlotMap;
use std::collections::BTreeMap;
Expand Down
2 changes: 1 addition & 1 deletion simulation/src/map/objects/building.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
use crate::map::procgen::{gen_exterior_farm, gen_exterior_house, ColoredMesh};
use crate::map::{Buildings, Environment, LanePattern, SpatialMap};
use crate::souls::goods_company::GoodsCompanyID;
use common::descriptions::BuildingGen;
use egui_inspect::debug_inspect_impl;
use geom::{Color, Polygon, Vec2, Vec3, OBB};
use prototypes::BuildingGen;
use serde::{Deserialize, Serialize};
use slotmapd::new_key_type;

Expand Down
4 changes: 1 addition & 3 deletions simulation/src/souls/goods_company.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,10 @@ use crate::utils::time::GameTime;
use crate::world::{CompanyEnt, HumanEnt, HumanID, VehicleID};
use crate::{ParCommandBuffer, SoulID};
use crate::{Simulation, World};
use common::descriptions::{
BuildingGen, CompanyKind, GoodsCompanyDescriptionJSON, ZoneDescription,
};
use common::saveload::Encoder;
use egui_inspect::Inspect;
use geom::{Transform, Vec2};
use prototypes::{BuildingGen, CompanyKind, GoodsCompanyDescriptionJSON, ZoneDescription};
use serde::{Deserialize, Serialize};
use slotmapd::{new_key_type, SlotMap};

Expand Down
2 changes: 1 addition & 1 deletion simulation/src/souls/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ use crate::souls::goods_company::{company_soul, GoodsCompany, GoodsCompanyRegist
use crate::souls::human::spawn_human;
use crate::transportation::{spawn_parked_vehicle, VehicleKind};
use crate::Simulation;
use common::descriptions::CompanyKind;
use geom::Vec3;
use prototypes::CompanyKind;
use std::collections::BTreeMap;

#[macro_use]
Expand Down
2 changes: 1 addition & 1 deletion simulation/src/world_command.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
use std::collections::BTreeMap;
use std::time::Instant;

use common::descriptions::BuildingGen;
use serde::{Deserialize, Serialize};

use geom::{vec3, Vec2, Vec3, OBB};
use prototypes::BuildingGen;
use WorldCommand::*;

use crate::economy::Government;
Expand Down

0 comments on commit f827e00

Please sign in to comment.