Skip to content

Commit

Permalink
v2023.5.12 changes
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenlucerne committed May 15, 2023
1 parent 55d7ddb commit 623745e
Show file tree
Hide file tree
Showing 256 changed files with 13,305 additions and 10,853 deletions.
228 changes: 0 additions & 228 deletions Documentation/README.md

This file was deleted.

21 changes: 21 additions & 0 deletions English.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
#
msgid ""
msgstr ""

msgid "Build Info"
msgstr ""
"Project-Id-Version: Modio\n"
"POT-Creation-Date: 2022-10-25 03:01\n"
"PO-Revision-Date: 2022-10-25 03:01\n"
Expand Down Expand Up @@ -458,6 +461,12 @@ msgstr "Queue"
msgid "Privacy Policy"
msgstr "Privacy Policy"

msgid "Connect with Epic"
msgstr "Connect with Epic"

msgid "Connect with GOG"
msgstr "Connect with GOG"

msgid "Connect with Steam"
msgstr "Connect with Steam"

Expand Down Expand Up @@ -553,3 +562,15 @@ msgstr "Failed to fetch mods"

msgid "Retry all failed fetches"
msgstr "Retry all failed fetches"

msgid "Failed to uninstall"
msgstr "Failed to uninstall"

msgid "Uninstalled the mod '{name}'"
msgstr "Uninstalled the mod '{name}'"

msgid "Failed to uninstall the mod '{name}'"
msgstr "Failed to uninstall the mod '{name}'"

msgid "Uninstall"
msgstr "Uninstall"
34 changes: 22 additions & 12 deletions Platform/Editor/ModIO.Implementation.Platform/EditorDataService.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#if UNITY_EDITOR || (MODIO_COMPILE_ALL && UNITY_EDITOR)

using System;
using System.Collections.Generic;
using System.IO;
using System.Threading.Tasks;
using UnityEngine;

Expand Down Expand Up @@ -34,9 +32,9 @@ public string RootDirectory

#region Initialization

/// <summary>Init as IUserDataService.</summary>
async Task<Result> IUserDataService.InitializeAsync(string userProfileIdentifier,
long gameId, BuildSettings settings)
/// <summary>Init as IUserDataService.</summary>
Result IUserDataService.Initialize(string userProfileIdentifier,
long gameId, BuildSettings settings)
{
rootDir =
$"{GlobalRootDirectory}/{gameId.ToString("00000")}/users/{userProfileIdentifier}";
Expand All @@ -47,8 +45,8 @@ async Task<Result> IUserDataService.InitializeAsync(string userProfileIdentifier
}

/// <summary>Init as IPersistentDataService.</summary>
async Task<Result> IPersistentDataService.InitializeAsync(long gameId,
BuildSettings settings)
Result IPersistentDataService.Initialize(long gameId,
BuildSettings settings)
{
rootDir =
$"{GlobalRootDirectory}/{gameId.ToString("00000")}/data";
Expand All @@ -59,7 +57,7 @@ async Task<Result> IPersistentDataService.InitializeAsync(long gameId,
}

/// <summary>Init as ITempDataService.</summary>
async Task<Result> ITempDataService.InitializeAsync(long gameId, BuildSettings settings)
Result ITempDataService.Initialize(long gameId, BuildSettings settings)
{
rootDir =
$"{GlobalRootDirectory}/{gameId.ToString("00000")}/temp";
Expand Down Expand Up @@ -88,13 +86,25 @@ public ModIOFileStream OpenWriteStream(string filePath, out Result result)
/// <summary>Reads an entire file asynchronously.</summary>
public async Task<ResultAnd<byte[]>> ReadFileAsync(string filePath)
{
return await SystemIOWrapper.ReadFileAsync(filePath).ConfigureAwait(false);
return await SystemIOWrapper.ReadFileAsync(filePath);
}

/// <summary>Reads an entire file asynchronously.</summary>
public ResultAnd<byte[]> ReadFile(string filePath)
{
return SystemIOWrapper.ReadFile(filePath);
}

/// <summary>Writes an entire file asynchronously.</summary>
public async Task<Result> WriteFileAsync(string filePath, byte[] data)
{
return await SystemIOWrapper.WriteFileAsync(filePath, data).ConfigureAwait(false);
return await SystemIOWrapper.WriteFileAsync(filePath, data);
}

/// <summary>Writes an entire file asynchronously.</summary>
public Result WriteFile(string filePath, byte[] data)
{
return SystemIOWrapper.WriteFile(filePath, data);
}

/// <summary>Deletes a file.</summary>
Expand Down Expand Up @@ -142,10 +152,10 @@ public ResultAnd<List<string>> ListAllFiles(string directoryPath)
}

/// <summary>Gets the size and hash of a file.</summary>
public async Task<ResultAnd<(long fileSize, string fileHash)>> GetFileSizeAndHash(
public ResultAnd<(long fileSize, string fileHash)> GetFileSizeAndHash(
string filePath)
{
return await SystemIOWrapper.GetFileSizeAndHash(filePath);
return SystemIOWrapper.GetFileSizeAndHash(filePath);
}

/// <summary>Determines whether a directory exists.</summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,30 +19,29 @@ internal static partial class PlatformConfiguration
#endif
public const bool SynchronizedDataJobs = false;

/// <summary>Creates the user data storage service.</summary>
public static async Task<ResultAnd<IUserDataService>> CreateUserDataService(
public static ResultAnd<IUserDataService> CreateUserDataService(
string userProfileIdentifier, long gameId, BuildSettings settings)
{
IUserDataService service = new EditorDataService();
Result result = await service.InitializeAsync(userProfileIdentifier, gameId, settings).ConfigureAwait(false);
Result result = service.Initialize(userProfileIdentifier, gameId, settings);
return ResultAnd.Create(result, service);
}

/// <summary>Creates the persistent data storage service.</summary>
public static async Task<ResultAnd<IPersistentDataService>> CreatePersistentDataService(
public static ResultAnd<IPersistentDataService> CreatePersistentDataService(
long gameId, BuildSettings settings)
{
IPersistentDataService service = new EditorDataService();
Result result = await service.InitializeAsync(gameId, settings).ConfigureAwait(false);
Result result = service.Initialize(gameId, settings);
return ResultAnd.Create(result, service);
}

/// <summary>Creates the temp data storage service.</summary>
public static async Task<ResultAnd<ITempDataService>> CreateTempDataService(
public static ResultAnd<ITempDataService> CreateTempDataService(
long gameId, BuildSettings settings)
{
ITempDataService service = new EditorDataService();
Result result = await service.InitializeAsync(gameId, settings).ConfigureAwait(false);
Result result = service.Initialize(gameId, settings);
return ResultAnd.Create(result, service);
}
}
Expand Down
Loading

0 comments on commit 623745e

Please sign in to comment.