Event when a mod setting is changed

Place to get help with not working mods / modding interface.
Lebster
Manual Inserter
Manual Inserter
Posts: 1
Joined: Thu Dec 17, 2020 3:38 pm
Contact:

Event when a mod setting is changed

Post by Lebster »

I've got a mod setting with the setting_type global-runtime
It's a bool-setting

How can I run a function when the user modifies the value of the setting from the mod settings options category?
User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5211
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: Event when a mod setting is changed

Post by eradicator »

Code: Select all

script.on_event(defines.events.on_runtime_mod_setting_changed, function(event)
  end)
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.
Post Reply

Return to “Modding help”