Open sarinilla opened 3 years ago
The .store et al files are documented under the CLI. Are these files also used with the PyQt interface? In other words, do any restrictions exist for using PyQt and CLI interfaces with the same towns?
Oh. Ahem. Did it still mention .store files? I may have changed my mind on that one. 😁 Yes, they are fully interoperable with the GUI, though. (That's why I changed my mind.) I've updated the README to clarify both.
And a known issue occurs to me here. If you have two identical items in the same store (say, a DX+2 Dirk), there is currently no way to buy only one of them. I might add a --price
you can use to differentiate? And/or maybe some logic that if you are trying to buy one and there are multiple results that are identical that it will just purchase the lower-priced of them. 🤔 For the next update...
As far as restrictions... I'm not sure what would happen if you use both GUI and CLI at the same time, though. Meaning if you open the GUI, enter a town, load a list of shop items... then you go out to the CLI and purchase an item out of that shop, then try to purchase it again in the GUI... That might be an error. But I think that's reasonable, particularly for an early version here...
Or if multiple people were accessing the data files simultaneously from the same interface type. We'd need a transaction-based database for that, which is a bit more ambitious (and outside my bailiwick, though I've always wanted to take a deep dive into SQL databases). I think given the current user base, we can live with the current design!
Create a simple command-line interface to the store manager with a minimal effective feature set (see README or usage examples in
--help
).