Skip to content

Commit

Permalink
Update clay_lump.lua (#3802)
Browse files Browse the repository at this point in the history
linter said it has nil value
so It seems oke to declare the variable in the loop instead
  • Loading branch information
EPuncker authored Dec 14, 2021
1 parent 33f5bb7 commit 9a8e6af
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions data/scripts/actions/others/clay_lump.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ local config = {
local clayLump = Action()

function clayLump.onUse(player, item, fromPosition, target, toPosition, isHotkey)
local random, tmpItem = math.random(0, 10000) * 0.01
local random = math.random(0, 10000) * 0.01
for i = 1, #config do
tmpItem = config[i]
local tmpItem = config[i]
if random >= tmpItem.chance[1] and random < tmpItem.chance[2] then
item:getPosition():sendMagicEffect(CONST_ME_POFF)

Expand Down

0 comments on commit 9a8e6af

Please sign in to comment.