Commit Graph

7568 Commits

Author SHA1 Message Date
kabou
f37f8b6bca Return itemstack in composter_harvest().
* `composter_harvest()` is a `on_rightclick` handler and should return
  what remains of the ItemStack that was passed to it.
2022-04-02 03:32:56 +02:00
kabou
2ba801dfc7 Add protection support to composter.
* Add checks for `minetest.is_protected()` and log any violations.
* Add local aliases for global functions.
2022-04-02 03:32:56 +02:00
kabou
bba3aabb59 Add compostability to GROUPS.md 2022-04-02 03:32:56 +02:00
kabou
19eb31f389 Streamline use of vector ops.
* Use vector.offset instead of vector.add.
* Define and use local alias for vector.offset.
2022-04-02 03:32:56 +02:00
kabou
541a805a48 Logix fix and some simple optimizations.
* Fix silly and mostly inconsequential logic bug that had gone unnoticed up
  till now.
* Condense a single use variable away by using a slightly more elaborate
  assignment statement.
* Add a few more local aliases for global minetest.* functions.
2022-04-02 03:32:56 +02:00
kabou
cd12e1d78c Various little fixes.
* Remove trailing whitespace.
* Remove `use_texture_alpha` setting from node definitions, the default
  value is already the correct one.
2022-04-02 03:32:56 +02:00
kabou
4335d0d659 Use compostability group from node definitions.
* Replace use of local table with compostability values with a call to
 `minetest.get_item_group()`.
* Define local alias for `minetest.get_item_group`.
* Remove the now unused static compostabilty values table.
2022-04-02 03:32:56 +02:00
kabou
de16eb3c5a Add compostability to node definition group.
* mcl_cake/init.lua (cake);
* mcl_core/craftitems.lua (apple);
* mcl_core/nodes_base.lua (dirt with grass);
* mcl_core/nodes_cactuscane.lua (cactus, sugarcane);
* mcl_core/nodes_climb.lua (vines);
* mcl_core/nodes_trees.lua (leaves, saplings);
* mcl_dye/init.lua (cocoa beans);
* mcl_farming/beetroot.lua (beetroot, & seeds);
* mcl_farming/carrots.lua (carrot);
* mcl_farming/melon.lua (melon, & slice, & seeds);
* mcl_farming/potatoes.lua (potato, baked potato);
* mcl_farming/pumpkin.lua (pumpkin, carved &, & seeds, & pie);
* mcl_farming/wheat.lua (wheat, cookie, bread, hay block);
* mcl_flowers/init.lua (flowers, ferns, grass, & tall variants);
* mcl_mushrooms/small.lua (red and brown mushrooms);
* mcl_mushrooms/huge.lua (red and brown huge mushrooms);
* mcl_nether/init.lua (nether wart block);
* mcl_nether/nether_wart.lua (nether wart);
* mcl_ocean/kelp.lua (kelp, dried &, & block);
* mcl_ocean/sea_pickle.lua (sea pickle);
* mcl_ocean/seagrass.lua (seagrass).
2022-04-02 03:32:56 +02:00
cora
6851fa759e Merge pull request 'Fix weather lag' (#2091) from fix-weather-lag into master
Reviewed-on: https://git.minetest.land/MineClone2/MineClone2/pulls/2091
2022-03-30 10:25:44 +00:00
cora
7f1bb7af92 replace nether dust particles with p. spawners
mcl2 uses add_particle for nether dust resulting in a 10-fold
increase in network traffic when in the nether. Nether dust is not
configurable making it impossible to turn this off for server admins.
this commit replaces the add_particle method with particle spawners
2022-03-30 10:21:32 +00:00
cora
53715212a2 remove unnecessary on_dimensionchange 2022-03-30 10:21:32 +00:00
cora
c146426c5c fix snow not being properly removed 2022-03-30 10:21:32 +00:00
cora
dc24f45cfa add indoor detection for snow 2022-03-30 10:21:32 +00:00
cora
d2861c5955 remove unneccessary particle logic 2022-03-30 10:21:32 +00:00
cora
1e4494e85d let rain and thunder use particlespawners 2022-03-30 10:21:32 +00:00
cora
4eae95fa47 let snow use particlespawners 2022-03-30 10:21:32 +00:00
cora
ef7ebda90c Merge pull request 'fire-HUD-crashfix' (#2093) from fire-HUD-crashfix into master
Reviewed-on: https://git.minetest.land/MineClone2/MineClone2/pulls/2093

Tested and verified it fixes the crash
2022-03-30 10:20:24 +00:00
kabou
1b99b73894 Fix wrong player name accessor.
* Duh..
2022-03-30 01:31:38 +02:00
kabou
14da059ce7 Add extra check and warning on missing player data.
* For some unexplained reason, `mcl_burning.storage[player]` can
  sometimes be `nil`, causing a crash in `on_leaveplayer()`.  This
  commit adds a check for that.  If a `nil` is encountered, a sane
  value is substituted and a warning is set to the log.
2022-03-29 12:06:00 +02:00
cora
04f0ea260d Merge pull request 'Add shields and offhand (Fix #295)' (#2073) from NO11/MineClone2:shields2 into master
Reviewed-on: https://git.minetest.land/MineClone2/MineClone2/pulls/2073
Reviewed-by: AFCMS <afcm.contact@gmail.com>
Reviewed-by: kabou <kabou@noreply.git.minetest.land>
Reviewed-by: cora <cora@noreply.git.minetest.land>
2022-03-28 14:55:11 +00:00
NO11
5974b6f609 Merge branch 'master' into shields2 2022-03-28 12:27:57 +00:00
NO411
148be4ea39 Fix shield behavior 2022-03-27 19:52:36 +02:00
NO411
6afe7cfb58 Fix typo and interact bug? 2022-03-27 18:08:43 +02:00
cora
8e24e6edfe Merge pull request 'Fix Barrel protection and add proper log for interactions (#2086)' (#2087) from barrel_fix into master
Reviewed-on: https://git.minetest.land/MineClone2/MineClone2/pulls/2087
Reviewed-by: cora <cora@noreply.git.minetest.land>
2022-03-25 13:16:52 +00:00
AFCMS
909b77ce4d
barrel protection fix + log 2022-03-25 13:28:33 +01:00
cora
1dde51dd0b Merge pull request 'Fix passive mobs not spawning in certain biomes ( #2069 )' (#2085) from fix-mobs-spawning into master
Reviewed-on: https://git.minetest.land/MineClone2/MineClone2/pulls/2085
0.72.1
2022-03-24 16:00:24 +00:00
NO11
63a156c30c Fix typo/crash 2022-03-23 18:30:34 +00:00
cora
1c9f0c3238 don't spawn mobs on non opaque nodes or leaves
with the preliminary jordanspaning mobs would spawn on trees
and water regularly.
2022-03-22 22:02:15 +01:00
cora
50e99f470e fix certain mobs not spawning in certain biomes 2022-03-22 15:16:48 +01:00
NO411
aeff7cf1a4 Remove offhand item on death 2022-03-22 12:48:41 +01:00
cora
bc723616ea Merge pull request 'Fix undefined luaentity crash.' (#2084) from fix-unregistered-collisions into master
Reviewed-on: https://git.minetest.land/MineClone2/MineClone2/pulls/2084
Reviewed-by: cora <cora@noreply.git.minetest.land>
2022-03-21 10:31:20 +00:00
kabou
46ee5aaa59 Fix undefined luaentity crash.
* Add nil check to get_luaentity() access.
* Cache get_luaentity() call in local var.
2022-03-21 01:39:02 +00:00
cora
3dd4eec4e8 Merge pull request 'Add group:supported_node (for carpets).' (#2077) from kabou/MineClone2:add-group-supported_nodes into master
Reviewed-on: https://git.minetest.land/MineClone2/MineClone2/pulls/2077
Reviewed-by: cora <cora@noreply.git.minetest.land>
2022-03-21 00:31:53 +00:00
NO411
019dd45381 Check for damager 2022-03-19 16:50:19 +01:00
NO411
d481f7b720 Fix showing shield hud at the wrong side for half a second 2022-03-19 15:59:59 +01:00
NO411
c94964d10a Remove debug line 2022-03-19 15:26:41 +01:00
kabou
a9a3f01a0e Tiny comment fix. 2022-03-19 03:16:15 +01:00
kabou
ae6bea73fd Make carpets supported_node.
* Change carpet from `group:attached_node` to `group:supported_node`,
  allowing carpets to be placed on top of torches, water source blocks
  and other non-walkable nodes, like in MC.
2022-03-19 02:32:46 +01:00
kabou
2002872af8 Add group supported_node to GROUPS.md. 2022-03-19 02:32:29 +01:00
kabou
8518ce2c19 Add support for group:supported_node
* Add support for `group:supported_node` to CORE/mcl_attached.
  Supported nodes are nodes that can be placed on any node that does not
  have the `drawtype = "airlike"` attribute.
* Copy the `drop_attached_node()` function from minetest/builtin, so
  that the override function provides the same behavior when nodes drop.
* Add comments to CORE/mcl_attached and to the functions defined in it.
* Add more local aliases for global minetest.* functions.
* If the original function returns true, it is not necessary anymore
  to perform more tests and the override function can simply return true
  immediately.
2022-03-19 02:32:13 +01:00
NO411
6158e4e50d Don't always update shield texture using set_properties 2022-03-18 23:23:01 +01:00
NO411
7c0a48bebf Remove some code ... 2022-03-18 23:08:50 +01:00
NO411
5bdf83cbfc Revert weird changes 2022-03-18 23:07:25 +01:00
NO411
976cfba53a Make it possible to xraft a banner on an enchanted shield 2022-03-18 23:02:51 +01:00
NO411
fc9e83c059 Make it possible to craft a banner on an enchanted shield 2022-03-18 23:02:25 +01:00
NO411
60d877b718 Fix enchanting shield on enchanting table possible 2022-03-18 22:45:12 +01:00
cora
81a1b9973a Merge pull request 'More burning HUD fixes (kabou)' (#2076) from fix-burning-hud into master
Reviewed-on: https://git.minetest.land/MineClone2/MineClone2/pulls/2076
2022-03-18 10:52:07 +00:00
kabou
9eba0e4860 Remove unused code.
* Remove unused code that was commented out.  The code tried to find
  fire luaentities in the same spot as the newly created fire luaentity.
  It may have been intended to optimize getting set on fire multiple
  times, but it makes no sense as it does not discriminate between fire
  luaentities attached to the object set on fire and those attached to
  other objects.  The function that this code was in also has a better
  way to prevent adding multiple fire luaentities in the first place.
2022-03-18 11:39:11 +01:00
kabou
90311da514 Preempt possible crash on nil in on_joinplayer.
* In mineclone5 a crash was reported to occur when deserialization of
  storage returned nil in on_joinplayer.    https://git.minetest.land/
  MineClone5/MineClone5/commit/96c4fb60d8641b4181edb902ed24dbf173828d09
  This commit uses a different, but equally effective fix.
2022-03-18 11:36:33 +01:00
kabou
e9ff2ba32a Minor changes to mcl_burning.
* Remove animation_frame from fire entity state, it is now kept in the
  storage table of the parent entity.
* Rename animation_timer in fire entity table to _mcl_animation_timer,
  in line with mineclone2 policy on adding custom members to minetest
  tables.
* Comment out code that does nothing sensible.  Scheduled for deletion
  at a later time.
2022-03-18 11:36:23 +01:00