Skip to content

Class: DewSave ​

  • Namespace: Global
  • Assembly: Dew.Core.dll
csharp
public static class DewSave

Fields ​

NameDeclarationDescription
itemspublic static DewItemsData items
onSaveEndedpublic static SafeAction onSaveEnded
onSaveStartedpublic static SafeAction onSaveStarted
onSettingsChangedpublic static SafeAction onSettingsChanged
platformSettingspublic static DewPlatformSettings platformSettings
profileContinuepublic static DewProfileContinue profileContinue
profileMainpublic static DewProfile profileMain
profileStatspublic static DewProfileStats profileStats

Properties ​

NameDeclarationDescription
profileContinuePathpublic static string profileContinuePath { get; }
profileMainPathpublic static string profileMainPath { get; }
profileStatsPathpublic static string profileStatsPath { get; }
SavePrefixpublic static string SavePrefix { get; }

Methods ​

AddMissingServerGeneratedItemsToProfile(DewProfile) ​

csharp
public static void AddMissingServerGeneratedItemsToProfile(DewProfile p)

Parameters:

NameTypeDescription
pDewProfile

AddServerGeneratedItem(DecryptedItemData) ​

csharp
public static void AddServerGeneratedItem(DecryptedItemData item)

Parameters:

NameTypeDescription
itemDecryptedItemData

ApplyCultureSettings() ​

csharp
public static void ApplyCultureSettings()

ApplySettings() ​

Apply current profile settings / platform settings to the game.

csharp
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.AfterSceneLoad)]
public static void ApplySettings()

ClearItemsFromItemStorage() ​

Clear all items from item-storage

csharp
public static void ClearItemsFromItemStorage()

ConsumeGameResult(DewGameResult, ref LastGamePlayReward) ​

csharp
public static void ConsumeGameResult(DewGameResult result, ref LastGamePlayReward rewardSummary)

Parameters:

NameTypeDescription
resultDewGameResult
rewardSummaryLastGamePlayReward

ConvertProfile(string) ​

Create a new converted profile of different edition to make it compatible with current version.Previous profile will be deleted.

csharp
public static void ConvertProfile(string path)

Parameters:

NameTypeDescription
pathstring

CreateProfile(string) ​

Create and use new profile.

csharp
public static void CreateProfile(string name)

Parameters:

NameTypeDescription
namestring

CreateSubProfilesIfNonExistent(string) ​

csharp
public static void CreateSubProfilesIfNonExistent(string mainPath)

Parameters:

NameTypeDescription
mainPathstring

CreateZipWithJsonFiles(string, string) ​

csharp
public static void CreateZipWithJsonFiles(string sourceDirectory, string zipFilePath)

Parameters:

NameTypeDescription
sourceDirectorystring
zipFilePathstring

DeleteProfile(string) ​

csharp
public static void DeleteProfile(string path)

Parameters:

NameTypeDescription
pathstring

Exists(string) ​

csharp
public static bool Exists(string path)

Parameters:

NameTypeDescription
pathstring

Returns: bool

GetNormalProfiles() ​

csharp
public static List<DewProfileItem> GetNormalProfiles()

Returns: System.Collections.Generic.List&lt;T&gt;&lt;DewProfileItem&gt;

GetPlatformSettingsFileName() ​

csharp
public static string GetPlatformSettingsFileName()

Returns: string

GetProfileMainFileName(string) ​

csharp
public static string GetProfileMainFileName(string guid)

Parameters:

NameTypeDescription
guidstring

Returns: string

GetProfiles() ​

csharp
public static List<DewProfileItem> GetProfiles()

Returns: System.Collections.Generic.List&lt;T&gt;&lt;DewProfileItem&gt;

LoadPlatformSettings() ​

Loads platform settings. Returns true iif the operation succeeds.

csharp
public static bool LoadPlatformSettings()

Returns: bool

LoadProfile() ​

Load saved user profile of appropriate index. Can load transient profile. Returns true if succeeds.

csharp
public static bool LoadProfile()

Returns: bool

LoadProfile(string) ​

Loads saved user profile. Returns true if succeeds.

csharp
public static bool LoadProfile(string path)

Parameters:

NameTypeDescription
pathstring

Returns: bool

ResetPlatformSettings() ​

csharp
public static void ResetPlatformSettings()

SaveItems() ​

csharp
public static void SaveItems()

SavePlatformSettings() ​

csharp
public static void SavePlatformSettings()

SaveProfileAll(bool) ​

csharp
public static void SaveProfileAll(bool immediate = false)

Parameters:

NameTypeDescription
immediatebool

SaveProfileContinue(bool) ​

csharp
public static void SaveProfileContinue(bool immediate = false)

Parameters:

NameTypeDescription
immediatebool

SaveProfileMain(bool) ​

csharp
public static void SaveProfileMain(bool immediate = false)

Parameters:

NameTypeDescription
immediatebool

SaveProfileStats(bool) ​

csharp
public static void SaveProfileStats(bool immediate = false)

Parameters:

NameTypeDescription
immediatebool

SetShadowQuality(QualityOff4Levels) ​

csharp
public static void SetShadowQuality(QualityOff4Levels q)

Parameters:

NameTypeDescription
qQualityOff4Levels

ShowSaveLoadErrorAndExit() ​

csharp
public static void ShowSaveLoadErrorAndExit()

SyncAchievements() ​

csharp
public static void SyncAchievements()

Maintained by the Shape of Dreams Modding Community