From 79e8452f6245322eb57860fade34cacf12569b91 Mon Sep 17 00:00:00 2001 From: seventeenthShulker Date: Sun, 18 Aug 2024 18:59:57 +0200 Subject: [PATCH 1/3] Soul speed works on soul soil too (needs localization) --- mods/ITEMS/mcl_enchanting/enchantments.lua | 2 +- mods/PLAYER/mcl_playerplus/init.lua | 13 +++++++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/mods/ITEMS/mcl_enchanting/enchantments.lua b/mods/ITEMS/mcl_enchanting/enchantments.lua index 44b3a5bd6..64fe2ac09 100644 --- a/mods/ITEMS/mcl_enchanting/enchantments.lua +++ b/mods/ITEMS/mcl_enchanting/enchantments.lua @@ -691,7 +691,7 @@ mcl_enchanting.enchantments.soul_speed = { disallow = {non_combat_armor = true}, incompatible = {frost_walker = true}, weight = 2, - description = S("Increases walking speed on soul sand."), + description = S("Increases walking speed on soul sand and soul soil."), curse = false, on_enchant = function() end, requires_tool = false, diff --git a/mods/PLAYER/mcl_playerplus/init.lua b/mods/PLAYER/mcl_playerplus/init.lua index e40411c10..a467786f2 100644 --- a/mods/PLAYER/mcl_playerplus/init.lua +++ b/mods/PLAYER/mcl_playerplus/init.lua @@ -514,13 +514,18 @@ minetest.register_globalstep(function(dtime) return end - -- Standing on soul sand? If so, walk slower (unless player wears Soul Speed boots) - if node_stand == "mcl_nether:soul_sand" then + local boots = player:get_inventory():get_stack("armor", 5) + local soul_speed = mcl_enchanting.get_enchantment(boots, "soul_speed") + + -- Standing on soul soil? If so, apply Soul Speed bonus + if node_stand == "mcl_blackstone:soul_soil" and soul_speed > 0 then + playerphysics.add_physics_factor(player, "speed", "mcl_playerplus:soul_speed", soul_speed * 0.105 + 1.3) + + -- Standing on soul sand? If so, walk slower (unless player wears Soul Speed boots, then apply bonus) + elseif node_stand == "mcl_nether:soul_sand" then -- TODO: Tweak walk speed -- TODO: Also slow down mobs -- Slow down even more when soul sand is above certain block - local boots = player:get_inventory():get_stack("armor", 5) - local soul_speed = mcl_enchanting.get_enchantment(boots, "soul_speed") if soul_speed > 0 then playerphysics.add_physics_factor(player, "speed", "mcl_playerplus:soul_speed", soul_speed * 0.105 + 1.3) else From e2bcd129c1ec881397c89ae854ce9d6ea4f02801 Mon Sep 17 00:00:00 2001 From: seventeenthShulker Date: Mon, 19 Aug 2024 19:41:34 +0200 Subject: [PATCH 2/3] Use soul_block group for soul speed bonus --- mods/PLAYER/mcl_playerplus/init.lua | 33 ++++++++++++++++------------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/mods/PLAYER/mcl_playerplus/init.lua b/mods/PLAYER/mcl_playerplus/init.lua index a467786f2..a4af9d000 100644 --- a/mods/PLAYER/mcl_playerplus/init.lua +++ b/mods/PLAYER/mcl_playerplus/init.lua @@ -517,23 +517,26 @@ minetest.register_globalstep(function(dtime) local boots = player:get_inventory():get_stack("armor", 5) local soul_speed = mcl_enchanting.get_enchantment(boots, "soul_speed") - -- Standing on soul soil? If so, apply Soul Speed bonus - if node_stand == "mcl_blackstone:soul_soil" and soul_speed > 0 then - playerphysics.add_physics_factor(player, "speed", "mcl_playerplus:soul_speed", soul_speed * 0.105 + 1.3) - - -- Standing on soul sand? If so, walk slower (unless player wears Soul Speed boots, then apply bonus) - elseif node_stand == "mcl_nether:soul_sand" then - -- TODO: Tweak walk speed - -- TODO: Also slow down mobs - -- Slow down even more when soul sand is above certain block - if soul_speed > 0 then - playerphysics.add_physics_factor(player, "speed", "mcl_playerplus:soul_speed", soul_speed * 0.105 + 1.3) - else - if node_stand_below == "mcl_core:ice" or node_stand_below == "mcl_core:packed_ice" or node_stand_below == "mcl_core:slimeblock" or node_stand_below == "mcl_core:water_source" then - playerphysics.add_physics_factor(player, "speed", "mcl_playerplus:soul_speed", 0.1) + -- Standing on a soul block? If so, check for speed bonus / penalty + if get_item_group(node_stand, "soul_block") ~= 0 then + + -- Standing on soul sand? If so, walk slower (unless player wears Soul Speed boots, then apply bonus) + if node_stand == "mcl_nether:soul_sand" then + -- TODO: Tweak walk speed + -- TODO: Also slow down mobs + -- Slow down even more when soul sand is above certain block + if soul_speed > 0 then + playerphysics.add_physics_factor(player, "speed", "mcl_playerplus:soul_speed", soul_speed * 0.105 + 1.3) else - playerphysics.add_physics_factor(player, "speed", "mcl_playerplus:soul_speed", 0.4) + if node_stand_below == "mcl_core:ice" or node_stand_below == "mcl_core:packed_ice" or node_stand_below == "mcl_core:slimeblock" or node_stand_below == "mcl_core:water_source" then + playerphysics.add_physics_factor(player, "speed", "mcl_playerplus:soul_speed", 0.1) + else + playerphysics.add_physics_factor(player, "speed", "mcl_playerplus:soul_speed", 0.4) + end end + elseif soul_speed > 0 then + -- Standing on a different soul block? If so, apply Soul Speed bonus unconditionally + playerphysics.add_physics_factor(player, "speed", "mcl_playerplus:soul_speed", soul_speed * 0.105 + 1.3) end else playerphysics.remove_physics_factor(player, "speed", "mcl_playerplus:soul_speed") From de3b34f5eac9abd3cce4e09303192db524f61c18 Mon Sep 17 00:00:00 2001 From: seventeenthShulker Date: Sat, 31 Aug 2024 15:43:29 +0200 Subject: [PATCH 3/3] Update English translation keys with soul soil --- mods/ITEMS/mcl_enchanting/locale/mcl_enchanting.de.tr | 2 +- mods/ITEMS/mcl_enchanting/locale/mcl_enchanting.es.tr | 2 +- mods/ITEMS/mcl_enchanting/locale/mcl_enchanting.fr.tr | 2 +- mods/ITEMS/mcl_enchanting/locale/mcl_enchanting.ja.tr | 2 +- mods/ITEMS/mcl_enchanting/locale/template.txt | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/mods/ITEMS/mcl_enchanting/locale/mcl_enchanting.de.tr b/mods/ITEMS/mcl_enchanting/locale/mcl_enchanting.de.tr index ecc08b5dc..d8d97a677 100644 --- a/mods/ITEMS/mcl_enchanting/locale/mcl_enchanting.de.tr +++ b/mods/ITEMS/mcl_enchanting/locale/mcl_enchanting.de.tr @@ -68,7 +68,7 @@ Mined blocks drop themselves.=Abgebaute Blöcke werfen sich selbst ab. Smite=Qual Increases damage to undead mobs.=Erhöht Schaden für untote Mobs. Soul Speed=Schnelle Seele -Increases walking speed on soul sand.=Erhöht Gehgeschwindigkeit auf Seelensand. +Increases walking speed on soul sand and soul soil.=Erhöht Gehgeschwindigkeit auf Seelensand. Sweeping Edge=Schwungklinge Increases sweeping attack damage.=Erhöht Schwungangriffsschaden. Thorns=Dornen diff --git a/mods/ITEMS/mcl_enchanting/locale/mcl_enchanting.es.tr b/mods/ITEMS/mcl_enchanting/locale/mcl_enchanting.es.tr index a977e8fe6..2b76b8af6 100644 --- a/mods/ITEMS/mcl_enchanting/locale/mcl_enchanting.es.tr +++ b/mods/ITEMS/mcl_enchanting/locale/mcl_enchanting.es.tr @@ -36,7 +36,7 @@ Increases mob loot.=Incrementa el botín de los enemigos. Increases rate of good loot (enchanting books, etc.)=Incrementa la probabilidad de encontrar tesoros. Increases sweeping attack damage.=Incrementa el daño de efecto area. Increases underwater movement speed.=Incrementa la velocidad de nado bajo el agua. -Increases walking speed on soul sand.=Incrementa la velocidad al caminar sobre arena de Almas. +Increases walking speed on soul sand and soul soil.=Incrementa la velocidad al caminar sobre arena de Almas. Infinity=Infinidad Item destroyed on death.=El objeto se destruye tras tu muerte. Knockback=Empuje diff --git a/mods/ITEMS/mcl_enchanting/locale/mcl_enchanting.fr.tr b/mods/ITEMS/mcl_enchanting/locale/mcl_enchanting.fr.tr index 23cf257da..e05a91fd7 100644 --- a/mods/ITEMS/mcl_enchanting/locale/mcl_enchanting.fr.tr +++ b/mods/ITEMS/mcl_enchanting/locale/mcl_enchanting.fr.tr @@ -36,7 +36,7 @@ Increases mob loot.=Augmente le butin des mobs. Increases rate of good loot (enchanting books, etc.)=Augmente le taux de bon butin (livres enchanteurs, etc.) Increases sweeping attack damage.=Augmente les dégâts de l'épée Increases underwater movement speed.=Augmente la vitesse de déplacement sous l'eau. -Increases walking speed on soul sand.=Augmente la vitesse de marche sur le sable des âmes. +Increases walking speed on soul sand and soul soil.=Augmente la vitesse de marche sur le sable des âmes. Infinity=Infinité Item destroyed on death.=Objet détruit à la mort. Knockback=Recul diff --git a/mods/ITEMS/mcl_enchanting/locale/mcl_enchanting.ja.tr b/mods/ITEMS/mcl_enchanting/locale/mcl_enchanting.ja.tr index 1983ec4d4..d539c35a1 100644 --- a/mods/ITEMS/mcl_enchanting/locale/mcl_enchanting.ja.tr +++ b/mods/ITEMS/mcl_enchanting/locale/mcl_enchanting.ja.tr @@ -36,7 +36,7 @@ Increases mob loot.=MOBの戦利品が増加します。 Increases rate of good loot (enchanting books, etc.)=釣果の質が良くなります(エンチャントの本など)。 Increases sweeping attack damage.=なぎ払い攻撃のダメージが増加します。 Increases underwater movement speed.=水中での横移動速度が増加します。 -Increases walking speed on soul sand.=ソウルサンドとソウルソイルの上を歩く速度が増加します。 +Increases walking speed on soul sand and soul soil.=ソウルサンドとソウルソイルの上を歩く速度が増加します。 Infinity=無限 Item destroyed on death.=死亡時にアイテムが消滅します。 Knockback=ノックバック diff --git a/mods/ITEMS/mcl_enchanting/locale/template.txt b/mods/ITEMS/mcl_enchanting/locale/template.txt index 2a0890d91..99dca7a55 100644 --- a/mods/ITEMS/mcl_enchanting/locale/template.txt +++ b/mods/ITEMS/mcl_enchanting/locale/template.txt @@ -36,7 +36,7 @@ Increases mob loot.= Increases rate of good loot (enchanting books, etc.)= Increases sweeping attack damage.= Increases underwater movement speed.= -Increases walking speed on soul sand.= +Increases walking speed on soul sand and soul soil.= Infinity= Item destroyed on death.= Knockback=