[kovarex] [0.17.42] Infinite technologies with lower max_level than prototype-number can freeze the game.

This subforum contains all the issues which we already resolved.
Post Reply
User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 3857
Joined: Tue Jul 12, 2016 9:03 am
Contact:

[kovarex] [0.17.42] Infinite technologies with lower max_level than prototype-number can freeze the game.

Post by eradicator »

What?

If an infinite technology prototype is named "blabla-N" and has max_level=K with K < (N-1) then calling research_all_technologies will freeze the game.

Reproduction

Code: Select all

data.raw.technology['physical-projectile-damage-7'].max_level=1

Code: Select all

/c game.player.force.research_all_technologies()
This technology works 7 to 5.
This technology works 7 to 5.
invalid_level_range.png (56.67 KiB) Viewed 478 times

Expected Behavior

Max level should be treated as ((N-1) + K) not just K i guess? Not sure.
Author of: Hand Crank Generator, Screenshot Hotkey 2.0
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.

kovarex
Factorio Staff
Factorio Staff
Posts: 7426
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: [0.17.42] Infinite technologies with lower max_level than prototype-number can freeze the game.

Post by kovarex »

Hello, thanks for the report.
I made a condition for the technology loading, that the max level can't be lower then the level.

Post Reply

Return to “Resolved Problems and Bugs”

Who is online

Users browsing this forum: No registered users