Every time KoL comes up with a new Coinmaster, they add some new wrinkle to it and I have to refactor the code. This is no exception.
Currently, we believe that there is a one-to-one mapping between type of token and the Coinmaster we present in the GUI. Here, the token is "lunar isotope" but there are three different shops, each with its own URL, that trade in it. I see two choices:
1) Make each shop - dollmaker, lunch, isotope armory - its own coinmaster (and refactor to allow that)
2) Make one coinmaster which handles everything which trades in isotopes (and refactor to allow different URLs for the three categories of goods).
Neither looks particularly easier or harder. The question comes down to: which is best for the user? Opinions?
Another wrinkle is that you require a status effect to be able to even get to the shop. We have other coinmasters with conditions: the dimemaster and quartersmaster require you to wear a particular outfit, Big Brother requires you to breath underwater, the bounty hunter and the game shoppe require access to the Distant Woods (although I don't think we enforce either), and so on. We have a "check" button on the frame which will suit up and visit.
I assume that the "check" button will use a transporter if you are not Transpondent. There are other reasons to want to have that effect, other than simply buying from a shop, but if the user proactively presses that button, it's a command.
What about "acquire"? That (actually, InventoryManager.retrieveItem) has special knowledge that allows you to retrieve a coffee pixie stick by trading tickets to the arcade and to trade in snack vouchers at the game shoppe. I assume we'll want similar code to trade lunar isotopes for food, drink, and potions from the lunch counter. But, again, we run into needing the status effect to actually GET there. If you have the Transpondent effect, the stores are available, we can trade isotopes for consumables, and I can make "acquire" (and the Food & Booze panels of the Item Manager) do that.
But what about if you DON'T have the effect active? If you don't have a transporter, no problem: those items are not accessible and are not shown in the Item Manager. If you DO have a transponder, should I show them as available - and use one if the user asks for them - and expect the user to understand that? I may very well want to use one of the consumables rather than something I already have - if I can see and compare.
I guess it's sort of like the other thing we've discussed recently of showing Fancy food and drink even if you do not (yet) have the right tool in your kitchen, as long as you have enough Meat to buy the tool when you first ask to make a Fancy item. Here, the "tool" is Transpondent, the "Meat" to acquire it is a transporter in inventory, and "buying" the tool is using the transponder.
But, I have a niggling feeling that it's not QUITE the same, since that effect allows other things - in particular, adventuring in Spaaace - than simply acquiring a consumable, and you might want to be careful with your Spaaace turns.
Thoughts?