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

autocrafter: replacement with the same item should remain in the main inventory #80

Open
fluxionary opened this issue Aug 18, 2023 · 9 comments
Assignees
Labels
controversial Strongly divided opinions enhancement New feature or request

Comments

@fluxionary
Copy link
Member

currently, all replacements are placed in the output inventory, requiring extra machinery to inject the item back into the main inventory for repeated crafting. an example is e.g. from farming: crafting flour from wheat and a mortar and pestle. it'd be nice if the mortar and pestle remained in the input inventory after the crafting.

@S-S-X
Copy link
Member

S-S-X commented Aug 19, 2023

replacements should go into output inventory, for example to get replacements out.

@OgelGames
Copy link
Contributor

OgelGames commented Aug 19, 2023

It should be both, with a button to switch it.

@SwissalpS
Copy link
Contributor

It should be both, with a button to switch it.

I don't like this idea.
Players will also want a digilines command to switch it.
Plus it would make the code, we only just added, for detecting space for these items, more complicated and less manageable.
As I understand it, this would not only simply switch between targets but also require inspection of which items to send to which inventory.

It's something, that can easily be solved in-game with a sorting tube, that I don't think it's worth the amount of code to maintain.
Besides now there would be one less thing to solve in-game. Autocrafters are already considered, by some, as OP the way they are.

@fluxionary
Copy link
Member Author

fluxionary commented Aug 21, 2023

i omitted a very important condition in my request. this should only apply to replacements which replace the item with itself. items which are consumed or transformed should continue to go to the output inventory.

@SwissalpS
Copy link
Contributor

I omitted a very important condition in my request. this should only apply to replacements which replace the item with itself. Items which are consumed or transformed should continue to go to the output inventory.

Thanks for elaborating.
It was part of my reasoning against implementing this issue's suggestion:

As I understand it, this would not only simply switch between targets but also require inspection of which items to send to which inventory.

This adds at least two more levels of complexity to the code. For something that can be solved with a trivial in-game element: sorting tube at injector's exit side.

@OgelGames
Copy link
Contributor

OgelGames commented Aug 21, 2023

As I understand it, this would not only simply switch between targets but also require inspection of which items to send to which inventory.

It's simpler than that, because get_craft_result returns the replacements separate from the result. All you would need to do is decide which list to put the decremented_input items in, no inspection of items required.

local output, decremented_input = minetest.get_craft_result({method = "normal", width = 3, items = recipe})

@OgelGames OgelGames added the enhancement New feature or request label Aug 21, 2023
@S-S-X
Copy link
Member

S-S-X commented Aug 21, 2023

Most important thing I see is this:

It's something, that can easily be solved in-game with a sorting tube, that I don't think it's worth the amount of code to maintain.
Besides now there would be one less thing to solve in-game. Autocrafters are already considered, by some, as OP the way they are.

Especially this part:

there would be one less thing to solve in-game

Implementing full automation for everything in code is interesting yes but mostly for mod developer. For players it will unfortunately take away challenges and content. This is main reason why I see this as a downgrade instead of upgrade.

@S-S-X S-S-X added the controversial Strongly divided opinions label Aug 21, 2023
@fluxionary
Copy link
Member Author

how about an argument for consistency w/ the game engine? if an item in a crafting grid is replaced with itself, it stays in the crafting grid. you don't have to keep moving it back from your main inventory into the grid.

@FeXoR-o-Illuria
Copy link

"it stays in the crafting grid" This is a horrible behavior in the first place IMO because one manually needs to remove that item from the crafting grid to e.g. not lose it on next death.

IMO those "replace with same" recipes are mostly an annoyance and don't add much to the game.
(And even many of those with containers IMO like bottled/canned/... stuff.
Yes, buckets kind-of make sense to me - then again a wooden bucket would also do - and if that would be expended on use players won't be terribly outraged I guess)

If you want more elaborate processing either add expendable material or special nodes/builds to do the processing outside the crafting grid.

@OgelGames OgelGames self-assigned this Aug 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
controversial Strongly divided opinions enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants