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

Realign the rail craft recipes #169

Merged
merged 7 commits into from
Dec 30, 2020

Conversation

Oblomov
Copy link
Contributor

@Oblomov Oblomov commented Dec 28, 2020

This replaces the override for the obsolete rail recipe with an override
for the new recipes for all rail types. Rather than hard-coding the
recipes, we “reconstruct” the declared crafting recipes and simply pump
up the amount produced by 50% (which was the increase achieved over the
old recipe).

Fixes #162.

@Oblomov
Copy link
Contributor Author

Oblomov commented Dec 29, 2020

Right, I was trying to mimick the previous changelog entries 8-)

I'm actually having a bit of a second thought about this change. Since we're doing this “override productivity” for multiple things, I've been thinking that refactoring the code that I've now used for rails so that it can be used for all overrides would be nicer. I'll look into that.

@Oblomov
Copy link
Contributor Author

Oblomov commented Dec 29, 2020

OK, refactored the whole “override production” thing, and ported all overloads to the new mechanism.

-- { detector, amount changing function }
-- { detector, amount changing function }
-- }
-- TODO consider exporting this function to other mods
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
-- TODO consider exporting this function to other mods
-- TODO: consider exporting this function to other mods

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While we're at it, I could just do the export. Does moreblocks provide some kind of API object? Or should I just hook it into minetest directly?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Oblomov Not that I know of.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess we'll keep it as a TODO for now. Force-pushed with the colon.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the next commits these will be used in place of the hardcoded
overrides.
This replaces the override for the obsolete rail recipe with an override
for the new recipes for all rail types.

Fixes GitHub issue minetest-mods#162.
@Calinou
Copy link
Member

Calinou commented Dec 30, 2020

@Oblomov Is this good to merge now? 🙂

@Oblomov
Copy link
Contributor Author

Oblomov commented Dec 30, 2020

If you're happy with it, I'm happy with it. We can think about providing some kind of API at a later time, possibly with more stuff 8-)

Copy link
Member

@Calinou Calinou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@Calinou Calinou changed the title Realign craft recipes Realign the rail craft recipes Dec 30, 2020
@Calinou Calinou merged commit ddf8b39 into minetest-mods:master Dec 30, 2020
mckaygerhard added a commit to minenux/minetest-mod-moreblocks that referenced this pull request Feb 19, 2022
…ecoded

* fixeds minetest-mods#162
* backported minetest-mods#169
* if 5+ engines are detected Use new function to override wall sign recipes
* Introduce auxiliary functions to change craft amount even hardcoded overrides
* but for 0.4.X let hardcoded cos older game engines does not change anymore
* backported minetest-mods@ddf8b39
MazepaDeni

This comment was marked as spam.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Realign rails recipe
4 participants