Skip to content

Commit

Permalink
Merge pull request #31 from NewSoupVi/stripes007-changes-testing
Browse files Browse the repository at this point in the history
Speedup canSolve
  • Loading branch information
Exempt-Medic authored Dec 6, 2023
2 parents 0a729d0 + e129640 commit ce13ac1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions scripts/archipelago.lua
Original file line number Diff line number Diff line change
Expand Up @@ -497,6 +497,9 @@ function laser(num)
return (lasers[tonumber(num)] > 0)
end

function randomizationChanged()
require(getLogicFile())
end

-- add AP callbacks
-- un-/comment as needed
Expand All @@ -505,3 +508,5 @@ Archipelago:AddItemHandler("item handler", onItem)
Archipelago:AddLocationHandler("location handler", onLocation)
Archipelago:AddSetReplyHandler("setReply", setReply)
Archipelago:AddRetrievedHandler("setReply", setReply)

ScriptHost:AddWatchForCode("RandomizationChanged", "puzzleRandomization", randomizationChanged)
2 changes: 1 addition & 1 deletion scripts/logic.lua
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,9 @@ function parseIds(ids)
end


require(getLogicFile())
function canSolve(ids)
ids = parseIds(ids)
require(getLogicFile())
for id in ids:gmatch("%S+") do
requiredSymbols = getLogic()[tonumber(id)]
for k, v in pairs(requiredSymbols) do
Expand Down

0 comments on commit ce13ac1

Please sign in to comment.