fr.jeanf.questsystem 0.0.50 → 0.0.51
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.
|
@@ -56,7 +56,7 @@ namespace jeanf.questsystem
|
|
|
56
56
|
questId = questSO.id;
|
|
57
57
|
for (int i = 0; i < questSO.rootSteps.Length; i++)
|
|
58
58
|
{
|
|
59
|
-
Debug.Log($"id on awake {questSO.rootSteps[i].StepId}, added to {this.name}'s dictionary", this);
|
|
59
|
+
if(isDebug) Debug.Log($"id on awake {questSO.rootSteps[i].StepId}, added to {this.name}'s dictionary", this);
|
|
60
60
|
AddStepToStepMap(questSO.rootSteps[i]);
|
|
61
61
|
rootSteps.Add(questSO.rootSteps[i]);
|
|
62
62
|
}
|
|
@@ -144,12 +144,15 @@ namespace jeanf.questsystem
|
|
|
144
144
|
|
|
145
145
|
private void AddStepToStepMap(QuestStep step)
|
|
146
146
|
{
|
|
147
|
+
if(isDebug) Debug.Log($"--- Received request to add step {step.name} with id: {step.StepId} to stepMap.");
|
|
147
148
|
if (!stepMap.ContainsKey(step.StepId))
|
|
148
149
|
{
|
|
150
|
+
if(isDebug) Debug.Log($"--- Step [{step.StepId}] not found in stepMap, adding it.");
|
|
149
151
|
stepMap.Add(step.StepId, step);
|
|
150
152
|
}
|
|
151
153
|
if (completedSteps.ContainsKey(step.StepId))
|
|
152
154
|
{
|
|
155
|
+
if(isDebug) Debug.Log($"--- Step [{step.StepId}] already completed removing it from completeSteps so that we can go through it again.");
|
|
153
156
|
completedSteps.Remove(step.StepId);
|
|
154
157
|
}
|
|
155
158
|
}
|
|
@@ -161,7 +164,7 @@ namespace jeanf.questsystem
|
|
|
161
164
|
completedSteps.Clear();
|
|
162
165
|
completedSteps.TrimExcess();
|
|
163
166
|
|
|
164
|
-
Debug.Log($"Quest [{id}]: _startQuestOnEnable value is: [{_startQuestOnEnable}]");
|
|
167
|
+
if(isDebug) Debug.Log($"Quest [{id}]: _startQuestOnEnable value is: [{_startQuestOnEnable}]");
|
|
165
168
|
if (!_startQuestOnEnable || id != questId) return;
|
|
166
169
|
clearToStart = true;
|
|
167
170
|
currentQuestState = QuestState.CAN_START;
|
|
@@ -59,7 +59,7 @@ namespace jeanf.questsystem
|
|
|
59
59
|
{
|
|
60
60
|
// failsafe to avoid lauching the same step more than once at a time.
|
|
61
61
|
if (stepStatus == QuestStepStatus.Active) return;
|
|
62
|
-
Debug.Log($"Initializing quest with questId: {questId}");
|
|
62
|
+
if(isDebug) Debug.Log($"Initializing questStep [{stepId}] with for quest with questId: [{questId}]");
|
|
63
63
|
|
|
64
64
|
stepStatus = QuestStepStatus.Active;
|
|
65
65
|
stepActive?.Invoke(stepId, stepStatus);
|
|
@@ -75,8 +75,10 @@ namespace jeanf.questsystem
|
|
|
75
75
|
_timelineTriggerEventChannelSo.RaiseEvent(timeline, true);
|
|
76
76
|
}
|
|
77
77
|
|
|
78
|
+
if(isDebug) Debug.Log($"Step with id [{stepId}] has {questStepsToTrigger.Count} childSteps");
|
|
78
79
|
foreach(QuestStep questStep in questStepsToTrigger)
|
|
79
80
|
{
|
|
81
|
+
if (isDebug) Debug.Log($"sending childstep to initialization: {questStep.name}, stepId: [{questStep.stepId}]");
|
|
80
82
|
childStep?.Invoke(questStep);
|
|
81
83
|
}
|
|
82
84
|
}
|