fr.jeanf.questsystem 0.0.55 → 0.0.57

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/README.md CHANGED
@@ -18,3 +18,5 @@ Credits:
18
18
  - It is inspired by this <a href="https://github.com/shapedbyrainstudios/quest-system">this</a>.
19
19
  - I simply implemented this code in my package registry and tweaked it to my liking. Overtime I will add quite a lot of functionalities but for now I focus on making it work with my custom Event System.
20
20
 
21
+ Contributors:
22
+ [Code] Felix Cotes-Charlebois <a href="https://github.com/Percevent13">
@@ -52,15 +52,16 @@ namespace jeanf.questsystem
52
52
  public void OnEnable()
53
53
  {
54
54
  InitializeQuestStep();
55
+ Debug.Log("Played questStep's enable");
55
56
  }
56
57
 
57
58
 
58
59
  public void InitializeQuestStep()
59
60
  {
60
61
  // failsafe to avoid lauching the same step more than once at a time.
61
- // if (stepStatus == QuestStepStatus.Active) return;
62
+ if (stepStatus == QuestStepStatus.Active) return;
62
63
 
63
- Debug.Log($"Initializing questStep [{stepId}] with for quest with questId: [{questId}]");
64
+ if(isDebug) Debug.Log($"Initializing questStep [{stepId}] with for quest with questId: [{questId}]");
64
65
 
65
66
  stepStatus = QuestStepStatus.Active;
66
67
  stepActive?.Invoke(stepId, stepStatus);
@@ -72,14 +73,14 @@ namespace jeanf.questsystem
72
73
  }
73
74
  if (isUsingIntroTimeline && timeline)
74
75
  {
75
- Debug.Log($"sending trigger to timeline: {timeline.name}, triggerValue: true");
76
+ if(isDebug) Debug.Log($"sending trigger to timeline: {timeline.name}, triggerValue: true");
76
77
  _timelineTriggerEventChannelSo.RaiseEvent(timeline, true);
77
78
  }
78
79
 
79
80
  if(isDebug) Debug.Log($"Step with id [{stepId}] has {questStepsToTrigger.Count} childSteps");
80
81
  foreach(QuestStep questStep in questStepsToTrigger)
81
82
  {
82
- Debug.Log($"sending childstep to initialization: {questStep.name}, stepId: [{questStep.stepId}]");
83
+ if(isDebug) Debug.Log($"sending childstep to initialization: {questStep.name}, stepId: [{questStep.stepId}]");
83
84
  childStep?.Invoke(questStep);
84
85
  }
85
86
  }
@@ -88,27 +89,27 @@ namespace jeanf.questsystem
88
89
 
89
90
  protected void FinishQuestStep()
90
91
  {
91
- Debug.Log($" ---- Step with id: {stepId} finished. Changing status to completed", this);
92
+ if(isDebug) Debug.Log($" ---- Step with id: {stepId} finished. Changing status to completed", this);
92
93
  stepStatus = QuestStepStatus.Completed;
93
94
 
94
95
  if (sendQuestStepTooltip != null)
95
96
  {
96
- Debug.Log($" ---- Step with id: {stepId} finished. Sending tooltip", this);
97
+ if(isDebug) Debug.Log($" ---- Step with id: {stepId} finished. Sending tooltip", this);
97
98
  sendQuestStepTooltip.RaiseEvent(string.Empty);
98
99
  }
99
100
  ;
100
101
 
101
102
  foreach(QuestStep questStep in questStepsToTrigger)
102
103
  {
103
- Debug.Log($" ---- Step with id: {stepId} finished. Requesting to start next step: {questStep.stepId}", this);
104
+ if(isDebug) Debug.Log($" ---- Step with id: {stepId} finished. Requesting to start next step: {questStep.stepId}", this);
104
105
  sendNextStepId?.Invoke(questStep.stepId);
105
106
  }
106
- Debug.Log($" ---- Step with id: {stepId} finished. Sending stepCompleted Event (delegate) with argument: {stepId}", this);
107
+ if(isDebug) Debug.Log($" ---- Step with id: {stepId} finished. Sending stepCompleted Event (delegate) with argument: {stepId}", this);
107
108
  stepCompleted?.Invoke(stepId);
108
- Debug.Log($" ---- Step with id: {stepId} finished. Sending stepActive Event (delegate) with arguments: {stepId}, {stepStatus} ", this);
109
+ if(isDebug) Debug.Log($" ---- Step with id: {stepId} finished. Sending stepActive Event (delegate) with arguments: {stepId}, {stepStatus} ", this);
109
110
  stepActive?.Invoke(stepId, stepStatus);
110
111
 
111
- Debug.Log($" ---- Step with id: {stepId} finished. Destroying the gameobject with name {this.name}", this);
112
+ if(isDebug) Debug.Log($" ---- Step with id: {stepId} finished. Destroying the gameobject with name {this.name}", this);
112
113
  Destroy(this.gameObject);
113
114
  }
114
115
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name":"fr.jeanf.questsystem",
3
- "version":"0.0.55",
3
+ "version":"0.0.57",
4
4
  "displayName":"Quest system",
5
5
  "description":"This package uses Scriptable Objects to define quests.",
6
6
  "unity": "2021.3",