Page 1 of 1

[Rseding91] [2.0.9] Impossible to build any storage tanks.

Posted: Wed Oct 23, 2024 12:52 pm
by micromario
Greetings,

I have the following bloc of code in data stage.

Code: Select all

data:extend {{
    type = "item",
    name = "storage-tank-raw",
    icon = data.raw["storage-tank"]["storage-tank"].icon,
    icon_size = 64,
    place_result = "storage-tank",
    stack_size = 50,
    flags = {"primary-place-result"}
}}
After adding this item prototype into the game, it seems to break the place_result of the regular "storage-tank" prototype and instead print "Missing Storage tank".
10-23-2024, 07-51-04.png
10-23-2024, 07-51-04.png (1.31 MiB) Viewed 1940 times
Indeed it seems having duplicate items of any prototype with the same place_result triggers this bug.

Reproduction:
- Disable all mods including space age.
- Unzip and install the attached `autotech` mod.
- Spawn in a "storage-tank" item.
- Attempt to place such item.

Note: It also seems that construction bots refuse to build any storage tank ghosts.

Re: [2.0.9] Impossible to build any storage tanks.

Posted: Wed Oct 23, 2024 12:55 pm
by Rseding91
Thanks for the report however that is working correctly. You set

Code: Select all

flags = {"primary-place-result"}
and so it is the primary place result. If that's not the behavior you want, don't set that flag.

Re: [2.0.9] Impossible to build any storage tanks.

Posted: Wed Oct 23, 2024 12:59 pm
by micromario
No that is not correct.

Removing the flag simply causes the "storage-tank-raw" item to break due to prototype load order:
10-23-2024, 07-58-37.png
10-23-2024, 07-58-37.png (1.47 MiB) Viewed 1917 times
10-23-2024, 07-59-31.png
10-23-2024, 07-59-31.png (142.89 KiB) Viewed 1917 times

Code: Select all

data:extend {{
    type = "item",
    name = "storage-tank-raw",
    icon = data.raw["storage-tank"]["storage-tank"].icon,
    icon_size = 64,
    place_result = "iron-chest",
    stack_size = 50,
    order = "z"
}}
Additionally, it seems this bug is only reproducible if you do not have both items in your inventory at the same time.

Re: [2.0.9] Impossible to build any storage tanks.

Posted: Thu Oct 24, 2024 4:16 pm
by Rseding91
Ok, I was confused and wrong about part of this. This should now be fixed for the next release.