ignore takes precedence

This commit is contained in:
Lilian Jónsdóttir 2020-07-28 23:15:41 -07:00
parent 6108fea353
commit c87003de46

View file

@ -65,13 +65,13 @@ local function pickCell(ogDest)
local picked = table.choice(cells) local picked = table.choice(cells)
local cell = tes3.getCell({id = picked}) local cell = tes3.getCell({id = picked})
if not config.wildernessCells and not cell.name then if config.ignoredCells[cell.id] then
log("%s is wilderness, trying again...", cell.id) log("%s is ignored cell, trying again...", cell.id)
cell = pickCell(ogDest) cell = pickCell(ogDest)
end end
if config.ignoredCells[cell.id] then if not config.wildernessCells and not cell.name then
log("%s is ignored cell, trying again...", cell.id) log("%s is wilderness, trying again...", cell.id)
cell = pickCell(ogDest) cell = pickCell(ogDest)
end end
@ -148,3 +148,5 @@ end
event.register("initialized", onInitialized) event.register("initialized", onInitialized)
event.register("modConfigReady", function() mwse.mcm.register(require("celediel.DoorRandomizer.mcm")) end) event.register("modConfigReady", function() mwse.mcm.register(require("celediel.DoorRandomizer.mcm")) end)
-- vim:fdm=marker