net.dreditor.maps 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.
Files changed (132) hide show
  1. package/.attestation.p7m +0 -0
  2. package/CharacterMapMarkerUI.cs +94 -94
  3. package/CharacterMapMarkerUI.cs.meta +11 -11
  4. package/CharacterMapUITab.cs +171 -171
  5. package/CharacterMapUITab.cs.meta +11 -11
  6. package/ClearMapAreaData.cs +22 -22
  7. package/ClearMapAreaData.cs.meta +11 -11
  8. package/ClearMapInstanceData.cs +35 -35
  9. package/ClearMapInstanceData.cs.meta +11 -11
  10. package/ControlFastTravel.cs +56 -56
  11. package/ControlFastTravel.cs.meta +11 -11
  12. package/DREditor.Maps.asmdef +23 -23
  13. package/DREditor.Maps.asmdef.meta +7 -7
  14. package/DiscoverData.cs +22 -22
  15. package/DiscoverData.cs.meta +11 -11
  16. package/DiscoverableBase.cs +23 -23
  17. package/DiscoverableBase.cs.meta +11 -11
  18. package/FastTravelController.cs +35 -35
  19. package/FastTravelController.cs.meta +11 -11
  20. package/FastTravelData.cs +24 -24
  21. package/FastTravelData.cs.meta +11 -11
  22. package/FastTravelMarker.cs +106 -106
  23. package/FastTravelMarker.cs.meta +13 -13
  24. package/IDHolder.cs +46 -46
  25. package/IDHolder.cs.meta +11 -11
  26. package/IEntryLoader.cs +18 -18
  27. package/IEntryLoader.cs.meta +11 -11
  28. package/IMapManager.cs +26 -26
  29. package/IMapManager.cs.meta +11 -11
  30. package/IPlaceMarker.cs +25 -25
  31. package/IPlaceMarker.cs.meta +11 -11
  32. package/IPlaceOptionHolder.cs +52 -52
  33. package/IPlaceOptionHolder.cs.meta +11 -11
  34. package/MapAreaData.cs +52 -52
  35. package/MapAreaData.cs.meta +11 -11
  36. package/MapAreaEntry.cs +54 -54
  37. package/MapAreaEntry.cs.meta +11 -11
  38. package/MapAreaManager.cs +193 -193
  39. package/MapAreaManager.cs.meta +11 -11
  40. package/MapBaseData.cs +65 -65
  41. package/MapBaseData.cs.meta +11 -11
  42. package/MapData.cs +34 -34
  43. package/MapData.cs.meta +11 -11
  44. package/MapDatabase.cs +132 -132
  45. package/MapDatabase.cs.meta +11 -11
  46. package/MapEntry.cs +76 -76
  47. package/MapEntry.cs.meta +11 -11
  48. package/MapEntryChange.cs +320 -320
  49. package/MapEntryChange.cs.meta +11 -11
  50. package/MapEntryChanger.cs +44 -44
  51. package/MapEntryChanger.cs.meta +11 -11
  52. package/MapHoverSelector.cs +160 -160
  53. package/MapHoverSelector.cs.meta +11 -11
  54. package/MapManager.cs +287 -287
  55. package/MapManager.cs.meta +11 -11
  56. package/MapManagerBase.cs +259 -259
  57. package/MapManagerBase.cs.meta +11 -11
  58. package/MapMarkerSelectable.cs +70 -70
  59. package/MapMarkerSelectable.cs.meta +11 -11
  60. package/MapObjectiveData.cs +27 -27
  61. package/MapObjectiveData.cs.meta +11 -11
  62. package/MapSaveManager.cs +62 -62
  63. package/MapSaveManager.cs.meta +11 -11
  64. package/MapTabUIHandler.cs +97 -97
  65. package/MapTabUIHandler.cs.meta +11 -11
  66. package/MapUITab.cs +25 -25
  67. package/MapUITab.cs.meta +11 -11
  68. package/MapUtility.cs +182 -182
  69. package/MapUtility.cs.meta +11 -11
  70. package/MarkerData.cs +24 -24
  71. package/MarkerData.cs.meta +11 -11
  72. package/MarkerDatabase.cs +56 -56
  73. package/MarkerDatabase.cs.meta +11 -11
  74. package/MarkerUtility.cs +47 -47
  75. package/MarkerUtility.cs.meta +11 -11
  76. package/MarkerVessel.cs +37 -37
  77. package/MarkerVessel.cs.meta +11 -11
  78. package/PlaceData.cs +26 -26
  79. package/PlaceData.cs.meta +11 -11
  80. package/PlaceEntry.cs +82 -82
  81. package/PlaceEntry.cs.meta +11 -11
  82. package/PlaceManager.cs +292 -292
  83. package/PlaceManager.cs.meta +11 -11
  84. package/PlaceMapUITab.cs +202 -202
  85. package/PlaceMapUITab.cs.meta +11 -11
  86. package/{Samples → Samples~}/Clear_Map_Area_Data_Event.prefab +52 -52
  87. package/{Samples → Samples~}/Clear_Map_Area_Data_Event.prefab.meta +7 -7
  88. package/{Samples → Samples~}/Clear_Map_Instance_Data.prefab +56 -56
  89. package/{Samples → Samples~}/Clear_Map_Instance_Data.prefab.meta +7 -7
  90. package/{Samples → Samples~}/DRE_Map_UI.unity +461 -461
  91. package/{Samples → Samples~}/DRE_Map_UI.unity.meta +7 -7
  92. package/{Samples → Samples~}/Map_Entry_Changer.prefab +52 -52
  93. package/{Samples → Samples~}/Map_Entry_Changer.prefab.meta +7 -7
  94. package/{Samples → Samples~}/Map_Marker_Selectable_ETemplate.prefab +126 -126
  95. package/{Samples → Samples~}/Map_Marker_Selectable_ETemplate.prefab.meta +7 -7
  96. package/{Samples → Samples~}/Map_Tab_UI_Handler_Shell.prefab +134 -134
  97. package/{Samples → Samples~}/Map_Tab_UI_Handler_Shell.prefab.meta +7 -7
  98. package/{Samples → Samples~}/Map_Tab_UI_Handler_Template.prefab +404 -404
  99. package/{Samples → Samples~}/Map_Tab_UI_Handler_Template.prefab.meta +7 -7
  100. package/{Samples → Samples~}/Map_UI_Canvas_Shell.prefab +842 -842
  101. package/{Samples → Samples~}/Map_UI_Canvas_Shell.prefab.meta +7 -7
  102. package/{Samples → Samples~}/Map_UI_Canvas_Template.prefab +996 -996
  103. package/{Samples → Samples~}/Map_UI_Canvas_Template.prefab.meta +7 -7
  104. package/{Samples → Samples~}/Map_UI_Controls_ETemplate.prefab +538 -538
  105. package/{Samples → Samples~}/Map_UI_Controls_ETemplate.prefab.meta +7 -7
  106. package/{Samples → Samples~}/Map_UI_GO_FT_ETemplate.prefab +78 -78
  107. package/{Samples → Samples~}/Map_UI_GO_FT_ETemplate.prefab.meta +7 -7
  108. package/{Samples → Samples~}/Map_UI_Place_Place_Name_ETemplate.prefab +181 -181
  109. package/{Samples → Samples~}/Map_UI_Place_Place_Name_ETemplate.prefab.meta +7 -7
  110. package/{Samples → Samples~}/Map_UI_Place_Tab_Shell.prefab +57 -57
  111. package/{Samples → Samples~}/Map_UI_Place_Tab_Shell.prefab.meta +7 -7
  112. package/{Samples → Samples~}/Map_UI_Place_Tab_Template.prefab +806 -806
  113. package/{Samples → Samples~}/Map_UI_Place_Tab_Template.prefab.meta +7 -7
  114. package/{Samples → Samples~}/Map_UI_Place_Tab_UI_ETemplate.prefab +1265 -1265
  115. package/{Samples → Samples~}/Map_UI_Place_Tab_UI_ETemplate.prefab.meta +7 -7
  116. package/{Samples → Samples~}/Map_UI_Reticle_ETemplate.prefab +78 -78
  117. package/{Samples → Samples~}/Map_UI_Reticle_ETemplate.prefab.meta +7 -7
  118. package/{Samples → Samples~}/Map_UI_Student_Tab_Shell.prefab +267 -267
  119. package/{Samples → Samples~}/Map_UI_Student_Tab_Shell.prefab.meta +7 -7
  120. package/{Samples → Samples~}/Map_UI_Student_Tab_Template.prefab +544 -544
  121. package/{Samples → Samples~}/Map_UI_Student_Tab_Template.prefab.meta +7 -7
  122. package/{Samples → Samples~}/Map_UI_Student_Tab_UI_Shell.prefab +90 -90
  123. package/{Samples → Samples~}/Map_UI_Student_Tab_UI_Shell.prefab.meta +7 -7
  124. package/{Samples → Samples~}/Map_UI_Student_Tab_UI_Template.prefab +2031 -2031
  125. package/{Samples → Samples~}/Map_UI_Student_Tab_UI_Template.prefab.meta +7 -7
  126. package/{Samples → Samples~}/Map_UI_Title_ETemplate.prefab +672 -672
  127. package/{Samples → Samples~}/Map_UI_Title_ETemplate.prefab.meta +7 -7
  128. package/{Samples → Samples~}/Place_Template.prefab +200 -200
  129. package/{Samples → Samples~}/Place_Template.prefab.meta +7 -7
  130. package/package.json +45 -40
  131. package/package.json.meta +7 -7
  132. package/Samples.meta +0 -8
package/MapManagerBase.cs CHANGED
@@ -1,260 +1,260 @@
1
- //Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
2
- using DREditor.Services;
3
- using System.Collections;
4
- using TMPro;
5
- using UnityEngine;
6
- using UnityEngine.Events;
7
- using UnityEngine.EventSystems;
8
- using static UnityEngine.InputSystem.InputAction;
9
-
10
- namespace DREditor.Maps
11
- {
12
- /// <summary>
13
- ///
14
- /// </summary>
15
- public abstract class MapManagerBase : ServiceHolder<IMapManager>, IMapManager
16
- {
17
- /// <summary>
18
- ///
19
- /// </summary>
20
- [Header("")]
21
- [Divider]
22
- [Tooltip("")]
23
- [SerializeField] protected MapEntry InstanceData = null;
24
-
25
- /// <summary>
26
- ///
27
- /// </summary>
28
- [Tooltip("")]
29
- [SerializeField] protected GameObject areaGameObject = null;
30
-
31
- /// <summary>
32
- ///
33
- /// </summary>
34
- [Tooltip("")]
35
- [SerializeField] protected MapAreaManager currentAreaManager = null;
36
-
37
- /// <summary>
38
- ///
39
- /// </summary>
40
- [Tooltip("")]
41
- [SerializeField] protected int currentAreaIndex = 0;
42
-
43
-
44
- /// <summary>
45
- ///
46
- /// </summary>
47
- [Header("")]
48
- [Divider]
49
- [Tooltip("")]
50
- [SerializeField] protected MapDatabase mapDatabase = null;
51
-
52
- /// <summary>
53
- ///
54
- /// </summary>
55
- [Tooltip("")]
56
- [SerializeField] protected GameObject root = null;
57
-
58
- /// <summary>
59
- ///
60
- /// </summary>
61
- [Tooltip("")]
62
- [SerializeField] protected TextMeshProUGUI areaText = null;
63
-
64
-
65
- [Header("")]
66
- [SerializeField] protected UnityEvent onMapChanging = null;
67
-
68
-
69
- /// <summary>
70
- ///
71
- /// </summary>
72
- protected int shiftNumber = 0;
73
-
74
- /// <summary>
75
- ///
76
- /// </summary>
77
- protected IPlaceOptionHolder placeOptionHolder;
78
-
79
-
80
- protected virtual void Start() => placeOptionHolder = GetComponentInChildren<IPlaceOptionHolder>();
81
-
82
-
83
- /// <summary>
84
- ///
85
- /// </summary>
86
- protected virtual void UpdateMapUI()
87
- {
88
- shiftNumber = 0;
89
-
90
- if (currentAreaManager != null &&
91
- currentAreaManager.Data.name == mapDatabase.ValidFloorList(InstanceData.UnlockedAreas)[currentAreaIndex].name)
92
- return;
93
-
94
- StopAllCoroutines();
95
-
96
- onMapChanging?.Invoke();
97
-
98
- StartCoroutine(UpdateMapArea());
99
- }
100
-
101
- /// <summary>
102
- ///
103
- /// </summary>
104
- protected virtual IEnumerator UpdateMapArea()
105
- {
106
- DestroyAreaUI();
107
-
108
- yield return null;
109
-
110
- SpawnLoadAreaUI();
111
-
112
- yield return null;
113
-
114
- PopulateMapUIText(0);
115
-
116
- ServiceLocator.GetService<MapTabUIHandler>().InitializeTab();
117
-
118
- if (ServiceLocator.GetService<MapTabUIHandler>().IsOnDefaultTab())
119
- NavigateSelectVisual(new CallbackContext());
120
-
121
- AnimateToHoveredPlace();
122
- }
123
-
124
- /// <summary>
125
- ///
126
- /// </summary>
127
- protected virtual void DestroyAreaUI()
128
- {
129
- if (areaGameObject != null)
130
- Destroy(areaGameObject);
131
- }
132
-
133
- /// <summary>
134
- ///
135
- /// </summary>
136
- protected virtual void SpawnLoadAreaUI()
137
- {
138
- areaGameObject = Instantiate(mapDatabase.ValidFloorList(InstanceData.UnlockedAreas)[currentAreaIndex].prefab, root.transform);
139
-
140
- if (areaGameObject == null)
141
- return;
142
-
143
- currentAreaManager = areaGameObject.GetComponent<MapAreaManager>();
144
-
145
- currentAreaManager
146
- .LoadEntry(InstanceData.GetAreaEntry(currentAreaManager.Data.name), InstanceData.UnlockedAreas);
147
- }
148
-
149
- /// <summary>
150
- ///
151
- /// </summary>
152
- /// <param name="shiftNum"></param>
153
- protected virtual void PopulateMapUIText(int shiftNum)
154
- {
155
- areaText.text = currentAreaManager.Data.name;
156
-
157
- var placeNames = currentAreaManager.GetNamesOfUnlockedPlaces(InstanceData.UnlockedAreas);
158
-
159
- placeOptionHolder.PopulatePlaceUIText(shiftNum, placeNames);
160
- }
161
-
162
- /// <summary>
163
- ///
164
- /// </summary>
165
- /// <param name="ctx"></param>
166
- protected void NavigateSelectVisual(CallbackContext ctx)
167
- {
168
- float vertical = ctx.ReadValue<Vector2>().y;
169
-
170
- bool movingUp = IsMovingUp(vertical);
171
-
172
- if (vertical == 0 && !movingUp)
173
- return;
174
-
175
- bool movingDown = IsMovingDown(vertical);
176
-
177
- if (movingUp || movingDown)
178
- ShiftThenHover(movingUp);
179
-
180
- if (ServiceLocator.GetService<MapTabUIHandler>().IsOnDefaultTab())
181
- AnimateToHoveredPlace();
182
- }
183
-
184
- /// <summary>
185
- ///
186
- /// </summary>
187
- /// <param name="vertical"></param>
188
- /// <returns></returns>
189
- protected virtual bool IsMovingUp(float vertical) =>
190
- vertical > 0 &&
191
- shiftNumber > 0 &&
192
- EventSystem.current.currentSelectedGameObject == placeOptionHolder.GetTopOption();
193
-
194
- /// <summary>
195
- ///
196
- /// </summary>
197
- /// <param name="vertical"></param>
198
- /// <returns></returns>
199
- protected virtual bool IsMovingDown(float vertical) =>
200
- vertical < 0 &&
201
- shiftNumber < placeOptionHolder.GetMaxShiftIndex() &&
202
- EventSystem.current.currentSelectedGameObject == placeOptionHolder.GetBottomOption();
203
-
204
- /// <summary>
205
- ///
206
- /// </summary>
207
- /// <param name="movingUp"></param>
208
- protected virtual void ShiftThenHover(bool movingUp)
209
- {
210
- if (movingUp)
211
- shiftNumber--;
212
- else
213
- shiftNumber++;
214
-
215
- PopulateMapUIText(shiftNumber);
216
-
217
- AnimateToHoveredPlace();
218
- }
219
-
220
- /// <summary>
221
- ///
222
- /// </summary>
223
- protected virtual void AnimateToHoveredPlace() => StartCoroutine(WaitForAreaLoaded());
224
-
225
- /// <summary>
226
- ///
227
- /// </summary>
228
- protected virtual IEnumerator WaitForAreaLoaded()
229
- {
230
- yield return new WaitUntil(() => ServiceLocator.HasService<MapAreaManager>());
231
-
232
- if (!ServiceLocator.HasService(out currentAreaManager))
233
- yield break;
234
-
235
- ServiceLocator.GetService<MapHoverSelector>().AnimateToHoveredPlace(placeOptionHolder.GetCurrentlyHoveredPlace());
236
- }
237
-
238
-
239
- /// <inheritdoc/>
240
- public virtual MapEntry GetInstanceData() => InstanceData;
241
-
242
- /// <inheritdoc/>
243
- public virtual void SetInstanceData(MapEntry InstanceData) => this.InstanceData = InstanceData;
244
-
245
- /// <inheritdoc/>
246
- public virtual void AddUnlockedArea(string areaName)
247
- {
248
- MapAreaData areaData = mapDatabase.GetArea(areaName);
249
-
250
- PlaceData placeData = mapDatabase.GetPlace(areaName);
251
-
252
- if (areaData != null)
253
- InstanceData.UnlockedAreas.Add(areaData.GetID());
254
- else if (placeData != null)
255
- InstanceData.UnlockedAreas.Add(placeData.GetID());
256
- else
257
- UnityEngine.Debug.LogWarning($"ALERT: {ToString()}: Couldn't find the area/place to unlock: " + areaName);
258
- }
259
- }
1
+ //Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
2
+ using DREditor.Services;
3
+ using System.Collections;
4
+ using TMPro;
5
+ using UnityEngine;
6
+ using UnityEngine.Events;
7
+ using UnityEngine.EventSystems;
8
+ using static UnityEngine.InputSystem.InputAction;
9
+
10
+ namespace DREditor.Maps
11
+ {
12
+ /// <summary>
13
+ ///
14
+ /// </summary>
15
+ public abstract class MapManagerBase : ServiceHolder<IMapManager>, IMapManager
16
+ {
17
+ /// <summary>
18
+ ///
19
+ /// </summary>
20
+ [Header("")]
21
+ [Divider]
22
+ [Tooltip("")]
23
+ [SerializeField] protected MapEntry InstanceData = null;
24
+
25
+ /// <summary>
26
+ ///
27
+ /// </summary>
28
+ [Tooltip("")]
29
+ [SerializeField] protected GameObject areaGameObject = null;
30
+
31
+ /// <summary>
32
+ ///
33
+ /// </summary>
34
+ [Tooltip("")]
35
+ [SerializeField] protected MapAreaManager currentAreaManager = null;
36
+
37
+ /// <summary>
38
+ ///
39
+ /// </summary>
40
+ [Tooltip("")]
41
+ [SerializeField] protected int currentAreaIndex = 0;
42
+
43
+
44
+ /// <summary>
45
+ ///
46
+ /// </summary>
47
+ [Header("")]
48
+ [Divider]
49
+ [Tooltip("")]
50
+ [SerializeField] protected MapDatabase mapDatabase = null;
51
+
52
+ /// <summary>
53
+ ///
54
+ /// </summary>
55
+ [Tooltip("")]
56
+ [SerializeField] protected GameObject root = null;
57
+
58
+ /// <summary>
59
+ ///
60
+ /// </summary>
61
+ [Tooltip("")]
62
+ [SerializeField] protected TextMeshProUGUI areaText = null;
63
+
64
+
65
+ [Header("")]
66
+ [SerializeField] protected UnityEvent onMapChanging = null;
67
+
68
+
69
+ /// <summary>
70
+ ///
71
+ /// </summary>
72
+ protected int shiftNumber = 0;
73
+
74
+ /// <summary>
75
+ ///
76
+ /// </summary>
77
+ protected IPlaceOptionHolder placeOptionHolder;
78
+
79
+
80
+ protected virtual void Start() => placeOptionHolder = GetComponentInChildren<IPlaceOptionHolder>();
81
+
82
+
83
+ /// <summary>
84
+ ///
85
+ /// </summary>
86
+ protected virtual void UpdateMapUI()
87
+ {
88
+ shiftNumber = 0;
89
+
90
+ if (currentAreaManager != null &&
91
+ currentAreaManager.Data.name == mapDatabase.ValidFloorList(InstanceData.UnlockedAreas)[currentAreaIndex].name)
92
+ return;
93
+
94
+ StopAllCoroutines();
95
+
96
+ onMapChanging?.Invoke();
97
+
98
+ StartCoroutine(UpdateMapArea());
99
+ }
100
+
101
+ /// <summary>
102
+ ///
103
+ /// </summary>
104
+ protected virtual IEnumerator UpdateMapArea()
105
+ {
106
+ DestroyAreaUI();
107
+
108
+ yield return null;
109
+
110
+ SpawnLoadAreaUI();
111
+
112
+ yield return null;
113
+
114
+ PopulateMapUIText(0);
115
+
116
+ ServiceLocator.GetService<MapTabUIHandler>().InitializeTab();
117
+
118
+ if (ServiceLocator.GetService<MapTabUIHandler>().IsOnDefaultTab())
119
+ NavigateSelectVisual(new CallbackContext());
120
+
121
+ AnimateToHoveredPlace();
122
+ }
123
+
124
+ /// <summary>
125
+ ///
126
+ /// </summary>
127
+ protected virtual void DestroyAreaUI()
128
+ {
129
+ if (areaGameObject != null)
130
+ Destroy(areaGameObject);
131
+ }
132
+
133
+ /// <summary>
134
+ ///
135
+ /// </summary>
136
+ protected virtual void SpawnLoadAreaUI()
137
+ {
138
+ areaGameObject = Instantiate(mapDatabase.ValidFloorList(InstanceData.UnlockedAreas)[currentAreaIndex].prefab, root.transform);
139
+
140
+ if (areaGameObject == null)
141
+ return;
142
+
143
+ currentAreaManager = areaGameObject.GetComponent<MapAreaManager>();
144
+
145
+ currentAreaManager
146
+ .LoadEntry(InstanceData.GetAreaEntry(currentAreaManager.Data.name), InstanceData.UnlockedAreas);
147
+ }
148
+
149
+ /// <summary>
150
+ ///
151
+ /// </summary>
152
+ /// <param name="shiftNum"></param>
153
+ protected virtual void PopulateMapUIText(int shiftNum)
154
+ {
155
+ areaText.text = currentAreaManager.Data.name;
156
+
157
+ var placeNames = currentAreaManager.GetNamesOfUnlockedPlaces(InstanceData.UnlockedAreas);
158
+
159
+ placeOptionHolder.PopulatePlaceUIText(shiftNum, placeNames);
160
+ }
161
+
162
+ /// <summary>
163
+ ///
164
+ /// </summary>
165
+ /// <param name="ctx"></param>
166
+ protected void NavigateSelectVisual(CallbackContext ctx)
167
+ {
168
+ float vertical = ctx.ReadValue<Vector2>().y;
169
+
170
+ bool movingUp = IsMovingUp(vertical);
171
+
172
+ if (vertical == 0 && !movingUp)
173
+ return;
174
+
175
+ bool movingDown = IsMovingDown(vertical);
176
+
177
+ if (movingUp || movingDown)
178
+ ShiftThenHover(movingUp);
179
+
180
+ if (ServiceLocator.GetService<MapTabUIHandler>().IsOnDefaultTab())
181
+ AnimateToHoveredPlace();
182
+ }
183
+
184
+ /// <summary>
185
+ ///
186
+ /// </summary>
187
+ /// <param name="vertical"></param>
188
+ /// <returns></returns>
189
+ protected virtual bool IsMovingUp(float vertical) =>
190
+ vertical > 0 &&
191
+ shiftNumber > 0 &&
192
+ EventSystem.current.currentSelectedGameObject == placeOptionHolder.GetTopOption();
193
+
194
+ /// <summary>
195
+ ///
196
+ /// </summary>
197
+ /// <param name="vertical"></param>
198
+ /// <returns></returns>
199
+ protected virtual bool IsMovingDown(float vertical) =>
200
+ vertical < 0 &&
201
+ shiftNumber < placeOptionHolder.GetMaxShiftIndex() &&
202
+ EventSystem.current.currentSelectedGameObject == placeOptionHolder.GetBottomOption();
203
+
204
+ /// <summary>
205
+ ///
206
+ /// </summary>
207
+ /// <param name="movingUp"></param>
208
+ protected virtual void ShiftThenHover(bool movingUp)
209
+ {
210
+ if (movingUp)
211
+ shiftNumber--;
212
+ else
213
+ shiftNumber++;
214
+
215
+ PopulateMapUIText(shiftNumber);
216
+
217
+ AnimateToHoveredPlace();
218
+ }
219
+
220
+ /// <summary>
221
+ ///
222
+ /// </summary>
223
+ protected virtual void AnimateToHoveredPlace() => StartCoroutine(WaitForAreaLoaded());
224
+
225
+ /// <summary>
226
+ ///
227
+ /// </summary>
228
+ protected virtual IEnumerator WaitForAreaLoaded()
229
+ {
230
+ yield return new WaitUntil(() => ServiceLocator.HasService<MapAreaManager>());
231
+
232
+ if (!ServiceLocator.HasService(out currentAreaManager))
233
+ yield break;
234
+
235
+ ServiceLocator.GetService<MapHoverSelector>().AnimateToHoveredPlace(placeOptionHolder.GetCurrentlyHoveredPlace());
236
+ }
237
+
238
+
239
+ /// <inheritdoc/>
240
+ public virtual MapEntry GetInstanceData() => InstanceData;
241
+
242
+ /// <inheritdoc/>
243
+ public virtual void SetInstanceData(MapEntry InstanceData) => this.InstanceData = InstanceData;
244
+
245
+ /// <inheritdoc/>
246
+ public virtual void AddUnlockedArea(string areaName)
247
+ {
248
+ MapAreaData areaData = mapDatabase.GetArea(areaName);
249
+
250
+ PlaceData placeData = mapDatabase.GetPlace(areaName);
251
+
252
+ if (areaData != null)
253
+ InstanceData.UnlockedAreas.Add(areaData.GetID());
254
+ else if (placeData != null)
255
+ InstanceData.UnlockedAreas.Add(placeData.GetID());
256
+ else
257
+ UnityEngine.Debug.LogWarning($"ALERT: {ToString()}: Couldn't find the area/place to unlock: " + areaName);
258
+ }
259
+ }
260
260
  }
@@ -1,11 +1,11 @@
1
- fileFormatVersion: 2
2
- guid: 7c5121726acf5974fba9c41771146992
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: 7c5121726acf5974fba9c41771146992
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant: