mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-16 16:11:06 +01:00
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:
parent
95228500a9
commit
2fc3d92550
1 changed files with 18 additions and 14 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue