net.dreditor.ui.savingloading 0.1.6 → 0.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/.attestation.p7m +0 -0
  2. package/DREditor.UI.SavingLoading.asmdef +22 -22
  3. package/DREditor.UI.SavingLoading.asmdef.meta +7 -7
  4. package/PostSavePoint.cs +57 -57
  5. package/PostSavePoint.cs.meta +11 -11
  6. package/ReturnToMenuOnPauseMenu.cs +113 -113
  7. package/ReturnToMenuOnPauseMenu.cs.meta +11 -11
  8. package/{Samples → Samples~}/DRE_SavePoint.unity +262 -262
  9. package/{Samples → Samples~}/DRE_SavePoint.unity.meta +7 -7
  10. package/{Samples → Samples~}/Save_Point_Canvas_Shell.prefab +169 -169
  11. package/{Samples → Samples~}/Save_Point_Canvas_Shell.prefab.meta +7 -7
  12. package/{Samples → Samples~}/Save_Point_Canvas_Template.prefab +563 -563
  13. package/{Samples → Samples~}/Save_Point_Canvas_Template.prefab.meta +7 -7
  14. package/{Samples → Samples~}/Save_Point_System_Template.prefab +1434 -1434
  15. package/{Samples → Samples~}/Save_Point_System_Template.prefab.meta +7 -7
  16. package/SaveDataDisplayerBase.cs +24 -24
  17. package/SaveDataDisplayerBase.cs.meta +11 -11
  18. package/SaveDateDisplayer.cs +146 -146
  19. package/SaveDateDisplayer.cs.meta +11 -11
  20. package/SaveLoadMenu.cs +298 -298
  21. package/SaveLoadMenu.cs.meta +11 -11
  22. package/SaveLoadMenuBase.cs +122 -122
  23. package/SaveLoadMenuBase.cs.meta +11 -11
  24. package/SavePointUI.cs +239 -239
  25. package/SavePointUI.cs.meta +11 -11
  26. package/SavePointUIBase.cs +134 -134
  27. package/SavePointUIBase.cs.meta +11 -11
  28. package/SavePointUIGameState.cs +120 -120
  29. package/SavePointUIGameState.cs.meta +11 -11
  30. package/SaveSlot.cs +81 -81
  31. package/SaveSlot.cs.meta +11 -11
  32. package/SaveSlotBase.cs +99 -99
  33. package/SaveSlotBase.cs.meta +11 -11
  34. package/SaveTitleDisplayer.cs +204 -204
  35. package/SaveTitleDisplayer.cs.meta +11 -11
  36. package/package.json +46 -41
  37. package/package.json.meta +7 -7
  38. package/Samples.meta +0 -8
@@ -1,205 +1,205 @@
1
- //Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
2
- using DREditor.Progressing;
3
- using DREditor.Saving;
4
- using DREditor.States;
5
- using System.Collections.Generic;
6
- using System.Text.RegularExpressions;
7
- using TMPro;
8
- using UnityEngine;
9
-
10
- namespace DREditor.UI.SavingLoading
11
- {
12
- /// <summary>
13
- ///
14
- /// </summary>
15
- [ClassHeader(nameof(SaveDataDisplayerBase) +
16
- "\n\n")]
17
- public class SaveTitleDisplayer : SaveDataDisplayerBase
18
- {
19
- /// <summary>
20
- ///
21
- /// </summary>
22
- [Header("")]
23
- [Divider]
24
- [Tooltip("")]
25
- [SerializeField] protected ProgressionDatabase progressionDatabase = null;
26
-
27
- /// <summary>
28
- ///
29
- /// </summary>
30
- [Tooltip("")]
31
- [SerializeField] protected StateDatabase addStateDatabase = null;
32
-
33
-
34
- /// <summary>
35
- ///
36
- /// </summary>
37
- [Header("")]
38
- [Divider]
39
- [Tooltip("")]
40
- [SerializeField] protected TextMeshProUGUI title = null;
41
-
42
-
43
- /// <summary>
44
- ///
45
- /// </summary>
46
- [Header("")]
47
- [Divider]
48
- [Tooltip("")]
49
- [SerializeField] protected string titleNotFoundText = "Free Slot ";
50
-
51
- /// <summary>
52
- ///
53
- /// </summary>
54
- [Tooltip("")]
55
- [SerializeField] protected string titleFoundText = "Slot ";
56
-
57
- /// <summary>
58
- ///
59
- /// </summary>
60
- [Tooltip("")]
61
- [SerializeField] protected string scenePrefix = "GYM_";
62
-
63
- /// <summary>
64
- ///
65
- /// </summary>
66
- [Tooltip("")]
67
- [SerializeField] protected string nullLocation = "null";
68
-
69
- /// <summary>
70
- ///
71
- /// </summary>
72
- [Tooltip("")]
73
- [SerializeField] protected string slotSeparator = " : ";
74
-
75
- /// <summary>
76
- ///
77
- /// </summary>
78
- [Tooltip("")]
79
- [SerializeField] protected string additionalStatePrefix = "(";
80
-
81
- /// <summary>
82
- ///
83
- /// </summary>
84
- [Tooltip("")]
85
- [SerializeField] protected string additionalStateSuffix = ")";
86
-
87
- /// <summary>
88
- ///
89
- /// </summary>
90
- [Tooltip("")]
91
- [SerializeField] protected string regexPattern = @"([a-z])([A-Z])|([A-Z]+)([A-Z][a-z])";
92
-
93
- /// <summary>
94
- ///
95
- /// </summary>
96
- [Tooltip("")]
97
- [SerializeField] protected string regexReplacement = "$1$3 $2$4";
98
-
99
-
100
- /// <summary>
101
- ///
102
- /// </summary>
103
- [Header("")]
104
- [Divider]
105
- [Tooltip("")]
106
- [SerializeField] protected string sceneKey = "SceneName";
107
-
108
- /// <summary>
109
- ///
110
- /// </summary>
111
- [Tooltip("")]
112
- [SerializeField] protected string addedStateKey = "addedState";
113
-
114
- /// <summary>
115
- ///
116
- /// </summary>
117
- [Tooltip("")]
118
- [SerializeField] protected string locationKey = "location";
119
-
120
- /// <summary>
121
- ///
122
- /// </summary>
123
- [Tooltip("")]
124
- [SerializeField] protected string chapterKey = "chapter";
125
-
126
-
127
- /// <summary>
128
- ///
129
- /// </summary>
130
- protected Dictionary<string, object> saveDatas;
131
-
132
-
133
- /// <inheritdoc/>
134
- public override void Display(Dictionary<string, object> saveDatas, int id)
135
- {
136
- this.saveDatas = saveDatas;
137
-
138
- string title = GetChapter() + GetArea() + GetAdditionalState();
139
-
140
- this.title.text = titleFoundText + (id + 1) + slotSeparator + title;
141
-
142
- this.saveDatas = null;
143
- }
144
-
145
- /// <summary>
146
- ///
147
- /// </summary>
148
- /// <returns></returns>
149
- protected virtual string GetChapter()
150
- => progressionDatabase != null ?
151
- progressionDatabase.Chapters[saveDatas.Get<int>(chapterKey)].saveTitle + " ": "";
152
-
153
- /// <summary>
154
- ///
155
- /// </summary>
156
- /// <returns></returns>
157
- protected virtual string GetArea()
158
- {
159
- string area = saveDatas.Get<string>(sceneKey)?.Replace(scenePrefix, "");
160
-
161
- string location = saveDatas.Get<string>(locationKey);
162
-
163
- if (location != null && location == nullLocation)
164
- return "";
165
- else if (location != null && location != "")
166
- return location + " ";
167
- else
168
- return SplitCamelCase(area) + " ";
169
- }
170
-
171
- /// <summary>
172
- ///
173
- /// </summary>
174
- /// <returns></returns>
175
- protected virtual string GetAdditionalState()
176
- {
177
- if (addStateDatabase == null)
178
- return string.Empty;
179
-
180
- string added = SplitCamelCase(addStateDatabase.GetStateName(saveDatas.Get<int>(addedStateKey)).ToString());
181
-
182
- if (added != "")
183
- added = additionalStatePrefix + added + additionalStateSuffix;
184
-
185
- return added;
186
- }
187
-
188
- /// <summary>
189
- ///
190
- /// </summary>
191
- /// <param name="text"></param>
192
- /// <returns></returns>
193
- protected virtual string SplitCamelCase(string text)
194
- {
195
- if (string.IsNullOrWhiteSpace(text))
196
- return "";
197
- else
198
- return Regex.Replace(text, regexPattern, regexReplacement);
199
- }
200
-
201
-
202
- /// <inheritdoc/>
203
- public override void OnSaveNotFound(int id) => title.text = titleNotFoundText + (id + 1);
204
- }
1
+ //Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
2
+ using DREditor.Progressing;
3
+ using DREditor.Saving;
4
+ using DREditor.States;
5
+ using System.Collections.Generic;
6
+ using System.Text.RegularExpressions;
7
+ using TMPro;
8
+ using UnityEngine;
9
+
10
+ namespace DREditor.UI.SavingLoading
11
+ {
12
+ /// <summary>
13
+ ///
14
+ /// </summary>
15
+ [ClassHeader(nameof(SaveDataDisplayerBase) +
16
+ "\n\n")]
17
+ public class SaveTitleDisplayer : SaveDataDisplayerBase
18
+ {
19
+ /// <summary>
20
+ ///
21
+ /// </summary>
22
+ [Header("")]
23
+ [Divider]
24
+ [Tooltip("")]
25
+ [SerializeField] protected ProgressionDatabase progressionDatabase = null;
26
+
27
+ /// <summary>
28
+ ///
29
+ /// </summary>
30
+ [Tooltip("")]
31
+ [SerializeField] protected StateDatabase addStateDatabase = null;
32
+
33
+
34
+ /// <summary>
35
+ ///
36
+ /// </summary>
37
+ [Header("")]
38
+ [Divider]
39
+ [Tooltip("")]
40
+ [SerializeField] protected TextMeshProUGUI title = null;
41
+
42
+
43
+ /// <summary>
44
+ ///
45
+ /// </summary>
46
+ [Header("")]
47
+ [Divider]
48
+ [Tooltip("")]
49
+ [SerializeField] protected string titleNotFoundText = "Free Slot ";
50
+
51
+ /// <summary>
52
+ ///
53
+ /// </summary>
54
+ [Tooltip("")]
55
+ [SerializeField] protected string titleFoundText = "Slot ";
56
+
57
+ /// <summary>
58
+ ///
59
+ /// </summary>
60
+ [Tooltip("")]
61
+ [SerializeField] protected string scenePrefix = "GYM_";
62
+
63
+ /// <summary>
64
+ ///
65
+ /// </summary>
66
+ [Tooltip("")]
67
+ [SerializeField] protected string nullLocation = "null";
68
+
69
+ /// <summary>
70
+ ///
71
+ /// </summary>
72
+ [Tooltip("")]
73
+ [SerializeField] protected string slotSeparator = " : ";
74
+
75
+ /// <summary>
76
+ ///
77
+ /// </summary>
78
+ [Tooltip("")]
79
+ [SerializeField] protected string additionalStatePrefix = "(";
80
+
81
+ /// <summary>
82
+ ///
83
+ /// </summary>
84
+ [Tooltip("")]
85
+ [SerializeField] protected string additionalStateSuffix = ")";
86
+
87
+ /// <summary>
88
+ ///
89
+ /// </summary>
90
+ [Tooltip("")]
91
+ [SerializeField] protected string regexPattern = @"([a-z])([A-Z])|([A-Z]+)([A-Z][a-z])";
92
+
93
+ /// <summary>
94
+ ///
95
+ /// </summary>
96
+ [Tooltip("")]
97
+ [SerializeField] protected string regexReplacement = "$1$3 $2$4";
98
+
99
+
100
+ /// <summary>
101
+ ///
102
+ /// </summary>
103
+ [Header("")]
104
+ [Divider]
105
+ [Tooltip("")]
106
+ [SerializeField] protected string sceneKey = "SceneName";
107
+
108
+ /// <summary>
109
+ ///
110
+ /// </summary>
111
+ [Tooltip("")]
112
+ [SerializeField] protected string addedStateKey = "addedState";
113
+
114
+ /// <summary>
115
+ ///
116
+ /// </summary>
117
+ [Tooltip("")]
118
+ [SerializeField] protected string locationKey = "location";
119
+
120
+ /// <summary>
121
+ ///
122
+ /// </summary>
123
+ [Tooltip("")]
124
+ [SerializeField] protected string chapterKey = "chapter";
125
+
126
+
127
+ /// <summary>
128
+ ///
129
+ /// </summary>
130
+ protected Dictionary<string, object> saveDatas;
131
+
132
+
133
+ /// <inheritdoc/>
134
+ public override void Display(Dictionary<string, object> saveDatas, int id)
135
+ {
136
+ this.saveDatas = saveDatas;
137
+
138
+ string title = GetChapter() + GetArea() + GetAdditionalState();
139
+
140
+ this.title.text = titleFoundText + (id + 1) + slotSeparator + title;
141
+
142
+ this.saveDatas = null;
143
+ }
144
+
145
+ /// <summary>
146
+ ///
147
+ /// </summary>
148
+ /// <returns></returns>
149
+ protected virtual string GetChapter()
150
+ => progressionDatabase != null ?
151
+ progressionDatabase.Chapters[saveDatas.Get<int>(chapterKey)].saveTitle + " ": "";
152
+
153
+ /// <summary>
154
+ ///
155
+ /// </summary>
156
+ /// <returns></returns>
157
+ protected virtual string GetArea()
158
+ {
159
+ string area = saveDatas.Get<string>(sceneKey)?.Replace(scenePrefix, "");
160
+
161
+ string location = saveDatas.Get<string>(locationKey);
162
+
163
+ if (location != null && location == nullLocation)
164
+ return "";
165
+ else if (location != null && location != "")
166
+ return location + " ";
167
+ else
168
+ return SplitCamelCase(area) + " ";
169
+ }
170
+
171
+ /// <summary>
172
+ ///
173
+ /// </summary>
174
+ /// <returns></returns>
175
+ protected virtual string GetAdditionalState()
176
+ {
177
+ if (addStateDatabase == null)
178
+ return string.Empty;
179
+
180
+ string added = SplitCamelCase(addStateDatabase.GetStateName(saveDatas.Get<int>(addedStateKey)).ToString());
181
+
182
+ if (added != "")
183
+ added = additionalStatePrefix + added + additionalStateSuffix;
184
+
185
+ return added;
186
+ }
187
+
188
+ /// <summary>
189
+ ///
190
+ /// </summary>
191
+ /// <param name="text"></param>
192
+ /// <returns></returns>
193
+ protected virtual string SplitCamelCase(string text)
194
+ {
195
+ if (string.IsNullOrWhiteSpace(text))
196
+ return "";
197
+ else
198
+ return Regex.Replace(text, regexPattern, regexReplacement);
199
+ }
200
+
201
+
202
+ /// <inheritdoc/>
203
+ public override void OnSaveNotFound(int id) => title.text = titleNotFoundText + (id + 1);
204
+ }
205
205
  }
@@ -1,11 +1,11 @@
1
- fileFormatVersion: 2
2
- guid: affae7c9da6af364091da6cd123deb60
3
- MonoImporter:
4
- externalObjects: {}
5
- serializedVersion: 2
6
- defaultReferences: []
7
- executionOrder: 0
8
- icon: {instanceID: 0}
9
- userData:
10
- assetBundleName:
11
- assetBundleVariant:
1
+ fileFormatVersion: 2
2
+ guid: affae7c9da6af364091da6cd123deb60
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
package/package.json CHANGED
@@ -1,41 +1,46 @@
1
- {
2
- "name": "net.dreditor.ui.savingloading",
3
- "version": "0.1.6",
4
- "displayName": "DREditor UI Saving Loading",
5
- "description": "The beta for DREditor. A tool to create death game style projects without having to code.",
6
- "unity": "6000.4",
7
- "dependencies": {
8
- "com.unity.ugui": "2.0.0",
9
- "net.dreditor.core": "0.1.6",
10
- "net.dreditor.fading": "0.1.6",
11
- "net.dreditor.progressing.handling": "0.1.6",
12
- "net.dreditor.states": "0.1.6",
13
- "net.dreditor.ui": "0.1.6",
14
- "net.dreditor.audio": "0.1.6",
15
- "net.dreditor.roomloading": "0.1.6"
16
- },
17
- "publishConfig": {
18
- "access": "public"
19
- },
20
- "author": {
21
- "name": "Benjamin \"Sweden\" Jillson",
22
- "email": "dreditortool@gmail.com",
23
- "url": "https://dreditor.net"
24
- },
25
- "keywords": [
26
- "editor",
27
- "tool",
28
- "dreditor"
29
- ],
30
- "samples": [
31
- {
32
- "displayName": "Samples",
33
- "description": "",
34
- "path": "Samples~"
35
- }
36
- ],
37
- "documentationUrl": "https://dreditor.net",
38
- "license": "Apache-2.0",
39
- "licensesUrl": "https://dreditor.net/docs/LICENSE.html",
40
- "changelogUrl": "https://dreditor.net/docs/CHANGELOG.html"
41
- }
1
+ {
2
+ "name": "net.dreditor.ui.savingloading",
3
+ "version": "0.1.7",
4
+ "displayName": "DREditor UI Saving Loading",
5
+ "description": "The beta for DREditor. A tool to create death game style projects without having to code.",
6
+ "unity": "6000.4",
7
+ "dependencies": {
8
+ "com.unity.ugui": "2.0.0",
9
+ "net.dreditor.core": "0.1.7",
10
+ "net.dreditor.fading": "0.1.7",
11
+ "net.dreditor.progressing.handling": "0.1.7",
12
+ "net.dreditor.states": "0.1.7",
13
+ "net.dreditor.ui": "0.1.7",
14
+ "net.dreditor.audio": "0.1.7",
15
+ "net.dreditor.roomloading": "0.1.7"
16
+ },
17
+ "publishConfig": {
18
+ "access": "public"
19
+ },
20
+ "author": {
21
+ "name": "Benjamin \"Sweden\" Jillson",
22
+ "email": "dreditortool@gmail.com",
23
+ "url": "https://dreditor.net"
24
+ },
25
+ "keywords": [
26
+ "editor",
27
+ "tool",
28
+ "dreditor"
29
+ ],
30
+ "samples": [
31
+ {
32
+ "displayName": "Samples",
33
+ "description": "",
34
+ "path": "Samples~"
35
+ }
36
+ ],
37
+ "documentationUrl": "https://dreditor.net",
38
+ "license": "Apache-2.0",
39
+ "licensesUrl": "https://dreditor.net/docs/LICENSE.html",
40
+ "changelogUrl": "https://dreditor.net/docs/CHANGELOG.html",
41
+ "repository": {
42
+ "url": "https://github.com/CertifiedSharp/DREditor",
43
+ "type": "git",
44
+ "revision": "14ca252fbb33eb6f53557ecaed1c10902877698f"
45
+ }
46
+ }
package/package.json.meta CHANGED
@@ -1,7 +1,7 @@
1
- fileFormatVersion: 2
2
- guid: b3963d6bb9e4559489a404d56f850e41
3
- TextScriptImporter:
4
- externalObjects: {}
5
- userData:
6
- assetBundleName:
7
- assetBundleVariant:
1
+ fileFormatVersion: 2
2
+ guid: b3963d6bb9e4559489a404d56f850e41
3
+ TextScriptImporter:
4
+ externalObjects: {}
5
+ userData:
6
+ assetBundleName:
7
+ assetBundleVariant:
package/Samples.meta DELETED
@@ -1,8 +0,0 @@
1
- fileFormatVersion: 2
2
- guid: d27f0365e20cf504f9e338319f002894
3
- folderAsset: yes
4
- DefaultImporter:
5
- externalObjects: {}
6
- userData:
7
- assetBundleName:
8
- assetBundleVariant: