summaryrefslogtreecommitdiffhomepage
path: root/selector.lua
diff options
context:
space:
mode:
authorAki <nthirtyone@gmail.com>2016-08-24 14:19:18 +0200
committerAki <nthirtyone@gmail.com>2016-08-24 14:19:18 +0200
commit8b0698abc1290cbdbfef3c8b48a2dc7a0388c9d1 (patch)
treea135f4198502c8615379763788bcc4f254dfc29f /selector.lua
parent1213e1e2831805ebb5d193702e02c59c2927e54a (diff)
downloadroflnauts-8b0698abc1290cbdbfef3c8b48a2dc7a0388c9d1.zip
roflnauts-8b0698abc1290cbdbfef3c8b48a2dc7a0388c9d1.tar.gz
roflnauts-8b0698abc1290cbdbfef3c8b48a2dc7a0388c9d1.tar.bz2
Blink button, fix empty error
Diffstat (limited to 'selector.lua')
-rw-r--r--selector.lua9
1 files changed, 5 insertions, 4 deletions
diff --git a/selector.lua b/selector.lua
index 0b3fe8a..cba01e6 100644
--- a/selector.lua
+++ b/selector.lua
@@ -144,13 +144,14 @@ end
-- Get list of selections, checks if not locked are allowed.
function Selector:getFullSelection(allowed)
- local allowed = allowed or false
+ local allowed = allowed
+ if allowed == nil then allowed = false end
local t = {}
- for n,v in ipairs(self.selections) do
+ for n,v in pairs(self.selections) do
local name = self:getListValue(self:getSelection(n))
local locked = self:isLocked(n)
- if not (not locked and not allow) then
- table.insert(t, {name, self.sets[n], self:isLocked(n)})
+ if locked or allowed then
+ table.insert(t, {name, self.sets[n]})
end
end
return t