summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAki <nthirtyone@gmail.com>2016-06-20 22:21:13 +0200
committerAki <nthirtyone@gmail.com>2016-06-20 22:21:13 +0200
commitdae8660f934248a0383c8e71b10701c222aa6bee (patch)
tree8cb0b12cef87512b7e3bc2aa4e33aa7f4901748c
parentc3705e6c90bc0635cd9661284498439d5b31fab2 (diff)
downloadroflnauts-dae8660f934248a0383c8e71b10701c222aa6bee.zip
roflnauts-dae8660f934248a0383c8e71b10701c222aa6bee.tar.gz
roflnauts-dae8660f934248a0383c8e71b10701c222aa6bee.tar.bz2
Naut selection improvmenet
-rw-r--r--nautslist.lua57
-rw-r--r--selector.lua8
2 files changed, 35 insertions, 30 deletions
diff --git a/nautslist.lua b/nautslist.lua
index 01c489a..c8df0e1 100644
--- a/nautslist.lua
+++ b/nautslist.lua
@@ -1,31 +1,32 @@
-- List of characters with empty character included
return {
- "empty",
- "frog",
- "lonestar",
- "leon",
- "scoop",
- "gnaw",
- "raelynn",
- "ayla",
- "clunk",
- "voltar",
- "coco",
- "skolldir",
- "yuri",
- "derpl",
- --"vinnie",
- --"genji",
- "swiggins",
- --"rocco",
- "ksenia",
- "ted",
- --"penny",
- --"sentry",
- "skree",
- --"nibbs",
- --"yoolip",
- "chucho",
- --"lux",
- --"ix"
+ "empty", -- empty
+ "frog", -- froggy
+ "lonestar", -- lonestar
+ "leon", -- leon
+ "scoop", -- scoop
+ "gnaw", -- gnaw
+ "raelynn", -- raelynn
+ "ayla", -- ayla
+ "clunk", -- clunk
+ "voltar", -- voltar
+ "coco", -- coco
+ "skolldir", -- skolldir
+ "yuri", -- yuri
+ "derpl", -- derpl
+ --"vinnie", -- vinnie
+ --"spike", -- spike
+ --"genji", -- genji
+ "swiggins", -- swiggins
+ --"rocco", -- rocco
+ "ksenia", -- ksenia
+ "ted", -- ted
+ --"penny", -- penny
+ --"sentry", -- sentry
+ "skree", -- skree
+ --"nibbs", -- nibbs
+ --"yoolip", -- yoolip
+ "chucho", -- chucho
+ --"lux", -- lux
+ --"ix" -- ix
} \ No newline at end of file
diff --git a/selector.lua b/selector.lua
index 778c6cc..b3ab5c4 100644
--- a/selector.lua
+++ b/selector.lua
@@ -66,13 +66,17 @@ end
function Selector:controllerPressed(control, controller)
local n = #self.parent.nauts
if control == "left" and not self.state then
- if self.naut == 1 then
+ if self.naut == 2 or self.naut == 1 then
self.naut = n
else
self.naut = self.naut - 1
end
elseif control == "right" and not self.state then
- self.naut = (self.naut % n) + 1
+ if self.naut == n then
+ self.naut = 2
+ else
+ self.naut = self.naut + 1
+ end
elseif control == "attack" then
if self.naut ~= 1 then
self.state = true