message: add negative handling
diff: @@ -3,38 +3,41 @@ setup.money = (copper, priceMod) => {
  if (priceMod) copper = Math.round(copper * setup.getPriceMod(priceMod))
  let silver
  let gold
  - switch (settings.silverStandard) {
  - case true:
  - if (copper >= 10000) {
  - gold = Math.trunc(copper / 10000)
  - copper %= 10000
  - } else {
  - gold = 0
  + let isNegative = false
  + if (copper < 0) { isNegative = true }
  + copper = Math.abs(copper)
  + const conversionRates = {
  + default: {
  + copperToGold: 100,
  + silverToGold: 10
  + },
  + silverStandard: {
  + copperToGold: 10000,
  + silverToGold: 100
  }
  -
  - if (copper >= 100) {
  - silver = Math.trunc(copper / 100)
  - copper %= 100
  + }
  + let conversions
  + if (settings.silverStandard) {
  + conversions = conversionRates.silverStandard
  } else {
  - silver = 0
  + conversions = conversionRates.default
  }
  - break
  - default:
  - if (copper >= 100) {
  - gold = Math.trunc(copper / 100)
  - copper %= 100
  +
  + if (copper >= conversions.copperToGold) {
  + gold = Math.trunc(copper / conversions.copperToGold)
  + copper %= conversions.copperToGold
  } else {
  gold = 0
  }
  - if (copper >= 10) {
  - silver = Math.trunc(copper / 10)
  - copper %= 10
  + if (copper >= conversions.silverToGold) {
  + silver = Math.trunc(copper / conversions.silverToGold)
  + copper %= conversions.silverToGold
  } else {
  silver = 0
  }
  - }
  let output = ''
  + if (isNegative) output += '-'
  if (gold > 0) output = `${output}${gold} Gold`
  if (silver > 0) output = `${output} ${silver} Silver`
  if (copper > 0) output = `${output} ${copper} Copper`
  