problem with LuaTechnology.level

Place to post guides, observations, things related to modding that are not mods themselves.
Post Reply
CyberWizard2261
Inserter
Inserter
Posts: 23
Joined: Tue Jun 26, 2018 11:01 am
Contact:

problem with LuaTechnology.level

Post by CyberWizard2261 »

in techs with multiple levels, LuaTechnology.level is showing level + 1 except when level = max level
Am I missing something? Is it a bug? If this is the normal behavior I think it should be explained in the documentation since it's unintuitive

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5206
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: problem with LuaTechnology.level

Post by eradicator »

CyberWizard2261 wrote:
Mon Mar 30, 2020 7:38 pm
I think it should be explained in the documentation since it's unintuitive
It already does.
The current level of this technology. For level-based technology writing to this is the same as researching the technology to the *previous* level.
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.

CyberWizard2261
Inserter
Inserter
Posts: 23
Joined: Tue Jun 26, 2018 11:01 am
Contact:

Re: problem with LuaTechnology.level

Post by CyberWizard2261 »

I'm sorry but if you consider this vague sentence an explanation I think there's something wrong with you

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5206
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: problem with LuaTechnology.level

Post by eradicator »

I'm also sorry for your inability to understand a simple sentence.
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.

User avatar
picklock
Fast Inserter
Fast Inserter
Posts: 138
Joined: Sat Nov 09, 2019 6:49 am
Contact:

Re: problem with LuaTechnology.level

Post by picklock »

There was a similar discussion for this topic. Perhaps it is helpful for ypu:

LuaTechnology.level is not consistent
Last edited by picklock on Tue Mar 31, 2020 2:46 pm, edited 1 time in total.
My Mods: Picklocks Fusion Power | Picklocks Inserter | Picklocks Lithium Polymer Accumulator | Picklocks rocket silo stats | Picklocks Set Inventory Filters

CyberWizard2261
Inserter
Inserter
Posts: 23
Joined: Tue Jun 26, 2018 11:01 am
Contact:

Re: problem with LuaTechnology.level

Post by CyberWizard2261 »

thanks, picklock now I can make a code to circumvent this problem, but I still think this kind of unintuitive feature deserves a better explanation

Post Reply

Return to “Modding discussion”