pmaclellan / ChemCaravan

0 stars 0 forks source link

Inventory redesign #24

Open pmaclellan opened 8 years ago

pmaclellan commented 8 years ago

The inventory system needs to be overhauled to be more intelligent.

Reasoning: In the original, when one of your carriers is killed in combat, the items they were carrying are lost. This requires keeping track of what each is carrying.

Currently, we are just storing chems in a flat dictionary structure that tracks price paid and quantity. We will probably need to convert to a slotted system where each slot holds a single chem and each is tracked individually. this will require extensive changes to how empty space and average price paid are calculated. We will also need to come up with a system for evenly distributing newly purchased chems among the player's personal inventory and the various brahmin. This requires a design choice about how generous to be in terms of whether the player's inventory should be filled first before distributing among the brahmin, which can be lost.

pmaclellan commented 8 years ago

This could be done in the future, but for now isn't necessary. Chems are removed when a brahmin dies based on a variable percentage. This is a faked version of the above description, but is seemingly more in line with what dopewars does.