Timeline for How can I implement an inventory that stores different types of items?
Current License: CC BY-SA 4.0
5 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jun 27, 2020 at 21:20 | comment | added | Hatoru Hansou | @user253751 Yes, that situation may happen. But we have the best possible use of storage. This only works if you are very sure your items will have only one numerical property. If some items will have two, then yes, you need PARAM1 and PARAM2 columns. If some will have three... and so on. Name of the column isn't really important. | |
Jun 26, 2020 at 11:44 | comment | added | Criticizing Israel not allowed | If I was going with the COUNT_OR_HEALTH approach I'd call them param1, param2, param3, .... Which is a valid approach, but maybe not the ideal one. Calling it COUNT_OR_HEALTH just means you'll need to rename it every time you add an item type which needs a different attribute that isn't count or health. Eventually you'll call it COUNT_OR_HEALTH_OR_STRENGTH_OR_FIRING_SPEED_OR_DURABILITY_OR_... | |
Feb 5, 2020 at 22:31 | history | edited | Hatoru Hansou | CC BY-SA 4.0 |
Important note
|
Feb 5, 2020 at 22:17 | history | edited | Hatoru Hansou | CC BY-SA 4.0 |
C# have Dictionary not Map
|
Feb 5, 2020 at 21:08 | history | answered | Hatoru Hansou | CC BY-SA 4.0 |