net.dreditor.endevents 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.
Files changed (48) hide show
  1. package/.attestation.p7m +0 -0
  2. package/CustomCallEndEventHandler.cs +57 -57
  3. package/CustomCallEndEventHandler.cs.meta +11 -11
  4. package/DREditor.EndEvents.asmdef +19 -19
  5. package/DREditor.EndEvents.asmdef.meta +7 -7
  6. package/DirectToEndEventHandler.cs +131 -131
  7. package/DirectToEndEventHandler.cs.meta +11 -11
  8. package/DirectToTransitionalEndEventHandler.cs +30 -30
  9. package/DirectToTransitionalEndEventHandler.cs.meta +11 -11
  10. package/MainMenuTransitionEndEventHandler.cs +48 -48
  11. package/MainMenuTransitionEndEventHandler.cs.meta +11 -11
  12. package/PauseOptionEndEventHandler.cs +46 -46
  13. package/PauseOptionEndEventHandler.cs.meta +11 -11
  14. package/PhaseChangeEndEventHandler.cs +55 -55
  15. package/PhaseChangeEndEventHandler.cs.meta +11 -11
  16. package/{Samples → Samples~}/Custom_Call_End_Event_Handler.prefab +47 -47
  17. package/{Samples → Samples~}/Custom_Call_End_Event_Handler.prefab.meta +7 -7
  18. package/{Samples → Samples~}/Direct_To_Transitional_End_Event_Handler.prefab +139 -139
  19. package/{Samples → Samples~}/Direct_To_Transitional_End_Event_Handler.prefab.meta +7 -7
  20. package/{Samples → Samples~}/Main_Menu_Transition_End_Event_Handler.prefab +63 -63
  21. package/{Samples → Samples~}/Main_Menu_Transition_End_Event_Handler.prefab.meta +7 -7
  22. package/{Samples → Samples~}/Pause_Option_End_Event_Handler.prefab +48 -48
  23. package/{Samples → Samples~}/Pause_Option_End_Event_Handler.prefab.meta +7 -7
  24. package/{Samples → Samples~}/PhaseChangeEndEventHandler.prefab +48 -48
  25. package/{Samples → Samples~}/PhaseChangeEndEventHandler.prefab.meta +7 -7
  26. package/{Samples → Samples~}/Scene_Transition_End_Event_Handler.prefab +54 -54
  27. package/{Samples → Samples~}/Scene_Transition_End_Event_Handler.prefab.meta +7 -7
  28. package/{Samples → Samples~}/SkipTrialSequences.asset +21 -21
  29. package/{Samples → Samples~}/SkipTrialSequences.asset.meta +8 -8
  30. package/{Samples → Samples~}/Skip_Sequence_End_Event_Handler.prefab +47 -47
  31. package/{Samples → Samples~}/Skip_Sequence_End_Event_Handler.prefab.meta +7 -7
  32. package/{Samples → Samples~}/Trigger_Flag_End_Event_Handler.prefab +46 -46
  33. package/{Samples → Samples~}/Trigger_Flag_End_Event_Handler.prefab.meta +7 -7
  34. package/{Samples → Samples~}/UpdateDirectTo.asset +15 -15
  35. package/{Samples → Samples~}/UpdateDirectTo.asset.meta +8 -8
  36. package/{Samples → Samples~}/Variable_End_Event_Handler.prefab +49 -49
  37. package/{Samples → Samples~}/Variable_End_Event_Handler.prefab.meta +7 -7
  38. package/SceneTransitionEndEventHandler.cs +169 -169
  39. package/SceneTransitionEndEventHandler.cs.meta +11 -11
  40. package/SkipSequenceEndEventHandler.cs +35 -35
  41. package/SkipSequenceEndEventHandler.cs.meta +11 -11
  42. package/TriggerFlagEndEventHandler.cs +41 -41
  43. package/TriggerFlagEndEventHandler.cs.meta +11 -11
  44. package/VariableEndEventHandler.cs +111 -111
  45. package/VariableEndEventHandler.cs.meta +11 -11
  46. package/package.json +43 -38
  47. package/package.json.meta +7 -7
  48. package/Samples.meta +0 -8
@@ -1,112 +1,112 @@
1
- //Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
2
- using DREditor.Dialogues;
3
- using DREditor.Dialogues.Ending;
4
- using DREditor.EventObjects;
5
- using DREditor.Progressing.Handling;
6
- using DREditor.Saving;
7
- using DREditor.Services;
8
- using System;
9
- using System.Collections.Generic;
10
- using System.Linq;
11
- using UnityEngine;
12
-
13
- namespace DREditor.EndEvents
14
- {
15
- /// <summary>
16
- ///
17
- /// </summary>
18
- [ClassHeader(nameof(DialogueComponent) + ", " + nameof(IDialogueEndEvent) + ", " +
19
- nameof(IClearDialogueSaveData) + ", " + nameof(IDRESaveable) + ", " + nameof(IDRELoadable) +
20
- "\n\n")]
21
- public class VariableEndEventHandler : DialogueComponent, IDialogueEndEvent, IClearDialogueSaveData, IDRESaveable, IDRELoadable
22
- {
23
- /// <summary>
24
- ///
25
- /// </summary>
26
- [Tooltip("")]
27
- [SerializeField] protected BoolWithEvent fastForwardModeWasEnabled = null;
28
-
29
- /// <summary>
30
- ///
31
- /// </summary>
32
- [Tooltip("")]
33
- [SerializeField] protected string conditionalNumSaveKey = "Conditional";
34
-
35
-
36
- /// <summary>
37
- ///
38
- /// </summary>
39
- protected List<bool> saveConditions = new();
40
-
41
-
42
- /// <inheritdoc/>
43
- public virtual bool EvaluateEndEvent<T>(DialogueBase<T> currentDialogue, Action<DialogueCore[]> interruptDialogue)
44
- where T : Line
45
- {
46
- if (currentDialogue.Variable.Enabled)
47
- return EvaluateVarable(currentDialogue, interruptDialogue);
48
- else
49
- return false;
50
- }
51
-
52
- /// <summary>
53
- ///
54
- /// </summary>
55
- /// <typeparam name="T"></typeparam>
56
- /// <param name="currentDialogue"></param>
57
- /// <param name="interruptDialogue"></param>
58
- /// <returns></returns>
59
- protected virtual bool EvaluateVarable<T>(DialogueBase<T> currentDialogue, Action<DialogueCore[]> interruptDialogue)
60
- where T : Line
61
- {
62
- DialogueCore[] dialogues = new DialogueCore[1];
63
-
64
- var variable = currentDialogue.Variable;
65
-
66
- bool boolVariableEvaluation = variable.BoolVariable != null && variable.BoolVariable.Resolve();
67
-
68
- bool flagShouldBeTriggered = ServiceLocator.GetService<FlagTriggerHandlerBase>().
69
- EvaluateVariable(variable.Chapter, variable.Objective, variable.Flags, variable.FalseFlags);
70
-
71
- if (boolVariableEvaluation || flagShouldBeTriggered)
72
- {
73
- dialogues[0] = currentDialogue.Variable.NextDialogueTrue;
74
-
75
- saveConditions.Add(true);
76
- }
77
- else if (variable.NextDialogueFalse != null)
78
- {
79
- dialogues[0] = currentDialogue.Variable.NextDialogueFalse;
80
-
81
- saveConditions.Add(false);
82
- }
83
-
84
- if (dialogues[0] != null)
85
- {
86
- fastForwardModeWasEnabled.SetValue(true);
87
-
88
- interruptDialogue(dialogues);
89
-
90
- return true;
91
- }
92
-
93
- return false;
94
- }
95
-
96
-
97
- /// <inheritdoc/>
98
- public virtual void Save(Dictionary<string, object> saveData)
99
- {
100
- if (!ServiceLocator.GetService<IDialogueManager>().GetComponentsInChildren<DialogueComponent>().Contains(this))
101
- return;
102
-
103
- saveData.Set(conditionalNumSaveKey, new List<bool>(saveConditions));
104
- }
105
-
106
- /// <inheritdoc/>
107
- public virtual void ClearSaveData() => saveConditions.Clear();
108
-
109
- /// <inheritdoc/>
110
- public virtual void Load(Dictionary<string, object> saveDatas) => saveConditions = new(saveDatas.Get<List<bool>>(conditionalNumSaveKey));
111
- }
1
+ //Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
2
+ using DREditor.Dialogues;
3
+ using DREditor.Dialogues.Ending;
4
+ using DREditor.EventObjects;
5
+ using DREditor.Progressing.Handling;
6
+ using DREditor.Saving;
7
+ using DREditor.Services;
8
+ using System;
9
+ using System.Collections.Generic;
10
+ using System.Linq;
11
+ using UnityEngine;
12
+
13
+ namespace DREditor.EndEvents
14
+ {
15
+ /// <summary>
16
+ ///
17
+ /// </summary>
18
+ [ClassHeader(nameof(DialogueComponent) + ", " + nameof(IDialogueEndEvent) + ", " +
19
+ nameof(IClearDialogueSaveData) + ", " + nameof(IDRESaveable) + ", " + nameof(IDRELoadable) +
20
+ "\n\n")]
21
+ public class VariableEndEventHandler : DialogueComponent, IDialogueEndEvent, IClearDialogueSaveData, IDRESaveable, IDRELoadable
22
+ {
23
+ /// <summary>
24
+ ///
25
+ /// </summary>
26
+ [Tooltip("")]
27
+ [SerializeField] protected BoolWithEvent fastForwardModeWasEnabled = null;
28
+
29
+ /// <summary>
30
+ ///
31
+ /// </summary>
32
+ [Tooltip("")]
33
+ [SerializeField] protected string conditionalNumSaveKey = "Conditional";
34
+
35
+
36
+ /// <summary>
37
+ ///
38
+ /// </summary>
39
+ protected List<bool> saveConditions = new();
40
+
41
+
42
+ /// <inheritdoc/>
43
+ public virtual bool EvaluateEndEvent<T>(DialogueBase<T> currentDialogue, Action<DialogueCore[]> interruptDialogue)
44
+ where T : Line
45
+ {
46
+ if (currentDialogue.Variable.Enabled)
47
+ return EvaluateVarable(currentDialogue, interruptDialogue);
48
+ else
49
+ return false;
50
+ }
51
+
52
+ /// <summary>
53
+ ///
54
+ /// </summary>
55
+ /// <typeparam name="T"></typeparam>
56
+ /// <param name="currentDialogue"></param>
57
+ /// <param name="interruptDialogue"></param>
58
+ /// <returns></returns>
59
+ protected virtual bool EvaluateVarable<T>(DialogueBase<T> currentDialogue, Action<DialogueCore[]> interruptDialogue)
60
+ where T : Line
61
+ {
62
+ DialogueCore[] dialogues = new DialogueCore[1];
63
+
64
+ var variable = currentDialogue.Variable;
65
+
66
+ bool boolVariableEvaluation = variable.BoolVariable != null && variable.BoolVariable.Resolve();
67
+
68
+ bool flagShouldBeTriggered = ServiceLocator.GetService<FlagTriggerHandlerBase>().
69
+ EvaluateVariable(variable.Chapter, variable.Objective, variable.Flags, variable.FalseFlags);
70
+
71
+ if (boolVariableEvaluation || flagShouldBeTriggered)
72
+ {
73
+ dialogues[0] = currentDialogue.Variable.NextDialogueTrue;
74
+
75
+ saveConditions.Add(true);
76
+ }
77
+ else if (variable.NextDialogueFalse != null)
78
+ {
79
+ dialogues[0] = currentDialogue.Variable.NextDialogueFalse;
80
+
81
+ saveConditions.Add(false);
82
+ }
83
+
84
+ if (dialogues[0] != null)
85
+ {
86
+ fastForwardModeWasEnabled.SetValue(true);
87
+
88
+ interruptDialogue(dialogues);
89
+
90
+ return true;
91
+ }
92
+
93
+ return false;
94
+ }
95
+
96
+
97
+ /// <inheritdoc/>
98
+ public virtual void Save(Dictionary<string, object> saveData)
99
+ {
100
+ if (!ServiceLocator.GetService<IDialogueManager>().GetComponentsInChildren<DialogueComponent>().Contains(this))
101
+ return;
102
+
103
+ saveData.Set(conditionalNumSaveKey, new List<bool>(saveConditions));
104
+ }
105
+
106
+ /// <inheritdoc/>
107
+ public virtual void ClearSaveData() => saveConditions.Clear();
108
+
109
+ /// <inheritdoc/>
110
+ public virtual void Load(Dictionary<string, object> saveDatas) => saveConditions = new(saveDatas.Get<List<bool>>(conditionalNumSaveKey));
111
+ }
112
112
  }
@@ -1,11 +1,11 @@
1
- fileFormatVersion: 2
2
- guid: 952c6aa834e1f1b489045bce729ef1d1
3
- MonoImporter:
4
- externalObjects: {}
5
- serializedVersion: 2
6
- defaultReferences: []
7
- executionOrder: 0
8
- icon: {instanceID: 0}
9
- userData:
10
- assetBundleName:
11
- assetBundleVariant:
1
+ fileFormatVersion: 2
2
+ guid: 952c6aa834e1f1b489045bce729ef1d1
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
package/package.json CHANGED
@@ -1,38 +1,43 @@
1
- {
2
- "name": "net.dreditor.endevents",
3
- "version": "0.1.6",
4
- "displayName": "DREditor End Events",
5
- "description": "The beta for DREditor. A tool to create death game style projects without having to code.",
6
- "unity": "6000.4",
7
- "dependencies": {
8
- "net.dreditor.core": "0.1.6",
9
- "net.dreditor.fading": "0.1.6",
10
- "net.dreditor.progressing.handling": "0.1.6",
11
- "net.dreditor.roomloading": "0.1.6",
12
- "net.dreditor.ui.menus": "0.1.6"
13
- },
14
- "publishConfig": {
15
- "access": "public"
16
- },
17
- "author": {
18
- "name": "Benjamin \"Sweden\" Jillson",
19
- "email": "dreditortool@gmail.com",
20
- "url": "https://dreditor.net"
21
- },
22
- "keywords": [
23
- "editor",
24
- "tool",
25
- "dreditor"
26
- ],
27
- "samples": [
28
- {
29
- "displayName": "Samples",
30
- "description": "",
31
- "path": "Samples~"
32
- }
33
- ],
34
- "documentationUrl": "https://dreditor.net",
35
- "license": "Apache-2.0",
36
- "licensesUrl": "https://dreditor.net/docs/LICENSE.html",
37
- "changelogUrl": "https://dreditor.net/docs/CHANGELOG.html"
38
- }
1
+ {
2
+ "name": "net.dreditor.endevents",
3
+ "version": "0.1.8",
4
+ "displayName": "DREditor End Events",
5
+ "description": "The beta for DREditor. A tool to create death game style projects without having to code.",
6
+ "unity": "6000.4",
7
+ "dependencies": {
8
+ "net.dreditor.core": "0.1.8",
9
+ "net.dreditor.fading": "0.1.8",
10
+ "net.dreditor.progressing.handling": "0.1.8",
11
+ "net.dreditor.roomloading": "0.1.8",
12
+ "net.dreditor.ui.menus": "0.1.8"
13
+ },
14
+ "publishConfig": {
15
+ "access": "public"
16
+ },
17
+ "author": {
18
+ "name": "Benjamin \"Sweden\" Jillson",
19
+ "email": "dreditortool@gmail.com",
20
+ "url": "https://dreditor.net"
21
+ },
22
+ "keywords": [
23
+ "editor",
24
+ "tool",
25
+ "dreditor"
26
+ ],
27
+ "samples": [
28
+ {
29
+ "displayName": "Samples",
30
+ "description": "",
31
+ "path": "Samples~"
32
+ }
33
+ ],
34
+ "documentationUrl": "https://dreditor.net",
35
+ "license": "Apache-2.0",
36
+ "licensesUrl": "https://dreditor.net/docs/LICENSE.html",
37
+ "changelogUrl": "https://dreditor.net/docs/CHANGELOG.html",
38
+ "repository": {
39
+ "url": "https://github.com/CertifiedSharp/DREditor",
40
+ "type": "git",
41
+ "revision": "416b18f937fb917bf3f595362a1082ed97457744"
42
+ }
43
+ }
package/package.json.meta CHANGED
@@ -1,7 +1,7 @@
1
- fileFormatVersion: 2
2
- guid: 05f05685bf5920c43b9a537acd4767d3
3
- TextScriptImporter:
4
- externalObjects: {}
5
- userData:
6
- assetBundleName:
7
- assetBundleVariant:
1
+ fileFormatVersion: 2
2
+ guid: 05f05685bf5920c43b9a537acd4767d3
3
+ TextScriptImporter:
4
+ externalObjects: {}
5
+ userData:
6
+ assetBundleName:
7
+ assetBundleVariant:
package/Samples.meta DELETED
@@ -1,8 +0,0 @@
1
- fileFormatVersion: 2
2
- guid: 0fe32e106fb49b34c817da31f95010d9
3
- folderAsset: yes
4
- DefaultImporter:
5
- externalObjects: {}
6
- userData:
7
- assetBundleName:
8
- assetBundleVariant: