Fix formspec code that reads strength button field (#4385)

Reviewed-on: VoxeLibre/VoxeLibre#4385
Reviewed-by: the-real-herowl <the-real-herowl@noreply.git.minetest.land>
Co-authored-by: teknomunk <teknomunk@protonmail.com>
Co-committed-by: teknomunk <teknomunk@protonmail.com>
This commit is contained in:
teknomunk 2024-06-11 18:40:44 +02:00 committed by the-real-herowl
parent ddab68b87c
commit 5cafa97dd1
1 changed files with 2 additions and 2 deletions

View File

@ -265,7 +265,7 @@ minetest.register_node("mcl_beacons:beacon", {
remove_beacon_beam(pos) remove_beacon_beam(pos)
end, end,
on_receive_fields = function(pos, formname, fields, sender) on_receive_fields = function(pos, formname, fields, sender)
if fields.swiftness or fields.regeneration or fields.leaping or fields.strenght if fields.swiftness or fields.regeneration or fields.leaping or fields.strength
or fields.haste or fields.resistance or fields.absorption or fields.slow_falling then or fields.haste or fields.resistance or fields.absorption or fields.slow_falling then
local sender_name = sender:get_player_name() local sender_name = sender:get_player_name()
local power_level = beacon_blockcheck(pos) local power_level = beacon_blockcheck(pos)
@ -329,7 +329,7 @@ minetest.register_node("mcl_beacons:beacon", {
end end
minetest.get_meta(pos):set_string("effect","resistance") minetest.get_meta(pos):set_string("effect","resistance")
successful = true successful = true
elseif fields.strenght and power_level >= 3 then elseif fields.strength and power_level >= 3 then
if power_level == 4 then if power_level == 4 then
minetest.get_meta(pos):set_int("effect_level",2) minetest.get_meta(pos):set_int("effect_level",2)
else else