-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor to reduce conditional code.
Move most of the conditional compilation code to helper/extension methods.
- Loading branch information
1 parent
ec7e8c4
commit 7752ed2
Showing
9 changed files
with
593 additions
and
415 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
using Steamworks; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
using VRage.GameServices; | ||
|
||
namespace Phoenix.WorkshopTool.Extensions | ||
{ | ||
static class GameServiceExtensions | ||
{ | ||
public static bool GetRemoteStorageQuota(this IMyGameService service, out ulong totalBytes, out ulong availableBytes) | ||
{ | ||
return SteamRemoteStorage.GetQuota(out totalBytes, out availableBytes); | ||
} | ||
|
||
public static int GetRemoteStorageFileCount(this IMyGameService service) | ||
{ | ||
return SteamRemoteStorage.GetFileCount(); | ||
} | ||
|
||
public static string GetRemoteStorageFileNameAndSize(this IMyGameService service, int fileIndex, out int fileSizeInBytes) | ||
{ | ||
return SteamRemoteStorage.GetFileNameAndSize(fileIndex, out fileSizeInBytes); | ||
} | ||
|
||
public static bool IsRemoteStorageFilePersisted(this IMyGameService service, string file) | ||
{ | ||
return SteamRemoteStorage.FilePersisted(file); | ||
} | ||
|
||
public static bool RemoteStorageFileForget(this IMyGameService service, string file) | ||
{ | ||
return SteamRemoteStorage.FileForget(file); | ||
} | ||
|
||
public static bool DeleteFromCloud(this IMyGameService service, string fileName) | ||
{ | ||
return SteamRemoteStorage.FileDelete(fileName); | ||
} | ||
} | ||
} |
Oops, something went wrong.