Replies: 1 comment
-
Alright, this is now outdated, though not entirely different. Now, instead of writing source files (which has a host of problems associated with it), the data is instead stored in pickle files which are unserialized in static source files in the
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Relevant data to the module is stored in a number of files in the main package repo in the abstract format
*_data.py
depending on what data has been extracted. If you make changes to factorio data or to the mod folder, in order for those changes to be reflected you have to run theupdate_module.py
script, which overwrites the data files with their updated values.Now, I'm gonna go out on a limb here and say that this isn't exactly pythonic. What's the better way to do this? I might be possible to make the whole library completely dynamic, such that the classes themselves are somehow based on the files in the folders, but I have no idea if that's even possible. If not, is there any more standard way of keeping track of data files within a Python module? I'd prefer not to have to load the whole Factorio
data.raw
every time someone uses the module.Beta Was this translation helpful? Give feedback.
All reactions