net.dreditor.freetime 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 (44) hide show
  1. package/.attestation.p7m +0 -0
  2. package/CharacterReaction.cs +45 -45
  3. package/CharacterReaction.cs.meta +11 -11
  4. package/DREditor.FreeTime.asmdef +25 -25
  5. package/DREditor.FreeTime.asmdef.meta +7 -7
  6. package/FTECharacterDialogues.cs +55 -55
  7. package/FTECharacterDialogues.cs.meta +11 -11
  8. package/FTEData.cs +51 -51
  9. package/FTEData.cs.meta +11 -11
  10. package/FTEDataHandler.cs +180 -180
  11. package/FTEDataHandler.cs.meta +11 -11
  12. package/FTEDatabase.cs +68 -68
  13. package/FTEDatabase.cs.meta +11 -11
  14. package/FTEDatabaseEditor.cs +101 -101
  15. package/FTEDatabaseEditor.cs.meta +11 -11
  16. package/FTEDialogues.cs +32 -32
  17. package/FTEDialogues.cs.meta +11 -11
  18. package/FTEManager.cs +322 -322
  19. package/FTEManager.cs.meta +11 -11
  20. package/IFTEDataHandler.cs +37 -37
  21. package/IFTEDataHandler.cs.meta +11 -11
  22. package/MoveToNextDayEvent.cs +213 -213
  23. package/MoveToNextDayEvent.cs.meta +11 -11
  24. package/PresentReaction.cs +36 -36
  25. package/PresentReaction.cs.meta +11 -11
  26. package/ReactionDatabase.cs +111 -111
  27. package/ReactionDatabase.cs.meta +11 -11
  28. package/ReactionUtility.cs +43 -43
  29. package/ReactionUtility.cs.meta +11 -11
  30. package/{Samples → Samples~}/FTE_Data_Handler.prefab +49 -49
  31. package/{Samples → Samples~}/FTE_Data_Handler.prefab.meta +7 -7
  32. package/{Samples → Samples~}/FTE_Manager_ETemplate.prefab +218 -218
  33. package/{Samples → Samples~}/FTE_Manager_ETemplate.prefab.meta +7 -7
  34. package/{Samples → Samples~}/Move_To_Next_Day_Event.prefab +83 -83
  35. package/{Samples → Samples~}/Move_To_Next_Day_Event.prefab.meta +7 -7
  36. package/{Samples → Samples~}/Start_FTE_Handler_ETemplate.prefab +336 -336
  37. package/{Samples → Samples~}/Start_FTE_Handler_ETemplate.prefab.meta +7 -7
  38. package/SimpleFTEEntryCollection.cs +28 -28
  39. package/SimpleFTEEntryCollection.cs.meta +1 -1
  40. package/StartFTEAnimation.cs +76 -76
  41. package/StartFTEAnimation.cs.meta +11 -11
  42. package/package.json +47 -42
  43. package/package.json.meta +7 -7
  44. 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.Characters;
3
- using DREditor.Dialogues;
4
- using DREditor.Dialogues.Loading;
5
- using DREditor.Services;
6
- using System.Collections.Generic;
7
- using UnityEngine;
8
-
9
- namespace DREditor.FreeTime
10
- {
11
- /// <summary>
12
- ///
13
- /// </summary>
14
- [System.Serializable]
15
- [CreateAssetMenu(menuName = "DREditor/FTE/Reaction Database", fileName = "Reaction Database")]
16
- public class ReactionDatabase : ScriptableObject, IDialogueHolder
17
- {
18
- /// <summary>
19
- ///
20
- /// </summary>
21
- [Header("")]
22
- [Divider]
23
- [Tooltip("")]
24
- public List<CharacterReaction> characterReactions = new();
25
-
26
- /// <summary>
27
- ///
28
- /// </summary>
29
- [Tooltip("")]
30
- [SerializeField] protected int badReactionIndex = 4;
31
-
32
-
33
- /// <summary>
34
- ///
35
- /// </summary>
36
- /// <param name="character"></param>
37
- /// <param name="level"></param>
38
- /// <returns></returns>
39
- public virtual List<DialogueCore> GetReactionPool(Character character, int level)
40
- {
41
- var pool = characterReactions.Find(characterReaction => characterReaction.character == character)
42
- .Reactions.Find(presentReaction => presentReaction.reactionKeyIndex == level)
43
- .reactions;
44
-
45
- List<DialogueCore> dialogues = new();
46
-
47
- foreach (var reaction in pool)
48
- dialogues.Add(reaction);
49
-
50
- return dialogues;
51
- }
52
-
53
- /// <summary>
54
- ///
55
- /// </summary>
56
- /// <param name="dialogue"></param>
57
- /// <returns></returns>
58
- public virtual int GetReactionKeyFromDialogue(Dialogue dialogue)
59
- {
60
- CharacterReaction charReact = GetReactionFromDialogue(dialogue);
61
-
62
- PresentReaction reaction = charReact.GetReactionFromDialogue(dialogue);
63
-
64
- if (reaction == null)
65
- {
66
- UnityEngine.Debug.LogWarning(nameof(ReactionDatabase) + ": " +
67
- "The reation level couldn't be found for dialogue: " +
68
- dialogue.name + " and will return a bad reaction level.");
69
-
70
- return badReactionIndex;
71
- }
72
-
73
- return reaction.reactionKeyIndex;
74
- }
75
-
76
- /// <summary>
77
- ///
78
- /// </summary>
79
- /// <param name="dialogue"></param>
80
- /// <returns></returns>
81
- protected virtual CharacterReaction GetReactionFromDialogue(Dialogue dialogue)
82
- {
83
- foreach (CharacterReaction reactions in characterReactions)
84
- {
85
- PresentReaction presentReactionAsset = reactions.Reactions
86
- .Find(presentReactions => presentReactions.reactions.Contains(dialogue));
87
-
88
- if (presentReactionAsset != null)
89
- return reactions;
90
- }
91
-
92
- UnityEngine.Debug.LogWarning(nameof(ReactionDatabase) + ": The character reaction couldn't be found for dialogue: " +
93
- dialogue.name + " and will return a null reaction.");
94
-
95
- return null;
96
- }
97
-
98
-
99
- /// <inheritdoc/>
100
- public virtual bool CheckIfSaveDialogue()
101
- {
102
- foreach (var reaction in characterReactions)
103
- foreach (var presentReaction in reaction.Reactions)
104
- if (ServiceLocator.GetService<IDialogueManager>()
105
- .GetManagerComponent<DialogueLoadIdentifier>()
106
- .CheckDialogues<Line>(presentReaction.GetReactions()))
107
- return true;
108
-
109
- return false;
110
- }
111
- }
1
+ //Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
2
+ using DREditor.Characters;
3
+ using DREditor.Dialogues;
4
+ using DREditor.Dialogues.Loading;
5
+ using DREditor.Services;
6
+ using System.Collections.Generic;
7
+ using UnityEngine;
8
+
9
+ namespace DREditor.FreeTime
10
+ {
11
+ /// <summary>
12
+ ///
13
+ /// </summary>
14
+ [System.Serializable]
15
+ [CreateAssetMenu(menuName = "DREditor/FTE/Reaction Database", fileName = "Reaction Database")]
16
+ public class ReactionDatabase : ScriptableObject, IDialogueHolder
17
+ {
18
+ /// <summary>
19
+ ///
20
+ /// </summary>
21
+ [Header("")]
22
+ [Divider]
23
+ [Tooltip("")]
24
+ public List<CharacterReaction> characterReactions = new();
25
+
26
+ /// <summary>
27
+ ///
28
+ /// </summary>
29
+ [Tooltip("")]
30
+ [SerializeField] protected int badReactionIndex = 4;
31
+
32
+
33
+ /// <summary>
34
+ ///
35
+ /// </summary>
36
+ /// <param name="character"></param>
37
+ /// <param name="level"></param>
38
+ /// <returns></returns>
39
+ public virtual List<DialogueCore> GetReactionPool(Character character, int level)
40
+ {
41
+ var pool = characterReactions.Find(characterReaction => characterReaction.character == character)
42
+ .Reactions.Find(presentReaction => presentReaction.reactionKeyIndex == level)
43
+ .reactions;
44
+
45
+ List<DialogueCore> dialogues = new();
46
+
47
+ foreach (var reaction in pool)
48
+ dialogues.Add(reaction);
49
+
50
+ return dialogues;
51
+ }
52
+
53
+ /// <summary>
54
+ ///
55
+ /// </summary>
56
+ /// <param name="dialogue"></param>
57
+ /// <returns></returns>
58
+ public virtual int GetReactionKeyFromDialogue(Dialogue dialogue)
59
+ {
60
+ CharacterReaction charReact = GetReactionFromDialogue(dialogue);
61
+
62
+ PresentReaction reaction = charReact.GetReactionFromDialogue(dialogue);
63
+
64
+ if (reaction == null)
65
+ {
66
+ UnityEngine.Debug.LogWarning(nameof(ReactionDatabase) + ": " +
67
+ "The reation level couldn't be found for dialogue: " +
68
+ dialogue.name + " and will return a bad reaction level.");
69
+
70
+ return badReactionIndex;
71
+ }
72
+
73
+ return reaction.reactionKeyIndex;
74
+ }
75
+
76
+ /// <summary>
77
+ ///
78
+ /// </summary>
79
+ /// <param name="dialogue"></param>
80
+ /// <returns></returns>
81
+ protected virtual CharacterReaction GetReactionFromDialogue(Dialogue dialogue)
82
+ {
83
+ foreach (CharacterReaction reactions in characterReactions)
84
+ {
85
+ PresentReaction presentReactionAsset = reactions.Reactions
86
+ .Find(presentReactions => presentReactions.reactions.Contains(dialogue));
87
+
88
+ if (presentReactionAsset != null)
89
+ return reactions;
90
+ }
91
+
92
+ UnityEngine.Debug.LogWarning(nameof(ReactionDatabase) + ": The character reaction couldn't be found for dialogue: " +
93
+ dialogue.name + " and will return a null reaction.");
94
+
95
+ return null;
96
+ }
97
+
98
+
99
+ /// <inheritdoc/>
100
+ public virtual bool CheckIfSaveDialogue()
101
+ {
102
+ foreach (var reaction in characterReactions)
103
+ foreach (var presentReaction in reaction.Reactions)
104
+ if (ServiceLocator.GetService<IDialogueManager>()
105
+ .GetManagerComponent<DialogueLoadIdentifier>()
106
+ .CheckDialogues<Line>(presentReaction.GetReactions()))
107
+ return true;
108
+
109
+ return false;
110
+ }
111
+ }
112
112
  }
@@ -1,11 +1,11 @@
1
- fileFormatVersion: 2
2
- guid: 5a7190757e96f7f4a82f240808437415
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: 5a7190757e96f7f4a82f240808437415
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
@@ -1,44 +1,44 @@
1
- //Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
2
- #if UNITY_EDITOR
3
- using UnityEditor;
4
-
5
- namespace DREditor.FreeTime
6
- {
7
- /// <summary>
8
- ///
9
- /// </summary>
10
- public static class ReactionUtility
11
- {
12
- /// <summary>
13
- ///
14
- /// </summary>
15
- [MenuItem("DREditor/FTE/Generate Base Reaction Data")]
16
- public static void GenerateBaseReactionData()
17
- {
18
- UnityEngine.Debug.LogWarning("ALERT: This tool has not been implemented as there will be a " +
19
- "PresentReactionLevel Rework in the future and this class will depend on that process." +
20
- "\nContact Sweden for more information.");
21
-
22
- //database.characterReactions.Clear();
23
-
24
- //List<Character> characters = characterDatabase.GetFTECharacterList();
25
-
26
- //List<PresentReactionLevel> levels = Enum.GetValues(typeof(PresentReactionLevel)).Cast<PresentReactionLevel>().ToList();
27
-
28
- //foreach (Character character in characters)
29
- //{
30
- // CharacterReaction reaction = new(character.FirstName, character);
31
-
32
- // database.characterReactions.Add(reaction);
33
-
34
- // foreach(PresentReactionLevel level in levels)
35
- // {
36
- // PresentReaction presReact = new(level.ToString(), level);
37
-
38
- // reaction.Reactions.Add(presReact);
39
- // }
40
- //}
41
- }
42
- }
43
- }
1
+ //Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
2
+ #if UNITY_EDITOR
3
+ using UnityEditor;
4
+
5
+ namespace DREditor.FreeTime
6
+ {
7
+ /// <summary>
8
+ ///
9
+ /// </summary>
10
+ public static class ReactionUtility
11
+ {
12
+ /// <summary>
13
+ ///
14
+ /// </summary>
15
+ [MenuItem("DREditor/FTE/Generate Base Reaction Data")]
16
+ public static void GenerateBaseReactionData()
17
+ {
18
+ UnityEngine.Debug.LogWarning("ALERT: This tool has not been implemented as there will be a " +
19
+ "PresentReactionLevel Rework in the future and this class will depend on that process." +
20
+ "\nContact Sweden for more information.");
21
+
22
+ //database.characterReactions.Clear();
23
+
24
+ //List<Character> characters = characterDatabase.GetFTECharacterList();
25
+
26
+ //List<PresentReactionLevel> levels = Enum.GetValues(typeof(PresentReactionLevel)).Cast<PresentReactionLevel>().ToList();
27
+
28
+ //foreach (Character character in characters)
29
+ //{
30
+ // CharacterReaction reaction = new(character.FirstName, character);
31
+
32
+ // database.characterReactions.Add(reaction);
33
+
34
+ // foreach(PresentReactionLevel level in levels)
35
+ // {
36
+ // PresentReaction presReact = new(level.ToString(), level);
37
+
38
+ // reaction.Reactions.Add(presReact);
39
+ // }
40
+ //}
41
+ }
42
+ }
43
+ }
44
44
  #endif
@@ -1,11 +1,11 @@
1
- fileFormatVersion: 2
2
- guid: 8a5b1192b4a72884c8822c49674d5e1b
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: 8a5b1192b4a72884c8822c49674d5e1b
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
@@ -1,49 +1,49 @@
1
- %YAML 1.1
2
- %TAG !u! tag:unity3d.com,2011:
3
- --- !u!1 &2695087620381833349
4
- GameObject:
5
- m_ObjectHideFlags: 0
6
- m_CorrespondingSourceObject: {fileID: 0}
7
- m_PrefabInstance: {fileID: 0}
8
- m_PrefabAsset: {fileID: 0}
9
- serializedVersion: 6
10
- m_Component:
11
- - component: {fileID: 2695087620381833348}
12
- - component: {fileID: 2695087620381833347}
13
- m_Layer: 0
14
- m_Name: FTE_Data_Handler
15
- m_TagString: Untagged
16
- m_Icon: {fileID: 0}
17
- m_NavMeshLayer: 0
18
- m_StaticEditorFlags: 0
19
- m_IsActive: 1
20
- --- !u!4 &2695087620381833348
21
- Transform:
22
- m_ObjectHideFlags: 0
23
- m_CorrespondingSourceObject: {fileID: 0}
24
- m_PrefabInstance: {fileID: 0}
25
- m_PrefabAsset: {fileID: 0}
26
- m_GameObject: {fileID: 2695087620381833349}
27
- serializedVersion: 2
28
- m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
29
- m_LocalPosition: {x: 0, y: 0, z: 0}
30
- m_LocalScale: {x: 1, y: 1, z: 1}
31
- m_ConstrainProportionsScale: 0
32
- m_Children: []
33
- m_Father: {fileID: 0}
34
- m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
35
- --- !u!114 &2695087620381833347
36
- MonoBehaviour:
37
- m_ObjectHideFlags: 0
38
- m_CorrespondingSourceObject: {fileID: 0}
39
- m_PrefabInstance: {fileID: 0}
40
- m_PrefabAsset: {fileID: 0}
41
- m_GameObject: {fileID: 2695087620381833349}
42
- m_Enabled: 1
43
- m_EditorHideFlags: 0
44
- m_Script: {fileID: 11500000, guid: 889f5628fce755746837451a211f4b96, type: 3}
45
- m_Name:
46
- m_EditorClassIdentifier:
47
- fTEDataSaveKey: fTEDatas
48
- database: {fileID: 0}
49
- fTEDatas: []
1
+ %YAML 1.1
2
+ %TAG !u! tag:unity3d.com,2011:
3
+ --- !u!1 &2695087620381833349
4
+ GameObject:
5
+ m_ObjectHideFlags: 0
6
+ m_CorrespondingSourceObject: {fileID: 0}
7
+ m_PrefabInstance: {fileID: 0}
8
+ m_PrefabAsset: {fileID: 0}
9
+ serializedVersion: 6
10
+ m_Component:
11
+ - component: {fileID: 2695087620381833348}
12
+ - component: {fileID: 2695087620381833347}
13
+ m_Layer: 0
14
+ m_Name: FTE_Data_Handler
15
+ m_TagString: Untagged
16
+ m_Icon: {fileID: 0}
17
+ m_NavMeshLayer: 0
18
+ m_StaticEditorFlags: 0
19
+ m_IsActive: 1
20
+ --- !u!4 &2695087620381833348
21
+ Transform:
22
+ m_ObjectHideFlags: 0
23
+ m_CorrespondingSourceObject: {fileID: 0}
24
+ m_PrefabInstance: {fileID: 0}
25
+ m_PrefabAsset: {fileID: 0}
26
+ m_GameObject: {fileID: 2695087620381833349}
27
+ serializedVersion: 2
28
+ m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
29
+ m_LocalPosition: {x: 0, y: 0, z: 0}
30
+ m_LocalScale: {x: 1, y: 1, z: 1}
31
+ m_ConstrainProportionsScale: 0
32
+ m_Children: []
33
+ m_Father: {fileID: 0}
34
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
35
+ --- !u!114 &2695087620381833347
36
+ MonoBehaviour:
37
+ m_ObjectHideFlags: 0
38
+ m_CorrespondingSourceObject: {fileID: 0}
39
+ m_PrefabInstance: {fileID: 0}
40
+ m_PrefabAsset: {fileID: 0}
41
+ m_GameObject: {fileID: 2695087620381833349}
42
+ m_Enabled: 1
43
+ m_EditorHideFlags: 0
44
+ m_Script: {fileID: 11500000, guid: 889f5628fce755746837451a211f4b96, type: 3}
45
+ m_Name:
46
+ m_EditorClassIdentifier:
47
+ fTEDataSaveKey: fTEDatas
48
+ database: {fileID: 0}
49
+ fTEDatas: []
@@ -1,7 +1,7 @@
1
- fileFormatVersion: 2
2
- guid: 19663ee03c25e4b47b87a0720a6a4d69
3
- PrefabImporter:
4
- externalObjects: {}
5
- userData:
6
- assetBundleName:
7
- assetBundleVariant:
1
+ fileFormatVersion: 2
2
+ guid: 19663ee03c25e4b47b87a0720a6a4d69
3
+ PrefabImporter:
4
+ externalObjects: {}
5
+ userData:
6
+ assetBundleName:
7
+ assetBundleVariant: