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.
- package/.attestation.p7m +0 -0
- package/DREditor.Presents.asmdef +16 -0
- package/DREditor.Presents.asmdef.meta +7 -0
- package/Editor/CreatePresentsWizard.cs +160 -0
- package/Editor/CreatePresentsWizard.cs.meta +11 -0
- package/Editor/DREditor.Presents.Editor.asmdef +18 -0
- package/Editor/DREditor.Presents.Editor.asmdef.meta +7 -0
- package/Editor/DescriptionsByIDOption.cs +106 -0
- package/Editor/DescriptionsByIDOption.cs.meta +2 -0
- package/Editor/PresentDatabaseEditor.cs +184 -0
- package/Editor/PresentDatabaseEditor.cs.meta +11 -0
- package/Editor/PresentEditor.cs +153 -0
- package/Editor/PresentEditor.cs.meta +11 -0
- package/Editor/PresentGoogleSheetsImportOption.cs +55 -0
- package/Editor/PresentGoogleSheetsImportOption.cs.meta +2 -0
- package/Editor/PresentImportOptionBase.cs +132 -0
- package/Editor/PresentImportOptionBase.cs.meta +2 -0
- package/Editor/PresentReactionLevelOption.cs +81 -0
- package/Editor/PresentReactionLevelOption.cs.meta +2 -0
- package/Editor/PresentUtility.cs +42 -0
- package/Editor/PresentUtility.cs.meta +11 -0
- package/Editor/ReactionByIDCharactersOption.cs +136 -0
- package/Editor/ReactionByIDCharactersOption.cs.meta +2 -0
- package/Editor/ReactionByIDOption.cs +54 -0
- package/Editor/ReactionByIDOption.cs.meta +2 -0
- package/Editor/ReactionImportOption.cs +74 -0
- package/Editor/ReactionImportOption.cs.meta +2 -0
- package/Editor/ReactionImporter.cs +59 -0
- package/Editor/ReactionImporter.cs.meta +11 -0
- package/Editor/RenamePresentsByIDOption.cs +96 -0
- package/Editor/RenamePresentsByIDOption.cs.meta +2 -0
- package/Editor/StudentReactionCollectionEditor.cs +104 -0
- package/Editor/StudentReactionCollectionEditor.cs.meta +2 -0
- package/Editor/StudentReactionEditor.cs +83 -0
- package/Editor/StudentReactionEditor.cs.meta +2 -0
- package/Editor.meta +8 -0
- package/IAmountablePresent.cs +29 -0
- package/IAmountablePresent.cs.meta +2 -0
- package/INewPresentObtained.cs +22 -0
- package/INewPresentObtained.cs.meta +2 -0
- package/IPresentData.cs +10 -0
- package/IPresentData.cs.meta +2 -0
- package/IPresentManager.cs +38 -0
- package/IPresentManager.cs.meta +2 -0
- package/IReactionEntry.cs +21 -0
- package/IReactionEntry.cs.meta +2 -0
- package/Present.cs +24 -0
- package/Present.cs.meta +11 -0
- package/PresentData.cs +50 -0
- package/PresentData.cs.meta +11 -0
- package/PresentDatabase.cs +28 -0
- package/PresentDatabase.cs.meta +11 -0
- package/PresentManager.cs +71 -0
- package/PresentManager.cs.meta +11 -0
- package/PresentManagerBase.cs +35 -0
- package/PresentManagerBase.cs.meta +2 -0
- package/PresentReactionLevel.cs +12 -0
- package/PresentReactionLevel.cs.meta +11 -0
- package/PresentSaveBase.cs +26 -0
- package/PresentSaveBase.cs.meta +2 -0
- package/ReactionLevelDatabase.cs +35 -0
- package/ReactionLevelDatabase.cs.meta +11 -0
- package/Samples~/Present_Manager.prefab +54 -0
- package/Samples~/Present_Manager.prefab.meta +7 -0
- package/StudentReaction.cs +28 -0
- package/StudentReaction.cs.meta +2 -0
- package/StudentReactionCollection.cs +45 -0
- package/StudentReactionCollection.cs.meta +2 -0
- package/package.json +37 -4
- package/package.json.meta +7 -0
- 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,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,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,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,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,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,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
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,39 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "net.dreditor.presents",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"description": "
|
|
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
|
+
}
|
package/README.md
DELETED