From 464f0f161bd1549c6940d6433f12f7c71bca9898 Mon Sep 17 00:00:00 2001 From: FaceDeer Date: Tue, 23 Aug 2022 22:02:16 -0600 Subject: [PATCH] beef up explosions in MCL, make slade brick craftable from slade sand and lava --- df_dependencies/helper_functions.lua | 3 ++- df_dependencies/nodes.lua | 1 + df_underworld_items/slade.lua | 22 ++++++++++++++-------- df_underworld_items/slade_drill.lua | 2 +- 4 files changed, 18 insertions(+), 10 deletions(-) diff --git a/df_dependencies/helper_functions.lua b/df_dependencies/helper_functions.lua index 5573f73..5d86b51 100644 --- a/df_dependencies/helper_functions.lua +++ b/df_dependencies/helper_functions.lua @@ -189,7 +189,8 @@ if minetest.get_modpath("tnt") then df_dependencies.tnt_boom = tnt.boom elseif minetest.get_modpath("mcl_explosions") then df_dependencies.tnt_boom = function(pos, def) - mcl_explosions.explode(pos, def.radius) + local strength = def.radius * 5 + mcl_explosions.explode(pos, strength) end end diff --git a/df_dependencies/nodes.lua b/df_dependencies/nodes.lua index b6ccd51..db51632 100644 --- a/df_dependencies/nodes.lua +++ b/df_dependencies/nodes.lua @@ -81,6 +81,7 @@ df_dependencies.node_name_dirt_wet = select_required("farming:soil_wet", "mcl_fa df_dependencies.node_name_string = select_required("farming:string", "mcl_mobitems:string") df_dependencies.node_name_bucket_empty = select_required("bucket:bucket_empty", "mcl_buckets:bucket_empty") +df_dependencies.node_name_bucket_lava = select_required("bucket:bucket_lava", "mcl_buckets:bucket_lava") -- from "wool" diff --git a/df_underworld_items/slade.lua b/df_underworld_items/slade.lua index 9e44b30..bab34e8 100644 --- a/df_underworld_items/slade.lua +++ b/df_underworld_items/slade.lua @@ -12,8 +12,6 @@ end local add_immortality = function(slade_def) slade_def.groups.immortal = 1 slade_def.can_dig = server_diggable_only - slade_def._mcl_blast_resistance = 3600000 - slade_def._mcl_hardness = -1 return slade_def end @@ -51,8 +49,8 @@ local slade_brick_def = { groups = slade_groups, sounds = df_dependencies.sound_stone({ footstep = { name = "bedrock2_step", gain = 1 } }), is_ground_content = false, - _mcl_blast_resistance = 1200, - _mcl_hardness = 50, + _mcl_blast_resistance = 8, + _mcl_hardness = 5, } if invulnerable then add_immortality(slade_brick_def) @@ -82,8 +80,8 @@ local slade_wall_def = { is_ground_content = false, groups = slade_wall_groups, sounds = df_dependencies.sound_stone({ footstep = { name = "bedrock2_step", gain = 1 } }), - _mcl_blast_resistance = 1200, - _mcl_hardness = 50, + _mcl_blast_resistance = 8, + _mcl_hardness = 5, } if invulnerable then add_immortality(slade_wall_def) @@ -99,7 +97,7 @@ minetest.register_node("df_underworld_items:slade_sand", { groups = {crumbly = 3, falling_node = 1, slade=1, pit_plasma_resistant=1, mese_radiation_shield=1,handy=1,shovely=3, sand=1, enderman_takable=1, building_block=1, material_sand=1, crush_after_fall=1, falling_node_damage=1}, sounds = df_dependencies.sound_gravel({footstep = {name = df_dependencies.soundfile_gravel_footstep, gain = 0.45},}), _mcl_blast_resistance = 8, - _mcl_hardness = 5, + _mcl_hardness = 3, }) local slade_block_def = { @@ -137,7 +135,15 @@ if invulnerable then end minetest.register_node("df_underworld_items:slade_seal", slade_seal_def) - +minetest.register_craft({ + type = "shapeless", + output = "df_underworld_items:slade_brick", + recipe = { + "df_underworld_items:slade_sand", + df_dependencies.node_name_bucket_lava, + }, + replacements = {{df_dependencies.node_name_bucket_lava, df_dependencies.node_name_bucket_empty}}, +}) minetest.register_abm{ label = "slade seal scratching", diff --git a/df_underworld_items/slade_drill.lua b/df_underworld_items/slade_drill.lua index 1a701a7..1ba0596 100644 --- a/df_underworld_items/slade_drill.lua +++ b/df_underworld_items/slade_drill.lua @@ -7,7 +7,7 @@ local check_timeout = function(user) local player_name = user:get_player_name() local curr_time = minetest.get_gametime() -- minetest.get_us_time() for microsecond precision local last_used = use_timeout[player_name] - if not last_used or curr_time > last_used + 1 then + if not last_used or curr_time > last_used then use_timeout[player_name] = curr_time return true end