Skip to content

Commit

Permalink
fix upgrade item bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
OgelGames committed Oct 14, 2020
1 parent 4b58b09 commit 4202362
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions formspec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ function beacon.update_formspec(pos)
local max_range = beacon.config["effect_range_"..level]
local effect = meta:get_string("effect")

meta:set_int("range", beacon.limit_range(meta:get_int("range"), level))

effect_names = table.concat(effect_names, ",")

local index = 1
Expand Down
2 changes: 1 addition & 1 deletion helpers.lua
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ function beacon.get_level(pos)
local level = 0
for i = 1, inv:get_size("beacon_upgrades") do
local stack = inv:get_stack("beacon_upgrades", i)
if not stack:is_empty() then
if not stack:is_empty() and stack:get_name() == beacon.config.upgrade_item then
level = level + 1
end
end
Expand Down

0 comments on commit 4202362

Please sign in to comment.