How to detect change of startup mod settings

Place to get help with not working mods / modding interface.
Post Reply
User avatar
<NO_NAME>
Filter Inserter
Filter Inserter
Posts: 291
Joined: Tue Aug 02, 2016 9:52 am
Contact:

How to detect change of startup mod settings

Post by <NO_NAME> »

I need to check if startup settings of my mod were changed since the last save.
My mod changes some colors on the map preview and I need to call game.forces.player.rechart() if settings were changed.
Event on_runtime_mod_setting_changed doesn't seem to be triggered in this situation and I cannot find any other that would fit better.
I am a translator. And what did you do for Factorio?
Check out my mod "Realistic Ores" and my other mods!


User avatar
<NO_NAME>
Filter Inserter
Filter Inserter
Posts: 291
Joined: Tue Aug 02, 2016 9:52 am
Contact:

Re: How to detect change of startup mod settings

Post by <NO_NAME> »

Thanks! mod_startup_settings_changed works.
It's bad that it doesn't tell you which setting has changed, though. Only some of them require recharting the map.
I am a translator. And what did you do for Factorio?
Check out my mod "Realistic Ores" and my other mods!

Post Reply

Return to “Modding help”