Sync source to CNB / Sync Git ref (push) Has been cancelled
- local_settings_editor.rs:单实例(未同步)游戏设置的读取/预览/保存 - game_options/mod.rs 补声明与 re-export - api/instance/mod.rs 补 game_options 的公开导出(get_local_game_options_config 等)
176 lines
7.5 KiB
Rust
176 lines
7.5 KiB
Rust
//! Theseus instance management interface
|
|
|
|
mod backup;
|
|
mod content;
|
|
mod core_components;
|
|
mod export_mrpack;
|
|
mod get;
|
|
mod home;
|
|
mod install;
|
|
mod lifecycle;
|
|
mod mcarchive;
|
|
mod paths;
|
|
mod planet_minecraft;
|
|
mod projects;
|
|
mod run;
|
|
mod screenshot_groups;
|
|
mod screenshots;
|
|
pub(crate) mod synced_options;
|
|
mod upgrade;
|
|
pub(crate) mod synced_packs {
|
|
pub(crate) use super::synced_packs_axolotl::{
|
|
capture_resource_pack_selection_change, detach,
|
|
prepare_instance_update, reconcile, seed_from_instance,
|
|
};
|
|
}
|
|
mod synced_packs_axolotl;
|
|
pub(crate) mod synced_servers;
|
|
|
|
pub use self::backup::{
|
|
BackupDeleteSummary, BackupExclusion, BackupExclusionKind, BackupOperation,
|
|
BackupOperationState, BackupOperationType, BackupRepositoryStatus,
|
|
BackupRestorePreview, BackupSnapshot, InstanceBackupConfig,
|
|
InstanceBackupEligibility, cancel_backup,
|
|
delete_snapshot as delete_backup_snapshot, disable as disable_backups,
|
|
enable as enable_backups,
|
|
exclusion_from_absolute_path as get_backup_exclusion_from_path,
|
|
has_active_operations as has_active_backup_operations,
|
|
has_active_repository_move as has_active_backup_repository_move,
|
|
instance_config as get_backup_config,
|
|
instance_delete_summary as get_backup_delete_summary,
|
|
interrupt_active_operations as interrupt_active_backup_operations,
|
|
list_operations as list_backup_operations,
|
|
list_snapshots as list_backup_snapshots,
|
|
maintain_repository as maintain_backup_repository,
|
|
repository_status as get_backup_repository_status, restore_snapshot,
|
|
start_repository_move as move_backup_repository,
|
|
start_restore_preview as get_backup_restore_preview,
|
|
start_snapshot as start_backup_snapshot,
|
|
update_exclusions as update_backup_exclusions,
|
|
};
|
|
pub(crate) use self::backup::{
|
|
begin_instance_deletion, cancel_instance_deletion, delete_instance_backups,
|
|
ensure_backup_eligible_edit, has_active_instance_operation,
|
|
lock_instance_maintenance, move_default_repository_for_launcher_directory,
|
|
};
|
|
pub use self::content::{
|
|
apply_content_update_plan, get_content_items, get_content_items_by_paths,
|
|
get_content_snapshot, get_dependencies_as_content_items,
|
|
get_install_candidates, get_installed_project_ids,
|
|
get_linked_modpack_content, get_linked_modpack_info, get_projects,
|
|
list_content_sets, plan_content_updates, refresh_content,
|
|
sync_content_files,
|
|
};
|
|
pub(crate) use self::core_components::assemble_for_launch;
|
|
pub use self::core_components::{
|
|
McArchiveCoreInstallResult, add_core_jar_mod, import_mcarchive_modloader,
|
|
install_mcarchive_modloader, list_core_components, move_core_component,
|
|
preview_core_jar, remove_core_component, replace_core_jar,
|
|
restore_core_component, set_core_component_enabled,
|
|
};
|
|
pub use self::export_mrpack::{
|
|
create_mrpack_json, export_mrpack, get_pack_export_candidates,
|
|
};
|
|
pub use self::get::{get, get_many, list};
|
|
pub use self::home::{
|
|
get_daily_playtime, get_daily_playtime_details, set_pinned,
|
|
};
|
|
pub use self::install::get_optimal_jre_key;
|
|
pub(crate) use self::lifecycle::create;
|
|
pub use self::lifecycle::{
|
|
cache_icon, create_with_direct_link, edit, edit_icon, remove,
|
|
sync_direct_links,
|
|
};
|
|
pub use self::mcarchive::{
|
|
McArchiveContentInstallRequest, McArchiveContentInstallResult,
|
|
import_mcarchive_content, install_mcarchive_content,
|
|
};
|
|
pub use self::paths::{get_full_path, get_mod_full_path};
|
|
pub use self::planet_minecraft::{
|
|
PlanetMinecraftContentInstallRequest, PlanetMinecraftContentInstallResult,
|
|
import_planet_minecraft_content, install_planet_minecraft_content,
|
|
};
|
|
pub(crate) use self::projects::emit_content_changed;
|
|
pub use self::projects::{
|
|
ContentToggleResult, InstallProjectWithDependenciesRequest,
|
|
add_project_from_path, add_project_from_version, import_world_save,
|
|
install_datapack_bytes_to_world, install_datapack_to_world,
|
|
install_project_with_dependencies, preview_project_with_dependencies,
|
|
preview_project_with_dependencies_for_target, queue_curseforge_content,
|
|
queue_curseforge_world, queue_project_with_dependencies,
|
|
remove_content_entry, remove_project, repair_managed_modrinth,
|
|
restore_pack_member_default, rollback_project,
|
|
switch_content_entry_version, switch_project_version_with_dependencies,
|
|
toggle_content_entries, toggle_content_entry, toggle_disable_project,
|
|
update_all_projects, update_content_entry, update_managed_modrinth_version,
|
|
update_project,
|
|
};
|
|
pub use self::run::{
|
|
GcLaunchIntent, GcLaunchReport, QuickPlayType, kill, run,
|
|
run_with_extra_launch_args, run_with_extra_launch_args_with_gc,
|
|
};
|
|
pub use self::screenshot_groups::{
|
|
ScreenshotGroup, ScreenshotGroupImport, ScreenshotGroupMembershipUpdate,
|
|
create_screenshot_group, delete_screenshot_group, import_screenshot_groups,
|
|
list_screenshot_groups, rename_screenshot_group,
|
|
set_screenshot_group_memberships,
|
|
};
|
|
#[allow(unused_imports)]
|
|
pub(crate) use self::screenshots::reconcile_screenshots;
|
|
pub use self::screenshots::{
|
|
InstanceScreenshot, ScreenshotEditSaveMode, ScreenshotKey,
|
|
delete_screenshots, export_screenshots, get_screenshot_path,
|
|
list_all_screenshots, list_screenshots, list_synced_screenshots,
|
|
move_screenshots, save_edited_screenshot,
|
|
};
|
|
pub use self::synced_options::game_options::{
|
|
GameOptionsSourceCandidate, GameSettingLocaleLabels,
|
|
GameSettingsEditorState, SaveGameSettingsResult, UpdateGameSettingsRequest,
|
|
get_config as get_synced_game_options_config,
|
|
get_game_setting_locale_labels,
|
|
get_local_config as get_local_game_options_config,
|
|
list_sync_sources as list_game_options_sync_sources,
|
|
preview_changes as preview_synced_game_option_changes,
|
|
preview_local_changes as preview_local_game_option_changes,
|
|
save_changes as save_synced_game_option_changes,
|
|
save_local_changes as save_local_game_option_changes,
|
|
};
|
|
pub(crate) use self::synced_options::game_options::{
|
|
apply_launcher_overrides as apply_game_options_launcher_overrides,
|
|
sync_before_launch as sync_game_options_before_launch,
|
|
};
|
|
pub use self::synced_options::{
|
|
GlobalSyncedOptions, SyncedOptionCapability, SyncedOptionJoinAction,
|
|
SyncedOptionJoinPreview, SyncedOptionJoinResolution, SyncedOptionsOverview,
|
|
get_capabilities as get_synced_option_capabilities,
|
|
get_command_history as get_synced_command_history,
|
|
get_global_options as get_global_synced_options,
|
|
get_initialized_options as get_initialized_synced_options,
|
|
get_instance_option_join_preview as get_synced_option_join_preview,
|
|
get_overview as get_synced_options_overview,
|
|
set_command_history as set_synced_command_history,
|
|
set_global_option as set_global_synced_option,
|
|
set_instance_option as set_instance_synced_option,
|
|
};
|
|
pub(crate) use self::synced_options::{
|
|
reconcile_changed_file as reconcile_synced_option_file,
|
|
remove_generated_instance_files,
|
|
};
|
|
pub use self::synced_packs_axolotl::{
|
|
PackSyncPreview, PackSyncTarget, desync_pack, get_pack_sync_preview,
|
|
list_synced_packs, remove_synced_pack, set_synced_pack_enabled, sync_pack,
|
|
upload_synced_pack,
|
|
};
|
|
pub use self::synced_servers::{
|
|
DesyncServerMode, ServerSource, SyncedServer, desync_server,
|
|
list_synced_servers, remove_synced_server, update_synced_server,
|
|
};
|
|
pub use self::upgrade::{
|
|
dismiss_instance_post_upgrade_notice, execute_instance_upgrade,
|
|
get_instance_post_upgrade_notice, get_instance_upgrade_plan,
|
|
plan_instance_upgrade, reset_instance_upgrade_resolution,
|
|
resolve_custom_instance_upgrade_solution, select_instance_upgrade_solution,
|
|
update_instance_upgrade_resolution, update_instance_upgrade_resolutions,
|
|
};
|
|
pub use crate::state::{DailyPlaytime, DailyPlaytimeEntry};
|