-
Notifications
You must be signed in to change notification settings - Fork 0
Interface. Food Inventory
Table of Contents:
Table of contents generated with markdown-toc.
You can carry:
- 10 food items along with you
- And +10 items extra for every donkey that you purchase at the stable.
So, up to 40 food items at most (when having three donkeys) in 10x4 matrix:
Implemented in: #125.
The representation of the above example food inventory, using our internal products IDs would look like that:
P | 28 |
29 |
29 |
4 |
3 |
10 |
||||
D | 11 |
1 |
2 |
3 |
9 |
5 |
6 |
4 |
||
D | 31 |
4 |
9 |
31 |
9 |
8 |
4 |
7 |
6 |
|
D | 29 |
29 |
29 |
29 |
29 |
29 |
29 |
29 |
29 |
29 |
Each array's item has corresponding item's ID or null
value and it does not denote quantity. For food (on contrary to tools) game does not implement items' quantities.
So, the above table or inventory "translated" into Javascript array could look something like that:
let food = [
[28, 29, 29, null, null, null, null, 4, 3, 10],
[1, null, null, 1, 2, 3, 9, 5, 6, 4],
[31, 4, 9, null, 31, 9, 8, 4, 7, 6],
[29, 29, 29, 29, 29, 29, 29, 29, 29, 29]
];
Two-dimensional array is suggested, to make it easier to implement functionality, where player can move items between its own pocket and donkeys that he has purchased (as in graphical example above).
Meaning of the IDs can be found among shop goods and extra items.
Player starts a new game with a completely empty Food Inventory meaning that all 28 array items are set to null
.
- Startup: Loop | Credits
- Game: New | Settings | Load | Save | Options
- Interface: Screen | Common | Control Panel
- Stuff: Cash | Health | Food | Tools | Weapons
- World: Map | Temperature | Time and Date
- Player: General | Goal
- Earning: Assay Office | Bank | Jail
- Spending: Mercantile | Saloon | Stable
- Other: Intro | Doctor | Laundry | Newspaper
- Desert: Intro | Indians | Outlaws | Snakes
- River: Intro | Fishing | Panning | Watering
- Mines: Intro | Exploring | Picking | Lost Mine
- Original: The Story | Manual | Description
- New: Game Manual | Extensions
- Core: Coding | Building | Platforms | Support
- Components: Translations | In‐app payments