Authored Unity primitive/object-model shim, VFX layer (control-flow-preserving, InstantVfx never invokes its action -- headless suppression), god-object stubs (GameMgr/EffectMgr/UIManager with faithfully-extracted nested enums), View/UI/Touch tree, LitJson+BetterList+Tuple copied, third-party stubs. Discovered Roslyn header-error masking: fixing class-header type errors unmasks body references, so the true copy closure is ~2570 files (was 782 under masking). Errors: masked-25720 -> 268; our shim files compile clean. Remaining: ~50 residual shim/external types, 24 NGUI UI-base overrides, static-type fixes, plus likely 1-2 more unmask waves.
91 lines
1.8 KiB
C#
91 lines
1.8 KiB
C#
using CodeStage.AntiCheat.ObscuredTypes;
|
|
using UnityEngine;
|
|
|
|
namespace Cute;
|
|
|
|
public class SavedataManager : MonoBehaviour, IManager
|
|
{
|
|
public const string RESOURCE_VERSION_KEY = "RES_VER";
|
|
|
|
public const string LANGUAGE_FIRST_SET = "LANG_FIRST_SET";
|
|
|
|
public const string LANGUAGE_KEY = "LANG_SETTING";
|
|
|
|
public const string LANGUAGE_SOUND_KEY = "LANG_SOUND_SETTING";
|
|
|
|
public const string LANGUAGE_FONT_KEY = "LANG_FONT";
|
|
|
|
public static string OMOTENASHI_COUNTRY_KEY = "OMOTE_COUNTRY";
|
|
|
|
public static string LANGUAGE_CHANGE = "LANG_CHANGE";
|
|
|
|
private void Start()
|
|
{
|
|
Toolbox.SavedataManager = this;
|
|
}
|
|
|
|
private void OnDestroy()
|
|
{
|
|
}
|
|
|
|
public void DeleteAll()
|
|
{
|
|
ObscuredPrefs.DeleteAll();
|
|
}
|
|
|
|
public void DeleteKey(string key)
|
|
{
|
|
ObscuredPrefs.DeleteKey(key);
|
|
}
|
|
|
|
public float GetFloat(string key, float defaultValue = 0f)
|
|
{
|
|
return ObscuredPrefs.GetFloat(key, defaultValue);
|
|
}
|
|
|
|
public void SetFloat(string key, float value)
|
|
{
|
|
ObscuredPrefs.SetFloat(key, value);
|
|
}
|
|
|
|
public int GetInt(string key, int defaultValue = 0)
|
|
{
|
|
return ObscuredPrefs.GetInt(key, defaultValue);
|
|
}
|
|
|
|
public void SetInt(string key, int value)
|
|
{
|
|
ObscuredPrefs.SetInt(key, value);
|
|
}
|
|
|
|
public string GetString(string key, string defaultValue = "")
|
|
{
|
|
return ObscuredPrefs.GetString(key, defaultValue);
|
|
}
|
|
|
|
public void SetString(string key, string value)
|
|
{
|
|
ObscuredPrefs.SetString(key, value);
|
|
}
|
|
|
|
public bool HasKey(string key)
|
|
{
|
|
return ObscuredPrefs.HasKey(key);
|
|
}
|
|
|
|
public void Save()
|
|
{
|
|
ObscuredPrefs.Save();
|
|
}
|
|
|
|
public void SetResourceVersion(string version)
|
|
{
|
|
SetString("RES_VER", version);
|
|
}
|
|
|
|
public string GetResourceVersion()
|
|
{
|
|
return GetString("RES_VER", "00000000");
|
|
}
|
|
}
|