Mod item pricing fix and Flib 0.8 compatibility #32
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi,
This is my first public PR, so please feel free to let me know what I can do better with regards to contributing.
The current release gets around problems caused by recent changes to Flib by listing dependency on a prior version, but Factorio (and presumably some of the other mods I'm using) don't want to downgrade to that prior version. There seems to be a bug causing most angel-bob items to default to the price for unknown items, as well.
The reason why Flib 0.8+ causes BM2 to crash is because it has depreciated a few of its functions (Flib seems to just automatically take care of what those functions accomplished without needing "users" to manually call them). To that end, those calls have been commented out and the flib dependency is now
"flib >= 0.8.0"
.For mod item pricing, I added a function that allows for logging of the reason for any item's price getting set to
unknown_price
and an accompanying setting (off by default) so that it isn't stuck always logging. The cause for lots of items getting set tounknown_price
seems to have been a small typo at the end of price calculation.I took the liberty of making some spelling changes in some comments and
debug_print
statements (to one local variable as well) and reformatting some one line for/if blocks.I incremented the minor version number by 1 (
"version": "2.0.7"
).Finally
symlink.sh
creates a link from wherever it is being run to the mods folder, in case the current user organizes their files a bit differently.