-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
more complete error on texture load and move descriptions to common
- Loading branch information
Showing
18 changed files
with
204 additions
and
138 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
use geom::Vec2; | ||
use serde::{Deserialize, Serialize}; | ||
|
||
#[derive(Serialize, Deserialize)] | ||
pub struct RecipeDescription { | ||
pub consumption: Vec<(String, i32)>, | ||
pub production: Vec<(String, i32)>, | ||
pub complexity: i32, | ||
pub storage_multiplier: i32, | ||
} | ||
|
||
#[derive(Serialize, Deserialize)] | ||
pub struct BuildingGenDescription { | ||
pub kind: String, | ||
pub vertical_factor: Option<f32>, | ||
pub door_pos: Option<Vec2>, | ||
} | ||
|
||
#[derive(Serialize, Deserialize)] | ||
pub struct GoodsCompanyDescriptionJSON { | ||
pub name: String, | ||
pub bgen: BuildingGenDescription, | ||
pub kind: String, | ||
pub recipe: RecipeDescription, | ||
pub n_workers: i32, | ||
pub n_trucks: Option<u32>, | ||
pub size: f32, | ||
pub asset_location: String, | ||
pub price: i64, | ||
#[serde(default, skip_serializing_if = "Option::is_none")] | ||
pub zone: Option<Box<ZoneDescription>>, | ||
} | ||
|
||
#[derive(Debug, Serialize, Deserialize)] | ||
pub struct ZoneDescription { | ||
pub floor: String, | ||
pub filler: String, | ||
/// The price for each "production unit" | ||
pub price_per_area: i64, | ||
/// Wether the zone filler positions should be randomized | ||
#[serde(default)] | ||
pub randomize_filler: bool, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -200,6 +200,7 @@ where | |
{ | ||
} | ||
|
||
pub mod descriptions; | ||
pub mod history; | ||
pub mod logger; | ||
pub mod rand; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.