Can I disable the technology branch

Place to get help with not working mods / modding interface.
User avatar
WIZ4
Fast Inserter
Fast Inserter
Posts: 209
Joined: Thu Apr 07, 2016 1:36 pm
Contact:

Can I disable the technology branch

Post by WIZ4 »

I want to cancel all technologies to improve the damage, but disabling one technology is very inconvenient, if there is a way to cancel the study of the entire branch using a script?
Is there a way to simplify this code?
Screenshot_15.png
Screenshot_15.png (74.57 KiB) Viewed 837 times
Screenshot_16.png
Screenshot_16.png (748.69 KiB) Viewed 837 times
My native language is russian. Sorry if my messages are difficult to read.
User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2905
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: Can I disable the technology branch

Post by darkfrei »

Code: Select all

function tech_iterator (tech_name, level)
local level = level or 1

tech_name = tech_name .. '-' .. level
--If data techs tech_name then tech_iterator (tech_name, level+1)
Post Reply

Return to “Modding help”