Skip to content

Commit

Permalink
Lua code format - (Stylua)
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Oct 5, 2024
1 parent 977f8b5 commit a1be8af
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions data/libs/functions/boss_lever.lua
Original file line number Diff line number Diff line change
Expand Up @@ -146,23 +146,23 @@ end
function BossLever:onUse(player)
local monsterName = MonsterType(self.name):getName()
local isParticipant = false
local players = {}
local players = {}

for i = 1, #self.playerPositions do
local pos = self.playerPositions[i].pos
local creature = Tile(pos):getTopCreature()
for i = 1, #self.playerPositions do
local pos = self.playerPositions[i].pos
local creature = Tile(pos):getTopCreature()

if not creature or not creature:isPlayer() then
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You need " .. #self.playerPositions .. " players to challenge " .. self.name .. ".")
return true
end
if not creature or not creature:isPlayer() then
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You need " .. #self.playerPositions .. " players to challenge " .. self.name .. ".")
return true
end

if pos == player:getPosition() then
if pos == player:getPosition() then
isParticipant = true
end

table.insert(players, creature)
end
table.insert(players, creature)
end
if not isParticipant then
return false
end
Expand Down

0 comments on commit a1be8af

Please sign in to comment.