I guess it's later

This commit is contained in:
Lilian Jónsdóttir 2020-08-16 15:51:39 -07:00
parent ba880908b3
commit 46a56e7c69

View file

@ -524,34 +524,12 @@ local function isIgnoredDoor(door, homeCellId)
door.destination.cell.sourceMod, config.ignored[door.destination.cell.sourceMod] and "ignored" or "not ignored", -- destination mod is ignored door.destination.cell.sourceMod, config.ignored[door.destination.cell.sourceMod] and "ignored" or "not ignored", -- destination mod is ignored
inCity and "" or "not ", leadsToPublicCell and "" or "not ", hasOccupants and "" or "un") -- in a city, is public, is ocupado inCity and "" or "not ", leadsToPublicCell and "" or "not ", hasOccupants and "" or "un") -- in a city, is public, is ocupado
-- todo: clean this up return config.ignored[door.destination.cell.id] or
-- local shit = config.ignored[door.destination.cell.id] or config.ignored[door.destination.cell.sourceMod] or not inCity or leadsToPublicCell or not hasOccupants config.ignored[door.destination.cell.sourceMod] or
-- log(common.logLevels.large, "shit: %s", shit) not isInteriorCell(door.destination.cell) or
-- return shit not inCity or
if config.ignored[door.destination.cell.id] then leadsToPublicCell or
log(common.logLevels.large, "ignored cell id: %s", door.destination.cell.id) not hasOccupants
return true
elseif config.ignored[door.destination.cell.sourceMod] then
log(common.logLevels.large, "ignored cell mod: %s", door.destination.cell.sourceMod)
return true
elseif not inCity then
log(common.logLevels.large, "%s not in city", door.destination.cell.id)
return true
elseif leadsToPublicCell then
log(common.logLevels.large, "%s is public", door.destination.cell.id)
return true
elseif not hasOccupants then
log(common.logLevels.large, "%s is unoccupied", door.destination.cell.id)
return true
-- otherwise
else
return false
end
end end
local function isIgnoredCell(cell) local function isIgnoredCell(cell)
@ -874,6 +852,9 @@ local function applyChanges(cell)
-- Interior cell, except Waistworks, don't do anything -- Interior cell, except Waistworks, don't do anything
if isInteriorCell(cell) and not (config.waistWorks and isCantonCell(cell.name)) then return end if isInteriorCell(cell) and not (config.waistWorks and isCantonCell(cell.name)) then return end
-- don't do anything to public houses
if isPublicHouse(cell) then return end
-- Deal with NPCs and mounts in cell -- Deal with NPCs and mounts in cell
processNPCs(cell) processNPCs(cell)
processPets(cell) processPets(cell)