net.dreditor.progressing.handling 0.1.6 → 0.1.8
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.
- package/.attestation.p7m +0 -0
- package/ChapterTitleDisplayer.cs +41 -41
- package/ChapterTitleDisplayer.cs.meta +11 -11
- package/DREditor.Progressing.Handling.asmdef +16 -16
- package/DREditor.Progressing.Handling.asmdef.meta +7 -7
- package/FlagTriggerExtensions.cs +78 -78
- package/FlagTriggerExtensions.cs.meta +11 -11
- package/FlagTriggerHandler.cs +236 -236
- package/FlagTriggerHandler.cs.meta +11 -11
- package/FlagTriggerHandlerBase.cs +65 -65
- package/FlagTriggerHandlerBase.cs.meta +11 -11
- package/HistoricalManagerBase.cs +158 -158
- package/HistoricalManagerBase.cs.meta +1 -1
- package/IHistory.cs +100 -100
- package/IHistory.cs.meta +1 -1
- package/ProgressionData.cs +180 -180
- package/ProgressionData.cs.meta +11 -11
- package/ProgressionDebugger.cs +185 -185
- package/ProgressionDebugger.cs.meta +11 -11
- package/ProgressionFlagHandler.cs +166 -166
- package/ProgressionFlagHandler.cs.meta +11 -11
- package/ProgressionHistoryManager.cs +33 -33
- package/ProgressionHistoryManager.cs.meta +11 -11
- package/ProgressionInfo.cs +53 -53
- package/ProgressionInfo.cs.meta +11 -11
- package/ProgressionLoader.cs +128 -128
- package/ProgressionLoader.cs.meta +11 -11
- package/ProgressionManager.cs +285 -285
- package/ProgressionManager.cs.meta +11 -11
- package/ProgressionManagerBase.cs +131 -131
- package/ProgressionManagerBase.cs.meta +11 -11
- package/ProgressionSaver.cs +48 -48
- package/ProgressionSaver.cs.meta +11 -11
- package/{Samples → Samples~}/CurrentChapterIndex.asset +21 -21
- package/{Samples → Samples~}/CurrentChapterIndex.asset.meta +8 -8
- package/{Samples → Samples~}/CurrentObjectiveIndex.asset +19 -19
- package/{Samples → Samples~}/CurrentObjectiveIndex.asset.meta +8 -8
- package/{Samples → Samples~}/CurrentObjectiveName.asset +19 -19
- package/{Samples → Samples~}/CurrentObjectiveName.asset.meta +8 -8
- package/{Samples → Samples~}/FlagTriggered.asset +19 -19
- package/{Samples → Samples~}/FlagTriggered.asset.meta +8 -8
- package/{Samples → Samples~}/Flag_Trigger_Handler.prefab +194 -194
- package/{Samples → Samples~}/Flag_Trigger_Handler.prefab.meta +7 -7
- package/{Samples → Samples~}/LoadProgressionData.asset +14 -14
- package/{Samples → Samples~}/LoadProgressionData.asset.meta +8 -8
- package/{Samples → Samples~}/MoveToNextNaturalObjective.asset +14 -14
- package/{Samples → Samples~}/MoveToNextNaturalObjective.asset.meta +8 -8
- package/{Samples → Samples~}/MoveToObjective.asset +19 -19
- package/{Samples → Samples~}/MoveToObjective.asset.meta +8 -8
- package/{Samples → Samples~}/ObjectiveKeepsInstanceData.asset +19 -19
- package/{Samples → Samples~}/ObjectiveKeepsInstanceData.asset.meta +8 -8
- package/{Samples → Samples~}/OnGeneratePastData.asset +14 -14
- package/{Samples → Samples~}/OnGeneratePastData.asset.meta +8 -8
- package/{Samples → Samples~}/OnLastObjective.asset +19 -19
- package/{Samples → Samples~}/OnLastObjective.asset.meta +8 -8
- package/{Samples → Samples~}/Progression_Debugger.prefab +73 -73
- package/{Samples → Samples~}/Progression_Debugger.prefab.meta +7 -7
- package/{Samples → Samples~}/Progression_Flag_Handler.prefab +47 -47
- package/{Samples → Samples~}/Progression_Flag_Handler.prefab.meta +7 -7
- package/{Samples → Samples~}/Progression_History_Manager.prefab +107 -107
- package/{Samples → Samples~}/Progression_History_Manager.prefab.meta +7 -7
- package/{Samples → Samples~}/Progression_Loader.prefab +76 -76
- package/{Samples → Samples~}/Progression_Loader.prefab.meta +7 -7
- package/{Samples → Samples~}/Progression_Manager_ETemplate.prefab +603 -603
- package/{Samples → Samples~}/Progression_Manager_ETemplate.prefab.meta +7 -7
- package/{Samples → Samples~}/Progression_Saver.prefab +51 -51
- package/{Samples → Samples~}/Progression_Saver.prefab.meta +7 -7
- package/{Samples → Samples~}/RequiredFlagsTriggered.asset +19 -19
- package/{Samples → Samples~}/RequiredFlagsTriggered.asset.meta +8 -8
- package/{Samples → Samples~}/TriggerAllRequiredFlags.asset +14 -14
- package/{Samples → Samples~}/TriggerAllRequiredFlags.asset.meta +8 -8
- package/package.json +40 -35
- package/package.json.meta +7 -7
- package/Samples.meta +0 -8
package/HistoricalManagerBase.cs
CHANGED
|
@@ -1,159 +1,159 @@
|
|
|
1
|
-
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
-
using DREditor.EventObjects;
|
|
3
|
-
using DREditor.Saving;
|
|
4
|
-
using DREditor.Services;
|
|
5
|
-
using DREditor.Utility;
|
|
6
|
-
using System.Collections.Generic;
|
|
7
|
-
using UnityEngine;
|
|
8
|
-
using UnityEngine.Scripting.APIUpdating;
|
|
9
|
-
|
|
10
|
-
namespace DREditor.Progressing.Handling
|
|
11
|
-
{
|
|
12
|
-
/// <summary>
|
|
13
|
-
///
|
|
14
|
-
/// </summary>
|
|
15
|
-
[MovedFrom(true, "DREditor.Progression.Handling", "DREditor.Progression.Handling")]
|
|
16
|
-
public abstract class HistoricalManagerBase<T, T2> : ServiceHolder<T2>,
|
|
17
|
-
IDRESaveable, IDRELoadableManager, IDRELoadable, ILoadOnChapterSelect
|
|
18
|
-
where T2 : class
|
|
19
|
-
{
|
|
20
|
-
/// <summary>
|
|
21
|
-
///
|
|
22
|
-
/// </summary>
|
|
23
|
-
[Header("")]
|
|
24
|
-
[Divider]
|
|
25
|
-
[Tooltip("")]
|
|
26
|
-
[SerializeField] protected SceneEventListener loadProgressionData = null;
|
|
27
|
-
|
|
28
|
-
/// <summary>
|
|
29
|
-
///
|
|
30
|
-
/// </summary>
|
|
31
|
-
[Tooltip("")]
|
|
32
|
-
[SerializeField] protected SceneEventListener newGameSelected = null;
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
/// <summary>
|
|
36
|
-
///
|
|
37
|
-
/// </summary>
|
|
38
|
-
[Header("")]
|
|
39
|
-
[Divider]
|
|
40
|
-
[Tooltip("")]
|
|
41
|
-
[SerializeField] protected string progressionKey = "ProgressionData";
|
|
42
|
-
|
|
43
|
-
/// <summary>
|
|
44
|
-
///
|
|
45
|
-
/// </summary>
|
|
46
|
-
[Tooltip("")]
|
|
47
|
-
[SelectType]
|
|
48
|
-
[SerializeReference] protected T historicalData;
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
/// <summary>
|
|
52
|
-
///
|
|
53
|
-
/// </summary>
|
|
54
|
-
protected Dictionary<string, object> saveDatas;
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
protected override void InitializeService()
|
|
58
|
-
{
|
|
59
|
-
base.InitializeService();
|
|
60
|
-
|
|
61
|
-
if (ServiceLocator.HasService(out T2 activeManager) && this as T2 == activeManager)
|
|
62
|
-
ServiceLocator.Register<T>(historicalData);
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
protected override void OnDestroy()
|
|
66
|
-
{
|
|
67
|
-
base.OnDestroy();
|
|
68
|
-
|
|
69
|
-
if (ServiceLocator.HasService(out T activeHistory) && activeHistory.Equals(historicalData))
|
|
70
|
-
ServiceLocator.Unregister<T>(historicalData);
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
public virtual void Load(Dictionary<string, object> saveDatas) => this.saveDatas = saveDatas;
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
protected virtual void OnEnable()
|
|
78
|
-
{
|
|
79
|
-
loadProgressionData.AddListener(OnLoadProgressionDataInvoked);
|
|
80
|
-
|
|
81
|
-
newGameSelected.AddListener(OnNewGameSelected);
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
protected virtual void OnDisable()
|
|
85
|
-
{
|
|
86
|
-
loadProgressionData.RemoveListener(OnLoadProgressionDataInvoked);
|
|
87
|
-
|
|
88
|
-
newGameSelected.RemoveListener(OnNewGameSelected);
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
/// <summary>
|
|
92
|
-
///
|
|
93
|
-
/// </summary>
|
|
94
|
-
protected virtual void OnLoadProgressionDataInvoked() => LoadRegisterData(GetSaveData(saveDatas));
|
|
95
|
-
|
|
96
|
-
/// <summary>
|
|
97
|
-
///
|
|
98
|
-
/// </summary>
|
|
99
|
-
/// <returns></returns>
|
|
100
|
-
protected virtual T GetSaveData(Dictionary<string, object> saveDatas) =>
|
|
101
|
-
(T)saveDatas.GetGeneric(progressionKey, historicalData.GetType());
|
|
102
|
-
|
|
103
|
-
/// <summary>
|
|
104
|
-
///
|
|
105
|
-
/// </summary>
|
|
106
|
-
protected virtual void OnNewGameSelected()
|
|
107
|
-
{
|
|
108
|
-
if (ServiceLocator.GetService<T>() is IClearableOnNewGameSelected clearable)
|
|
109
|
-
clearable?.Clear();
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
public virtual void Save(Dictionary<string, object> saveDatas) =>
|
|
114
|
-
saveDatas.Set(progressionKey, GetInstanceData());
|
|
115
|
-
|
|
116
|
-
/// <summary>
|
|
117
|
-
///
|
|
118
|
-
/// </summary>
|
|
119
|
-
/// <returns></returns>
|
|
120
|
-
protected virtual object GetInstanceData() => historicalData;
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
public virtual void LoadManager(Dictionary<string, object> saveDatas, bool inChapterSelect) =>
|
|
124
|
-
LoadRegisterData(GetSaveData(saveDatas).DeepCopy());
|
|
125
|
-
|
|
126
|
-
/// <summary>
|
|
127
|
-
///
|
|
128
|
-
/// </summary>
|
|
129
|
-
/// <param name="historicalData"></param>
|
|
130
|
-
protected virtual void LoadRegisterData(T historicalData)
|
|
131
|
-
{
|
|
132
|
-
if (historicalData == null)
|
|
133
|
-
return;
|
|
134
|
-
|
|
135
|
-
ServiceLocator.Unregister<T>();
|
|
136
|
-
|
|
137
|
-
this.historicalData = historicalData;
|
|
138
|
-
|
|
139
|
-
ServiceLocator.Register<T>(this.historicalData);
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
public virtual void CarryOverOnChapterSelect(Dictionary<string, object> oldSaveDatas, Dictionary<string, object> newSaveDatas)
|
|
144
|
-
{
|
|
145
|
-
if (GetSaveData(oldSaveDatas) is IPersistentData loadedData && GetSaveData(newSaveDatas) is IPersistentData newData)
|
|
146
|
-
newData?.CarryOver(loadedData);
|
|
147
|
-
else
|
|
148
|
-
OnCarryingOverFailed(oldSaveDatas, newSaveDatas);
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
/// <summary>
|
|
152
|
-
///
|
|
153
|
-
/// </summary>
|
|
154
|
-
/// <param name="oldSaveDatas"></param>
|
|
155
|
-
/// <param name="newSaveDatas"></param>
|
|
156
|
-
protected virtual void OnCarryingOverFailed(Dictionary<string, object> oldSaveDatas, Dictionary<string, object> newSaveDatas) =>
|
|
157
|
-
UnityEngine.Debug.LogWarning($"ANALYSIS: Either the new or loaded progression data were not of type: {nameof(IPersistentData)}.");
|
|
158
|
-
}
|
|
1
|
+
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
+
using DREditor.EventObjects;
|
|
3
|
+
using DREditor.Saving;
|
|
4
|
+
using DREditor.Services;
|
|
5
|
+
using DREditor.Utility;
|
|
6
|
+
using System.Collections.Generic;
|
|
7
|
+
using UnityEngine;
|
|
8
|
+
using UnityEngine.Scripting.APIUpdating;
|
|
9
|
+
|
|
10
|
+
namespace DREditor.Progressing.Handling
|
|
11
|
+
{
|
|
12
|
+
/// <summary>
|
|
13
|
+
///
|
|
14
|
+
/// </summary>
|
|
15
|
+
[MovedFrom(true, "DREditor.Progression.Handling", "DREditor.Progression.Handling")]
|
|
16
|
+
public abstract class HistoricalManagerBase<T, T2> : ServiceHolder<T2>,
|
|
17
|
+
IDRESaveable, IDRELoadableManager, IDRELoadable, ILoadOnChapterSelect
|
|
18
|
+
where T2 : class
|
|
19
|
+
{
|
|
20
|
+
/// <summary>
|
|
21
|
+
///
|
|
22
|
+
/// </summary>
|
|
23
|
+
[Header("")]
|
|
24
|
+
[Divider]
|
|
25
|
+
[Tooltip("")]
|
|
26
|
+
[SerializeField] protected SceneEventListener loadProgressionData = null;
|
|
27
|
+
|
|
28
|
+
/// <summary>
|
|
29
|
+
///
|
|
30
|
+
/// </summary>
|
|
31
|
+
[Tooltip("")]
|
|
32
|
+
[SerializeField] protected SceneEventListener newGameSelected = null;
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
/// <summary>
|
|
36
|
+
///
|
|
37
|
+
/// </summary>
|
|
38
|
+
[Header("")]
|
|
39
|
+
[Divider]
|
|
40
|
+
[Tooltip("")]
|
|
41
|
+
[SerializeField] protected string progressionKey = "ProgressionData";
|
|
42
|
+
|
|
43
|
+
/// <summary>
|
|
44
|
+
///
|
|
45
|
+
/// </summary>
|
|
46
|
+
[Tooltip("")]
|
|
47
|
+
[SelectType]
|
|
48
|
+
[SerializeReference] protected T historicalData;
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
/// <summary>
|
|
52
|
+
///
|
|
53
|
+
/// </summary>
|
|
54
|
+
protected Dictionary<string, object> saveDatas;
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
protected override void InitializeService()
|
|
58
|
+
{
|
|
59
|
+
base.InitializeService();
|
|
60
|
+
|
|
61
|
+
if (ServiceLocator.HasService(out T2 activeManager) && this as T2 == activeManager)
|
|
62
|
+
ServiceLocator.Register<T>(historicalData);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
protected override void OnDestroy()
|
|
66
|
+
{
|
|
67
|
+
base.OnDestroy();
|
|
68
|
+
|
|
69
|
+
if (ServiceLocator.HasService(out T activeHistory) && activeHistory.Equals(historicalData))
|
|
70
|
+
ServiceLocator.Unregister<T>(historicalData);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
public virtual void Load(Dictionary<string, object> saveDatas) => this.saveDatas = saveDatas;
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
protected virtual void OnEnable()
|
|
78
|
+
{
|
|
79
|
+
loadProgressionData.AddListener(OnLoadProgressionDataInvoked);
|
|
80
|
+
|
|
81
|
+
newGameSelected.AddListener(OnNewGameSelected);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
protected virtual void OnDisable()
|
|
85
|
+
{
|
|
86
|
+
loadProgressionData.RemoveListener(OnLoadProgressionDataInvoked);
|
|
87
|
+
|
|
88
|
+
newGameSelected.RemoveListener(OnNewGameSelected);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/// <summary>
|
|
92
|
+
///
|
|
93
|
+
/// </summary>
|
|
94
|
+
protected virtual void OnLoadProgressionDataInvoked() => LoadRegisterData(GetSaveData(saveDatas));
|
|
95
|
+
|
|
96
|
+
/// <summary>
|
|
97
|
+
///
|
|
98
|
+
/// </summary>
|
|
99
|
+
/// <returns></returns>
|
|
100
|
+
protected virtual T GetSaveData(Dictionary<string, object> saveDatas) =>
|
|
101
|
+
(T)saveDatas.GetGeneric(progressionKey, historicalData.GetType());
|
|
102
|
+
|
|
103
|
+
/// <summary>
|
|
104
|
+
///
|
|
105
|
+
/// </summary>
|
|
106
|
+
protected virtual void OnNewGameSelected()
|
|
107
|
+
{
|
|
108
|
+
if (ServiceLocator.GetService<T>() is IClearableOnNewGameSelected clearable)
|
|
109
|
+
clearable?.Clear();
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
public virtual void Save(Dictionary<string, object> saveDatas) =>
|
|
114
|
+
saveDatas.Set(progressionKey, GetInstanceData());
|
|
115
|
+
|
|
116
|
+
/// <summary>
|
|
117
|
+
///
|
|
118
|
+
/// </summary>
|
|
119
|
+
/// <returns></returns>
|
|
120
|
+
protected virtual object GetInstanceData() => historicalData;
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
public virtual void LoadManager(Dictionary<string, object> saveDatas, bool inChapterSelect) =>
|
|
124
|
+
LoadRegisterData(GetSaveData(saveDatas).DeepCopy());
|
|
125
|
+
|
|
126
|
+
/// <summary>
|
|
127
|
+
///
|
|
128
|
+
/// </summary>
|
|
129
|
+
/// <param name="historicalData"></param>
|
|
130
|
+
protected virtual void LoadRegisterData(T historicalData)
|
|
131
|
+
{
|
|
132
|
+
if (historicalData == null)
|
|
133
|
+
return;
|
|
134
|
+
|
|
135
|
+
ServiceLocator.Unregister<T>();
|
|
136
|
+
|
|
137
|
+
this.historicalData = historicalData;
|
|
138
|
+
|
|
139
|
+
ServiceLocator.Register<T>(this.historicalData);
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
public virtual void CarryOverOnChapterSelect(Dictionary<string, object> oldSaveDatas, Dictionary<string, object> newSaveDatas)
|
|
144
|
+
{
|
|
145
|
+
if (GetSaveData(oldSaveDatas) is IPersistentData loadedData && GetSaveData(newSaveDatas) is IPersistentData newData)
|
|
146
|
+
newData?.CarryOver(loadedData);
|
|
147
|
+
else
|
|
148
|
+
OnCarryingOverFailed(oldSaveDatas, newSaveDatas);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
/// <summary>
|
|
152
|
+
///
|
|
153
|
+
/// </summary>
|
|
154
|
+
/// <param name="oldSaveDatas"></param>
|
|
155
|
+
/// <param name="newSaveDatas"></param>
|
|
156
|
+
protected virtual void OnCarryingOverFailed(Dictionary<string, object> oldSaveDatas, Dictionary<string, object> newSaveDatas) =>
|
|
157
|
+
UnityEngine.Debug.LogWarning($"ANALYSIS: Either the new or loaded progression data were not of type: {nameof(IPersistentData)}.");
|
|
158
|
+
}
|
|
159
159
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
fileFormatVersion: 2
|
|
1
|
+
fileFormatVersion: 2
|
|
2
2
|
guid: bf5f735cd2a867349b4f1776ca593538
|
package/IHistory.cs
CHANGED
|
@@ -1,101 +1,101 @@
|
|
|
1
|
-
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
-
using DREditor.Saving;
|
|
3
|
-
using System.Collections.Generic;
|
|
4
|
-
using UnityEngine.Scripting.APIUpdating;
|
|
5
|
-
|
|
6
|
-
namespace DREditor.Progressing.Handling
|
|
7
|
-
{
|
|
8
|
-
/// <summary>
|
|
9
|
-
///
|
|
10
|
-
/// </summary>
|
|
11
|
-
[MovedFrom(true, "DREditor.Progression.Handling", "DREditor.Progression.Handling")]
|
|
12
|
-
public interface IHistory : IPersistentData, IClearableOnNewGameSelected
|
|
13
|
-
{
|
|
14
|
-
/// <summary>
|
|
15
|
-
///
|
|
16
|
-
/// </summary>
|
|
17
|
-
/// <param name="chapterIndex"></param>
|
|
18
|
-
/// <param name="objective"></param>
|
|
19
|
-
void Add(int chapterIndex, Objective objective);
|
|
20
|
-
|
|
21
|
-
/// <summary>
|
|
22
|
-
///
|
|
23
|
-
/// </summary>
|
|
24
|
-
/// <param name="objectiveName"></param>
|
|
25
|
-
/// <returns></returns>
|
|
26
|
-
bool ContainsObjective(string objectiveName);
|
|
27
|
-
|
|
28
|
-
/// <summary>
|
|
29
|
-
///
|
|
30
|
-
/// </summary>
|
|
31
|
-
/// <returns></returns>
|
|
32
|
-
int GetAmountOfFinishedObjectives();
|
|
33
|
-
|
|
34
|
-
/// <summary>
|
|
35
|
-
///
|
|
36
|
-
/// </summary>
|
|
37
|
-
/// <returns></returns>
|
|
38
|
-
List<List<Objective>> GetChapterHistory();
|
|
39
|
-
|
|
40
|
-
/// <summary>
|
|
41
|
-
///
|
|
42
|
-
/// </summary>
|
|
43
|
-
/// <param name="flagName"></param>
|
|
44
|
-
/// <returns></returns>
|
|
45
|
-
ProgressionFlag GetFlagFromHistory(string flagName);
|
|
46
|
-
|
|
47
|
-
/// <summary>
|
|
48
|
-
///
|
|
49
|
-
/// </summary>
|
|
50
|
-
/// <param name="chapter"></param>
|
|
51
|
-
/// <param name="objective"></param>
|
|
52
|
-
/// <param name="flag"></param>
|
|
53
|
-
/// <returns></returns>
|
|
54
|
-
ProgressionFlag GetFlagFromIndexes(int chapter, int objective, int flag);
|
|
55
|
-
|
|
56
|
-
/// <summary>
|
|
57
|
-
///
|
|
58
|
-
/// </summary>
|
|
59
|
-
/// <param name="chapter"></param>
|
|
60
|
-
/// <param name="objective"></param>
|
|
61
|
-
/// <returns></returns>
|
|
62
|
-
Objective GetHistoryObjective(int chapter, int objective);
|
|
63
|
-
|
|
64
|
-
/// <summary>
|
|
65
|
-
///
|
|
66
|
-
/// </summary>
|
|
67
|
-
/// <returns></returns>
|
|
68
|
-
Objective GetLastObjective();
|
|
69
|
-
|
|
70
|
-
/// <summary>
|
|
71
|
-
///
|
|
72
|
-
/// </summary>
|
|
73
|
-
/// <param name="chapterHistory"></param>
|
|
74
|
-
void SetChapterHistory(List<List<Objective>> chapterHistory);
|
|
75
|
-
|
|
76
|
-
/// <summary>
|
|
77
|
-
///
|
|
78
|
-
/// </summary>
|
|
79
|
-
/// <param name="chapter"></param>
|
|
80
|
-
void SetChapterIndex(int chapter);
|
|
81
|
-
|
|
82
|
-
/// <summary>
|
|
83
|
-
///
|
|
84
|
-
/// </summary>
|
|
85
|
-
/// <param name="objective"></param>
|
|
86
|
-
void SetPreviousObjective(Objective objective);
|
|
87
|
-
|
|
88
|
-
/// <summary>
|
|
89
|
-
///
|
|
90
|
-
/// </summary>
|
|
91
|
-
/// <param name="selectedChapter"></param>
|
|
92
|
-
/// <returns></returns>
|
|
93
|
-
int GetObjectiveCountFromHistory(int selectedChapter);
|
|
94
|
-
|
|
95
|
-
/// <summary>
|
|
96
|
-
///
|
|
97
|
-
/// </summary>
|
|
98
|
-
/// <returns></returns>
|
|
99
|
-
int LatestChapterIndex();
|
|
100
|
-
}
|
|
1
|
+
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
+
using DREditor.Saving;
|
|
3
|
+
using System.Collections.Generic;
|
|
4
|
+
using UnityEngine.Scripting.APIUpdating;
|
|
5
|
+
|
|
6
|
+
namespace DREditor.Progressing.Handling
|
|
7
|
+
{
|
|
8
|
+
/// <summary>
|
|
9
|
+
///
|
|
10
|
+
/// </summary>
|
|
11
|
+
[MovedFrom(true, "DREditor.Progression.Handling", "DREditor.Progression.Handling")]
|
|
12
|
+
public interface IHistory : IPersistentData, IClearableOnNewGameSelected
|
|
13
|
+
{
|
|
14
|
+
/// <summary>
|
|
15
|
+
///
|
|
16
|
+
/// </summary>
|
|
17
|
+
/// <param name="chapterIndex"></param>
|
|
18
|
+
/// <param name="objective"></param>
|
|
19
|
+
void Add(int chapterIndex, Objective objective);
|
|
20
|
+
|
|
21
|
+
/// <summary>
|
|
22
|
+
///
|
|
23
|
+
/// </summary>
|
|
24
|
+
/// <param name="objectiveName"></param>
|
|
25
|
+
/// <returns></returns>
|
|
26
|
+
bool ContainsObjective(string objectiveName);
|
|
27
|
+
|
|
28
|
+
/// <summary>
|
|
29
|
+
///
|
|
30
|
+
/// </summary>
|
|
31
|
+
/// <returns></returns>
|
|
32
|
+
int GetAmountOfFinishedObjectives();
|
|
33
|
+
|
|
34
|
+
/// <summary>
|
|
35
|
+
///
|
|
36
|
+
/// </summary>
|
|
37
|
+
/// <returns></returns>
|
|
38
|
+
List<List<Objective>> GetChapterHistory();
|
|
39
|
+
|
|
40
|
+
/// <summary>
|
|
41
|
+
///
|
|
42
|
+
/// </summary>
|
|
43
|
+
/// <param name="flagName"></param>
|
|
44
|
+
/// <returns></returns>
|
|
45
|
+
ProgressionFlag GetFlagFromHistory(string flagName);
|
|
46
|
+
|
|
47
|
+
/// <summary>
|
|
48
|
+
///
|
|
49
|
+
/// </summary>
|
|
50
|
+
/// <param name="chapter"></param>
|
|
51
|
+
/// <param name="objective"></param>
|
|
52
|
+
/// <param name="flag"></param>
|
|
53
|
+
/// <returns></returns>
|
|
54
|
+
ProgressionFlag GetFlagFromIndexes(int chapter, int objective, int flag);
|
|
55
|
+
|
|
56
|
+
/// <summary>
|
|
57
|
+
///
|
|
58
|
+
/// </summary>
|
|
59
|
+
/// <param name="chapter"></param>
|
|
60
|
+
/// <param name="objective"></param>
|
|
61
|
+
/// <returns></returns>
|
|
62
|
+
Objective GetHistoryObjective(int chapter, int objective);
|
|
63
|
+
|
|
64
|
+
/// <summary>
|
|
65
|
+
///
|
|
66
|
+
/// </summary>
|
|
67
|
+
/// <returns></returns>
|
|
68
|
+
Objective GetLastObjective();
|
|
69
|
+
|
|
70
|
+
/// <summary>
|
|
71
|
+
///
|
|
72
|
+
/// </summary>
|
|
73
|
+
/// <param name="chapterHistory"></param>
|
|
74
|
+
void SetChapterHistory(List<List<Objective>> chapterHistory);
|
|
75
|
+
|
|
76
|
+
/// <summary>
|
|
77
|
+
///
|
|
78
|
+
/// </summary>
|
|
79
|
+
/// <param name="chapter"></param>
|
|
80
|
+
void SetChapterIndex(int chapter);
|
|
81
|
+
|
|
82
|
+
/// <summary>
|
|
83
|
+
///
|
|
84
|
+
/// </summary>
|
|
85
|
+
/// <param name="objective"></param>
|
|
86
|
+
void SetPreviousObjective(Objective objective);
|
|
87
|
+
|
|
88
|
+
/// <summary>
|
|
89
|
+
///
|
|
90
|
+
/// </summary>
|
|
91
|
+
/// <param name="selectedChapter"></param>
|
|
92
|
+
/// <returns></returns>
|
|
93
|
+
int GetObjectiveCountFromHistory(int selectedChapter);
|
|
94
|
+
|
|
95
|
+
/// <summary>
|
|
96
|
+
///
|
|
97
|
+
/// </summary>
|
|
98
|
+
/// <returns></returns>
|
|
99
|
+
int LatestChapterIndex();
|
|
100
|
+
}
|
|
101
101
|
}
|
package/IHistory.cs.meta
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
fileFormatVersion: 2
|
|
1
|
+
fileFormatVersion: 2
|
|
2
2
|
guid: c63a7b3b0cd9cc74786ec021176ff49c
|