snowgears / shopbugs

Shop bug tracker
8 stars 4 forks source link

[BUG] Price Formatting doesn't work correctly #397

Closed SladeHazard closed 1 month ago

SladeHazard commented 1 year ago

Is there an existing issue for this?

Type of bug

Other unexpected behaviour

Environment

- Server Version: 1.12.2 Paper
- Shop Version: 1.8.4.2-legacy

Server startup log

N/A

Shop config files

N/A

Error log (if applicable)

No response

Bug description

Formatting of balance on shop signs does not work properly for the billion.

If I put 30B on the Buy section price. it converts it to 30$ instead of $30,000,000,000 but it only works correctly when I put 30G. people are not familiar with the character "G" can you please fix it so it works with the "B" = billion as well. This is my formatting config:

This formats suffixes for large numbers like (5,000 = 5k) or (5,000,000 = 5M) # minimumValue = minimum value to start formatting strings # priceSuffixes: minimumValue: 10000 k: enabled: true value: 1000 M: enabled: true value: 1000000 B: enabled: true value: 1000000000 T: enabled: true value: 1000000000000 P: enabled: true value: 1000000000000000 E: enabled: true value: 1000000000000000000

Steps to reproduce

create a buy or sell shop and put B character after a number in the price section for example 30B

[shop] 3 30B buy

Expected behaviour

the price should be 30 billion

Actual behaviour

the price is $30

Other information

No response

iLemon commented 1 year ago

Can confirm, having the same issue.

Running paper 1.19.3 with Shop 1.8.4.3

Firosee commented 1 year ago

This happens for me when trying T (trillions), it sets it to be $21.47B, and same for any formatting above it (Q, E, etc)

SladeHazard commented 1 year ago

when will this be fixed ? @snowgears

Firosee commented 1 year ago

^

OstlerDev commented 2 months ago

This happens for me when trying T (trillions), it sets it to be $21.47B, and same for any formatting above it (Q, E, etc)

Unfortunately there is a limitation of our internal variables that cap the max price at 21.47 Billion, so using amounts like Trillions and higher will not work.

OstlerDev commented 1 month ago

Bug is fixed in the upcoming version v1.9.1.0, you will now be able to create shops using the prefixes defined inside the config file! It previously was using hardcoded values instead of the config, this has been updated and changed.

OstlerDev commented 1 month ago

Released 1.9.1.0