Skip to content

adding more checking of inventory logic to players #18

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion LearnDS/Assets/Scripts/MonoBehaviours/Player.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,20 @@ public Item[] PassItem()
return items;
}


//think about name
//what is it doing?
//name that would explain whats going on
public bool CheckStoveAndTicket()
{
string[] ticketOrder = ticket.PassOrder(orderIndex);
Item[] stoveItems = stoveInventory.GetItems();

//if ticket.length == stove.length ?
for(int i = 0; i < ticketOrder.Length; i++)
{
//handle null exception
//try catch: handle known exception

Debug.Log(ticketOrder[i]+"(Clone)(Clone)" == stoveItems[i].name);
Debug.Log(ticketOrder[i] + " : " + stoveItems[i].name.ToString());

Expand Down
140 changes: 70 additions & 70 deletions LearnDS/UserSettings/Layouts/default-2021.dwlt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ MonoBehaviour:
width: 1920
height: 997
m_ShowMode: 4
m_Title: Game
m_Title: Scene
m_RootView: {fileID: 2}
m_MinSize: {x: 875, y: 300}
m_MaxSize: {x: 10000, y: 10000}
Expand Down Expand Up @@ -119,7 +119,7 @@ MonoBehaviour:
m_MinSize: {x: 300, y: 200}
m_MaxSize: {x: 24288, y: 16192}
vertical: 0
controlID: 54
controlID: 106
--- !u!114 &6
MonoBehaviour:
m_ObjectHideFlags: 52
Expand All @@ -138,12 +138,12 @@ MonoBehaviour:
serializedVersion: 2
x: 0
y: 0
width: 1557
width: 1562
height: 947
m_MinSize: {x: 200, y: 200}
m_MaxSize: {x: 16192, y: 16192}
vertical: 0
controlID: 25
controlID: 141
--- !u!114 &7
MonoBehaviour:
m_ObjectHideFlags: 52
Expand All @@ -163,12 +163,12 @@ MonoBehaviour:
serializedVersion: 2
x: 0
y: 0
width: 1557
width: 1562
height: 947
m_MinSize: {x: 200, y: 200}
m_MaxSize: {x: 16192, y: 16192}
vertical: 1
controlID: 26
controlID: 142
--- !u!114 &8
MonoBehaviour:
m_ObjectHideFlags: 52
Expand All @@ -188,12 +188,12 @@ MonoBehaviour:
serializedVersion: 2
x: 0
y: 0
width: 1557
height: 501
width: 1562
height: 511
m_MinSize: {x: 200, y: 100}
m_MaxSize: {x: 16192, y: 8096}
vertical: 0
controlID: 27
controlID: 117
--- !u!114 &9
MonoBehaviour:
m_ObjectHideFlags: 52
Expand All @@ -211,10 +211,10 @@ MonoBehaviour:
serializedVersion: 2
x: 0
y: 0
width: 1305
height: 501
m_MinSize: {x: 200, y: 200}
m_MaxSize: {x: 4000, y: 4000}
width: 1315
height: 511
m_MinSize: {x: 201, y: 221}
m_MaxSize: {x: 4001, y: 4021}
m_ActualView: {fileID: 15}
m_Panes:
- {fileID: 15}
Expand All @@ -235,12 +235,12 @@ MonoBehaviour:
m_Children: []
m_Position:
serializedVersion: 2
x: 1305
x: 1315
y: 0
width: 252
height: 501
m_MinSize: {x: 200, y: 200}
m_MaxSize: {x: 4000, y: 4000}
width: 247
height: 511
m_MinSize: {x: 202, y: 221}
m_MaxSize: {x: 4002, y: 4021}
m_ActualView: {fileID: 16}
m_Panes:
- {fileID: 16}
Expand All @@ -264,13 +264,13 @@ MonoBehaviour:
m_Position:
serializedVersion: 2
x: 0
y: 501
width: 1557
height: 446
y: 511
width: 1562
height: 436
m_MinSize: {x: 200, y: 100}
m_MaxSize: {x: 16192, y: 8096}
vertical: 0
controlID: 141
controlID: 143
--- !u!114 &12
MonoBehaviour:
m_ObjectHideFlags: 52
Expand All @@ -288,8 +288,8 @@ MonoBehaviour:
serializedVersion: 2
x: 0
y: 0
width: 930
height: 446
width: 1068
height: 436
m_MinSize: {x: 201, y: 221}
m_MaxSize: {x: 4001, y: 4021}
m_ActualView: {fileID: 17}
Expand All @@ -313,10 +313,10 @@ MonoBehaviour:
m_Children: []
m_Position:
serializedVersion: 2
x: 930
x: 1068
y: 0
width: 627
height: 446
width: 494
height: 436
m_MinSize: {x: 232, y: 271}
m_MaxSize: {x: 10002, y: 10021}
m_ActualView: {fileID: 19}
Expand All @@ -339,12 +339,12 @@ MonoBehaviour:
m_Children: []
m_Position:
serializedVersion: 2
x: 1557
x: 1562
y: 0
width: 363
width: 358
height: 947
m_MinSize: {x: 275, y: 50}
m_MaxSize: {x: 4000, y: 4000}
m_MinSize: {x: 276, y: 71}
m_MaxSize: {x: 4001, y: 4021}
m_ActualView: {fileID: 20}
m_Panes:
- {fileID: 20}
Expand Down Expand Up @@ -372,8 +372,8 @@ MonoBehaviour:
serializedVersion: 2
x: 0
y: 73
width: 1304
height: 480
width: 1314
height: 490
m_ViewDataDictionary: {fileID: 0}
m_OverlayCanvas:
m_LastAppliedPresetName: Default
Expand Down Expand Up @@ -420,23 +420,23 @@ MonoBehaviour:
serializedVersion: 2
x: 0
y: 21
width: 1304
height: 459
m_Scale: {x: 0.425, y: 0.425}
m_Translation: {x: 652, y: 229.5}
width: 1314
height: 469
m_Scale: {x: 0.43425924, y: 0.43425927}
m_Translation: {x: 657, y: 234.5}
m_MarginLeft: 0
m_MarginRight: 0
m_MarginTop: 0
m_MarginBottom: 0
m_LastShownAreaInsideMargins:
serializedVersion: 2
x: -1534.1176
x: -1512.9211
y: -540
width: 3068.235
width: 3025.8423
height: 1080
m_MinimalGUI: 1
m_defaultScale: 0.425
m_LastWindowPixelSize: {x: 1304, y: 480}
m_defaultScale: 0.43425927
m_LastWindowPixelSize: {x: 1314, y: 490}
m_ClearInEditMode: 1
m_NoCameraWarning: 1
m_LowResolutionForAspectRatios: 01000000000000000000
Expand All @@ -462,34 +462,34 @@ MonoBehaviour:
m_Tooltip:
m_Pos:
serializedVersion: 2
x: 1305
x: 1315
y: 73
width: 250
height: 480
width: 245
height: 490
m_ViewDataDictionary: {fileID: 0}
m_OverlayCanvas:
m_LastAppliedPresetName: Default
m_SaveData: []
m_SceneHierarchy:
m_TreeViewState:
scrollPos: {x: 0, y: 0}
m_SelectedIDs: a2610000
m_LastClickedID: 0
m_ExpandedIDs: aabcffffc0bcffffaebfffff4aceffffd2cefffff0ceffff26fbffffca600000
scrollPos: {x: 0, y: 651}
m_SelectedIDs: 76600000
m_LastClickedID: 24694
m_ExpandedIDs: 26fbffff34600000ca600000fa600000
m_RenameOverlay:
m_UserAcceptedRename: 0
m_Name: CoinObject (6)
m_OriginalName: CoinObject (6)
m_Name:
m_OriginalName:
m_EditFieldRect:
serializedVersion: 2
x: 0
y: 0
width: 0
height: 0
m_UserData: -1294
m_UserData: 0
m_IsWaitingForDelay: 0
m_IsRenaming: 0
m_OriginalEventType: 0
m_OriginalEventType: 11
m_IsRenamingFilename: 0
m_ClientGUIView: {fileID: 10}
m_SearchString:
Expand Down Expand Up @@ -520,9 +520,9 @@ MonoBehaviour:
m_Pos:
serializedVersion: 2
x: 0
y: 574
width: 929
height: 425
y: 584
width: 1067
height: 415
m_ViewDataDictionary: {fileID: 0}
m_OverlayCanvas:
m_LastAppliedPresetName: Default
Expand Down Expand Up @@ -575,7 +575,7 @@ MonoBehaviour:
containerId: overlay-toolbar__top
floating: 0
collapsed: 0
displayed: 0
displayed: 1
snapOffset: {x: 0, y: 0}
snapOffsetDelta: {x: 0, y: 0}
snapCorner: 0
Expand Down Expand Up @@ -785,7 +785,7 @@ MonoBehaviour:
m_Size: {x: 1, y: 1}
zGrid:
m_Fade:
m_Target: 1
m_Target: 0
speed: 2
m_Value: 1
m_Color: {r: 0.5, g: 0.5, b: 0.5, a: 0.4}
Expand Down Expand Up @@ -927,10 +927,10 @@ MonoBehaviour:
m_Tooltip:
m_Pos:
serializedVersion: 2
x: 930
y: 574
width: 625
height: 425
x: 1068
y: 584
width: 492
height: 415
m_ViewDataDictionary: {fileID: 0}
m_OverlayCanvas:
m_LastAppliedPresetName: Default
Expand All @@ -948,22 +948,22 @@ MonoBehaviour:
m_SkipHidden: 0
m_SearchArea: 1
m_Folders:
- Assets/prefabs
- Assets/Scripts
m_Globs: []
m_OriginalText:
m_ViewMode: 1
m_StartGridSize: 60
m_LastFolders:
- Assets/prefabs
- Assets/Scripts
m_LastFoldersGridSize: 60
m_LastProjectPath: C:\Users\jbord\OneDrive\Desktop\CDLRepository\LearnDataStructures\LearnDS
m_LockTracker:
m_IsLocked: 0
m_FolderTreeState:
scrollPos: {x: 0, y: 0}
m_SelectedIDs: 46630000
m_LastClickedID: 25414
m_ExpandedIDs: 00000000426300004463000046630000486300004a6300004c6300004e63000050630000866300006a68000000ca9a3b
m_SelectedIDs: 52630000
m_LastClickedID: 25426
m_ExpandedIDs: 000000004c6300004e63000050630000526300005463000056630000586300005a63000000ca9a3b
m_RenameOverlay:
m_UserAcceptedRename: 0
m_Name:
Expand Down Expand Up @@ -991,7 +991,7 @@ MonoBehaviour:
scrollPos: {x: 0, y: 0}
m_SelectedIDs:
m_LastClickedID: 0
m_ExpandedIDs: 00000000426300004463000046630000486300004a6300004c6300004e63000050630000
m_ExpandedIDs: 000000004c6300004e63000050630000526300005463000056630000586300005a630000
m_RenameOverlay:
m_UserAcceptedRename: 0
m_Name:
Expand All @@ -1018,7 +1018,7 @@ MonoBehaviour:
m_ListAreaState:
m_SelectedInstanceIDs:
m_LastClickedInstanceID: 0
m_HadKeyboardFocusLastEvent: 1
m_HadKeyboardFocusLastEvent: 0
m_ExpandedInstanceIDs: c6230000f8620000fa620000386c00006e690000a2610000a46100004c700000d861000080d70000f2610000388300003e830000728300009acc0000f2dc0000
m_RenameOverlay:
m_UserAcceptedRename: 0
Expand Down Expand Up @@ -1067,9 +1067,9 @@ MonoBehaviour:
m_Tooltip:
m_Pos:
serializedVersion: 2
x: 1557
x: 1562
y: 73
width: 362
width: 357
height: 926
m_ViewDataDictionary: {fileID: 0}
m_OverlayCanvas:
Expand Down