Commit Graph

79 Commits

Author SHA1 Message Date
Elias Fleckenstein f6a40ffb78
Run tools/strip_trailing_whitespace.sh 2022-05-26 07:29:28 +02:00
Emojigit af8681c143 mcl_buckets 2022-02-23 23:58:05 +01:00
kabou af132cc523 Reinstate nil check in on_place_bucket.
* Oops, nil checks on registered_node[name] were erroneously optimized
  away, risking crashes.  Reinstate those checks.
2022-02-21 18:00:56 +01:00
kabou e54502edd6 Add more local aliases for minetest.* namespace functions
* Add locals for
  - minetest.is_creative_enabled
  - minetest.is_protected
  - minetest.record_protection_violation
2022-02-20 20:24:55 +01:00
kabou 639bf936c5 Use alias for minetest.* namespace function call.
* Fix one missed minetest.get_node use in earlier commit.
2022-02-20 19:52:05 +01:00
kabou d2261426c3 Remove redundant variables in on_place_bucket.
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.
2022-02-20 18:46:23 +01:00
kabou 88ce1e3662 Remove redundant logic.
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.
2022-02-20 18:46:23 +01:00
kabou b3aed9d6b8 Use proper get_item_group accessor.
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.
2022-02-20 18:46:23 +01:00
kabou 13baa68b67 Fixed missed alias uses and added set_node alias.
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.
2022-02-20 18:46:23 +01:00
kabou 315f251584 Add local to speedup global function access.
The minetest.registered_nodes function is called from multiple places.
Define a local alias registered_nodes and substitute it in all calls.
2022-02-20 18:46:23 +01:00
kabou 584a75df76 Fix filling cauldrons with water.
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.
2022-02-20 18:46:23 +01:00
NO11 c40c05f594 Exact MC behavior 2022-02-17 15:32:58 +00:00
NO11 3cfcd1355f Add missing dependency 2022-02-17 14:42:01 +00:00
NO11 4707cd4526 Correct bucket behavior 2022-02-17 14:36:48 +00:00
AFCMS b364faa7c7 make bucket use 5 lenght raycast 2021-07-17 16:22:46 +02:00
AFCMS 49bde37a5e rewrite README to markdown 2021-07-15 01:03:50 +02:00
AFCMS dc17cc91a3 make raycast start from player head 2021-07-15 00:01:56 +02:00
AFCMS 873a1e73dc fix documentation 2021-07-14 15:22:27 +02:00
AFCMS 8fff20eec9 fix misleading API 2021-07-14 15:18:12 +02:00
AFCMS ec6086d8e6 cleanup 2021-07-14 15:14:23 +02:00
AFCMS 6d7aafe0d4 Revert "more mt like API (improved readability)"
This reverts commit 88e59d3592.
2021-07-14 15:13:40 +02:00
AFCMS cf5703d528 fix luacheck warnings 2021-07-14 11:53:37 +02:00
AFCMS 88e59d3592 more mt like API (improved readability) 2021-07-14 11:52:27 +02:00
AFCMS cd08df175c add better documentation 2021-07-14 11:41:09 +02:00
AFCMS ca277b6769 mcl_bucket code refactoring + fix extra_check noot working 2021-07-14 11:29:15 +02:00
AFCMS b0127fc1c3 fix bucket dispense function 2021-07-14 09:18:15 +02:00
AFCMS d26b1b1402 use mcl_util.call_on_rightclick insteed of current implementation 2021-07-14 09:10:01 +02:00
AFCMS 30e2e0d70a test values 2021-06-14 14:36:17 +02:00
AFCMS 40f4287ff2 new buckets fixes 2021-06-12 12:21:01 +02:00
AFCMS f70dbb8cfa Merge branch 'master' into buckets 2021-06-12 10:12:51 +02:00
marcin-serwin cbe8583cef Merge branch 'master' into polish-translation 2021-06-02 10:14:25 +00:00
AFCMS cd33d406b2 fix many codestyle issues (functions, strings, modpaths) 2021-05-29 16:12:33 +02:00
AFCMS 91ac70cf28 Merge branch 'master' into buckets 2021-05-23 16:22:53 +02:00
AFCMS ac459d3914 [mcl_bucket] fix warnings 2021-05-23 00:42:31 +02:00
AFCMS 621a5a53a8 [mcl_bucket] fix warnings 2021-05-23 00:32:04 +02:00
AFCMS 17202115fa cache general functions 2021-05-22 18:58:58 +02:00
AFCMS 5d65c8a3aa Working empty bucket 2021-05-22 18:57:51 +02:00
AFCMS e9f38c6b90 WIP raycast base buckets 2021-05-22 10:47:28 +02:00
AFCMS a9bf923df9 improve mcl_bucket API (on_take callback) 2021-05-19 11:14:18 +02:00
Marcin Serwin ae7ea8edef Add polish translation of mcl_buckets 2021-04-24 20:57:57 +02:00
AFCMS d07cf64d11 Merge pull request 'mcl_death_drop refactoring' (#1415) from mcl-death-drop-refactoring into master
Reviewed-on: https://git.minetest.land/MineClone2/MineClone2/pulls/1415
2021-03-28 18:13:57 +00:00
kay27 54e7529754 [mcl_achievements] Add mcl:stoneAge, mcl:hotStuff, mcl:obsidian 2021-03-28 04:32:57 +04:00
AFCMS 3ba7a40251 Add API documentation 2021-03-27 23:07:46 +01:00
AFCMS 5df668f6af fix mcl_buckets extra_check #1320 2021-03-17 16:56:46 +01:00
Code-Sploit 834dfcf9af Change Max Empty bucket stack back to 16 but keep Lava and Water max_stack. Reason: Wrong research 2021-03-16 13:05:19 +00:00
Code-Sploit f06a56d7c4 Set max_stack of Lava, Water and Emtpy buckets to 1 2021-03-16 12:54:33 +00:00
iliekprogrammar 7a5aa54035 Allow water & lava buckets dispensed break nether portals. 2021-03-14 12:10:54 +08:00
AFCMS a84b70bde6 move buckets registering to separate file 2021-03-12 20:05:47 +01:00
AFCMS 752f74e554 remix mcl_buckets API to be more self documented 2021-03-12 19:56:15 +01:00
Elias Fleckenstein d57db0444f Use mod.conf in all mods, part 1 2021-03-04 15:22:14 +01:00