* check for non-zero group value
in theory groups can have negative values too.
* fix#114 multi group recipe items
Fix the bug that prevented crafting with recipes
that had ingredients that need to match multiple
groups.
* comments and whitespace changes
* fix faulty empty table check
* Add support for recipes with groups to autocrafter
* fix autocrafter replacements
* remove unnecessary check and move some code
* reorder and change back var name
* only whitespace changes
* reuse hash that is asigned to variable anyway
* add get_matching_craft
function that looks for the best matching recipe according to what user
put in recipe inventory
some crafts use groups in multiple recipes
* return right away if there is a chached craft
gives us more horizontal space to work with
* indentation adjusting
* use get_matching_craft to get best craft
this line was buggy anyhow
* new craft format: decremented_input
craft.decremented_input now only holds the items. Extra parameters are
dropped
* bugfix: when item has no groups
"" and unknown items have no def and thus no groups
* add function has_room_for_output
moving the output space calculation into its own function
helps keep autocraft() short and overseeable
* use has_room_for_output
* remove double-check of available materials
* add warning to ensure double-check was not needed
* rebuild cache whenever recipe inv changes
no need to check if still current, this only happens when user is
interacting and can only be better to do so.
Otherwise we would have to check groups etc. again just to check, so
might as well reset cache.
* remove unused line
* use minetest.get_item_group()
* whitespace cleanup
make code easier to read and give it a more
"thoughtthrough" look than the "smash it in to make it work" look it has
had.
(I'm holding back, there would be more to do overall through this mod)
* add .editorconfig
this should also help keep consistency throughout this mod
* changelog updated
at least the most recent more important ones
* whitespace changelog (trailing spaces)
---------
Co-authored-by: rubenwardy <rw@rubenwardy.com>
Co-authored-by: OgelGames <olliverdc28@gmail.com>
Co-authored-by: wsor4035 <24964441+wsor4035@users.noreply.github.com>
2024-01-13 20:41:28 -05:00
Github is a non-free platform owned by Microsoft. Reasonable alternatives exist, such as Gitea, Sourcehut. We need a federated, mastodon-like forge based on ForgeFed. See: https://forgefed.org
* mineclone dig times balanced
* fix pickaxey dupe
2023-09-01 15:00:50 +02:00
Github is a non-free platform owned by Microsoft. Reasonable alternatives exist, such as Gitea, Sourcehut. We need a federated, mastodon-like forge based on ForgeFed. See: https://forgefed.org
* make it boot in non mtg
* make water flow
* fix water texture warnings
* fix missing steel texture issues
* remove depreciated/unnessary default function calls
* make sounds work
* fix default formspec crashes
* fix wierd tab spacing
* additionally game dig group support
* move crafts to crafts.lua
* make crafts support various games
Prevents protector flip/player being hurt/protection violation if the
player closes the formspec without attempting any changes (sorting tube
and autocrafter).
- Created `locale/template.txt`
- Fixed some typos
- Replace some `print("[pipeworks]"..` with `pipeworks.logger()`
- Removed "You hacker, you" from descriptions
"on" and "off" messages turn it on or off, "single" crafts one item, and sending nested tables in the shape of the crafting grid sets the craft. Example message:
{
{"default:wood","default:wood","default:wood"},
{"default:wood","","default:wood"},
{"default:wood","default:wood","default:wood"}
}