minetest-mods / craftguide

:book: The most comprehensive Crafting Guide on Minetest
Other
43 stars 20 forks source link

Progressive mode show up not revealed items trough groups #68

Closed bell07 closed 5 years ago

bell07 commented 5 years ago

Steps to reproduce

  1. Start new game (Minetest game) => Craftguide is empty
  2. Get any wood in inventory and wait till Craftguide is updated => Result: You see all available kind of wood, with the revealed group usages => Expected result: You see only the revealed kind of wood with the group usages
kilbith commented 5 years ago

You mean if I get e.g. Apple Wood Planks in inventory, I should not be able to see Acacia Wood Planks, etc?

bell07 commented 5 years ago

Yes. I see the Acacia Wood Planks because the Stick is crafteable by group:wood. In group:wood the Apple Wood Planks is only known, so the logic is: I see the Acacia Wood Planks because Stick is crafteable by Apple Wood Planks. For Usages the groups should be considered for revealed items.

For recipes it is ok to check if any of the group items is revealed. The Stick / Stick recipe can be visiblie as is if any of wood is known.

The Usages for any group item should show only the revealed item. Usage for Acacia Wood Planks should be shown if Acacia Wood Planks is known.

kilbith commented 5 years ago

https://github.com/minetest-mods/craftguide/commit/92cf2307dbecb41e51432e9fb91bae0d636612ca

Not sure whether it's the best fix though... @pauloue

p-ouellette commented 5 years ago

Maybe this isn't a bug because it doesn't let you see any recipes that you shouldn't be able to see. You only see that a certain undiscovered item has a certain group.

If this is a bug then it must also be a bug when undiscovered items are shown as the "group stereotype". If you discover Acacia Wood Planks before Apple Wood Planks you may see Apple Wood Planks as the group:wood item in recipes even though you haven't discovered Apple Wood Planks.

kilbith commented 5 years ago

A subgame could make an extensive use of groups, with a lot of them shared in common between items, and you could discover a lot of things at once. This is bad.

If this is a bug then it must also be a bug when undiscovered items are shown as the "group stereotype".

Yes, this is also a bug.