Hi! I encountered a crash when initializing the mod. Here is the error message:
Error while running event AbandonedRuins-Combined::on_init()
AbandonedRuins-Combined/control.lua:12: Require can't be used outside of control.lua parsing.
stack traceback:
[C]: in function 'require'
AbandonedRuins-Combined/control.lua:12: in function 'build_ruin_set'
AbandonedRuins-Combined/control.lua:25: in function <AbandonedRuins-Combined/control.lua:16>
In Factorio, the require function cannot be called dynamically inside runtime events like on_init(). It must only be used during the initial file parsing stage.
To fix this, please move the require statement from line 12 inside build_ruin_set to the very top of the control.lua file, outside of any functions or event handlers.Thank you for maintaining this mod!