Skip to content
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

Mod item pricing fix and Flib 0.8 compatibility #32

Merged
merged 7 commits into from Sep 15, 2021

Conversation

xsirh925
Copy link
Contributor

@xsirh925 xsirh925 commented Sep 15, 2021

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 to unknown_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.

`gui-beta` from flib 0.7.0 has replaced `gui`
calls to `init`, `build_lookup_tables` and `check_filter_validity` cause crashes, BM2 still works without calls to those functions
  * control.lua
    - line 828, assignment to otherwise unused global
    - line 870, reference to undefined `ingredient_amount`, the preexisting comment implies `product_amount` was intended to be used here
@djmango djmango added the enhancement New feature or request label Sep 15, 2021
@djmango djmango linked an issue Sep 15, 2021 that may be closed by this pull request
@djmango djmango added this to the 2.1.0 QOL Update milestone Sep 15, 2021
@djmango
Copy link
Owner

djmango commented Sep 15, 2021

Looks good, water prices are a bit funky but this solves problems for a huge chunk of people so pushing it through, thanks for your contribution!

@djmango djmango merged commit 34439b4 into djmango:master Sep 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Factorio error
2 participants