Static World Gen and Display for the Overworld #5

Merged
msrd0 merged 21 commits from overworld-house-gen into main 2024-07-06 20:23:25 +00:00
Showing only changes of commit 8f800c1e91 - Show all commits

View file

@ -31,6 +31,7 @@ impl AssetsWriter {
fn new<P: AsRef<Path>>(path: P) -> Self {
let mut file = File::create(path).expect("Failed to create assets file");
writeln!(file, "// @generated").unwrap();
writeln!(file, "#![allow(dead_code)]").unwrap();
Self {
file,
root: Assets::default()
@ -80,14 +81,14 @@ impl AssetsWriter {
for asset_name in root.assets.keys() {
writeln!(
file,
"pub {indent}\t{}: comfy::TextureHandle,",
"{indent}\tpub {}: comfy::TextureHandle,",
asset_name.to_snake_case()
)?;
}
for group_name in root.groups.keys() {
writeln!(
file,
"pub {indent}\t{group_name}: &'static {group_name}::Assets,"
"{indent}\tpub {group_name}: &'static {group_name}::Assets,"
)?;
}
writeln!(file, "{indent}}}")?;