net.dreditor.roombuilding 0.1.6 → 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.RoomBuilding.asmdef +28 -28
- package/DREditor.RoomBuilding.asmdef.meta +7 -7
- package/Editor/DREditor.RoomBuilding.Editor.asmdef +19 -19
- package/Editor/DREditor.RoomBuilding.Editor.asmdef.meta +7 -7
- package/Editor/FindCharactersInRoomsWizard.cs +55 -55
- package/Editor/FindCharactersInRoomsWizard.cs.meta +11 -11
- package/Editor/RoomBuilderContainsObjective.cs +38 -38
- package/Editor/RoomBuilderContainsObjective.cs.meta +11 -11
- package/Editor/RoomBuilderScanWizard.cs +90 -90
- package/Editor/RoomBuilderScanWizard.cs.meta +11 -11
- package/Editor/ScanRoomBuilders.cs +74 -74
- package/Editor/ScanRoomBuilders.cs.meta +11 -11
- package/Editor.meta +8 -8
- package/Implementation/Actors/ActorData.cs +115 -115
- package/Implementation/Actors/ActorData.cs.meta +11 -11
- package/Implementation/Actors/ActorStateData.cs +10 -10
- package/Implementation/Actors/ActorStateData.cs.meta +11 -11
- package/Implementation/Actors/ActorStateLoader.cs +344 -344
- package/Implementation/Actors/ActorStateLoader.cs.meta +11 -11
- package/Implementation/Actors/TActorData.cs +35 -35
- package/Implementation/Actors/TActorData.cs.meta +11 -11
- package/Implementation/Actors/TrialActorManager.cs +157 -157
- package/Implementation/Actors/TrialActorManager.cs.meta +11 -11
- package/Implementation/Actors.meta +8 -8
- package/Implementation/DoorLoader.cs +117 -117
- package/Implementation/DoorLoader.cs.meta +11 -11
- package/Implementation/DoorLoaderUtility.cs +51 -51
- package/Implementation/DoorLoaderUtility.cs.meta +11 -11
- package/Implementation/DoorStateData.cs +11 -11
- package/Implementation/DoorStateData.cs.meta +11 -11
- package/Implementation/ItemActorLoader.cs +157 -157
- package/Implementation/ItemActorLoader.cs.meta +11 -11
- package/Implementation/ItemData.cs +67 -67
- package/Implementation/ItemData.cs.meta +11 -11
- package/Implementation/ItemStateData.cs +10 -10
- package/Implementation/ItemStateData.cs.meta +11 -11
- package/Implementation/MoveLoader.cs +67 -67
- package/Implementation/MoveLoader.cs.meta +11 -11
- package/Implementation/MoveStateData.cs +11 -11
- package/Implementation/MoveStateData.cs.meta +11 -11
- package/Implementation/RoomStateHandlerBase.cs +241 -241
- package/Implementation/RoomStateHandlerBase.cs.meta +11 -11
- package/Implementation/SaveableData.cs +56 -56
- package/Implementation/SaveableData.cs.meta +11 -11
- package/Implementation/SaveableDataSet.cs +66 -66
- package/Implementation/SaveableDataSet.cs.meta +11 -11
- package/Implementation/SaveableManager.cs +70 -70
- package/Implementation/SaveableManager.cs.meta +11 -11
- package/Implementation/SaveableStateData.cs +10 -10
- package/Implementation/SaveableStateData.cs.meta +11 -11
- package/Implementation/SpawnableLoader.cs +125 -125
- package/Implementation/SpawnableLoader.cs.meta +11 -11
- package/Implementation/SpawnableStateData.cs +11 -11
- package/Implementation/SpawnableStateData.cs.meta +11 -11
- package/Implementation/StateDataAsset.cs +28 -28
- package/Implementation/StateDataAsset.cs.meta +11 -11
- package/Implementation/SubAreaLoader.cs +108 -108
- package/Implementation/SubAreaLoader.cs.meta +11 -11
- package/Implementation/SubAreaStateData.cs +11 -11
- package/Implementation/SubAreaStateData.cs.meta +11 -11
- package/Implementation/TriggerConverter.cs +137 -137
- package/Implementation/TriggerConverter.cs.meta +11 -11
- package/Implementation/TriggerLoader.cs +295 -295
- package/Implementation/TriggerLoader.cs.meta +11 -11
- package/Implementation/TriggerStateData.cs +18 -18
- package/Implementation/TriggerStateData.cs.meta +11 -11
- package/Implementation.meta +8 -8
- package/InstanceListWrapper.cs +23 -23
- package/InstanceListWrapper.cs.meta +11 -11
- package/Instances/ConvertInstanceData.cs +89 -89
- package/Instances/ConvertInstanceData.cs.meta +11 -11
- package/Instances/InstanceData.cs +43 -43
- package/Instances/InstanceData.cs.meta +11 -11
- package/Instances/InstanceStateData.cs +51 -51
- package/Instances/InstanceStateData.cs.meta +11 -11
- package/Instances/RoomInstanceData.cs +68 -68
- package/Instances/RoomInstanceData.cs.meta +11 -11
- package/Instances/RoomInstanceManager.cs +452 -452
- package/Instances/RoomInstanceManager.cs.meta +11 -11
- package/Instances.meta +8 -8
- package/LoadInvestigationRoomState.cs +53 -53
- package/LoadInvestigationRoomState.cs.meta +11 -11
- package/Old/ActorLoader.cs +382 -382
- package/Old/ActorLoader.cs.meta +11 -11
- package/Old/Room.cs +24 -24
- package/Old/Room.cs.meta +11 -11
- package/Old/RoomBuilder.cs +59 -59
- package/Old/RoomBuilder.cs.meta +11 -11
- package/Old/RoomData.cs +90 -90
- package/Old/RoomData.cs.meta +11 -11
- package/Old/RoomManager.cs +256 -256
- package/Old/RoomManager.cs.meta +11 -11
- package/Old/RoomManagerDisplayEditor.cs +72 -72
- package/Old/RoomManagerDisplayEditor.cs.meta +11 -11
- package/Old/RoomManagerEditor.cs +211 -211
- package/Old/RoomManagerEditor.cs.meta +11 -11
- package/Old/RoomManagerShellDisplayEditor.cs +48 -48
- package/Old/RoomManagerShellDisplayEditor.cs.meta +11 -11
- package/Old/RoomSection.cs +35 -35
- package/Old/RoomSection.cs.meta +11 -11
- package/Old.meta +8 -8
- package/RoomManagerBase.cs +84 -84
- package/RoomManagerBase.cs.meta +11 -11
- package/RoomManagerEditorBase.cs +86 -86
- package/RoomManagerEditorBase.cs.meta +11 -11
- package/RoomManagerEditorCoreBase.cs +159 -159
- package/RoomManagerEditorCoreBase.cs.meta +11 -11
- package/RoomSaveDisplayEditorBase.cs +111 -111
- package/RoomSaveDisplayEditorBase.cs.meta +11 -11
- package/RoomShellDisplayEditorBase.cs +68 -68
- package/RoomShellDisplayEditorBase.cs.meta +11 -11
- package/RoomStateBuilder.cs +53 -53
- package/RoomStateBuilder.cs.meta +11 -11
- package/RoomStateData.cs +58 -58
- package/RoomStateData.cs.meta +11 -11
- package/RoomStateManager.cs +202 -202
- package/RoomStateManager.cs.meta +11 -11
- package/RoomStateManagerEditor.cs +392 -392
- package/RoomStateManagerEditor.cs.meta +11 -11
- package/RoomStateSaveDisplayEditor.cs +175 -175
- package/RoomStateSaveDisplayEditor.cs.meta +11 -11
- package/RoomStateSection.cs +69 -69
- package/RoomStateSection.cs.meta +11 -11
- package/RoomStateShellDisplayEditor.cs +108 -108
- package/RoomStateShellDisplayEditor.cs.meta +11 -11
- package/{Samples → Samples~}/Room_State_Manager.prefab +473 -473
- package/{Samples → Samples~}/Room_State_Manager.prefab.meta +7 -7
- package/{Samples → Samples~}/Trial_Actor_Manager.prefab +51 -51
- package/{Samples → Samples~}/Trial_Actor_Manager.prefab.meta +7 -7
- package/package.json +51 -46
- package/package.json.meta +7 -7
- package/Samples.meta +0 -8
package/Old/ActorLoader.cs.meta
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
fileFormatVersion: 2
|
|
2
|
-
guid: bd54e0159bcd8cd499f69aaa88f7190c
|
|
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: bd54e0159bcd8cd499f69aaa88f7190c
|
|
3
|
+
MonoImporter:
|
|
4
|
+
externalObjects: {}
|
|
5
|
+
serializedVersion: 2
|
|
6
|
+
defaultReferences: []
|
|
7
|
+
executionOrder: 0
|
|
8
|
+
icon: {instanceID: 0}
|
|
9
|
+
userData:
|
|
10
|
+
assetBundleName:
|
|
11
|
+
assetBundleVariant:
|
package/Old/Room.cs
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
-
using System;
|
|
3
|
-
|
|
4
|
-
namespace DREditor.RoomBuilding.Old
|
|
5
|
-
{
|
|
6
|
-
/// <summary>
|
|
7
|
-
///
|
|
8
|
-
/// </summary>
|
|
9
|
-
[Serializable]
|
|
10
|
-
public class Room
|
|
11
|
-
{
|
|
12
|
-
public string Name;
|
|
13
|
-
|
|
14
|
-
public RoomData Data;
|
|
15
|
-
|
|
16
|
-
public Room() { }
|
|
17
|
-
|
|
18
|
-
public Room(string Name, RoomData Data)
|
|
19
|
-
{
|
|
20
|
-
this.Name = Name;
|
|
21
|
-
|
|
22
|
-
this.Data = Data;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
1
|
+
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
+
using System;
|
|
3
|
+
|
|
4
|
+
namespace DREditor.RoomBuilding.Old
|
|
5
|
+
{
|
|
6
|
+
/// <summary>
|
|
7
|
+
///
|
|
8
|
+
/// </summary>
|
|
9
|
+
[Serializable]
|
|
10
|
+
public class Room
|
|
11
|
+
{
|
|
12
|
+
public string Name;
|
|
13
|
+
|
|
14
|
+
public RoomData Data;
|
|
15
|
+
|
|
16
|
+
public Room() { }
|
|
17
|
+
|
|
18
|
+
public Room(string Name, RoomData Data)
|
|
19
|
+
{
|
|
20
|
+
this.Name = Name;
|
|
21
|
+
|
|
22
|
+
this.Data = Data;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
25
|
}
|
package/Old/Room.cs.meta
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
fileFormatVersion: 2
|
|
2
|
-
guid: d26402f6c9e64334cb92a2ed36a2434c
|
|
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: d26402f6c9e64334cb92a2ed36a2434c
|
|
3
|
+
MonoImporter:
|
|
4
|
+
externalObjects: {}
|
|
5
|
+
serializedVersion: 2
|
|
6
|
+
defaultReferences: []
|
|
7
|
+
executionOrder: 0
|
|
8
|
+
icon: {instanceID: 0}
|
|
9
|
+
userData:
|
|
10
|
+
assetBundleName:
|
|
11
|
+
assetBundleVariant:
|
package/Old/RoomBuilder.cs
CHANGED
|
@@ -1,59 +1,59 @@
|
|
|
1
|
-
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
-
using DREditor.Progressing;
|
|
3
|
-
using System;
|
|
4
|
-
using System.Collections.Generic;
|
|
5
|
-
using UnityEngine;
|
|
6
|
-
using UnityEngine.Serialization;
|
|
7
|
-
|
|
8
|
-
namespace DREditor.RoomBuilding.Old
|
|
9
|
-
{
|
|
10
|
-
/// <summary>
|
|
11
|
-
///
|
|
12
|
-
/// </summary>
|
|
13
|
-
[Serializable]
|
|
14
|
-
[CreateAssetMenu(menuName = "DREditor/Room Building/Old/Room Builder", fileName = "Room Builder")]
|
|
15
|
-
public class RoomBuilder : ScriptableObject
|
|
16
|
-
{
|
|
17
|
-
[FormerlySerializedAs("Shell")]
|
|
18
|
-
public List<RoomData> Shells = new();
|
|
19
|
-
|
|
20
|
-
public List<RoomSection> Sections = new();
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
public RoomSection GetSectionWithObjective(Chapter c, Objective o)
|
|
24
|
-
{
|
|
25
|
-
foreach (RoomSection section in Sections)
|
|
26
|
-
if (section.Chapter == c && section.HasDataFor(o))
|
|
27
|
-
return section;
|
|
28
|
-
|
|
29
|
-
return null;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
//private void OnEnable()
|
|
34
|
-
//{
|
|
35
|
-
// try
|
|
36
|
-
// {
|
|
37
|
-
// ProgressionDatabase pDB = Resources.Load<ProgressionDatabase>("Progression/ProgressionDatabase");
|
|
38
|
-
// if (Sections.Count < pDB.Chapters.Count)
|
|
39
|
-
// {
|
|
40
|
-
// /* Intended to add a new section when a new chapter was added, to be done later I guess
|
|
41
|
-
// for(int i = 0; i < (pDB.Chapters.Count - Sections.Count); i++)
|
|
42
|
-
// {
|
|
43
|
-
// UnityEngine.Debug.LogWarning("An Additional Section was added to match the current # of chapters");
|
|
44
|
-
// //UnityEngine.Debug.LogWarning("Chapters Count: " + pDB.Chapters.Count);
|
|
45
|
-
// //UnityEngine.Debug.LogWarning("Sections Count: " + Sections.Count);
|
|
46
|
-
// Sections.Add(new RoomSection(pDB.Chapters[i]));
|
|
47
|
-
// }
|
|
48
|
-
// */
|
|
49
|
-
// }
|
|
50
|
-
|
|
51
|
-
// }
|
|
52
|
-
// catch
|
|
53
|
-
// {
|
|
54
|
-
// UnityEngine.Debug.LogError("Progression Asset is missing or in the wrong place! " +
|
|
55
|
-
// "Make sure it's in: Resources/Progression and named ProgressionDatabase");
|
|
56
|
-
// }
|
|
57
|
-
//}
|
|
58
|
-
|
|
59
|
-
}
|
|
1
|
+
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
+
using DREditor.Progressing;
|
|
3
|
+
using System;
|
|
4
|
+
using System.Collections.Generic;
|
|
5
|
+
using UnityEngine;
|
|
6
|
+
using UnityEngine.Serialization;
|
|
7
|
+
|
|
8
|
+
namespace DREditor.RoomBuilding.Old
|
|
9
|
+
{
|
|
10
|
+
/// <summary>
|
|
11
|
+
///
|
|
12
|
+
/// </summary>
|
|
13
|
+
[Serializable]
|
|
14
|
+
[CreateAssetMenu(menuName = "DREditor/Room Building/Old/Room Builder", fileName = "Room Builder")]
|
|
15
|
+
public class RoomBuilder : ScriptableObject
|
|
16
|
+
{
|
|
17
|
+
[FormerlySerializedAs("Shell")]
|
|
18
|
+
public List<RoomData> Shells = new();
|
|
19
|
+
|
|
20
|
+
public List<RoomSection> Sections = new();
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
public RoomSection GetSectionWithObjective(Chapter c, Objective o)
|
|
24
|
+
{
|
|
25
|
+
foreach (RoomSection section in Sections)
|
|
26
|
+
if (section.Chapter == c && section.HasDataFor(o))
|
|
27
|
+
return section;
|
|
28
|
+
|
|
29
|
+
return null;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
//private void OnEnable()
|
|
34
|
+
//{
|
|
35
|
+
// try
|
|
36
|
+
// {
|
|
37
|
+
// ProgressionDatabase pDB = Resources.Load<ProgressionDatabase>("Progression/ProgressionDatabase");
|
|
38
|
+
// if (Sections.Count < pDB.Chapters.Count)
|
|
39
|
+
// {
|
|
40
|
+
// /* Intended to add a new section when a new chapter was added, to be done later I guess
|
|
41
|
+
// for(int i = 0; i < (pDB.Chapters.Count - Sections.Count); i++)
|
|
42
|
+
// {
|
|
43
|
+
// UnityEngine.Debug.LogWarning("An Additional Section was added to match the current # of chapters");
|
|
44
|
+
// //UnityEngine.Debug.LogWarning("Chapters Count: " + pDB.Chapters.Count);
|
|
45
|
+
// //UnityEngine.Debug.LogWarning("Sections Count: " + Sections.Count);
|
|
46
|
+
// Sections.Add(new RoomSection(pDB.Chapters[i]));
|
|
47
|
+
// }
|
|
48
|
+
// */
|
|
49
|
+
// }
|
|
50
|
+
|
|
51
|
+
// }
|
|
52
|
+
// catch
|
|
53
|
+
// {
|
|
54
|
+
// UnityEngine.Debug.LogError("Progression Asset is missing or in the wrong place! " +
|
|
55
|
+
// "Make sure it's in: Resources/Progression and named ProgressionDatabase");
|
|
56
|
+
// }
|
|
57
|
+
//}
|
|
58
|
+
|
|
59
|
+
}
|
package/Old/RoomBuilder.cs.meta
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
fileFormatVersion: 2
|
|
2
|
-
guid: 6c1793c1fca4ff04b805f5a7a4a81be6
|
|
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: 6c1793c1fca4ff04b805f5a7a4a81be6
|
|
3
|
+
MonoImporter:
|
|
4
|
+
externalObjects: {}
|
|
5
|
+
serializedVersion: 2
|
|
6
|
+
defaultReferences: []
|
|
7
|
+
executionOrder: 0
|
|
8
|
+
icon: {instanceID: 0}
|
|
9
|
+
userData:
|
|
10
|
+
assetBundleName:
|
|
11
|
+
assetBundleVariant:
|
package/Old/RoomData.cs
CHANGED
|
@@ -1,91 +1,91 @@
|
|
|
1
|
-
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
-
using DREditor.Doors;
|
|
3
|
-
using DREditor.Progressing;
|
|
4
|
-
using DREditor.RoomBuilding.Implementation;
|
|
5
|
-
using DREditor.RoomBuilding.Implementation.Actors;
|
|
6
|
-
using DREditor.SubAreas;
|
|
7
|
-
using DREditor.Talkables;
|
|
8
|
-
using DREditor.Triggers;
|
|
9
|
-
using System;
|
|
10
|
-
using System.Collections.Generic;
|
|
11
|
-
using UnityEngine;
|
|
12
|
-
using UnityEngine.Serialization;
|
|
13
|
-
|
|
14
|
-
namespace DREditor.RoomBuilding.Old
|
|
15
|
-
{
|
|
16
|
-
/// <summary>
|
|
17
|
-
///
|
|
18
|
-
/// </summary>
|
|
19
|
-
[Serializable]
|
|
20
|
-
public class RoomData
|
|
21
|
-
{
|
|
22
|
-
public bool isPersistent = false; // At present this only persists properly if it's the current room of InstanceData
|
|
23
|
-
|
|
24
|
-
public Objective progressionValue;
|
|
25
|
-
|
|
26
|
-
[FormerlySerializedAs("spawnList")]
|
|
27
|
-
public List<GameObject> spawnDatas = new ();
|
|
28
|
-
|
|
29
|
-
[FormerlySerializedAs("actorList")]
|
|
30
|
-
public List<ActorData> actorDatas = new ();
|
|
31
|
-
|
|
32
|
-
[FormerlySerializedAs("itemList")]
|
|
33
|
-
public List<ItemData> itemDatas = new ();
|
|
34
|
-
|
|
35
|
-
public List<EventTrigger> triggers = new();
|
|
36
|
-
|
|
37
|
-
public List<SubAreaData> subAreas = new();
|
|
38
|
-
|
|
39
|
-
public List<DoorData> doorDatas = new ();
|
|
40
|
-
|
|
41
|
-
public List<MoveData> moveDatas = new();
|
|
42
|
-
|
|
43
|
-
public SaveableData saveables = new ();
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
public RoomData() { }
|
|
47
|
-
|
|
48
|
-
public RoomData(Objective progressionValue)
|
|
49
|
-
{
|
|
50
|
-
this.progressionValue = progressionValue;
|
|
51
|
-
|
|
52
|
-
#if UNITY_EDITOR
|
|
53
|
-
if (!Application.isPlaying)
|
|
54
|
-
spawnDatas = SpawnableLoader.SaveSpawnables();
|
|
55
|
-
#endif
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
public void SetPersistent(bool isPersistent) => this.isPersistent = isPersistent;
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
public void SetActorDatas(List<ActorData> actorDatas) => this.actorDatas = actorDatas;
|
|
62
|
-
public void SetItemDatas(List<ItemData> itemDatas) => this.itemDatas = itemDatas;
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
public void Save()
|
|
66
|
-
{
|
|
67
|
-
#if UNITY_EDITOR
|
|
68
|
-
spawnDatas = SpawnableLoader.SaveSpawnables();
|
|
69
|
-
#endif
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
triggers = TriggerLoader.SaveData();
|
|
73
|
-
|
|
74
|
-
subAreas = SubAreaLoader.SaveData();
|
|
75
|
-
|
|
76
|
-
doorDatas = DoorLoader.SaveData();
|
|
77
|
-
|
|
78
|
-
moveDatas = MoveLoader.SaveData();
|
|
79
|
-
|
|
80
|
-
saveables = SaveableManager.SaveData();
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
/* - List the Objects you want to save in the RoomData class
|
|
84
|
-
* - Below is usually done with a static Class to call Save() and Load()
|
|
85
|
-
* - Go to RoomManager.cs and fill out the save process in the NewSaveRoom function
|
|
86
|
-
* - Go to RoomManager.cs and fill out the load process in the LoadRoom function
|
|
87
|
-
* - Go to RoomManager.cs and fill out the load process in the LoadRoomInstance function
|
|
88
|
-
* - Go to RoomManager.cs and fill out the overwrite process in the Overwrite function
|
|
89
|
-
* - Make sure you make the Save and Load functions on the class you're saving and loading to
|
|
90
|
-
*/
|
|
1
|
+
//Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
|
|
2
|
+
using DREditor.Doors;
|
|
3
|
+
using DREditor.Progressing;
|
|
4
|
+
using DREditor.RoomBuilding.Implementation;
|
|
5
|
+
using DREditor.RoomBuilding.Implementation.Actors;
|
|
6
|
+
using DREditor.SubAreas;
|
|
7
|
+
using DREditor.Talkables;
|
|
8
|
+
using DREditor.Triggers;
|
|
9
|
+
using System;
|
|
10
|
+
using System.Collections.Generic;
|
|
11
|
+
using UnityEngine;
|
|
12
|
+
using UnityEngine.Serialization;
|
|
13
|
+
|
|
14
|
+
namespace DREditor.RoomBuilding.Old
|
|
15
|
+
{
|
|
16
|
+
/// <summary>
|
|
17
|
+
///
|
|
18
|
+
/// </summary>
|
|
19
|
+
[Serializable]
|
|
20
|
+
public class RoomData
|
|
21
|
+
{
|
|
22
|
+
public bool isPersistent = false; // At present this only persists properly if it's the current room of InstanceData
|
|
23
|
+
|
|
24
|
+
public Objective progressionValue;
|
|
25
|
+
|
|
26
|
+
[FormerlySerializedAs("spawnList")]
|
|
27
|
+
public List<GameObject> spawnDatas = new ();
|
|
28
|
+
|
|
29
|
+
[FormerlySerializedAs("actorList")]
|
|
30
|
+
public List<ActorData> actorDatas = new ();
|
|
31
|
+
|
|
32
|
+
[FormerlySerializedAs("itemList")]
|
|
33
|
+
public List<ItemData> itemDatas = new ();
|
|
34
|
+
|
|
35
|
+
public List<EventTrigger> triggers = new();
|
|
36
|
+
|
|
37
|
+
public List<SubAreaData> subAreas = new();
|
|
38
|
+
|
|
39
|
+
public List<DoorData> doorDatas = new ();
|
|
40
|
+
|
|
41
|
+
public List<MoveData> moveDatas = new();
|
|
42
|
+
|
|
43
|
+
public SaveableData saveables = new ();
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
public RoomData() { }
|
|
47
|
+
|
|
48
|
+
public RoomData(Objective progressionValue)
|
|
49
|
+
{
|
|
50
|
+
this.progressionValue = progressionValue;
|
|
51
|
+
|
|
52
|
+
#if UNITY_EDITOR
|
|
53
|
+
if (!Application.isPlaying)
|
|
54
|
+
spawnDatas = SpawnableLoader.SaveSpawnables();
|
|
55
|
+
#endif
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
public void SetPersistent(bool isPersistent) => this.isPersistent = isPersistent;
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
public void SetActorDatas(List<ActorData> actorDatas) => this.actorDatas = actorDatas;
|
|
62
|
+
public void SetItemDatas(List<ItemData> itemDatas) => this.itemDatas = itemDatas;
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
public void Save()
|
|
66
|
+
{
|
|
67
|
+
#if UNITY_EDITOR
|
|
68
|
+
spawnDatas = SpawnableLoader.SaveSpawnables();
|
|
69
|
+
#endif
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
triggers = TriggerLoader.SaveData();
|
|
73
|
+
|
|
74
|
+
subAreas = SubAreaLoader.SaveData();
|
|
75
|
+
|
|
76
|
+
doorDatas = DoorLoader.SaveData();
|
|
77
|
+
|
|
78
|
+
moveDatas = MoveLoader.SaveData();
|
|
79
|
+
|
|
80
|
+
saveables = SaveableManager.SaveData();
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
/* - List the Objects you want to save in the RoomData class
|
|
84
|
+
* - Below is usually done with a static Class to call Save() and Load()
|
|
85
|
+
* - Go to RoomManager.cs and fill out the save process in the NewSaveRoom function
|
|
86
|
+
* - Go to RoomManager.cs and fill out the load process in the LoadRoom function
|
|
87
|
+
* - Go to RoomManager.cs and fill out the load process in the LoadRoomInstance function
|
|
88
|
+
* - Go to RoomManager.cs and fill out the overwrite process in the Overwrite function
|
|
89
|
+
* - Make sure you make the Save and Load functions on the class you're saving and loading to
|
|
90
|
+
*/
|
|
91
91
|
}
|
package/Old/RoomData.cs.meta
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
fileFormatVersion: 2
|
|
2
|
-
guid: bf0d7fc5bcc371d45b1c2830d0f3854c
|
|
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: bf0d7fc5bcc371d45b1c2830d0f3854c
|
|
3
|
+
MonoImporter:
|
|
4
|
+
externalObjects: {}
|
|
5
|
+
serializedVersion: 2
|
|
6
|
+
defaultReferences: []
|
|
7
|
+
executionOrder: 0
|
|
8
|
+
icon: {instanceID: 0}
|
|
9
|
+
userData:
|
|
10
|
+
assetBundleName:
|
|
11
|
+
assetBundleVariant:
|