I am happy about how extensive Factorio's scripting functionalities are but I have failed to figure out two issues and would greatly appreciate some pointers.
1. I would like to have (read-only) access to recipes in game, not merely enabling or disabling them. One can access data.raw in a mod's data.lua file but I cannot figure out how to do the same in, say, control.lua. Additionally, io is disabled during the loading phase and the global environment is replaced between loading and playing. I am probably missing something easy. Presently I am preprocessing the data folders but this is not without downsides. Suggestions?
2. Is it possible for entities other than stations and resources to show on the minimap? Named markers like the train stations would be ideal but even colors would do. Adding map_color to containers does not seem to suffice, for instance.
Thanks in advance and looking forward to try all the community content.
Q: data.raw in game and minimap markers
Re: Q: data.raw in game and minimap markers
As far as I know there is no obvious way to pass arbitrary data from data.lua to control.luaosuf wrote: 1. I would like to have (read-only) access to recipes in game, not merely enabling or disabling them. One can access data.raw in a mod's data.lua file but I cannot figure out how to do the same in, say, control.lua. Additionally, io is disabled during the loading phase and the global environment is replaced between loading and playing. I am probably missing something easy. Presently I am preprocessing the data folders but this is not without downsides. Suggestions?
testmod uses styles to pass some data.
For one time dump on mac os or linux you can run executable with output redirection and use default print function.