-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
data module #9
Comments
Yes, definitely. I've written a few things like this before for Marathon. Data manipulation is often a pain, and it would be nice to have easy functions for. |
@Choumiko FYI, I recently started on this. I went with a jquery selector ... inspired solution. Here's the commit: bca9d78 Example: |
I also wrote a metatable that is dynamically assigned to the recipe fields 'ingredients' and 'results', which detects the layout of the item, and emulates the 'amount' and 'name' fields when the item object is an array, or emulates the '1' and '2' fields if the item is a table. This should allow modders to stop trying to write code for either way and detecting, and just use the named fields when accessing, but write the shorthand array when updating recipes. |
The very basics of this was added to 0.6.0, but more work needs to be done to support specific data structures. https://github.com/Afforess/Factorio-Stdlib/releases/tag/0.6.0 |
What's our progress so far? What remains to be done on this issue? |
A module to allow easier data.raw manipulation:
Last 2 seem like edge cases
The text was updated successfully, but these errors were encountered: