1
0
Fork 0

Convert 'strenght' to 'strength' in beacons and guard against no effect string metadata set, fix whitespace in mcl_beacons/init.lua

This commit is contained in:
teknomunk 2024-05-28 20:19:51 -05:00
parent 95228500a9
commit 2fc3d92550
1 changed files with 18 additions and 14 deletions

View File

@ -218,7 +218,12 @@ local function apply_effects_to_all_players(pos)
local power_level = beacon_blockcheck(pos) local power_level = beacon_blockcheck(pos)
if effect_level == 2 and power_level < 4 then --no need to run loops when beacon is in an invalid setup :P if effect_string == "strenght" then
effect_string = "strength"
meta:set_string("effect", effect_string)
end
if effect_string == "" or ( effect_level == 2 and power_level < 4 ) then --no need to run loops when beacon is in an invalid setup :P
return return
end end
@ -363,7 +368,6 @@ minetest.register_node("mcl_beacons:beacon", {
node = minetest.get_node({x=pos.x,y=y,z=pos.z}) node = minetest.get_node({x=pos.x,y=y,z=pos.z})
end end
if minetest.get_item_group(node.name, "glass") ~= 0 or minetest.get_item_group(node.name,"material_glass") ~= 0 then if minetest.get_item_group(node.name, "glass") ~= 0 or minetest.get_item_group(node.name,"material_glass") ~= 0 then
beam_palette_index = get_beacon_beam(node.name) beam_palette_index = get_beacon_beam(node.name)
end end