CleverRaven / Cataclysm-DDA

Cataclysm - Dark Days Ahead. A turn-based survival game set in a post-apocalyptic world.
http://cataclysmdda.org
Other
10.7k stars 4.2k forks source link

Debug menu. Force temperature. The expected and displayed number must be the same data type #77296

Closed IdleSol closed 2 weeks ago

IdleSol commented 1 month ago

Describe the bug

If you need to set the temperature, you can only use numbers. That is, the temperature has an integer value.

debug menu / map... / T Force temperature / 1 Set 1 This is the window to enter the temperature. In the example I have set it to 10 degrees Celsius.

Now I want to change the temperature. I call the window again and get: 2

Okay, I'm just pressing enter: 3

So if I want to change the temperature, instead of entering a value, I have to edit the value entered last time. (In some cases, this is even good).

At the same time, the game outputs an integer number as a floating point number. And instead of changing 1-2 digits, I have to delete everything that the game output and then enter a new number.

This is not convenient. And annoying

Attach save file

n/a

Steps to reproduce

n/a

Expected behavior

The game should output the integer value, or at least accept it in the format it displays itself.

Screenshots

No response

Versions and configuration

Additional context

Maybe there's an additional problem. And there should be a period, not a comma. Maybe most people have that.

But my main language is Russian. And remembering the topic https://github.com/CleverRaven/Cataclysm-DDA/issues/71635#issuecomment-1935743602, maybe my system uses comma as a decimal separator. But I definitely didn't install it separately, so those are the default settings. Arch linux.

PatrikLundell commented 1 month ago

/Confirmed

The UI doesn't accept either comma or period as input (nothing happens when these keys are pressed: they're ignored), so either the input should be changed to take a floating point number, or the presented existing value should be displayed as an integer.

I believe the separator convention used is based on the language used, but cannot confirm it.

ZhilkinSerg commented 2 weeks ago

Popup query for temperature input uses .only_digits( true ) - need to remove it or allow decimal separators with this option.

IdleSol commented 1 week ago

The fix didn't help. Only the message has changed: 1

cdda-windows-with-graphics-x64-2024-11-18-0627