Skip to content

Commit f05a402

Browse files
committed
Merge branch 'pr/396' into main . Fix Player Inventory/ Testing inventory data.
1 parent bddfc4f commit f05a402

File tree

9 files changed

+217
-195
lines changed

9 files changed

+217
-195
lines changed

UOP1_Project/Assets/Prefabs/Gameplay/EditorInitializer.prefab

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,4 @@ MonoBehaviour:
5454
_onSceneReadyChannel: {fileID: 11400000, guid: b729e40fc41dd8b4ea7aaf5c857f7186,
5555
type: 2}
5656
_pathStorage: {fileID: 11400000, guid: a9ec09853cba047a8a58f5881053cfc6, type: 2}
57+
_saveSystem: {fileID: 11400000, guid: edc355c4a7d5028408d322b90814e19e, type: 2}

UOP1_Project/Assets/Scenes/Locations/Beach.unity

Lines changed: 173 additions & 173 deletions
Large diffs are not rendered by default.

UOP1_Project/Assets/Scenes/WIP/TestingGround_Questline.unity

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -428,12 +428,12 @@ PrefabInstance:
428428
- target: {fileID: 653251662382642302, guid: 27c7b99622d41f04ba08f0f122783c20,
429429
type: 3}
430430
propertyPath: m_LocalRotation.y
431-
value: 0.0000000037212475
431+
value: 0.0000000037212473
432432
objectReference: {fileID: 0}
433433
- target: {fileID: 653251662382642302, guid: 27c7b99622d41f04ba08f0f122783c20,
434434
type: 3}
435435
propertyPath: m_LocalRotation.z
436-
value: 1.7351201e-10
436+
value: 1.73512e-10
437437
objectReference: {fileID: 0}
438438
- target: {fileID: 5815136950816891769, guid: 27c7b99622d41f04ba08f0f122783c20,
439439
type: 3}
@@ -1632,6 +1632,12 @@ PrefabInstance:
16321632
propertyPath: m_LocalEulerAnglesHint.z
16331633
value: 0
16341634
objectReference: {fileID: 0}
1635+
- target: {fileID: 7222522106795826365, guid: 54d1f8b93400ea64d97c276fab375df3,
1636+
type: 3}
1637+
propertyPath: _thisSceneSO
1638+
value:
1639+
objectReference: {fileID: 11400000, guid: 7713c45402e4e7c4a8ae2d8c3e8689f2,
1640+
type: 2}
16351641
m_RemovedComponents: []
16361642
m_SourcePrefab: {fileID: 100100000, guid: 54d1f8b93400ea64d97c276fab375df3, type: 3}
16371643
--- !u!1 &695792052
@@ -3216,17 +3222,17 @@ PrefabInstance:
32163222
- target: {fileID: 2808035858438402709, guid: 45632f0a227c860489bcba0eb1f4ec3e,
32173223
type: 3}
32183224
propertyPath: m_LocalRotation.x
3219-
value: 0.10224992
3225+
value: 0.102249905
32203226
objectReference: {fileID: 0}
32213227
- target: {fileID: 2808035858438402709, guid: 45632f0a227c860489bcba0eb1f4ec3e,
32223228
type: 3}
32233229
propertyPath: m_LocalRotation.y
3224-
value: -0.08917594
3230+
value: -0.08917595
32253231
objectReference: {fileID: 0}
32263232
- target: {fileID: 2808035858438402709, guid: 45632f0a227c860489bcba0eb1f4ec3e,
32273233
type: 3}
32283234
propertyPath: m_LocalRotation.z
3229-
value: 0.024490176
3235+
value: 0.024490178
32303236
objectReference: {fileID: 0}
32313237
- target: {fileID: 2955398947125553842, guid: 45632f0a227c860489bcba0eb1f4ec3e,
32323238
type: 3}

UOP1_Project/Assets/ScriptableObjects/Inventory/PlayerInventory.asset

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,3 @@ MonoBehaviour:
1616
_defaultItems:
1717
- _item: {fileID: 11400000, guid: 540c35ca6164bf3438e37e4f8087d47c, type: 2}
1818
Amount: 1
19-
- _item: {fileID: 11400000, guid: 42396f680e5649c4b91e2b29ff34f811, type: 2}
20-
Amount: 20
21-
- _item: {fileID: 11400000, guid: 1c53a3bee1a484bc2ab70d7f4f1f0aa4, type: 2}
22-
Amount: 20
23-
- _item: {fileID: 11400000, guid: 7a6557abb46da48458da1572c9022163, type: 2}
24-
Amount: 20
25-
- _item: {fileID: 11400000, guid: f14caff5e16bd4a48b45e4a2c5a0fc86, type: 2}
26-
Amount: 20
27-
- _item: {fileID: 11400000, guid: 3e353820f321eb9469633db094e0c048, type: 2}
28-
Amount: 1

UOP1_Project/Assets/ScriptableObjects/Inventory/TestingInventory.asset

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,13 @@ MonoBehaviour:
1616
_defaultItems:
1717
- _item: {fileID: 11400000, guid: 540c35ca6164bf3438e37e4f8087d47c, type: 2}
1818
Amount: 1
19+
- _item: {fileID: 11400000, guid: 42396f680e5649c4b91e2b29ff34f811, type: 2}
20+
Amount: 20
21+
- _item: {fileID: 11400000, guid: 1c53a3bee1a484bc2ab70d7f4f1f0aa4, type: 2}
22+
Amount: 20
23+
- _item: {fileID: 11400000, guid: 7a6557abb46da48458da1572c9022163, type: 2}
24+
Amount: 20
25+
- _item: {fileID: 11400000, guid: f14caff5e16bd4a48b45e4a2c5a0fc86, type: 2}
26+
Amount: 20
27+
- _item: {fileID: 11400000, guid: 3e353820f321eb9469633db094e0c048, type: 2}
28+
Amount: 1

UOP1_Project/Assets/ScriptableObjects/Quests/Questline1/QL1.asset

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@ MonoBehaviour:
1616
_idQuestLine: 1
1717
_quests:
1818
- {fileID: 11400000, guid: 2419d670f41b60f45939ba1637631315, type: 2}
19-
_isDone: 1
19+
_isDone: 0
2020
_endQuestlineEvent: {fileID: 11400000, guid: f1dfa8d5cf7153245aa0c66e9d73942a, type: 2}

UOP1_Project/Assets/ScriptableObjects/SaveSystem/SaveSystem.asset

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,16 @@ MonoBehaviour:
1313
m_Name: SaveSystem
1414
m_EditorClassIdentifier:
1515
_loadLocation: {fileID: 11400000, guid: 00e3063edc5902e40832ea618644c597, type: 2}
16-
_playerInventory: {fileID: 11400000, guid: 59c84467f7726dc4587a8373b0936f03, type: 2}
16+
_playerInventory: {fileID: 11400000, guid: d0238f5fb055027499af8e4c6961e01b, type: 2}
1717
_questManagerSO: {fileID: 11400000, guid: dacb138678b7c2344b59c68de5dc18db, type: 2}
1818
saveFilename: save.chop
1919
backupSaveFilename: save.chop.bak
2020
saveData:
21-
_locationId: 1514f833150a79e4c9d242f58bdbcbc0
21+
_locationId: 2f386bbc670c05145834a0f9c7d55798
2222
_itemStacks: []
23-
_finishedQuestlineItemsGUIds: []
23+
_finishedQuestlineItemsGUIds:
24+
- 7b43c62a4fa974bbc82d5af43cc173ca
25+
- 2419d670f41b60f45939ba1637631315
26+
- 2187c1f18f6f9ae4bbd10f33a1871d8e
27+
- 2c804c0ebb31e6a48af992dacd5db830
28+
- c0990e60e5858ed48b0add09c1895572

UOP1_Project/Assets/Scripts/Menu/MenuSelectionHandler.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ private IEnumerator SelectDefault()
4141
public void Unselect()
4242
{
4343
currentSelection = null;
44-
EventSystem.current.SetSelectedGameObject(null);
44+
if (EventSystem.current != null)
45+
EventSystem.current.SetSelectedGameObject(null);
4546
}
4647

4748
/// <summary>

UOP1_Project/Assets/Scripts/SceneManagement/EditorColdStartup.cs

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ public class EditorColdStartup : MonoBehaviour
1818

1919
private bool isColdStart = false;
2020

21+
[SerializeField] private SaveSystem _saveSystem = default;
2122
private void Awake()
2223
{
2324
if (!SceneManager.GetSceneByName(_persistentManagersSO.sceneReference.editorAsset.name).isLoaded)
@@ -34,17 +35,25 @@ private void Start()
3435
if (isColdStart)
3536
{
3637
_persistentManagersSO.sceneReference.LoadSceneAsync(LoadSceneMode.Additive, true).Completed += LoadEventChannel;
38+
39+
}
40+
CreateSaveFileIfNotPresent();
41+
}
42+
private void CreateSaveFileIfNotPresent()
43+
{
44+
if (_saveSystem != null && !_saveSystem.LoadSaveDataFromDisk())
45+
{
46+
_saveSystem.SetNewGameData();
3747
}
3848
}
39-
4049
private void LoadEventChannel(AsyncOperationHandle<SceneInstance> obj)
4150
{
4251
_notifyColdStartupChannel.LoadAssetAsync<LoadEventChannelSO>().Completed += OnNotifyChannelLoaded;
4352
}
4453

4554
private void OnNotifyChannelLoaded(AsyncOperationHandle<LoadEventChannelSO> obj)
4655
{
47-
if(_thisSceneSO != null)
56+
if (_thisSceneSO != null)
4857
{
4958
obj.Result.RaiseEvent(_thisSceneSO);
5059
}

0 commit comments

Comments
 (0)