comparison WorldPlan.lua @ 16:8b1e8ba5753d v1.0-rc4

WorldQuests: - Filter interface reverted: - Left-click to single out a category value, right-click to exclude. Hold shift to set multiple inclusion rules. - Filters operate inclusively. If any of the criteria is green, that pin will appear.
author Nenue
date Mon, 24 Oct 2016 06:00:05 -0400
parents 54adb0d4938b
children 08b03bcdfeac
comparison
equal deleted inserted replaced
15:ecf6f005ce38 16:8b1e8ba5753d
964 if filterType == true then 964 if filterType == true then
965 isIncluded = true 965 isIncluded = true
966 print(' include? ', filterKey, controlValue, filterType) 966 print(' include? ', filterKey, controlValue, filterType)
967 end 967 end
968 end 968 end
969 end 969 self.filtered = (not isIncluded)
970 self.filtered = (not isIncluded) 970 end
971 971
972 972
973 if not TQ_IsActive(self.questID) then 973 if not TQ_IsActive(self.questID) then
974 self.used = nil 974 self.used = nil
975 end 975 end
1252 local setInclude = (button == 'LeftButton') 1252 local setInclude = (button == 'LeftButton')
1253 1253
1254 1254
1255 if not filterKey then 1255 if not filterKey then
1256 -- resetting 1256 -- resetting
1257 for k,v in pairs(WorldPlan.UsedFilters) do 1257 wipe(WorldPlan.UsedFilters)
1258 wipe(v) 1258
1259 end
1260 elseif IsShiftKeyDown() then 1259 elseif IsShiftKeyDown() then
1261 WorldPlan.UsedFilters[filterKey] = nil 1260 WorldPlan.UsedFilters[filterKey] = nil
1262 else 1261 else
1263 WorldPlan.UsedFilters[filterKey] = WorldPlan.UsedFilters[filterKey] or {} 1262 WorldPlan.UsedFilters[filterKey] = WorldPlan.UsedFilters[filterKey] or {}
1264 WorldPlan.UsedFilters[filterKey][filterValue] = setInclude 1263 WorldPlan.UsedFilters[filterKey][filterValue] = setInclude