This pull request renames buckets so that they use the `mcl_` naming convention.
I originally was going to do some renaming on a bigger scope, but decided against it for now.
Reviewed-on: MineClone2/MineClone2#3708
Reviewed-by: ancientmarinerdev <ancientmariner_dev@proton.me>
Co-authored-by: FossFanatic <fossfanatic@noreply.git.minetest.land>
Co-committed-by: FossFanatic <fossfanatic@noreply.git.minetest.land>
The function on_place_bucket defined a couple of variables that were
used only once or in a redundant check. After removal of the redundant
check in a previous commit, all use-once variables can now be substituted
with their assignment expressions.
The function on_place_bucket contains the following logic:
if not a and not b then return x end
if a then
foo(a)
elseif b then
foo(b)
else
return x
end
The "if not a and not b then .." is removed because the case is handled
by the else case later on. This will allow some further simplifications.
Instead of directly accessing the group table in node definitions, use
the proper minetest.get_item_group accessor to test for "cauldron"
group.
Also adds local alias get_item_group for the global minetest call.
Two instances of add_node and add_item still used the full minetest
call, substitute the alias.
Added a set_node alias for several minetest.set_node calls.
When using a bucket of water on a cauldron, this would not fill the
cauldron as expected, but deposit a water source block on top of the
cauldron instead.
Applied patch from mineclone5 #38 (commit #
698c29733f06a7fcb7e755bf26ee46b33b00699b) from mineclone5 that fixes
this problem.