Skip to content

Commit

Permalink
Neoforge support (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
Geometrically committed Aug 21, 2023
1 parent 10e7b66 commit 2fa8371
Show file tree
Hide file tree
Showing 4 changed files with 486 additions and 0 deletions.
2 changes: 2 additions & 0 deletions daedalus/src/modded.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ pub const CURRENT_FABRIC_FORMAT_VERSION: usize = 0;
pub const CURRENT_FORGE_FORMAT_VERSION: usize = 0;
/// The latest version of the format the quilt model structs deserialize to
pub const CURRENT_QUILT_FORMAT_VERSION: usize = 0;
/// The latest version of the format the neoforge model structs deserialize to
pub const CURRENT_NEOFORGE_FORMAT_VERSION: usize = 0;

/// The dummy replace string library names, inheritsFrom, and version names should be replaced with
pub const DUMMY_REPLACE_STRING: &str = "${modrinth.gameVersion}";
Expand Down
1 change: 1 addition & 0 deletions daedalus_client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ log = "0.4.17"
env_logger= "0.10.0"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
serde-xml-rs = "0.6.0"
lazy_static = "1.4.0"
thiserror = "1.0"
reqwest = "0.11.13"
Expand Down
13 changes: 13 additions & 0 deletions daedalus_client/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ use tokio::sync::Semaphore;
mod fabric;
mod forge;
mod minecraft;
mod neo;
mod quilt;

#[derive(thiserror::Error, Debug)]
Expand All @@ -17,6 +18,8 @@ pub enum Error {
DaedalusError(#[from] daedalus::Error),
#[error("Error while deserializing JSON")]
SerdeError(#[from] serde_json::Error),
#[error("Error while deserializing XML")]
XMLError(#[from] serde_xml_rs::Error),
#[error("Unable to fetch {item}")]
FetchError { inner: reqwest::Error, item: String },
#[error("Error while managing asynchronous tasks")]
Expand Down Expand Up @@ -98,6 +101,16 @@ async fn main() {
Ok(..) => {}
Err(err) => error!("{:?}", err),
};
match neo::retrieve_data(
&manifest,
&mut uploaded_files,
semaphore.clone(),
)
.await
{
Ok(..) => {}
Err(err) => error!("{:?}", err),
};
}
}
}
Expand Down
Loading

0 comments on commit 2fa8371

Please sign in to comment.