From f430aec0cd6550b889fa45666d7741537d11b20d Mon Sep 17 00:00:00 2001 From: GNU Hacker Date: Sun, 13 Mar 2022 14:58:01 +0100 Subject: [PATCH 1/4] item pickup sound gain more MC like --- mods/ENTITIES/mcl_item_entity/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mods/ENTITIES/mcl_item_entity/init.lua b/mods/ENTITIES/mcl_item_entity/init.lua index 2c5acdc92..e39e21bfb 100644 --- a/mods/ENTITIES/mcl_item_entity/init.lua +++ b/mods/ENTITIES/mcl_item_entity/init.lua @@ -110,7 +110,7 @@ minetest.register_globalstep(function(dtime) if tick == true and pool[name] > 0 then minetest.sound_play("item_drop_pickup", { pos = pos, - gain = 0.7, + gain = 0.3, max_hear_distance = 16, pitch = math.random(70,110)/100 }) From 47b1eeda742d8779622e64804d34dfe31a8c23d1 Mon Sep 17 00:00:00 2001 From: AFCMS Date: Sun, 13 Mar 2022 19:11:28 +0100 Subject: [PATCH 2/4] fix frost walker enchant not protecting from magma block damage --- mods/ITEMS/mcl_nether/init.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mods/ITEMS/mcl_nether/init.lua b/mods/ITEMS/mcl_nether/init.lua index c5afe66ae..bd983d72b 100644 --- a/mods/ITEMS/mcl_nether/init.lua +++ b/mods/ITEMS/mcl_nether/init.lua @@ -106,7 +106,8 @@ minetest.register_node("mcl_nether:magma", { sounds = mcl_sounds.node_sound_stone_defaults(), -- From walkover mod on_walk_over = function(loc, nodeiamon, player) - if player and player:get_player_control().sneak or minetest.global_exists("mcl_potions") and mcl_potions.player_has_effect(player, "fire_proof") then + local armor_feet = player:get_inventory():get_stack("armor", 5) + if player and player:get_player_control().sneak or (minetest.global_exists("mcl_enchanting") and mcl_enchanting.has_enchantment(armor_feet, "frost_walker")) or (minetest.global_exists("mcl_potions") and mcl_potions.player_has_effect(player, "fire_proof")) then return end -- Hurt players standing on top of this block From 4483f4b6b674f953ad6f96607170e8ec0c7e180f Mon Sep 17 00:00:00 2001 From: epCode Date: Tue, 15 Mar 2022 02:18:02 +0000 Subject: [PATCH 3/4] fix #2068 --- mods/ITEMS/mcl_bows/crossbow.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mods/ITEMS/mcl_bows/crossbow.lua b/mods/ITEMS/mcl_bows/crossbow.lua index 5ae21a1f3..b211f6b39 100644 --- a/mods/ITEMS/mcl_bows/crossbow.lua +++ b/mods/ITEMS/mcl_bows/crossbow.lua @@ -116,7 +116,7 @@ end -- Bow item, uncharged state minetest.register_tool("mcl_bows:crossbow", { - description = S("Corssbow"), + description = S("Crossbow"), _tt_help = S("Launches arrows"), _doc_items_longdesc = S("Bows are ranged weapons to shoot arrows at your foes.").."\n".. S("The speed and damage of the arrow increases the longer you charge. The regular damage of the arrow is between 1 and 9. At full charge, there's also a 20% of a critical hit, dealing 10 damage instead."), From 3f787f8305b73cedb622e019314e6fa43154ccfe Mon Sep 17 00:00:00 2001 From: kabou Date: Tue, 15 Mar 2022 07:42:11 +0100 Subject: [PATCH 4/4] Remove stray work notes files. * These temp files accidentally got added during the unregistered nodes fixes. --- mods/TODO.CORE | 16 ----- mods/TODO.ENTITIES | 61 ------------------ mods/TODO.ITEMS | 156 --------------------------------------------- mods/TODO.MAPGEN | 17 ----- 4 files changed, 250 deletions(-) delete mode 100644 mods/TODO.CORE delete mode 100644 mods/TODO.ENTITIES delete mode 100644 mods/TODO.ITEMS delete mode 100644 mods/TODO.MAPGEN diff --git a/mods/TODO.CORE b/mods/TODO.CORE deleted file mode 100644 index 62d5ed1a4..000000000 --- a/mods/TODO.CORE +++ /dev/null @@ -1,16 +0,0 @@ -CORE/_mcl_autogroup/init.lua: --> Enumerates entries of the registered_nodes table. Safe. - -CORE/flowlib/init.lua: --> All instances are checked before use. - -CORE/mcl_explosions/init.lua: --> Enumerates entries of the registered_nodes table. Safe. - -CORE/walkover/init.lua: --> Enumerates entries of the registered_nodes table. Safe. - -CORE/mcl_util/init.lua: --> All instances are checked before use. -- should use local. -- defines mcl_util.call_on_rightclick, but does not use it. diff --git a/mods/TODO.ENTITIES b/mods/TODO.ENTITIES deleted file mode 100644 index 9d1cdaf99..000000000 --- a/mods/TODO.ENTITIES +++ /dev/null @@ -1,61 +0,0 @@ -ENTITIES/mcl_boats/init.lua: --> All instances are checked before use. -- one use in stray comment. -- should use local or should use mcl_util.call_on_rightclick. - -ENTITIES/mcl_dripping/init.lua: --> Only references one directly indexed entry. Safe. - -ENTITIES/mcl_mobs/api.lua: --> Uses node_ok() that checks and always returns valid nodes. Safe. -- line 1331 minetest.registered_items? Fixed -- should use locals. - -ENTITIES/mcl_mobs/spawning.lua: --> Only instances in commented out spawning code. Safe. - -ENTITIES/mcl_mobs/mount.lua: --> All instances shielded by node_ok(). Safe. - -ENTITIES/mobs_mc/snowman.lua: --> All instances checked. Safe. -- line 107 belowdef.nod_box == nil ? - -ENTITIES/mobs_mc/2_throwing.lua: --> All instances checked. Safe. - -ENTITIES/mobs_mc/3_shared.lua: --> Unchecked accesses. Fixed. - -ENTITIES/mobs_mc/enderman.lua: --> Unchecked accesses. Fixed. -- line 69: use indexed registered_nodes. -- line 259: weird but works. -- line 409 and onwards: restricted to takable_nodes. - -ENTITIES/mobs_mc/blaze.lua: --> Unchecked access. Fixed. - -ENTITIES/mobs_mc/slime+magma_cube.lua: --> Unchecked accesses. Fixed. - -ENTITIES/mobs_mc/5_spawn_abm_check.lua: --> Does not appear to be used at all. -- unchecked access. Unfixed. - -ENTITIES/mcl_paintings/init.lua: --> All instances checked. Safe. - -ENTITIES/mcl_item_entity/init.lua: --> Unchecked access. Fixed. - -ENTITIES/mcl_falling_nodes/init.lua: --> All instances checked. Safe. -- line 170: minetest.registered_nodes[self.node.name] is the same as bcd set on line 155 - because of condition on line 164, therefore this access is safe. Sloppy code though. - -ENTITIES/mcl_minecarts/init.lua: --> Unchecked access. Fixed. - -ENTITIES/mobs_mc_gameconfig/init.lua: --> Only explicit indexing of registered_nodes. Safe diff --git a/mods/TODO.ITEMS b/mods/TODO.ITEMS deleted file mode 100644 index 4ebc07f84..000000000 --- a/mods/TODO.ITEMS +++ /dev/null @@ -1,156 +0,0 @@ -ITEMS/mcl_portals/portal_nether.lua --> not checked. -ITEMS/mcl_portals/portal_gateway.lua --> not checked. -ITEMS/mcl_portals/portal_end.lua --> not checked. -ITEMS/mcl_sponges/init.lua --> not checked. -ITEMS/mcl_beds/api.lua --> not checked. -ITEMS/mcl_beds/functions.lua --> not checked. -ITEMS/mcl_torches/api.lua --> not checked. -ITEMS/mcl_tools/init.lua --> not checked. -ITEMS/mcl_ocean/seagrass.lua --> not checked. -ITEMS/mcl_ocean/kelp.lua --> not checked. -ITEMS/mcl_ocean/corals.lua --> not checked. -ITEMS/mcl_ocean/sea_pickle.lua --> not checked. -ITEMS/mcl_lanterns/init.lua --> not checked. -ITEMS/mcl_stairs/api.lua --> not checked. -ITEMS/mcl_stairs/cornerstair.lua --> not checked. -ITEMS/mcl_dye/init.lua --> not checked. -ITEMS/mcl_bows/crossbow.lua --> not checked. -ITEMS/mcl_bows/bow.lua --> not checked. -ITEMS/mcl_bows/rocket.lua --> not checked. -ITEMS/mcl_bows/arrow.lua --> not checked. -ITEMS/mcl_buckets/init.lua --> not checked. -ITEMS/mcl_buckets/register.lua --> not checked. -ITEMS/mcl_throwing/register.lua --> not checked. -ITEMS/mcl_flowers/init.lua --> not checked. -ITEMS/mcl_tnt/init.lua --> not checked. -ITEMS/mcl_cocoas/init.lua --> not checked. -ITEMS/xpanes/init.lua --> not checked. -ITEMS/mcl_potions/tipped_arrow.lua --> not checked. -ITEMS/mcl_potions/potions.lua --> not checked. -ITEMS/mcl_potions/init.lua --> not checked. -ITEMS/mcl_end/end_crystal.lua --> not checked. -ITEMS/mcl_end/chorus_plant.lua --> not checked. -ITEMS/mcl_walls/init.lua --> not checked. -ITEMS/mcl_fishing/init.lua --> not checked. -ITEMS/mcl_composters/init.lua --> not checked. -ITEMS/mcl_heads/init.lua --> not checked. -ITEMS/mclx_fences/init.lua --> not checked. -ITEMS/mcl_mobspawners/init.lua --> not checked. -ITEMS/mclx_stairs/init.lua --> not checked. -ITEMS/mclx_core/init.lua --> not checked. -ITEMS/mcl_core/nodes_base.lua --> not checked. -ITEMS/mcl_core/nodes_misc.lua --> not checked. -ITEMS/mcl_core/nodes_cactuscane.lua --> not checked. -ITEMS/mcl_core/nodes_climb.lua --> not checked. -ITEMS/mcl_core/craftitems.lua --> not checked. - -ITEMS/mcl_core/functions.lua --> Unchecked accesses. Fixed. - -ITEMS/mcl_fire/init.lua --> not checked. -ITEMS/mcl_fire/fire_charge.lua --> not checked. -ITEMS/mcl_fire/flint_and_steel.lua --> not checked. -ITEMS/mcl_banners/init.lua --> not checked. -ITEMS/mcl_farming/shared_functions.lua --> not checked. -ITEMS/mcl_farming/hoes.lua --> not checked. -ITEMS/mcl_farming/soil.lua --> not checked. -ITEMS/mcl_signs/init.lua --> not checked. -ITEMS/mcl_maps/init.lua --> not checked. -ITEMS/screwdriver/init.lua --> not checked. -ITEMS/mcl_nether/lava.lua --> not checked. -ITEMS/mcl_nether/nether_wart.lua --> not checked. -ITEMS/mcl_books/init.lua --> not checked. -ITEMS/mcl_chests/init.lua --> not checked. -ITEMS/mcl_hoppers/init.lua --> not checked. -ITEMS/mcl_colorblocks/init.lua --> not checked. -ITEMS/REDSTONE/mcl_dispensers/init.lua --> not checked. -ITEMS/REDSTONE/mcl_droppers/init_new.lua --> not checked. -ITEMS/REDSTONE/mcl_droppers/init.lua --> not checked. -ITEMS/REDSTONE/mcl_comparators/init.lua --> not checked. -ITEMS/REDSTONE/mesecons_pressureplates/init.lua --> not checked. -ITEMS/REDSTONE/mesecons_walllever/init.lua --> not checked. -ITEMS/REDSTONE/mesecons_button/init.lua --> not checked. -ITEMS/REDSTONE/mesecons/internal.lua --> not checked. -ITEMS/REDSTONE/mesecons/util.lua --> not checked. -ITEMS/REDSTONE/mesecons_mvps/init.lua --> not checked. -ITEMS/REDSTONE/mesecons_wires/init.lua --> not checked. -ITEMS/REDSTONE/mesecons_delayer/init.lua --> not checked. -ITEMS/REDSTONE/mesecons_pistons/init.lua --> not checked. -ITEMS/mcl_itemframes/init.lua --> not checked. -ITEMS/mcl_doors/api_doors.lua --> not checked. diff --git a/mods/TODO.MAPGEN b/mods/TODO.MAPGEN deleted file mode 100644 index 0cba3f346..000000000 --- a/mods/TODO.MAPGEN +++ /dev/null @@ -1,17 +0,0 @@ -MAPGEN/mcl_villages/buildings.lua --> Only use is checked. Safe. - -MAPGEN/mcl_villages/utils.lua --> Only indexed uses. Safe. - -MAPGEN/tsm_railcorridors/init.lua --> Unchecked accesses. Fixed. - -MAPGEN/mcl_structures/init.lua --> Unchecked access. Fixed. - -MAPGEN/mcl_dungeons/init.lua --> Unchecked accesses. Fixed. - -MAPGEN/mcl_mapgen_core/init.lua --> All uses are checked. Safe.