tgstation / tgstation13.org

Website for tgstation13
GNU General Public License v2.0
6 stars 44 forks source link

Raw float in IGN time report. #63

Open TemporalOroboros opened 3 years ago

TemporalOroboros commented 3 years ago

It's a minor gripe, but I'm pretty sure the server buttons on the site aren't intended to display "IGN 1.457457457457457..." as a raw number.

antropod commented 2 years ago

caught it happening, this is what is in serverinfo.json image

antropod commented 2 years ago

Did some more investigation, this is what game server returns when answering "query" packet with query = ?status. I wrote a python script to check, ran it on local server and this is what parsed response looks like

{..., 'shuttle_mode': ['igniting'], 'shuttle_timer': ['3']}
{..., 'shuttle_mode': ['igniting'], 'shuttle_timer': ['2']}
{..., 'shuttle_mode': ['igniting'], 'shuttle_timer': ['1']}
{..., 'shuttle_mode': ['igniting'], 'shuttle_timer': ['0']}
{..., 'shuttle_mode': ['igniting'], 'shuttle_timer': ['1e+030']}

Possible solutions? Cap this value to something like 1 hour and print --:-- if value is greater (this is how it is done in game client statpanel).