You've already forked AstralRinth
forked from didirus/AstralRinth
Updating + Profile Repairs + Performance Improvements (#97)
* repairing * Main framework for updating * add jsconfig * more work * Improve performance * Finish updating * run lint
This commit is contained in:
@@ -32,6 +32,8 @@ async fn main() -> theseus::Result<()> {
|
||||
|
||||
// Initialize state
|
||||
let st = State::get().await?;
|
||||
State::update();
|
||||
|
||||
st.settings.write().await.max_concurrent_downloads = 5;
|
||||
st.settings.write().await.hooks.post_exit =
|
||||
Some("echo This is after Minecraft runs- global setting!".to_string());
|
||||
@@ -61,26 +63,30 @@ async fn main() -> theseus::Result<()> {
|
||||
Some(loader_version),
|
||||
None,
|
||||
None,
|
||||
None,
|
||||
)
|
||||
.await?;
|
||||
|
||||
println!("Adding sodium");
|
||||
let sodium_path = profile::add_project_from_version(
|
||||
&profile_path,
|
||||
"rAfhHfow".to_string(),
|
||||
)
|
||||
.await?;
|
||||
// let mut value = list().await?;
|
||||
// let profile_path = value.iter().next().map(|x| x.0).unwrap();
|
||||
|
||||
let mod_menu_path = profile::add_project_from_version(
|
||||
&profile_path,
|
||||
"gSoPJyVn".to_string(),
|
||||
)
|
||||
.await?;
|
||||
|
||||
println!("Disabling sodium");
|
||||
profile::toggle_disable_project(&profile_path, &sodium_path).await?;
|
||||
|
||||
profile::remove_project(&profile_path, &mod_menu_path).await?;
|
||||
// println!("Adding sodium");
|
||||
// let sodium_path = profile::add_project_from_version(
|
||||
// &profile_path,
|
||||
// "rAfhHfow".to_string(),
|
||||
// )
|
||||
// .await?;
|
||||
//
|
||||
// let mod_menu_path = profile::add_project_from_version(
|
||||
// &profile_path,
|
||||
// "gSoPJyVn".to_string(),
|
||||
// )
|
||||
// .await?;
|
||||
//
|
||||
// println!("Disabling sodium");
|
||||
// profile::toggle_disable_project(&profile_path, &sodium_path).await?;
|
||||
//
|
||||
// profile::remove_project(&profile_path, &mod_menu_path).await?;
|
||||
// let profile_path =
|
||||
// pack::install_pack_from_version_id("KxUUUFh5".to_string())
|
||||
// .await
|
||||
@@ -102,7 +108,7 @@ async fn main() -> theseus::Result<()> {
|
||||
State::sync().await?;
|
||||
|
||||
// Attempt to run game
|
||||
if auth::users().await?.len() == 0 {
|
||||
if auth::users().await?.is_empty() {
|
||||
println!("No users found, authenticating.");
|
||||
authenticate_run().await?; // could take credentials from here direct, but also deposited in state users
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user