I'd like to call a function f() only if a specific mod M is installed. f() affects the state of my mod (event registry, etc), so it needs to be called each time the mod starts. (Edit: In "control.lua" stage)
What's the problem?
Sounds trivial sure, just:
Code: Select all
if game.active_mods['M'] then script.on_load(f) end