If I am reading the code on line 618 correctly, you make a list of items and separate all of them by commas except the last two, when the last two items should still have a comma between them (before the word "and").
Within my own game, I've already written a function that formats lists properly (and it even lets me use "or" if need be) which I imported from
an earlier non-Pokémon project of mine. But for your own plugin, I'd suggest this:
if tallyItems.length > 2
string = tallyItems[0..-2].join(', ')
string += ", and #{tallyItems[-1]}"
else
string = tallyItems.join(" and ")
end
Notice that the top line is now if the list size is greater than 2, not 1, and that there's now a comma on the second line. And then the else statement now uses a join of its own.
Additionally, you're going to want to remove all the dollar signs in the pre-set text in the settings menu. Now that you can handle more currencies than just Pokedollars, it's causing the text to display that symbol twice if developers use a pre-set seller.
In a similar vein, I suggest adding this (or something similar) to before the using() do loop within pbChooseNumber:
f = ""
f2 = ""
case $currency.downcase
when "money", "gold"
f = "$ "
when "coins"
f2 = " Coins"
when "battle points", "bp"
f2 = " BP"
end
And then you want to change the instances of numwindow.text to:
numwindow.text = _INTL("x{1}<r>{2}{3}{4}", curnumber, f, (curnumber * itemprice).to_s_formatted, f2)
Lastly, if discount is numeric during the beginning stages of pbPokemonMart where it is parsing the developer's inputs, currency will
always be set to "money" regardless of what the developer uses as the currency input.
You want to write the code as follows:
elsif checkTrueFalseOrNil(useCat) # useCat is given or cantSell is given
if discount.is_a?(Numeric) # discount given (currency and cantSell optional)
if checkTrueFalseOrNil(currency)
cantSell = currency
currency = "money"
end
elsif discount.is_a?(String) # currency given (cantSell optional)
if checkTrueFalseOrNil(currency)
cantSell = currency
currency = discount
discount = nil
end