[2.0.43] dump-data json has fraction for ItemProduct amount

Bugs that are actually features.
User avatar
moon69
Fast Inserter
Fast Inserter
Posts: 184
Joined: Sun Sep 18, 2016 6:53 pm
Contact:

[2.0.43] dump-data json has fraction for ItemProduct amount

Post by moon69 »

ItemProductPrototype#amount states that amount should be a uint16:

Code: Select all

amount :: uint16
but doing a --dump-data shows a fractional amount for some recipes in data-raw-dump.json. EG:

Code: Select all

"uranium-cannon-shell-recycling": 
    {
      "type": "recipe",
      "category": "recycling",
      "results": 
      [        
        {
          "type": "item",
          "name": "cannon-shell",
          "amount": 0.25,
          "extra_count_fraction": 0.25
        }, ...
It seems to affect recycling recipes where "extra_count_fraction" > 0.
User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 3940
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: [2.0.43] dump-data json has fraction for ItemProduct amount

Post by boskid »

This is hard to classify because what you see is raw data without any rules enforced that would get applied when creating prototype instances. There may be also leftovers from data stage if mods put some data that are unused by the game itself. Fixing this would be like plugging a single hole in a colander.
Bilka
Factorio Staff
Factorio Staff
Posts: 3385
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: [2.0.43] dump-data json has fraction for ItemProduct amount

Post by Bilka »

Not a bug. Refer also to viewtopic.php?p=593577#p593577 and 109077
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.
Post Reply

Return to “Not a bug”