-
Notifications
You must be signed in to change notification settings - Fork 1
/
extract-data.diff
34 lines (34 loc) · 3.29 KB
/
extract-data.diff
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
class SaveManager {
- private ES3Settings m_ES3Settings;
+ public ES3Settings m_ES3Settings;
}
=================================================
+ using System.Linq;
class IDManager {
+ private void OnEnable() {
+ Debug.Log("IDManager OnEnable");
+ ES3.Save<List<ProductSO>>("products", this.m_Products, "game-data.dat", Singleton<SaveManager>.Instance.m_ES3Settings);
+ ES3.Save<List<ProductLicenseSO>>("licenses", this.m_ProductLicenses, "game-data.dat", Singleton<SaveManager>.Instance.m_ES3Settings);
+ ES3.Save<List<BoxSO>>("boxes", this.m_Boxes, "game-data.dat", Singleton<SaveManager>.Instance.m_ES3Settings);
+ ES3.Save<List<CashierSO>>("cashiers", this.m_Cashiers, "game-data.dat", Singleton<SaveManager>.Instance.m_ES3Settings);
+ ES3.Save<Dictionary<String, BoxSize>>("boxsize-enum", Enum.GetValues(typeof(BoxSize)).Cast<BoxSize>().ToDictionary(t => t.ToString(), t => t), "game-data.dat", Singleton<SaveManager>.Instance.m_ES3Settings);
+ ES3.Save<Dictionary<String, PlayerPaymentType>>("playerpaymenttype-enum", Enum.GetValues(typeof(PlayerPaymentType)).Cast<PlayerPaymentType>().ToDictionary(t => t.ToString(), t => t), "game-data.dat", Singleton<SaveManager>.Instance.m_ES3Settings);
+ ES3.Save<Dictionary<String, DisplayType>>("displaytype-enum", Enum.GetValues(typeof(DisplayType)).Cast<DisplayType>().ToDictionary(t => t.ToString(), t => t), "game-data.dat", Singleton<SaveManager>.Instance.m_ES3Settings);
+ ES3.Save<Dictionary<String, ProductSO.ProductCategory>>("productcategory-enum", Enum.GetValues(typeof(ProductSO.ProductCategory)).Cast<ProductSO.ProductCategory>().ToDictionary(t => t.ToString(), t => t), "game-data.dat", Singleton<SaveManager>.Instance.m_ES3Settings);
+ ES3.Save<PriceEvaluationManager>("price-curves", Singleton<PriceEvaluationManager>.Instance, "game-data.dat", Singleton<SaveManager>.Instance.m_ES3Settings);
+ ES3.StoreCachedFile("game-data.dat");
+ }
}
=================================================
+ using System.Linq;
class LocalizationManager {
+ private void OnEnable() {
+ Debug.Log("LocalizationManager OnEnable");
+ Func<LocalizationEntry, string> GetLocalizedString = e => new LocalizedStringTable(e.TableCollection).GetTable().GetEntry(e.TableEntry).GetLocalizedString();
+ ES3.Save<Dictionary<int, string>>("products-localization", this.m_LocalizedProductNames, "game-data.dat", Singleton<SaveManager>.Instance.m_ES3Settings);
+ ES3.Save<Dictionary<int, string>>("licenses-localization", this.m_LocalizedProductLicenceNames, "game-data.dat", Singleton<SaveManager>.Instance.m_ES3Settings);
+ ES3.Save<Dictionary<PlayerPaymentType, string>>("playerpaymenttype-localization", this.m_PlayerPayments.ToDictionary((PlayerPaymentTypeEntry e) => e.PaymentType, (PlayerPaymentTypeEntry e) => GetLocalizedString(e.LocalizationEntry)), "game-data.dat", Singleton<SaveManager>.Instance.m_ES3Settings);
+ ES3.Save<Dictionary<DisplayType, string>>("displaytype-localization", this.m_DisplayTypeLocalizations.ToDictionary((DisplayTypeEntry e) => e.DisplayType, (DisplayTypeEntry e) => GetLocalizedString(e.LocalizationEntry)), "game-data.dat", Singleton<SaveManager>.Instance.m_ES3Settings);
+ ES3.StoreCachedFile("game-data.dat");
+ }
}