1
0
Fork 0

Merge pull request 'Make Soul Speed work on Soul Soil' (#4604) from upstream/soul_soil_speed into master

Reviewed-on: VoxeLibre/VoxeLibre#4604
Reviewed-by: Mikita Wiśniewski <rudzik8@protonmail.com>
This commit is contained in:
the-real-herowl 2024-09-18 10:06:03 +02:00
commit cd2ee49591
7 changed files with 27 additions and 19 deletions

View File

@ -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,

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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=ノックバック

View File

@ -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=

View File

@ -514,21 +514,29 @@ 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
-- 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
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)
local boots = player:get_inventory():get_stack("armor", 5)
local soul_speed = mcl_enchanting.get_enchantment(boots, "soul_speed")
-- 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")