net.dreditor.presents 0.0.0-stage → 0.1.7

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 (71) hide show
  1. package/.attestation.p7m +0 -0
  2. package/DREditor.Presents.asmdef +16 -0
  3. package/DREditor.Presents.asmdef.meta +7 -0
  4. package/Editor/CreatePresentsWizard.cs +160 -0
  5. package/Editor/CreatePresentsWizard.cs.meta +11 -0
  6. package/Editor/DREditor.Presents.Editor.asmdef +18 -0
  7. package/Editor/DREditor.Presents.Editor.asmdef.meta +7 -0
  8. package/Editor/DescriptionsByIDOption.cs +106 -0
  9. package/Editor/DescriptionsByIDOption.cs.meta +2 -0
  10. package/Editor/PresentDatabaseEditor.cs +184 -0
  11. package/Editor/PresentDatabaseEditor.cs.meta +11 -0
  12. package/Editor/PresentEditor.cs +153 -0
  13. package/Editor/PresentEditor.cs.meta +11 -0
  14. package/Editor/PresentGoogleSheetsImportOption.cs +55 -0
  15. package/Editor/PresentGoogleSheetsImportOption.cs.meta +2 -0
  16. package/Editor/PresentImportOptionBase.cs +132 -0
  17. package/Editor/PresentImportOptionBase.cs.meta +2 -0
  18. package/Editor/PresentReactionLevelOption.cs +81 -0
  19. package/Editor/PresentReactionLevelOption.cs.meta +2 -0
  20. package/Editor/PresentUtility.cs +42 -0
  21. package/Editor/PresentUtility.cs.meta +11 -0
  22. package/Editor/ReactionByIDCharactersOption.cs +136 -0
  23. package/Editor/ReactionByIDCharactersOption.cs.meta +2 -0
  24. package/Editor/ReactionByIDOption.cs +54 -0
  25. package/Editor/ReactionByIDOption.cs.meta +2 -0
  26. package/Editor/ReactionImportOption.cs +74 -0
  27. package/Editor/ReactionImportOption.cs.meta +2 -0
  28. package/Editor/ReactionImporter.cs +59 -0
  29. package/Editor/ReactionImporter.cs.meta +11 -0
  30. package/Editor/RenamePresentsByIDOption.cs +96 -0
  31. package/Editor/RenamePresentsByIDOption.cs.meta +2 -0
  32. package/Editor/StudentReactionCollectionEditor.cs +104 -0
  33. package/Editor/StudentReactionCollectionEditor.cs.meta +2 -0
  34. package/Editor/StudentReactionEditor.cs +83 -0
  35. package/Editor/StudentReactionEditor.cs.meta +2 -0
  36. package/Editor.meta +8 -0
  37. package/IAmountablePresent.cs +29 -0
  38. package/IAmountablePresent.cs.meta +2 -0
  39. package/INewPresentObtained.cs +22 -0
  40. package/INewPresentObtained.cs.meta +2 -0
  41. package/IPresentData.cs +10 -0
  42. package/IPresentData.cs.meta +2 -0
  43. package/IPresentManager.cs +38 -0
  44. package/IPresentManager.cs.meta +2 -0
  45. package/IReactionEntry.cs +21 -0
  46. package/IReactionEntry.cs.meta +2 -0
  47. package/Present.cs +24 -0
  48. package/Present.cs.meta +11 -0
  49. package/PresentData.cs +50 -0
  50. package/PresentData.cs.meta +11 -0
  51. package/PresentDatabase.cs +28 -0
  52. package/PresentDatabase.cs.meta +11 -0
  53. package/PresentManager.cs +71 -0
  54. package/PresentManager.cs.meta +11 -0
  55. package/PresentManagerBase.cs +35 -0
  56. package/PresentManagerBase.cs.meta +2 -0
  57. package/PresentReactionLevel.cs +12 -0
  58. package/PresentReactionLevel.cs.meta +11 -0
  59. package/PresentSaveBase.cs +26 -0
  60. package/PresentSaveBase.cs.meta +2 -0
  61. package/ReactionLevelDatabase.cs +35 -0
  62. package/ReactionLevelDatabase.cs.meta +11 -0
  63. package/Samples~/Present_Manager.prefab +54 -0
  64. package/Samples~/Present_Manager.prefab.meta +7 -0
  65. package/StudentReaction.cs +28 -0
  66. package/StudentReaction.cs.meta +2 -0
  67. package/StudentReactionCollection.cs +45 -0
  68. package/StudentReactionCollection.cs.meta +2 -0
  69. package/package.json +37 -4
  70. package/package.json.meta +7 -0
  71. package/README.md +0 -3
@@ -0,0 +1,35 @@
1
+ //Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
2
+ using DREditor.Processables;
3
+ using DREditor.Services;
4
+ using System.Collections.Generic;
5
+ using System.Linq;
6
+ using UnityEngine;
7
+
8
+ namespace DREditor.Presents
9
+ {
10
+ /// <summary>
11
+ ///
12
+ /// </summary>
13
+ /// <typeparam name="T"></typeparam>
14
+ public abstract class PresentManagerBase<T> : ServiceHolder<IPresentManager>, IPresentManager where T : PresentSaveBase, IIdentifiable
15
+ {
16
+ /// <summary>
17
+ ///
18
+ /// </summary>
19
+ [Header("")]
20
+ [Divider]
21
+ [Tooltip("")]
22
+ [SerializeField] protected List<T> presentDatas = new();
23
+
24
+
25
+ public virtual int Count { get => presentDatas.Count; }
26
+
27
+
28
+ public abstract void AddPresent(int id, int amt = 1);
29
+
30
+ public virtual T1 Get<T1>(int id) where T1 : IIdentifiable
31
+ => presentDatas.OfType<T1>().ToList().Find(i => i.ID == id);
32
+
33
+ public virtual bool HadPresent(int id) => presentDatas.Any(i => i.ID == id);
34
+ }
35
+ }
@@ -0,0 +1,2 @@
1
+ fileFormatVersion: 2
2
+ guid: 0ca4945c93489b341991bd0e7aa4f0a7
@@ -0,0 +1,12 @@
1
+ //Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
2
+ using UnityEngine;
3
+
4
+ namespace DREditor.Presents
5
+ {
6
+ /// <summary>
7
+ ///
8
+ /// </summary>
9
+ [System.Serializable]
10
+ [CreateAssetMenu(menuName = "DREditor/Presents/Reaction Level", fileName = "Present Reaction Level")]
11
+ public class PresentReactionLevel : ScriptableObject { }
12
+ }
@@ -0,0 +1,11 @@
1
+ fileFormatVersion: 2
2
+ guid: a0a7a132cecfe3c488321807deacba2b
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
@@ -0,0 +1,26 @@
1
+ //Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
2
+ using DREditor.Processables;
3
+ using UnityEngine;
4
+
5
+ namespace DREditor.Presents
6
+ {
7
+ /// <summary>
8
+ ///
9
+ /// </summary>
10
+ public abstract class PresentSaveBase : IIdentifiable
11
+ {
12
+ /// <summary>
13
+ ///
14
+ /// </summary>
15
+ [Tooltip("")]
16
+ [SerializeField] protected int ID;
17
+
18
+
19
+ int IIdentifiable.ID => ID;
20
+
21
+
22
+ protected PresentSaveBase() { }
23
+
24
+ protected PresentSaveBase(int ID) => this.ID = ID;
25
+ }
26
+ }
@@ -0,0 +1,2 @@
1
+ fileFormatVersion: 2
2
+ guid: c958577bf5a0b6445a63250ed9440e30
@@ -0,0 +1,35 @@
1
+ //Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
2
+ using System.Collections.Generic;
3
+ using System.Linq;
4
+ using UnityEngine;
5
+
6
+ namespace DREditor.Presents
7
+ {
8
+ /// <summary>
9
+ ///
10
+ /// </summary>
11
+ [System.Serializable]
12
+ [CreateAssetMenu(menuName = "DREditor/Presents/Reaction Level Database", fileName = "Reaction Level Database")]
13
+ public class ReactionLevelDatabase : ScriptableObject
14
+ {
15
+ /// <summary>
16
+ ///
17
+ /// </summary>
18
+ [Tooltip("")]
19
+ [SerializeField] protected List<PresentReactionLevel> reactionLevels = new();
20
+
21
+
22
+ /// <summary>
23
+ ///
24
+ /// </summary>
25
+ /// <returns></returns>
26
+ public virtual string[] GetReactionNames() => reactionLevels.Select(reactionLevel => reactionLevel.name).ToArray();
27
+
28
+ /// <summary>
29
+ ///
30
+ /// </summary>
31
+ /// <param name="index"></param>
32
+ /// <returns></returns>
33
+ public virtual bool ReactionIndexValid(int index) => index >= 0 && index < reactionLevels.Count;
34
+ }
35
+ }
@@ -0,0 +1,11 @@
1
+ fileFormatVersion: 2
2
+ guid: cdbb190fefc7f534ebab9a4bf8e77133
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
@@ -0,0 +1,54 @@
1
+ %YAML 1.1
2
+ %TAG !u! tag:unity3d.com,2011:
3
+ --- !u!1 &6482524680141576321
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: 2412666774934771798}
12
+ - component: {fileID: 6213949345921309375}
13
+ m_Layer: 5
14
+ m_Name: Present_Manager
15
+ m_TagString: Untagged
16
+ m_Icon: {fileID: 0}
17
+ m_NavMeshLayer: 0
18
+ m_StaticEditorFlags: 0
19
+ m_IsActive: 1
20
+ --- !u!224 &2412666774934771798
21
+ RectTransform:
22
+ m_ObjectHideFlags: 0
23
+ m_CorrespondingSourceObject: {fileID: 0}
24
+ m_PrefabInstance: {fileID: 0}
25
+ m_PrefabAsset: {fileID: 0}
26
+ m_GameObject: {fileID: 6482524680141576321}
27
+ m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
28
+ m_LocalPosition: {x: 0, y: 0, z: 0}
29
+ m_LocalScale: {x: 1, y: 1, z: 1}
30
+ m_ConstrainProportionsScale: 0
31
+ m_Children: []
32
+ m_Father: {fileID: 0}
33
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
34
+ m_AnchorMin: {x: 0.5, y: 0.5}
35
+ m_AnchorMax: {x: 0.5, y: 0.5}
36
+ m_AnchoredPosition: {x: 0, y: 0}
37
+ m_SizeDelta: {x: 100, y: 100}
38
+ m_Pivot: {x: 0.5, y: 0.5}
39
+ --- !u!114 &6213949345921309375
40
+ MonoBehaviour:
41
+ m_ObjectHideFlags: 0
42
+ m_CorrespondingSourceObject: {fileID: 0}
43
+ m_PrefabInstance: {fileID: 0}
44
+ m_PrefabAsset: {fileID: 0}
45
+ m_GameObject: {fileID: 6482524680141576321}
46
+ m_Enabled: 1
47
+ m_EditorHideFlags: 0
48
+ m_Script: {fileID: 11500000, guid: c1e952d7bcf686c40b3de7ed39ee3f59, type: 3}
49
+ m_Name:
50
+ m_EditorClassIdentifier:
51
+ registerService: 1
52
+ dontDestroyOnLoad: 0
53
+ presentDatas: []
54
+ saveKey: presentData
@@ -0,0 +1,7 @@
1
+ fileFormatVersion: 2
2
+ guid: 2d7be3ffa5563fa4eb826b8b52f13021
3
+ PrefabImporter:
4
+ externalObjects: {}
5
+ userData:
6
+ assetBundleName:
7
+ assetBundleVariant:
@@ -0,0 +1,28 @@
1
+ //Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
2
+ using DREditor.Characters;
3
+ using UnityEngine;
4
+
5
+ namespace DREditor.Presents
6
+ {
7
+ /// <summary>
8
+ ///
9
+ /// </summary>
10
+ [System.Serializable]
11
+ public class StudentReaction : IReactionEntry
12
+ {
13
+ /// <summary>
14
+ ///
15
+ /// </summary>
16
+ [SerializeField] protected Character character;
17
+
18
+ /// <summary>
19
+ ///
20
+ /// </summary>
21
+ [SerializeField] protected int reactionIndex = 2;
22
+
23
+
24
+ public virtual Character Character { get => character; set => character = value; }
25
+
26
+ public virtual int ReactionIndex { get => reactionIndex; set => reactionIndex = value; }
27
+ }
28
+ }
@@ -0,0 +1,2 @@
1
+ fileFormatVersion: 2
2
+ guid: 48843c304e9b11748b735d42ee65e19a
@@ -0,0 +1,45 @@
1
+ //Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
2
+ using System.Collections.Generic;
3
+ using UnityEngine;
4
+
5
+ namespace DREditor.Presents
6
+ {
7
+ /// <summary>
8
+ ///
9
+ /// </summary>
10
+ [System.Serializable]
11
+ public class StudentReactionCollection : IPresentData
12
+ {
13
+ /// <summary>
14
+ ///
15
+ /// </summary>
16
+ [SerializeReference]
17
+ public List<IReactionEntry> studentReactions = new();
18
+
19
+
20
+ /// <summary>
21
+ ///
22
+ /// </summary>
23
+ /// <param name="name"></param>
24
+ /// <returns></returns>
25
+ public virtual IReactionEntry GetReactionByName(string name)
26
+ {
27
+ foreach (var reaction in studentReactions)
28
+ if (reaction.Character.name == name)
29
+ return reaction;
30
+
31
+ return null;
32
+ }
33
+
34
+ /// <summary>
35
+ ///
36
+ /// </summary>
37
+ /// <param name="name"></param>
38
+ /// <param name="reactionIndex"></param>
39
+ public virtual void SetReaction(string name, int reactionIndex) => GetReactionByName(name).ReactionIndex = reactionIndex;
40
+
41
+
42
+ /// <inheritdoc/>
43
+ public virtual bool IsValid() => studentReactions != null && studentReactions.Count > 0;
44
+ }
45
+ }
@@ -0,0 +1,2 @@
1
+ fileFormatVersion: 2
2
+ guid: 8385140d850ffe34e8faaa4d195731bb
package/package.json CHANGED
@@ -1,6 +1,39 @@
1
1
  {
2
2
  "name": "net.dreditor.presents",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.1.7",
4
+ "displayName": "DREditor Presents",
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.7"
9
+ },
10
+ "publishConfig": {
11
+ "access": "public"
12
+ },
13
+ "author": {
14
+ "name": "Benjamin \"Sweden\" Jillson",
15
+ "email": "dreditortool@gmail.com",
16
+ "url": "https://dreditor.net"
17
+ },
18
+ "keywords": [
19
+ "editor",
20
+ "tool",
21
+ "dreditor"
22
+ ],
23
+ "samples": [
24
+ {
25
+ "displayName": "Samples",
26
+ "description": "",
27
+ "path": "Samples~"
28
+ }
29
+ ],
30
+ "documentationUrl": "https://dreditor.net",
31
+ "license": "Apache-2.0",
32
+ "licensesUrl": "https://dreditor.net/docs/LICENSE.html",
33
+ "changelogUrl": "https://dreditor.net/docs/CHANGELOG.html",
34
+ "repository": {
35
+ "url": "https://github.com/CertifiedSharp/DREditor",
36
+ "type": "git",
37
+ "revision": "14ca252fbb33eb6f53557ecaed1c10902877698f"
38
+ }
39
+ }
@@ -0,0 +1,7 @@
1
+ fileFormatVersion: 2
2
+ guid: 5dad37d80c1277e4093fd6cd3a39c605
3
+ TextScriptImporter:
4
+ externalObjects: {}
5
+ userData:
6
+ assetBundleName:
7
+ assetBundleVariant:
package/README.md DELETED
@@ -1,3 +0,0 @@
1
- # Temporary Holding Version
2
-
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.