My workaround:
Code: Select all
event_handler.add_lib{
on_init = function()
on_force_created{name=defines.events.on_force_created, tick=0, force=game.forces.player}
on_force_created{name=defines.events.on_force_created, tick=0, force=game.forces.enemy}
on_force_created{name=defines.events.on_force_created, tick=0, force=game.forces.neutral}
end,
events = {
[defines.events.on_force_created] = on_force_created
}
}