Arx-Game / arxcode

A text-based/web game using Evennia.
MIT License
47 stars 42 forks source link

Number Formatting #34

Open Zironic opened 5 years ago

Zironic commented 5 years ago

Arx uses a lot of 5, 6 and 7 digit numbers which are often presented left-aligned. This makes it really hard for me to read if a number is 50k, 500k or 5 million.

I would like to see right-align for numbers and ideally also separators.

TehomCD commented 5 years ago

Reasonable to me. I wanna say the django "humanize" contrib has something to do that.

rozzingit commented 5 years ago

I never knew how much I wanted separators until just now. There are often times when I have to peer at a number a bit to decide if it's 10,000 or 100,000.

Zironic commented 5 years ago

After looking into this. The easiest way to do comma separation and right align is to simply use the built into python 2.7 format function.

This could even in most cases be achieved with regex substitution. I could write a patch for it pretty quickly but I'd need a fairly comprehensive list of all the game commands which print hilariously big numbers besides Score, inventory and Org.

TehomCD commented 5 years ago

We're gonna be removing numbers from score, so I wouldn't bother with that bit. The model command, org, donate, maybe work are what comes to mind.

rozzingit commented 5 years ago

In addition to that: broker, market, inventory, bank. Maybe shop for prices? Clues #'s get over 1000 BUT at the same time I feel like people copy-pasting the clue # to look at the clue is common, which would be harder if you dropped a comma in it. But you could right align.

Zironic commented 5 years ago

This should now be live.

rozzingit commented 5 years ago

There are a few additional places that could use this:

TehomCD commented 5 years ago

Reopening this until we get those ones too.