net.dreditor.maps 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 (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/MapManager.cs CHANGED
@@ -1,288 +1,288 @@
1
- //Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
2
- using DREditor.RoomLoading;
3
- using DREditor.Services;
4
- using System.Collections;
5
- using UnityEngine;
6
- using UnityEngine.Events;
7
- using UnityEngine.EventSystems;
8
- using UnityEngine.InputSystem;
9
- using static UnityEngine.InputSystem.InputAction;
10
-
11
- namespace DREditor.Maps
12
- {
13
- /// <summary>
14
- ///
15
- /// </summary>
16
- [ClassHeader(nameof(ServiceHolder<IMapManager>) + " for type: " + nameof(IMapManager) +
17
- "\n\n")]
18
- public class MapManager : MapManagerBase
19
- {
20
- /// <summary>
21
- ///
22
- /// </summary>
23
- [Space]
24
- [Tooltip("")]
25
- [SerializeField] protected InputActionReference submit = null;
26
-
27
- /// <summary>
28
- ///
29
- /// </summary>
30
- [Tooltip("")]
31
- [SerializeField] protected InputActionReference navigate = null;
32
-
33
- /// <summary>
34
- ///
35
- /// </summary>
36
- [Tooltip("")]
37
- [SerializeField] protected InputActionReference shuffleLeft = null;
38
-
39
- /// <summary>
40
- ///
41
- /// </summary>
42
- [Tooltip("")]
43
- [SerializeField] protected InputActionReference shuffleRight = null;
44
-
45
- /// <summary>
46
- ///
47
- /// </summary>
48
- [Tooltip("")]
49
- [SerializeField] protected InputActionReference rightClick = null;
50
-
51
- /// <summary>
52
- ///
53
- /// </summary>
54
- [Tooltip("")]
55
- [SerializeField] protected bool giveAllMapsOnStart = false;
56
-
57
-
58
- [Header("")]
59
- [SerializeField] protected UnityEvent OnTeleportMapUI;
60
-
61
-
62
- /// <summary>
63
- ///
64
- /// </summary>
65
- protected bool changingArea = false;
66
-
67
-
68
- /// <summary>
69
- ///
70
- /// </summary>
71
- protected virtual void ActivateControls()
72
- {
73
- submit.action.performed += OnPlaceSelected;
74
-
75
- navigate.action.performed += NavigateSelectVisual;
76
-
77
- shuffleLeft.action.started += DecreaseArea;
78
-
79
- shuffleRight.action.started += IncreaseArea;
80
-
81
- rightClick.action.started += OnChangeTab;
82
- }
83
-
84
- /// <summary>
85
- ///
86
- /// </summary>
87
- protected virtual void DeactivateControls()
88
- {
89
- submit.action.performed -= OnPlaceSelected;
90
-
91
- navigate.action.performed -= NavigateSelectVisual;
92
-
93
- shuffleLeft.action.started -= DecreaseArea;
94
-
95
- shuffleRight.action.started -= IncreaseArea;
96
-
97
- rightClick.action.started -= OnChangeTab;
98
- }
99
-
100
- /// <summary>
101
- ///
102
- /// </summary>
103
- /// <param name="ctx"></param>
104
- protected virtual void OnChangeTab(CallbackContext ctx)
105
- {
106
- if (!ServiceLocator.HasService(out MapTabUIHandler tabHandler))
107
- return;
108
-
109
- if (tabHandler.IsOnDefaultTab())
110
- placeOptionHolder.DisableSelectableOptions();
111
-
112
- tabHandler.UpdateTab();
113
-
114
- if (tabHandler.IsOnDefaultTab())
115
- {
116
- tabHandler.InitializeTab();
117
-
118
- if (tabHandler.IsOnDefaultTab())
119
- AnimateToHoveredPlace();
120
-
121
- PopulateMapUIText(0);
122
- }
123
- else
124
- UpdateMapUI();
125
- }
126
-
127
- /// <summary>
128
- ///
129
- /// </summary>
130
- /// <param name="ctx"></param>
131
- protected virtual void OnPlaceSelected(CallbackContext ctx)
132
- {
133
- UnityEngine.Debug.Log("REPORT: TELEPORT REQUESTED");
134
-
135
- if (ServiceLocator.GetService<MapHoverSelector>().PlaceIsFastTravelable())
136
- EvaluateTeleportingTo(ServiceLocator.GetService<MapHoverSelector>().GetCurrentPlace());
137
- else
138
- UnityEngine.Debug.Log("REPORT: TELEPORT REQUEST UNSUCCESSFUL, PLACE WAS NOT FAST TRAVELABLE.");
139
- }
140
-
141
- /// <summary>
142
- ///
143
- /// </summary>
144
- /// <param name="currentPlace"></param>
145
- protected virtual void EvaluateTeleportingTo(PlaceManager currentPlace)
146
- {
147
- DeactivateControls();
148
-
149
- if (ServiceLocator.HasService(out ITeleporter teleporter) &&
150
- teleporter.RequestTeleport(currentPlace.Data.sceneName, currentPlace.Data.fastTravelIndex))
151
- {
152
- UnityEngine.Debug.Log("REPORT: TELEPORT REQUEST SUCCESSFUL");
153
-
154
- LeaveProcess();
155
-
156
- OnTeleportMapUI?.Invoke();
157
-
158
- Time.timeScale = 1;
159
- }
160
- else
161
- {
162
- UnityEngine.Debug.Log("REPORT: TELEPORT REQUEST UNSUCCESSFUL");
163
-
164
- ActivateControls();
165
- }
166
- }
167
-
168
- /// <summary>
169
- ///
170
- /// </summary>
171
- /// <param name="ctx"></param>
172
- protected virtual void IncreaseArea(CallbackContext ctx)
173
- {
174
- if (changingArea || currentAreaIndex == mapDatabase.ValidFloorList(InstanceData.UnlockedAreas).Count - 1)
175
- return;
176
-
177
- currentAreaIndex++;
178
-
179
- ChangeArea();
180
- }
181
-
182
- /// <summary>
183
- ///
184
- /// </summary>
185
- /// <param name="ctx"></param>
186
- protected virtual void DecreaseArea(CallbackContext ctx)
187
- {
188
- if (changingArea || currentAreaIndex == 0)
189
- return;
190
-
191
- currentAreaIndex--;
192
-
193
- ChangeArea();
194
- }
195
-
196
- /// <summary>
197
- ///
198
- /// </summary>
199
- protected virtual IEnumerator AreaWait()
200
- {
201
- yield return new WaitForEndOfFrame();
202
-
203
- changingArea = false;
204
- }
205
-
206
-
207
- /// <summary>
208
- ///
209
- /// </summary>
210
- protected override void Start()
211
- {
212
- base.Start();
213
-
214
- if (giveAllMapsOnStart)
215
- DebugGivePlayerAllMaps();
216
- }
217
-
218
- /// <summary>
219
- ///
220
- /// </summary>
221
- protected virtual void DebugGivePlayerAllMaps()
222
- {
223
- foreach (var o in mapDatabase.floors)
224
- InstanceData.UnlockedAreas.Add(o.name);
225
- }
226
-
227
-
228
- /// <summary>
229
- ///
230
- /// </summary>
231
- /// <remarks></remarks>
232
- public virtual void StartDisplayingUI()
233
- {
234
- if (mapDatabase != null && mapDatabase.floors.Count > 0)
235
- ChangeArea();
236
- else
237
- UnityEngine.Debug.LogWarning($"ALERT: {ToString()}: Couldn't Populate UI due to Map Database not having information.");
238
- }
239
-
240
- /// <summary>
241
- ///
242
- /// </summary>
243
- protected virtual void ChangeArea()
244
- {
245
- changingArea = true;
246
-
247
- DeactivateControls();
248
-
249
- UpdateMapUI();
250
-
251
- ActivateControls();
252
-
253
- StartCoroutine(AreaWait());
254
- }
255
-
256
-
257
- /// <summary>
258
- ///
259
- /// </summary>
260
- /// <remarks></remarks>
261
- public virtual void LeaveProcess()
262
- {
263
- DeactivateControls();
264
-
265
- EventSystem.current.SetSelectedGameObject(null);
266
-
267
- DestroyAreaUI();
268
-
269
- shiftNumber = 0;
270
-
271
- ServiceLocator.GetService<MapTabUIHandler>().ShowDefaultTab();
272
-
273
- placeOptionHolder.DisableSelectableOptions();
274
- }
275
-
276
-
277
- /// <summary>
278
- ///
279
- /// </summary>
280
- /// <param name="shiftNum"></param>
281
- protected override void PopulateMapUIText(int shiftNum)
282
- {
283
- base.PopulateMapUIText(shiftNum);
284
-
285
- placeOptionHolder.EnableSelectablesOnValidText();
286
- }
287
- }
1
+ //Author: Benjamin "Sweden" Jillson : Discord: sweden_gaming For Project Eden's Garden
2
+ using DREditor.RoomLoading;
3
+ using DREditor.Services;
4
+ using System.Collections;
5
+ using UnityEngine;
6
+ using UnityEngine.Events;
7
+ using UnityEngine.EventSystems;
8
+ using UnityEngine.InputSystem;
9
+ using static UnityEngine.InputSystem.InputAction;
10
+
11
+ namespace DREditor.Maps
12
+ {
13
+ /// <summary>
14
+ ///
15
+ /// </summary>
16
+ [ClassHeader(nameof(ServiceHolder<IMapManager>) + " for type: " + nameof(IMapManager) +
17
+ "\n\n")]
18
+ public class MapManager : MapManagerBase
19
+ {
20
+ /// <summary>
21
+ ///
22
+ /// </summary>
23
+ [Space]
24
+ [Tooltip("")]
25
+ [SerializeField] protected InputActionReference submit = null;
26
+
27
+ /// <summary>
28
+ ///
29
+ /// </summary>
30
+ [Tooltip("")]
31
+ [SerializeField] protected InputActionReference navigate = null;
32
+
33
+ /// <summary>
34
+ ///
35
+ /// </summary>
36
+ [Tooltip("")]
37
+ [SerializeField] protected InputActionReference shuffleLeft = null;
38
+
39
+ /// <summary>
40
+ ///
41
+ /// </summary>
42
+ [Tooltip("")]
43
+ [SerializeField] protected InputActionReference shuffleRight = null;
44
+
45
+ /// <summary>
46
+ ///
47
+ /// </summary>
48
+ [Tooltip("")]
49
+ [SerializeField] protected InputActionReference rightClick = null;
50
+
51
+ /// <summary>
52
+ ///
53
+ /// </summary>
54
+ [Tooltip("")]
55
+ [SerializeField] protected bool giveAllMapsOnStart = false;
56
+
57
+
58
+ [Header("")]
59
+ [SerializeField] protected UnityEvent OnTeleportMapUI;
60
+
61
+
62
+ /// <summary>
63
+ ///
64
+ /// </summary>
65
+ protected bool changingArea = false;
66
+
67
+
68
+ /// <summary>
69
+ ///
70
+ /// </summary>
71
+ protected virtual void ActivateControls()
72
+ {
73
+ submit.action.performed += OnPlaceSelected;
74
+
75
+ navigate.action.performed += NavigateSelectVisual;
76
+
77
+ shuffleLeft.action.started += DecreaseArea;
78
+
79
+ shuffleRight.action.started += IncreaseArea;
80
+
81
+ rightClick.action.started += OnChangeTab;
82
+ }
83
+
84
+ /// <summary>
85
+ ///
86
+ /// </summary>
87
+ protected virtual void DeactivateControls()
88
+ {
89
+ submit.action.performed -= OnPlaceSelected;
90
+
91
+ navigate.action.performed -= NavigateSelectVisual;
92
+
93
+ shuffleLeft.action.started -= DecreaseArea;
94
+
95
+ shuffleRight.action.started -= IncreaseArea;
96
+
97
+ rightClick.action.started -= OnChangeTab;
98
+ }
99
+
100
+ /// <summary>
101
+ ///
102
+ /// </summary>
103
+ /// <param name="ctx"></param>
104
+ protected virtual void OnChangeTab(CallbackContext ctx)
105
+ {
106
+ if (!ServiceLocator.HasService(out MapTabUIHandler tabHandler))
107
+ return;
108
+
109
+ if (tabHandler.IsOnDefaultTab())
110
+ placeOptionHolder.DisableSelectableOptions();
111
+
112
+ tabHandler.UpdateTab();
113
+
114
+ if (tabHandler.IsOnDefaultTab())
115
+ {
116
+ tabHandler.InitializeTab();
117
+
118
+ if (tabHandler.IsOnDefaultTab())
119
+ AnimateToHoveredPlace();
120
+
121
+ PopulateMapUIText(0);
122
+ }
123
+ else
124
+ UpdateMapUI();
125
+ }
126
+
127
+ /// <summary>
128
+ ///
129
+ /// </summary>
130
+ /// <param name="ctx"></param>
131
+ protected virtual void OnPlaceSelected(CallbackContext ctx)
132
+ {
133
+ UnityEngine.Debug.Log("REPORT: TELEPORT REQUESTED");
134
+
135
+ if (ServiceLocator.GetService<MapHoverSelector>().PlaceIsFastTravelable())
136
+ EvaluateTeleportingTo(ServiceLocator.GetService<MapHoverSelector>().GetCurrentPlace());
137
+ else
138
+ UnityEngine.Debug.Log("REPORT: TELEPORT REQUEST UNSUCCESSFUL, PLACE WAS NOT FAST TRAVELABLE.");
139
+ }
140
+
141
+ /// <summary>
142
+ ///
143
+ /// </summary>
144
+ /// <param name="currentPlace"></param>
145
+ protected virtual void EvaluateTeleportingTo(PlaceManager currentPlace)
146
+ {
147
+ DeactivateControls();
148
+
149
+ if (ServiceLocator.HasService(out ITeleporter teleporter) &&
150
+ teleporter.RequestTeleport(currentPlace.Data.sceneName, currentPlace.Data.fastTravelIndex))
151
+ {
152
+ UnityEngine.Debug.Log("REPORT: TELEPORT REQUEST SUCCESSFUL");
153
+
154
+ LeaveProcess();
155
+
156
+ OnTeleportMapUI?.Invoke();
157
+
158
+ Time.timeScale = 1;
159
+ }
160
+ else
161
+ {
162
+ UnityEngine.Debug.Log("REPORT: TELEPORT REQUEST UNSUCCESSFUL");
163
+
164
+ ActivateControls();
165
+ }
166
+ }
167
+
168
+ /// <summary>
169
+ ///
170
+ /// </summary>
171
+ /// <param name="ctx"></param>
172
+ protected virtual void IncreaseArea(CallbackContext ctx)
173
+ {
174
+ if (changingArea || currentAreaIndex == mapDatabase.ValidFloorList(InstanceData.UnlockedAreas).Count - 1)
175
+ return;
176
+
177
+ currentAreaIndex++;
178
+
179
+ ChangeArea();
180
+ }
181
+
182
+ /// <summary>
183
+ ///
184
+ /// </summary>
185
+ /// <param name="ctx"></param>
186
+ protected virtual void DecreaseArea(CallbackContext ctx)
187
+ {
188
+ if (changingArea || currentAreaIndex == 0)
189
+ return;
190
+
191
+ currentAreaIndex--;
192
+
193
+ ChangeArea();
194
+ }
195
+
196
+ /// <summary>
197
+ ///
198
+ /// </summary>
199
+ protected virtual IEnumerator AreaWait()
200
+ {
201
+ yield return new WaitForEndOfFrame();
202
+
203
+ changingArea = false;
204
+ }
205
+
206
+
207
+ /// <summary>
208
+ ///
209
+ /// </summary>
210
+ protected override void Start()
211
+ {
212
+ base.Start();
213
+
214
+ if (giveAllMapsOnStart)
215
+ DebugGivePlayerAllMaps();
216
+ }
217
+
218
+ /// <summary>
219
+ ///
220
+ /// </summary>
221
+ protected virtual void DebugGivePlayerAllMaps()
222
+ {
223
+ foreach (var o in mapDatabase.floors)
224
+ InstanceData.UnlockedAreas.Add(o.name);
225
+ }
226
+
227
+
228
+ /// <summary>
229
+ ///
230
+ /// </summary>
231
+ /// <remarks></remarks>
232
+ public virtual void StartDisplayingUI()
233
+ {
234
+ if (mapDatabase != null && mapDatabase.floors.Count > 0)
235
+ ChangeArea();
236
+ else
237
+ UnityEngine.Debug.LogWarning($"ALERT: {ToString()}: Couldn't Populate UI due to Map Database not having information.");
238
+ }
239
+
240
+ /// <summary>
241
+ ///
242
+ /// </summary>
243
+ protected virtual void ChangeArea()
244
+ {
245
+ changingArea = true;
246
+
247
+ DeactivateControls();
248
+
249
+ UpdateMapUI();
250
+
251
+ ActivateControls();
252
+
253
+ StartCoroutine(AreaWait());
254
+ }
255
+
256
+
257
+ /// <summary>
258
+ ///
259
+ /// </summary>
260
+ /// <remarks></remarks>
261
+ public virtual void LeaveProcess()
262
+ {
263
+ DeactivateControls();
264
+
265
+ EventSystem.current.SetSelectedGameObject(null);
266
+
267
+ DestroyAreaUI();
268
+
269
+ shiftNumber = 0;
270
+
271
+ ServiceLocator.GetService<MapTabUIHandler>().ShowDefaultTab();
272
+
273
+ placeOptionHolder.DisableSelectableOptions();
274
+ }
275
+
276
+
277
+ /// <summary>
278
+ ///
279
+ /// </summary>
280
+ /// <param name="shiftNum"></param>
281
+ protected override void PopulateMapUIText(int shiftNum)
282
+ {
283
+ base.PopulateMapUIText(shiftNum);
284
+
285
+ placeOptionHolder.EnableSelectablesOnValidText();
286
+ }
287
+ }
288
288
  }
@@ -1,11 +1,11 @@
1
- fileFormatVersion: 2
2
- guid: e4f0cd550b032bc4fb6f8c48b2326adf
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: e4f0cd550b032bc4fb6f8c48b2326adf
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant: