Page 1 of 1

[Rseding91] [0.17.39] Loss icon count show 1 less for some entities

Posted: Wed May 15, 2019 2:50 pm
by Pinga
Hi,

In the Kills panel, the Loss count icon shows 1 less for some entities.

For example:

factorio_2019-04-26_15-59-55.png
factorio_2019-04-26_15-59-55.png (543.88 KiB) Viewed 3366 times

In the above picture, I lost 2 turrets (as evidenced by the 2 ghosts) and 2 bots, but the panel displays 1.
I appears that the icon is displaying empty for 1 loss, 1 for 2 losses etc. Below is what it shows when you lose 1 bot:

factorio_2019-05-15_10-26-04.png
factorio_2019-05-15_10-26-04.png (62.6 KiB) Viewed 3366 times

To test, I decided to kill some of my own entities. Before, the Kills panel had these values:

factorio_2019-05-15_10-36-08.png
factorio_2019-05-15_10-36-08.png (180.24 KiB) Viewed 3366 times

Then I killed 1 Steel Chest and 1 Contruction Bot. Notice that in the 1 minute panel (below), you can see in the left side that I killed 1 of each. In the right side, only the Chest displays the number 1.

factorio_2019-05-15_10-36-25.png
factorio_2019-05-15_10-36-25.png (244.45 KiB) Viewed 3366 times

In the 1 hour panel, only the Steel Chest display the correct loss number, the Construction Bot is showing 1, but it should display 2 because we already had 1 loss in the 1 hour panel. See:

factorio_2019-05-15_10-37-53.png
factorio_2019-05-15_10-37-53.png (306.12 KiB) Viewed 3366 times

The Kills side appears to display correct numbers, only the Loss side is counting empty as one.

Re: [0.17.39] Loss icon count show 1 less for some entities

Posted: Wed May 15, 2019 2:53 pm
by Rseding91
Can you please give me a save file that shows this problem?

Re: [0.17.39] Loss icon count show 1 less for some entities

Posted: Wed May 15, 2019 2:58 pm
by Pinga
Sure.

https://drive.google.com/file/d/1tZazXy ... sp=sharing

Let me know if the link doesn't work.

Re: [0.17.39] Loss icon count show 1 less for some entities

Posted: Wed May 15, 2019 3:19 pm
by Rseding91
Ok, it's now fixed for the next version of 0.17. The reason it would show no number is the value it wanted to show was < 0.5 and so when converted to an integer it rounds towards zero and 0 shows no number.

Re: [0.17.39] Loss icon count show 1 less for some entities

Posted: Wed May 15, 2019 3:56 pm
by Pinga
Amazing, that was fast.