fr.jeanf.questsystem 0.0.30 → 0.0.32

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.
@@ -104,10 +104,15 @@ namespace jeanf.questsystem
104
104
  #region Step Instantiation & Destroy
105
105
  public void InstantiateQuestStep(string id)
106
106
  {
107
+ if (activeSteps.ContainsKey(id))
108
+ {
109
+ Debug.Log("Step already in active steps");
110
+ return;
111
+ }
107
112
 
108
113
  if (stepMap.ContainsKey(id))
109
114
  {
110
- activeSteps.Add(id, Instantiate(stepMap[id]));
115
+ activeSteps.Add(id,Instantiate(stepMap[id], this.transform, true));
111
116
  }
112
117
  }
113
118
 
@@ -17,8 +17,6 @@ namespace jeanf.questsystem
17
17
  public bool IsValid { get; private set; }
18
18
 
19
19
  [Header("General")] public string displayName;
20
- [SerializeField][Validation("A reference to a BaseGraph is required.")] public BaseGraph QuestTree;
21
- [SerializeField] public QuestStep startingStep;
22
20
 
23
21
  [Header("Custom messages init/finish")]
24
22
  [SerializeField] public StringEventChannelSO messageChannel; //change to delegate?
@@ -42,12 +40,6 @@ namespace jeanf.questsystem
42
40
  var invalidObjects = new List<object>();
43
41
  var errorMessages = new List<string>();
44
42
 
45
- if (QuestTree == null)
46
- {
47
- validityCheck = false;
48
- invalidObjects.Add(QuestTree);
49
- }
50
-
51
43
  IsValid = validityCheck;
52
44
  if (!IsValid) return;
53
45
 
@@ -80,8 +80,8 @@ MonoBehaviour:
80
80
  serializedParameterList: []
81
81
  stickyNotes: []
82
82
  nodeInspectorReference: {fileID: 0}
83
- position: {x: -12, y: -23, z: 0}
84
- scale: {x: 1, y: 1, z: 1}
83
+ position: {x: -111.333336, y: 119.333336, z: 0}
84
+ scale: {x: 1.3225, y: 1.3225, z: 1}
85
85
  references:
86
86
  version: 2
87
87
  RefIds:
@@ -93,10 +93,10 @@ MonoBehaviour:
93
93
  computeOrder: 0
94
94
  position:
95
95
  serializedVersion: 2
96
- x: 351.25806
97
- y: 74.39978
98
- width: 88
99
- height: 75.2
96
+ x: 538.1009
97
+ y: 28.147438
98
+ width: 89.333374
99
+ height: 77.33333
100
100
  expanded: 0
101
101
  debug: 0
102
102
  nodeLock: 0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name":"fr.jeanf.questsystem",
3
- "version":"0.0.30",
3
+ "version":"0.0.32",
4
4
  "displayName":"Quest system",
5
5
  "description":"This package uses Scriptable Objects to define quests.",
6
6
  "unity": "2021.3",