At the moment, because the event fires in all mods when any single mod calls request_translation(), you have to keep track of what you asked to be translated in a big table in the meantime, or you'll be taking actions on things that other mods wanted translating and you didn't. Presumably every mod has to do this, so that could be a lot of variable space in the end. If I could just do something like this, it would be easier and mess up the global table less:
Code: Select all
script.on_event(defines.events.on_string_translated, function(event)
if event.translated and event.calling_mod == MY_MOD_ID then
...
end
end)