Class: DewSave
- Namespace:
Global - Assembly:
Dew.Core.dll
public static class DewSaveFields
| Name | Declaration | Description |
|---|---|---|
items | public static DewItemsData items | |
onSaveEnded | public static SafeAction onSaveEnded | |
onSaveStarted | public static SafeAction onSaveStarted | |
onSettingsChanged | public static SafeAction onSettingsChanged | |
platformSettings | public static DewPlatformSettings platformSettings | |
profileContinue | public static DewProfileContinue profileContinue | |
profileMain | public static DewProfile profileMain | |
profileStats | public static DewProfileStats profileStats |
Properties
| Name | Declaration | Description |
|---|---|---|
profileContinuePath | public static string profileContinuePath { get; } | |
profileMainPath | public static string profileMainPath { get; } | |
profileStatsPath | public static string profileStatsPath { get; } | |
SavePrefix | public static string SavePrefix { get; } |
Methods
AddMissingServerGeneratedItemsToProfile(DewProfile)
public static void AddMissingServerGeneratedItemsToProfile(DewProfile p)Parameters:
| Name | Type | Description |
|---|---|---|
p | DewProfile |
AddServerGeneratedItem(DecryptedItemData)
public static void AddServerGeneratedItem(DecryptedItemData item)Parameters:
| Name | Type | Description |
|---|---|---|
item | DecryptedItemData |
ApplyCultureSettings()
public static void ApplyCultureSettings()ApplySettings()
Apply current profile settings / platform settings to the game.
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.AfterSceneLoad)]
public static void ApplySettings()ClearItemsFromItemStorage()
Clear all items from item-storage
public static void ClearItemsFromItemStorage()ConsumeGameResult(DewGameResult, ref LastGamePlayReward)
public static void ConsumeGameResult(DewGameResult result, ref LastGamePlayReward rewardSummary)Parameters:
| Name | Type | Description |
|---|---|---|
result | DewGameResult | |
rewardSummary | LastGamePlayReward |
ConvertProfile(string)
Create a new converted profile of different edition to make it compatible with current version.Previous profile will be deleted.
public static void ConvertProfile(string path)Parameters:
| Name | Type | Description |
|---|---|---|
path | string |
CreateProfile(string)
Create and use new profile.
public static void CreateProfile(string name)Parameters:
| Name | Type | Description |
|---|---|---|
name | string |
CreateSubProfilesIfNonExistent(string)
public static void CreateSubProfilesIfNonExistent(string mainPath)Parameters:
| Name | Type | Description |
|---|---|---|
mainPath | string |
CreateZipWithJsonFiles(string, string)
public static void CreateZipWithJsonFiles(string sourceDirectory, string zipFilePath)Parameters:
| Name | Type | Description |
|---|---|---|
sourceDirectory | string | |
zipFilePath | string |
DeleteProfile(string)
public static void DeleteProfile(string path)Parameters:
| Name | Type | Description |
|---|---|---|
path | string |
Exists(string)
public static bool Exists(string path)Parameters:
| Name | Type | Description |
|---|---|---|
path | string |
Returns: bool
GetNormalProfiles()
public static List<DewProfileItem> GetNormalProfiles()Returns: System.Collections.Generic.List<T><DewProfileItem>
GetPlatformSettingsFileName()
public static string GetPlatformSettingsFileName()Returns: string
GetProfileMainFileName(string)
public static string GetProfileMainFileName(string guid)Parameters:
| Name | Type | Description |
|---|---|---|
guid | string |
Returns: string
GetProfiles()
public static List<DewProfileItem> GetProfiles()Returns: System.Collections.Generic.List<T><DewProfileItem>
LoadPlatformSettings()
Loads platform settings. Returns true iif the operation succeeds.
public static bool LoadPlatformSettings()Returns: bool
LoadProfile()
Load saved user profile of appropriate index. Can load transient profile. Returns true if succeeds.
public static bool LoadProfile()Returns: bool
LoadProfile(string)
Loads saved user profile. Returns true if succeeds.
public static bool LoadProfile(string path)Parameters:
| Name | Type | Description |
|---|---|---|
path | string |
Returns: bool
ResetPlatformSettings()
public static void ResetPlatformSettings()SaveItems()
public static void SaveItems()SavePlatformSettings()
public static void SavePlatformSettings()SaveProfileAll(bool)
public static void SaveProfileAll(bool immediate = false)Parameters:
| Name | Type | Description |
|---|---|---|
immediate | bool |
SaveProfileContinue(bool)
public static void SaveProfileContinue(bool immediate = false)Parameters:
| Name | Type | Description |
|---|---|---|
immediate | bool |
SaveProfileMain(bool)
public static void SaveProfileMain(bool immediate = false)Parameters:
| Name | Type | Description |
|---|---|---|
immediate | bool |
SaveProfileStats(bool)
public static void SaveProfileStats(bool immediate = false)Parameters:
| Name | Type | Description |
|---|---|---|
immediate | bool |
SetShadowQuality(QualityOff4Levels)
public static void SetShadowQuality(QualityOff4Levels q)Parameters:
| Name | Type | Description |
|---|---|---|
q | QualityOff4Levels |
ShowSaveLoadErrorAndExit()
public static void ShowSaveLoadErrorAndExit()SyncAchievements()
public static void SyncAchievements()