fr.jeanf.questsystem 0.0.41 → 0.0.42

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.
@@ -105,10 +105,9 @@ namespace jeanf.questsystem
105
105
  return;
106
106
  }
107
107
 
108
- if (stepMap.ContainsKey(id))
109
- {
110
- activeSteps.Add(id,Instantiate(stepMap[id], this.transform, true));
111
- }
108
+ if (!stepMap.ContainsKey(id)) return;
109
+
110
+ if(!activeSteps.ContainsKey(id)) activeSteps.Add(id,Instantiate(stepMap[id], this.transform, true));
112
111
  }
113
112
 
114
113
  public void DestroyQuestStep(string id)
@@ -56,7 +56,7 @@ namespace jeanf.questsystem
56
56
  public void InitializeQuestStep()
57
57
  {
58
58
  // failsafe to avoid lauching the same step more than once at a time.
59
- //if (stepStatus != QuestStepStatus.Active) return;
59
+ if (stepStatus == QuestStepStatus.Active) return;
60
60
  Debug.Log($"Initializing quest with questId: {questId}");
61
61
 
62
62
  stepStatus = QuestStepStatus.Active;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name":"fr.jeanf.questsystem",
3
- "version":"0.0.41",
3
+ "version":"0.0.42",
4
4
  "displayName":"Quest system",
5
5
  "description":"This package uses Scriptable Objects to define quests.",
6
6
  "unity": "2021.3",