mirror of
https://github.com/cave-story-randomizer/cave-story-randomizer
synced 2025-12-01 17:00:11 +00:00
Merge pull request #79 from duncathan/sequencebreaks
adds configurable sequence break logic
This commit is contained in:
commit
6ba47caa5f
Binary file not shown.
|
|
@ -2,21 +2,21 @@ local function lifeCapsule3()
|
|||
return {
|
||||
name = "Life Capsule",
|
||||
script = "<EVE0012",
|
||||
attributes = {"nonProgressive"}
|
||||
attributes = {"nonProgressive", "hp3"}
|
||||
}
|
||||
end
|
||||
local function lifeCapsule4()
|
||||
return {
|
||||
name = "Life Capsule",
|
||||
script = "<EVE0013",
|
||||
attributes = {"nonProgressive"}
|
||||
attributes = {"nonProgressive", "hp4"}
|
||||
}
|
||||
end
|
||||
local function lifeCapsule5()
|
||||
return {
|
||||
name = "Life Capsule",
|
||||
script = "<EVE0014",
|
||||
attributes = {"nonProgressive"}
|
||||
attributes = {"nonProgressive", "hp5"}
|
||||
}
|
||||
end
|
||||
|
||||
|
|
@ -107,7 +107,7 @@ local function _itemData()
|
|||
mapSystem = {
|
||||
name = "Map System",
|
||||
script = "<EVE0052",
|
||||
attributes = {"nonProgressive"}
|
||||
attributes = {"nonProgressive", "map"}
|
||||
},
|
||||
locket = {
|
||||
name = "Silver Locket",
|
||||
|
|
|
|||
|
|
@ -5,8 +5,16 @@ function _has(items, attribute)
|
|||
return _count(items, attribute, 1)
|
||||
end
|
||||
|
||||
function _num(items, attribute)
|
||||
return #_.filter(items, function(k,v) return _.contains(v.attributes, attribute) end)
|
||||
end
|
||||
|
||||
function _count(items, attribute, num)
|
||||
return #_.filter(items, function(k,v) return _.contains(v.attributes, attribute) end) >= num
|
||||
return _num(items, attribute) >= num
|
||||
end
|
||||
|
||||
function _hp(items, hp)
|
||||
return 3 + (_num(items, "hp3") * 3) + (_num(items, "hp4") * 4) + (_num(items, "hp5") * 5)
|
||||
end
|
||||
|
||||
local firstCave = Region:extend()
|
||||
|
|
@ -83,7 +91,7 @@ function arthur:new(worldGraph)
|
|||
|
||||
self.requirements = function(self, items)
|
||||
if self.world:StartPoint() then
|
||||
return _has(items, "arthurKey") and _has(items, "weaponSN")
|
||||
return _has(items, "arthurKey") and _has(items, "weaponSN") and self.world.regions.mimigaVillage:canAccess(items)
|
||||
elseif self.world:Camp() then
|
||||
return self.world.regions.labyrinthB:canAccess(items)
|
||||
elseif self.world:Arthur() then
|
||||
|
|
@ -107,7 +115,7 @@ function eggCorridor1:new(worldGraph)
|
|||
|
||||
self.requirements = function(self, items) return self.world.regions.arthur:canAccess(items) end
|
||||
|
||||
self.locations.cthulhu.requirements = function(self, items) return _has(items, "weaponSN") or _has(items, "flight") end
|
||||
self.locations.cthulhu.requirements = function(self, items) return _has(items, "weaponSN") or _has(items, "flight") or self.region.world:_dboost(items, 'cthulhu') end
|
||||
self.locations.eventSue.requirements = function(self, items) return _has(items, "idCard") and _has(items, "weaponBoss") end
|
||||
self.locations.eventSue:setItem(self.world.items:getByKey("eventSue"))
|
||||
end
|
||||
|
|
@ -151,7 +159,7 @@ function grasstownEast:new(worldGraph)
|
|||
|
||||
self.requirements = function(self, items)
|
||||
if not self.world.regions.arthur:canAccess(items) then return false end
|
||||
if _has(items, "flight") or _has(items, "juice") then
|
||||
if _has(items, "flight") or _has(items, "juice") or (self.world:_dboost(items, 'chaco') and _has(items, "weapon")) or self.world:_dboost(items, 'paxChaco') then
|
||||
if self.world.regions.grasstownWest:canAccess(items) then return true end
|
||||
end
|
||||
if _has(items, "eventKazuma") and _has(items, "weaponSN") and self.world.regions.plantation:canAccess(items) then return true end
|
||||
|
|
@ -160,7 +168,7 @@ function grasstownEast:new(worldGraph)
|
|||
|
||||
self.locations.kazuma2.requirements = function(self, items) return _has(items, "rustyKey") end
|
||||
self.locations.execution.requirements = function(self, items) return _has(items, "weaponSN") end
|
||||
self.locations.hutChest.requirements = function(self, items) return _has(items, "eventFans") or _has(items, "flight") end
|
||||
self.locations.hutChest.requirements = function(self, items) return _has(items, "eventFans") or _has(items, "flight") or self.region.world:_dboost(items, 'flightlessHut') end
|
||||
self.locations.gumChest.requirements = function(self, items)
|
||||
if _has(items, "gumKey") and _has(items, "weaponBoss") then
|
||||
if _has(items, "eventFans") or _has(items, "flight") then return true end
|
||||
|
|
@ -259,7 +267,7 @@ function labyrinthW:new(worldGraph)
|
|||
self.locations.turboChaba.requirements = function(self, items) return _has(items, "machineGun") end
|
||||
self.locations.snakeChaba.requirements = function(self, items) return _has(items, "fireball") end
|
||||
self.locations.whimChaba.requirements = function(self, items) return _count(items, "polarStar", 2) end
|
||||
self.locations.campChest.requirements = function(self, items) return _has(items, "flight") or self.region.world:Camp() end
|
||||
self.locations.campChest.requirements = function(self, items) return _has(items, "flight") or self.region.world:Camp() or self.region.world:_dboost(items, 'camp') end
|
||||
self.locations.puuBlack.requirements = function(self, items) return _has(items, "clinicKey") and _has(items, "weaponBoss") end
|
||||
end
|
||||
|
||||
|
|
@ -347,7 +355,7 @@ function eggCorridor2:new(worldGraph)
|
|||
end
|
||||
|
||||
self.locations.dragonChest.requirements = function(self, items) return _has(items, "weaponSN") or _has(items, "eventCore") end
|
||||
self.locations.sisters.requirements = function(self, items) return _has(items, "weaponBoss") end
|
||||
self.locations.sisters.requirements = function(self, items) return _has(items, "weaponBoss") or (self.region.world:_dboost(items, 'sisters') and _has(items, "flight")) end
|
||||
end
|
||||
|
||||
local outerWall = Region:extend()
|
||||
|
|
@ -399,7 +407,7 @@ function plantation:new(worldGraph)
|
|||
self.locations.sprinkler.requirements = function(self, items) return _has(items, "mask") end
|
||||
self.locations.megane.requirements = function(self, items) return _has(items, "brokenSprinkler") and _has(items, "mask") end
|
||||
self.locations.itoh.requirements = function(self, items) return _has(items, "letter") end
|
||||
self.locations.plantCeiling.requirements = function(self, items) return _has(items, "flight") end
|
||||
self.locations.plantCeiling.requirements = function(self, items) return _has(items, "flight") or self.region.world:_dboost(items, 'plantation') end
|
||||
self.locations.plantPup.requirements = function(self, items) return _has(items, "eventRocket") end
|
||||
self.locations.curlyShroom.requirements = function(self, items) return _has(items, "eventCurly") and _has(items, "maPignon") end
|
||||
|
||||
|
|
@ -417,7 +425,7 @@ function lastCave:new(worldGraph)
|
|||
redDemon = Location("Red Demon Boss", "Priso2", "0300", self)
|
||||
}
|
||||
|
||||
self.requirements = function(self, items) return _has(items, "eventRocket") and _has(items, "weaponBoss") and _count(items, "booster", 2) end
|
||||
self.requirements = function(self, items) return _has(items, "weaponBoss") and _count(items, "booster", 2) and (_has(items, "eventRocket") or (self.world:_dboost(items, 'rocket') and _has(items, "machineGun"))) end
|
||||
end
|
||||
|
||||
local endgame = Region:extend()
|
||||
|
|
@ -441,6 +449,20 @@ function worldGraph:new(items)
|
|||
self.order = 0
|
||||
self.spawn = ""
|
||||
|
||||
self.seqbreak = false
|
||||
self.dboosts = {
|
||||
cthulhu = {hp = 3, enabled = true},
|
||||
chaco = {hp = 5, enabled = true},
|
||||
paxChaco = {hp = 10, enabled = true},
|
||||
flightlessHut = {hp = 3, enabled = true},
|
||||
-- revChaco = {hp = 3, enabled = true},
|
||||
-- paxRevChaco = {hp = 8, enabled = true},
|
||||
camp = {hp = 9, enabled = true},
|
||||
sisters = {hp = 0, enabled = true},
|
||||
plantation = {hp = 15, enabled = true},
|
||||
rocket = {hp = 3, enabled = true},
|
||||
}
|
||||
|
||||
self.regions = {
|
||||
firstCave = firstCave(self),
|
||||
mimigaVillage = mimigaVillage(self),
|
||||
|
|
@ -463,6 +485,10 @@ function worldGraph:new(items)
|
|||
}
|
||||
end
|
||||
|
||||
function worldGraph:_dboost(items, key)
|
||||
return (self.seqbreak or self.dboosts[key].enabled) and _hp(items) > self.dboosts[key].hp
|
||||
end
|
||||
|
||||
function worldGraph:StartPoint() return self.spawn == "Start Point" end
|
||||
function worldGraph:Arthur() return self.spawn == "Arthur's House" end
|
||||
function worldGraph:Camp() return self.spawn == "Camp" end
|
||||
|
|
|
|||
|
|
@ -16,9 +16,9 @@ require 'lib.bit'
|
|||
|
||||
local random = require 'randomizer'
|
||||
local settings = require 'settings'
|
||||
Settings = settings()
|
||||
Randomizer = random()
|
||||
Screen = require 'ui.draw'
|
||||
Settings = settings()
|
||||
|
||||
local csdirectory
|
||||
|
||||
|
|
|
|||
|
|
@ -308,21 +308,24 @@ function C:_updateSettings()
|
|||
Settings.settings.obj = self.obj
|
||||
Settings.settings.mychar = self.mychar
|
||||
Settings.settings.spawn = self.worldGraph.spawn
|
||||
Settings.settings.seqbreaks = self.worldGraph.seqbreak
|
||||
Settings.settings.dboosts = _.map(self.worldGraph.dboosts, function(k,v) return v.enabled end)
|
||||
Settings:update()
|
||||
end
|
||||
|
||||
function C:_updateSharecode(seed)
|
||||
local settings = 0 -- 0b00000000
|
||||
-- 0bXXXSSPOO
|
||||
-- P: single bit used for puppysanity
|
||||
-- O: two bits used for objective
|
||||
-- S: two bits used for spawn location
|
||||
-- X: unused
|
||||
-- O: three bits used for objective
|
||||
-- S: three bits used for spawn location
|
||||
-- B: single bit used for sequence breaks
|
||||
-- 0bBSSSOOOP
|
||||
|
||||
-- bitshift intervals
|
||||
local obj = 0
|
||||
local pup = 2
|
||||
local spn = 3
|
||||
local obj = 1
|
||||
local pup = 0
|
||||
local spn = 4
|
||||
local brk = 7
|
||||
|
||||
if self.obj == "objBadEnd" then
|
||||
settings = bit.bor(settings, bit.blshift(1, obj))
|
||||
|
|
@ -341,11 +344,24 @@ function C:_updateSharecode(seed)
|
|||
settings = bit.bor(settings, bit.blshift(2, spn))
|
||||
end
|
||||
|
||||
local seq = 0
|
||||
if self.worldGraph.seqbreak then
|
||||
settings = bit.bor(settings, bit.blshift(1, brk))
|
||||
if self.worldGraph.dboosts.cthulhu.enabled then seq = bit.bor(seq, 1) end
|
||||
if self.worldGraph.dboosts.chaco.enabled then seq = bit.bor(seq, 2) end
|
||||
if self.worldGraph.dboosts.paxChaco.enabled then seq = bit.bor(seq, 4) end
|
||||
if self.worldGraph.dboosts.flightlessHut.enabled then seq = bit.bor(seq, 8) end
|
||||
if self.worldGraph.dboosts.camp.enabled then seq = bit.bor(seq, 16) end
|
||||
if self.worldGraph.dboosts.sisters.enabled then seq = bit.bor(seq, 32) end
|
||||
if self.worldGraph.dboosts.plantation.enabled then seq = bit.bor(seq, 64) end
|
||||
if self.worldGraph.dboosts.rocket.enabled then seq = bit.bor(seq, 128) end
|
||||
end
|
||||
|
||||
if #seed < 20 then
|
||||
seed = seed .. (" "):rep(20-#seed)
|
||||
end
|
||||
|
||||
local packed = love.data.pack("data", "sB", seed, settings)
|
||||
local packed = love.data.pack("data", "sBB", seed, settings, seq)
|
||||
self.sharecode = love.data.encode("string", "base64", packed)
|
||||
|
||||
logNotice(("Sharecode: %s"):format(self.sharecode))
|
||||
|
|
|
|||
|
|
@ -3,17 +3,36 @@ local C = Class:extend()
|
|||
function C:init()
|
||||
self.settings = {}
|
||||
if lf.getInfo('settings.txt') == nil then
|
||||
self:setDefaults()
|
||||
self.settings = self:getDefaults()
|
||||
else
|
||||
self.settings = lf.load('settings.txt')()
|
||||
-- add any missing entries if new settings have been added
|
||||
for k,v in pairs(self:getDefaults()) do
|
||||
self.settings[k] = self.settings[k] or v
|
||||
end
|
||||
end
|
||||
self.settings = lf.load('settings.txt')()
|
||||
self:update()
|
||||
end
|
||||
|
||||
function C:setDefaults()
|
||||
self.settings.csdirectory = nil
|
||||
self.settings.puppy = false
|
||||
self.settings.obj = "objBestEnd"
|
||||
self.settings.spawn = "Start Point"
|
||||
self:update()
|
||||
function C:getDefaults()
|
||||
return {
|
||||
csdirectory = "",
|
||||
puppy = false,
|
||||
obj = "objBestEnd",
|
||||
mychar = "assets/myChar/Quote.bmp",
|
||||
spawn = "Start Point",
|
||||
seqbreaks = false,
|
||||
dboosts = {
|
||||
cthulhu = true,
|
||||
chaco = true,
|
||||
paxChaco = true,
|
||||
flightlessHut = true,
|
||||
camp = true,
|
||||
sisters = true,
|
||||
plantation = true,
|
||||
rocket = true
|
||||
}
|
||||
}
|
||||
end
|
||||
|
||||
function C:update()
|
||||
|
|
@ -21,6 +40,14 @@ function C:update()
|
|||
end
|
||||
|
||||
function C:serialize()
|
||||
local function dboosts()
|
||||
local line = "{"
|
||||
for k,v in pairs(self.settings.dboosts) do
|
||||
line = line .. ("%s = %s,"):format(k,v)
|
||||
end
|
||||
return line .. "}"
|
||||
end
|
||||
|
||||
local line = "return {\r\n "
|
||||
|
||||
line = line .. ("csdirectory = [[%s]],\r\n "):format(self.settings.csdirectory or "")
|
||||
|
|
@ -28,9 +55,11 @@ function C:serialize()
|
|||
line = line .. ("obj = %q,\r\n "):format(self.settings.obj or "")
|
||||
line = line .. ("mychar = %q,\r\n "):format(self.settings.mychar or "")
|
||||
line = line .. ("spawn = %q,\r\n "):format(self.settings.spawn or "")
|
||||
local dboost = dboosts()
|
||||
line = line .. ("seqbreaks = %s,\r\n "):format(self.settings.seqbreaks)
|
||||
line = line .. ("dboosts = %s,\r\n "):format(dboost)
|
||||
|
||||
line = line .. "\r\n}"
|
||||
return line
|
||||
return line .. "\r\n}"
|
||||
end
|
||||
|
||||
function C:getSettings()
|
||||
|
|
|
|||
100
src/ui/draw.lua
100
src/ui/draw.lua
|
|
@ -6,22 +6,36 @@ local C = Class:extend()
|
|||
|
||||
local layout = Luigi(require 'ui.main')
|
||||
local settings = Luigi(require 'ui.settings')
|
||||
layout:setStyle(require 'ui.style')
|
||||
settings:setStyle(require 'ui.style')
|
||||
layout:setTheme(require 'lib.luigi.theme.dark')
|
||||
settings:setTheme(require 'lib.luigi.theme.dark')
|
||||
local sequence = Luigi(require 'ui.sequence')
|
||||
|
||||
local style = require 'ui.style'
|
||||
local theme = require 'lib.luigi.theme.dark'
|
||||
|
||||
layout:setStyle(style)
|
||||
settings:setStyle(style)
|
||||
sequence:setStyle(style)
|
||||
|
||||
layout:setTheme(theme)
|
||||
settings:setTheme(theme)
|
||||
sequence:setTheme(theme)
|
||||
|
||||
function C:setup()
|
||||
self:loadSettings(Settings.settings.puppy, Settings.settings.obj, nil, Settings.settings.mychar, Settings.settings.spawn)
|
||||
self:loadPuppy(Settings.settings.puppy)
|
||||
self:loadObjective(Settings.settings.obj)
|
||||
self:loadMyChar(Settings.settings.mychar)
|
||||
self:loadSpawn(Settings.settings.spawn)
|
||||
self:loadSeqSettings(Settings.settings.seqbreaks, Settings.settings.dboosts)
|
||||
|
||||
background = lg.newImage('assets/background.png')
|
||||
self:draw()
|
||||
layout:show()
|
||||
end
|
||||
|
||||
function C:loadSettings(puppy, obj, seed, mychar, spawn)
|
||||
function C:loadPuppy(puppy)
|
||||
settings.puppy.value = puppy
|
||||
end
|
||||
|
||||
function C:loadObjective(obj)
|
||||
if obj == "objBadEnd" or obj == 1 then
|
||||
settings.objective.index = 1
|
||||
elseif obj == "objNormalEnd" or obj == 2 then
|
||||
|
|
@ -32,13 +46,17 @@ function C:loadSettings(puppy, obj, seed, mychar, spawn)
|
|||
settings.objective.index = 3
|
||||
end
|
||||
settings.objective.value = "override"
|
||||
end
|
||||
|
||||
function C:loadSeed(seed)
|
||||
if seed ~= nil then
|
||||
settings.customseed.value = seed or ""
|
||||
settings.seedselect.value = true
|
||||
settings.seedrandom.value = false
|
||||
end
|
||||
end
|
||||
|
||||
function C:loadMyChar(mychar)
|
||||
if mychar == "assets/myChar/Quote.bmp" then
|
||||
settings.mychar.index = 1
|
||||
elseif mychar == "assets/myChar/Curly.bmp" then
|
||||
|
|
@ -55,7 +73,9 @@ function C:loadSettings(puppy, obj, seed, mychar, spawn)
|
|||
settings.mychar.index = 7
|
||||
end
|
||||
settings.mychar.value = "override"
|
||||
end
|
||||
|
||||
function C:loadSpawn(spawn)
|
||||
if spawn == "Start Point" or spawn == 0 then
|
||||
settings.spawn.index = 1
|
||||
elseif spawn == "Arthur's House" or spawn == 1 then
|
||||
|
|
@ -66,6 +86,20 @@ function C:loadSettings(puppy, obj, seed, mychar, spawn)
|
|||
settings.spawn.value = "override"
|
||||
end
|
||||
|
||||
function C:loadSeqSettings(breaks, seq)
|
||||
if breaks then settings.seqbreak.value = breaks end
|
||||
if breaks or breaks == nil then
|
||||
sequence.cthulhu.value = seq.cthulhu
|
||||
sequence.chaco.value = seq.chaco
|
||||
sequence.paxChaco.value = seq.paxChaco
|
||||
sequence.flightlessHut.value = seq.flightlessHut
|
||||
sequence.camp.value = seq.camp
|
||||
sequence.sisters.value = seq.sisters
|
||||
sequence.plantation.value = seq.plantation
|
||||
sequence.rocket.value = seq.rocket
|
||||
end
|
||||
end
|
||||
|
||||
layout.version.text = 'Cave Story Randomizer [Open Mode] v' .. VERSION
|
||||
layout.author.text = 'by shru and duncathan'
|
||||
layout.twitter.text = '(@shruuu and @duncathan_salt)'
|
||||
|
|
@ -85,6 +119,16 @@ layout.go:onPress(function()
|
|||
Randomizer.mychar = settings.mychar.value
|
||||
Randomizer.worldGraph.spawn = settings.spawn.value
|
||||
|
||||
Randomizer.worldGraph.seqbreak = settings.seqbreak.value
|
||||
Randomizer.worldGraph.dboosts.cthulhu.enabled = sequence.cthulhu.value
|
||||
Randomizer.worldGraph.dboosts.chaco.enabled = sequence.chaco.value
|
||||
Randomizer.worldGraph.dboosts.paxChaco.enabled = sequence.paxChaco.value
|
||||
Randomizer.worldGraph.dboosts.flightlessHut.enabled = sequence.flightlessHut.value
|
||||
Randomizer.worldGraph.dboosts.camp.enabled = sequence.camp.value
|
||||
Randomizer.worldGraph.dboosts.sisters.enabled = sequence.sisters.value
|
||||
Randomizer.worldGraph.dboosts.plantation.enabled = sequence.plantation.value
|
||||
Randomizer.worldGraph.dboosts.rocket.enabled = sequence.rocket.value
|
||||
|
||||
C:setStatus(Randomizer:randomize())
|
||||
|
||||
layout.sharecode.text = "Copy Sharecode"
|
||||
|
|
@ -104,6 +148,24 @@ settings.closeButton:onPress(function()
|
|||
settings.sharecode.value = ""
|
||||
end)
|
||||
|
||||
settings.seqButton:onPress(function()
|
||||
sequence:show()
|
||||
settings:hide()
|
||||
end)
|
||||
|
||||
sequence.allOn:onPress(function()
|
||||
Screen:loadSeqSettings(nil, _.map(Settings.settings.dboosts, function(k,v) return true end))
|
||||
end)
|
||||
|
||||
sequence.allOff:onPress(function()
|
||||
Screen:loadSeqSettings(nil, _.map(Settings.settings.dboosts, function(k,v) return false end))
|
||||
end)
|
||||
|
||||
sequence.close:onPress(function()
|
||||
sequence:hide()
|
||||
settings:show()
|
||||
end)
|
||||
|
||||
layout.sharecode:onPress(function()
|
||||
if Randomizer.sharecode ~= "" then
|
||||
love.system.setClipboardText(Randomizer.sharecode)
|
||||
|
|
@ -119,19 +181,29 @@ settings.customseed:onChange(function()
|
|||
end)
|
||||
|
||||
settings.importshare:onPress(function()
|
||||
local success, seed, sharesettings = pcall(function()
|
||||
local success, seed, sharesettings, seq = pcall(function()
|
||||
local packed = love.data.decode("data", "base64", settings.sharecode.value)
|
||||
local seed, settings = love.data.unpack("sB", packed)
|
||||
return seed, settings
|
||||
local seed, settings, seq = love.data.unpack("sBB", packed)
|
||||
assert(#seed == 20)
|
||||
return seed, settings, seq
|
||||
end)
|
||||
|
||||
if success then
|
||||
settings.importshare.text = "Sharecode Imported"
|
||||
local pup = bit.band(sharesettings, 4) ~= 0
|
||||
local obj = bit.band(sharesettings, 3)
|
||||
local spn = bit.brshift(bit.band(sharesettings, 24), 3)
|
||||
seed = seed:gsub("^%s*(.-)%s*$", "%1") -- trim any leading or trailing whitespace
|
||||
Screen:loadSettings(pup, obj, seed, nil, spn)
|
||||
Screen:loadPuppy(bit.band(sharesettings, 1) ~= 0) -- settings & 0b00000001
|
||||
Screen:loadObjective(bit.brshift(bit.band(sharesettings, 14), 1)) -- (settings & 0b00001110) >> 1
|
||||
Screen:loadSpawn(bit.brshift(bit.band(sharesettings, 112), 4)) -- (settings & 0b01110000) >> 4
|
||||
Screen:loadSeed(seed:gsub("^%s*(.-)%s*$", "%1")) -- trim any leading or trailing whitespace
|
||||
Screen:loadSeqSettings(bit.band(sharesettings, 128) ~= 0, { -- (settings & 0b10000000)
|
||||
cthulhu = bit.band(seq, 1) ~= 0,
|
||||
chaco = bit.band(seq, 2) ~= 0,
|
||||
paxChaco = bit.band(seq, 4) ~= 0,
|
||||
flightlessHut = bit.band(seq, 8) ~= 0,
|
||||
camp = bit.band(seq, 16) ~= 0,
|
||||
sisters = bit.band(seq, 32) ~= 0,
|
||||
plantation = bit.band(seq, 64) ~= 0,
|
||||
rocket = bit.band(seq, 128) ~= 0
|
||||
})
|
||||
else
|
||||
settings.importshare.text = "Invalid Sharecode!"
|
||||
end
|
||||
|
|
|
|||
19
src/ui/sequence.lua
Normal file
19
src/ui/sequence.lua
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
return { style = 'dialog',
|
||||
{ style = 'dialogHead', text = 'Sequence Break Settings'},
|
||||
{ style = 'dialogBody', padding = 24,
|
||||
{ type = 'check', value = true, id = 'cthulhu', text = "Cthulhu's Abode (requires 3HP)", minheight = 27 },
|
||||
{ type = 'check', value = true, id = 'chaco', text = "Chaco Skip (requires 5HP)", minheight = 27 },
|
||||
{ type = 'check', value = true, id = 'paxChaco', text = "Chaco Skip without a weapon (requires 10HP)", minheight = 27 },
|
||||
{ type = 'check', value = true, id = 'flightlessHut', text = "Flightless Grasstown Hut (requires 3HP)", minheight = 27 },
|
||||
{ type = 'check', value = true, id = 'camp', text = "Flightless Camp Chest (requires 9HP)", minheight = 27 },
|
||||
{ type = 'check', value = true, id = 'sisters', text = "Sisters Skip (requires flight)", minheight = 27 },
|
||||
{ type = 'check', value = true, id = 'plantation', text = "Flightless Plantation Chest (requires 15HP)", minheight = 27 },
|
||||
{ type = 'check', value = true, id = 'rocket', text = "Flightless Rocket Skip (requires 3HP, MG, and 2.0)", minheight = 27 },
|
||||
},
|
||||
{ style = 'dialogFoot',
|
||||
{},
|
||||
{ style = 'dialogButton', id = 'allOn', text = 'All On' },
|
||||
{ style = 'dialogButton', id = 'allOff', text = 'All Off' },
|
||||
{ style = 'dialogButton', id = 'close', text = 'Close' }
|
||||
}
|
||||
}
|
||||
|
|
@ -6,11 +6,22 @@ return { style = 'dialog',
|
|||
{ type = 'label', text = 'Seed', minheight = 32 },
|
||||
{
|
||||
{ type = 'radio', group = 'seed', text = 'Use random seed', value = true, id = 'seedrandom', minheight = 27 },
|
||||
{ flow = 'y', { type = 'radio', group = 'seed', text = 'Use custom seed', id = 'seedselect', minheight = 27 }, {{ type = 'text', id = 'customseed', width = 200, minheight = 32}, flow = 'x', { type = 'label', id = 'seedcount' }} }
|
||||
{ flow = 'y', { type = 'radio', group = 'seed', text = 'Use custom seed', id = 'seedselect', minheight = 27 },
|
||||
{
|
||||
flow = 'x',
|
||||
{ type = 'text', id = 'customseed', width = 200, minheight = 32},
|
||||
{ type = 'label', id = 'seedcount' }
|
||||
}
|
||||
}
|
||||
},
|
||||
{ type = 'label', text = 'Randomization Options', minheight = 32 },
|
||||
{ type = 'check', value = false, id = 'puppy', text = "Puppysanity", minheight = 27 },
|
||||
{ height = 64 },
|
||||
{ flow = 'x',
|
||||
{ type = 'check', value = false, id = 'seqbreak', text = "Sequence breaks", minheight = 32, width = 170},
|
||||
{ type = 'button', style = 'dialogButton', text = "Modify", id = 'seqButton', width = 70, align = 'center' },
|
||||
{ width = false }
|
||||
},
|
||||
{ height = 'auto' },
|
||||
},
|
||||
{
|
||||
{ type = 'label', text = 'Objective', minheight = 32 },
|
||||
|
|
|
|||
Loading…
Reference in a new issue