Page 1 of 1

Technology give-item with 0 count freezes the game and crash

Posted: Fri Dec 16, 2016 7:07 pm
by Mooncat
Bug: If technology has an "effect" with type = "give-item" and count = 0, the game will freeze and then crash if such technology is researched.

Steps to reproduce:
1) select a technology and change its effects to be something like this:

Code: Select all

effects =
{
    {
        type = "give-item",
        name = "inserter",
        count = 0
    }
}
or install the following mod. It changes the effects of "automation" as above:
tech-give-zero-item-crash_0.1.0.zip
(813 Bytes) Downloaded 59 times
2) start a new game and research that technology
3) observe when it finish

Here is the log:
log
Expected result:
Either of the following:
a) game does not crash. No item is given.
b) count has to be at least 1 or error will occur when game initializes.

Re: Technology give-item with 0 count freezes the game and crash

Posted: Fri Dec 16, 2016 11:08 pm
by Rseding91
This is fixed for 0.15. You must have a count != 0.

Re: Technology give-item with 0 count freezes the game and crash

Posted: Sat Dec 17, 2016 9:27 am
by Mooncat
Thanks. It should be fine.
But please consider this request: Customizable technology effect :mrgreen: