Skip to content

Commit

Permalink
Make manifest title optional
Browse files Browse the repository at this point in the history
  • Loading branch information
Raicuparta committed Jun 16, 2024
1 parent ba75d85 commit 3805280
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion backend/src/mod_loaders/mod_loader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ pub trait ModLoaderActions {
fs::write(
local_mod::get_manifest_path(&target_path),
serde_json::to_string_pretty(&mod_manifest::Manifest {
title: remote_mod.data.title.clone(),
title: Some(remote_mod.data.title.clone()),
version: latest_version.id.clone(),
runnable: latest_version.runnable.clone(),
engine: remote_mod.common.engine,
Expand Down
8 changes: 6 additions & 2 deletions backend/src/mod_manifest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use crate::{
};

serializable_struct!(Manifest {
pub title: String,
pub title: Option<String>,
pub version: String,
pub runnable: Option<RunnableModData>,
pub engine: Option<EngineBrand>,
Expand All @@ -34,7 +34,11 @@ pub fn get(path: &Path) -> Option<Manifest> {
{
Ok(manifest) => Some(manifest),
Err(error) => {
error!("Error getting manifest: {error}");
error!(
"Error getting manifest in path '{}': {}",
path.display(),
error
);
None
}
}
Expand Down
2 changes: 1 addition & 1 deletion frontend/api/bindings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ export type GameEngine = { brand: EngineBrand; version: EngineVersion | null }
export type ModDownload = { id: string; url: string; root: string | null; runnable: RunnableModData | null }
export type OwnedGame = { id: string; provider: ProviderId; name: string; osList: OperatingSystem[]; releaseDate: BigInt | null; thumbnailUrl: string | null; gameMode: GameMode | null; providerCommands: { [key: string]: ProviderCommand } }
export type AppEvent = "SyncInstalledGames" | "SyncOwnedGames" | "SyncRemoteGames" | "SyncModLoaders" | "SyncLocalMods" | "SyncRemoteMods" | "ExecutedProviderCommand" | "GameAdded" | "GameRemoved" | "Error"
export type Manifest = { title: string; version: string; runnable: RunnableModData | null; engine: EngineBrand | null; engineVersionRange: EngineVersionRange | null; unityBackend: UnityScriptingBackend | null }
export type Manifest = { title: string | null; version: string; runnable: RunnableModData | null; engine: EngineBrand | null; engineVersionRange: EngineVersionRange | null; unityBackend: UnityScriptingBackend | null }
export type LocalMod = { data: LocalModData; common: CommonModData }
export type InstalledGame = { id: string; name: string; provider: ProviderId; executable: GameExecutable; installedModVersions: { [key: string]: string }; discriminator: string | null; thumbnailUrl: string | null; ownedGameId: string | null; startCommand: ProviderCommand | null }
export type RemoteGame = { id: string; engine: GameEngine | null; skipCache: boolean }
Expand Down

0 comments on commit 3805280

Please sign in to comment.