refactor: use canonical module paths
This commit is contained in:
1 parent
c6205a337c
commit
feeb3e6d50
21 files changed
+28
-46
No files matched your search
@@ -1,8 +1,8 @@
|
||||
// scanning and toggling instance content (mods, resource packs, shaders, worlds).
|
||||
// minecraft uses a ".disabled" suffix convention for disabled content, so this leans on that heavily.
|
||||
|
||||
mod entry;
|
||||
mod icons;
|
||||
pub mod entry;
|
||||
pub mod icons;
|
||||
pub mod manifest;
|
||||
pub mod mods;
|
||||
mod packs;
|
||||
@@ -12,8 +12,6 @@ pub mod resource_packs;
|
||||
pub mod shaders;
|
||||
pub mod worlds;
|
||||
|
||||
pub(crate) use entry::toggle_entry_path;
|
||||
pub use entry::{ContentEntry, toggle_entry};
|
||||
pub(crate) use icons::{
|
||||
IconCell, fallback_icon, fallback_icon_large, make_icon_pixels, make_icon_pixels_from_image,
|
||||
make_icon_quadrants_from_image,
|
||||
|
||||
@@ -9,8 +9,7 @@ use std::path::Path;
|
||||
|
||||
use serde::Deserialize;
|
||||
|
||||
pub use super::entry::{ContentEntry, toggle_entry};
|
||||
pub use super::icons::IconCell;
|
||||
use super::entry::ContentEntry;
|
||||
use super::icons::{fallback_icon, make_icon_pixels};
|
||||
|
||||
#[derive(Deserialize, Default)]
|
||||
|
||||
@@ -4,7 +4,8 @@ use std::path::Path;
|
||||
|
||||
use serde::Deserialize;
|
||||
|
||||
use super::{ContentEntry, fallback_icon, make_icon_pixels};
|
||||
use super::entry::ContentEntry;
|
||||
use super::{fallback_icon, make_icon_pixels};
|
||||
|
||||
#[derive(Deserialize, Default)]
|
||||
struct PackMcMeta {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
use std::path::Path;
|
||||
|
||||
use super::ContentEntry;
|
||||
use super::entry::ContentEntry;
|
||||
|
||||
pub fn scan_one_resource_pack(path: &Path, file_stem: &str, enabled: bool) -> ContentEntry {
|
||||
super::packs::scan_one_pack(path, file_stem, enabled)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
use std::path::Path;
|
||||
|
||||
use super::ContentEntry;
|
||||
use super::entry::ContentEntry;
|
||||
|
||||
pub fn scan_one_shader(path: &Path, file_stem: &str, enabled: bool) -> ContentEntry {
|
||||
super::packs::scan_one_pack(path, file_stem, enabled)
|
||||
|
||||
@@ -4,7 +4,8 @@
|
||||
|
||||
use std::path::Path;
|
||||
|
||||
use super::{ContentEntry, fallback_icon_large, make_icon_pixels};
|
||||
use super::entry::ContentEntry;
|
||||
use super::{fallback_icon_large, make_icon_pixels};
|
||||
|
||||
pub fn scan_one_world(path: &Path, file_stem: &str, enabled: bool) -> ContentEntry {
|
||||
let icon_bytes = std::fs::read(path.join("icon.png")).ok();
|
||||
|
||||
+2
-4
@@ -14,14 +14,12 @@ pub mod models;
|
||||
pub mod runtime;
|
||||
pub mod screenshots;
|
||||
|
||||
pub use logs::files as log_files;
|
||||
|
||||
pub use content::manifest::{
|
||||
ContentFileRecord, ContentKind, ContentManifest, FileFingerprint, ProviderProject, Resolution,
|
||||
};
|
||||
pub use content::{
|
||||
ContentEntry, scan_mods, scan_one_mod, scan_one_resource_pack, scan_one_shader, scan_one_world,
|
||||
scan_resource_packs, scan_shaders, scan_worlds, toggle_entry,
|
||||
scan_mods, scan_one_mod, scan_one_resource_pack, scan_one_shader, scan_one_world,
|
||||
scan_resource_packs, scan_shaders, scan_worlds,
|
||||
};
|
||||
pub use launch::LaunchError;
|
||||
pub use loader::{GameVersion, ModLoaderInstaller, VanillaInstaller, get_installer};
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
use super::*;
|
||||
use crate::instance::content::entry::{ContentEntry, toggle_entry};
|
||||
use std::path::PathBuf;
|
||||
|
||||
fn setup_mods_dir(tmp: &Path, instance: &str) -> PathBuf {
|
||||
|
||||
Reference in new issue
Block a user