--[[nef_20221122 POLLUTION_script This script will give a hot link list of polluted tiles. It runs directly when loaded. Requires FEATURED_TEXT and SUPPORT_basic (or better). ]] do --[[POLLUTION_script]] -- SOH local featured = setmetatable({},{ -- FEATURED_TEXT __index = function(t,k) local ft = log.featured return assert(ft and ft[k], 'Featured text not loaded.' ) end;}) local function bbcode(...) bbcode = featured.bbcode; return bbcode (...) end local SP = setmetatable({},{ -- SUPPORT_basic __index = function(t,k) local SP = game.SP return assert(SP and SP[k], 'Support package not loaded.') end;}) local function user (...) user = SP.user; return user (...) end local function colored_link(...) colored_link = SP.colored_link; return colored_link(...) end -- STX local report = function(tile,...) if chat then chat.msg(...) log.normal(...) else notify.event(user(),tile,E.BROADCAST_REPORT,...) end end local function p_report(...); p_report = report; p_report(nil, bbcode ("b","Polluted tiles")); p_report(...) end for tile in whole_map_iterate() do if tile:has_extra("pollution") then p_report(tile, colored_link(tile)) end end; if p_report ~= report then report(nil, "No polluted tiles") end end -- end POLLUTION_script