Module:GeneralPortOperations: Difference between revisions

From MicrasWiki
Jump to navigationJump to search
NewZimiaGov (talk | contribs)
No edit summary
NewZimiaGov (talk | contribs)
Undo revision 360009 by NewZimiaGov (talk)
Tag: Undo
Line 4: Line 4:
-- 1) Date logic
-- 1) Date logic
function p.getCurrentDate()
function p.getCurrentDate()
     local start = os.time{year = 1999, month = 8, day = 6}
     local start   = os.time{year=1999,month=8,day=6}
     local elapsed = math.floor((os.time() - start) / 86400)
     local elapsed = math.floor((os.time() - start) / 86400)
     local year = math.floor(elapsed / 183)
     local year   = math.floor(elapsed / 183)
     local day = (elapsed % 183) + 1
     local day     = (elapsed % 183) + 1
     return year, day
     return year, day
end
end


-- 2) Random helpers
-- 2) Random helper
local function randomChoice(tbl)
local function randomChoice(t)
    if type(tbl) ~= "table" or #tbl == 0 then
     return t[math.random(#t)]
        return nil
    end
     return tbl[math.random(#tbl)]
end
end


local function randomN(tbl, n)
-- 3) Home ports list + flags
    local out = {}
local cities = {
     if type(tbl) ~= "table" or #tbl == 0 or n < 1 then
     "Aegirheim","Skýrophos","Bjornopolis","Norsolyra","Ephyra",
        return out
    "Symphonara","Delphica","Vaeringheim","Somniumpolis",
     end
     "Keybir-Aviv","Sufriya","Jogi"
    local copy = {table.unpack(tbl)}
}
     n = math.min(n, #copy)
local cityFlag = {}
     for i = 1, n do
for _, c in ipairs(cities) do
         local idx = math.random(#copy)
    -- Normalize name: remove spaces/hyphens/apostrophes and strip accents
         table.insert(out, table.remove(copy, idx))
     local norm = c:gsub("[%s%-%’]","")
    end
     norm = norm
     return out
        :gsub("Á","A"):gsub("á","a")
        :gsub("É","E"):gsub("é","e")
         :gsub("Í","I"):gsub("í","i")
         :gsub("Ó","O"):gsub("ó","o")
        :gsub("Ú","U"):gsub("ú","u")
        :gsub("Ý","Y"):gsub("ý","y")
     cityFlag[c] = string.format("[[File:%sFlag.png|20px]]", norm)
end
end


-- 3) Home ports and flags
-- 4) Vessel & Cargo types
local cities = {"Aegirheim", "Skýrophos", "Bjornopolis", "Norsolyra", "Ephyra",
local vesselTypes = {"Cargo","Military","Ritual","Privateer"}
                "Symphonara", "Delphica", "Vaeringheim", "Somniumpolis",
local cargoTypes  = {"Agricultural","Mining/Manufacturing","Services","Unspecified"}
                "Keybir-Aviv", "Sufriya", "Jogi"}
local cityFlag = {}
for _, name in ipairs(cities) do
    local norm = name:gsub("[%s%-’]", "")
    norm = norm:gsub("[Áá]", "A"):gsub("[Éé]", "E")
            :gsub("[Íí]", "I"):gsub("[Óó]", "O")
            :gsub("[Úú]", "U"):gsub("[Ýý]", "Y")
    cityFlag[name] = string.format("[[File:%sFlag.png|20px]]", norm)
end


-- 4) Vessel & cargo types
-- 5) Ritual cults & military divisions
local vesselTypes = {"Cargo", "Military", "Ritual", "Privateer"}
local ritualCults = {
local cargoTypes  = {"Agricultural", "Mining/Manufacturing", "Services", "Unspecified"}
    "Ordo Solis Invicti","Order of Aurora Mystica","Harmony Sanctum","Ignis Aeternum",
    "Celestial Harmony Sect","Guild of Golden Shadows","Azure Sentinel Sect","Reverie Nebulous",
    "Eon Fellowship","Order of the Umbral Oracle","Mystery of the Verdant Embrace","Conclave Illuminara",
    "Sanctum Vitalis","Temple Alabaster","Court of the Ironclad","Accord Concordia",
    "Mystery of the Stygian Veil","Sylvan Fellowship","Mystery of Red Mirth","Rex Catonis",
    "Sanctum Delphica","Ordo Amicitia","Temple Illuminata"
}
local militaryDivs = {
    "Alpazkigz Division","Odiferia Division","Vaeringheim Division","Haifa Division",
    "Jeseri Division","Hatch Ministry Division","New South Jangsong Division","Haifan Bassaridia Division"
}


-- 5) Owner pools (fill these tables accordingly)
-- 6) Company pools
local ritualCults    = {}  -- e.g. {"Ordo Solis Invicti", ...}
local agriCompanies = {
local militaryDivs    = {}  -- e.g. {"Haifa Division", ...}
    "Gladeseed Farmers' Union","Atterian Cattle Drivers","Noctic Fleet",
local agriCompanies  = {}  -- e.g. {"Gladeseed Farmers' Union", ...}
    "Jogiani Merchants of Manwine","Keepers of the Grove of Zoe Elm",
local miningCompanies = {}  -- e.g. {"Baratar Corporation", ...}
    "Sea-Elm Southern Meadery","Plains of Jogi","Ale of the Night Central Brewery",
local serviceCompanies= {}  -- e.g. {"Lake Morovia Blockade Fund", ...}
    "Camel Herders of the Jangsong Province","Anterran Imports and Services",
    "Merchant Guild of the Poppy Goddess","Grand Cave Bee Meadery",
    "Cinammon Plains of Rouge","The Velvet Company","Seamstresses of Rouge",
    "Salurian Temple of Sacred Horehound","Bulhanu Ranchers' Association",
    "Suncliff Fisheries","Ministers of Mistress Mugwort",
    "Blood Vineyards of the Far North","Norsolyrian Wisp Rice Farmers Association",
    "Giid-Lisea Ranching Import Company","Bird Keepers of Saluria",
    "Hunters of the Giant Fanged Penguin","Knights Castle Reindeer Herders",
    "Lindley Whaling Company","Aminian Coffee Company"
}
local miningCompanies = {
    "Baratar Corporation","Roving Wind Farm Corporation",
    "Thalassian Temple Granite Export Cooperative","East Keltian Iron Company",
    "Mylecian Coal Ports","Merchants of the Valley of Diamonds",
    "East Keltian Timber Company","Onceanic Boot Company",
    "Commune of the Garganid Apostles","Shï Collective","Order of the Sphinx",
    "Market Hanavusu","Somniant Stock Fund"
}
local serviceCompanies = {
    "Lake Morovia Blockade Fund","Court of the Dark Harpy","Hatch Ministry",
    "Maritime Guild of the Cult of Maskmakers","Ergonian Spy Agency",
    "Temple Bank of the Reformed Stripping Path","Couriers of the Lizard Queen",
    "Temple University of Delphica","La Sái Ebile","Hellhound Breeders of Dragevik"
}


-- 6) Company logos mapping
-- 7) Logos per company
local companyLogo = {}
local companyLogo = {}
local function addLogo(name, file)
local function addLogo(name, file)
     companyLogo[name] = file
     companyLogo[name] = file
end
end
-- addLogo("Gladeseed Farmers' Union", "Gladeseed420.png") etc.
-- addLogo calls for each company logo go here


-- 7) Privateer helper
-- 8) Privateer captains helper
local privateers = {{first = "Talvios", last = "Karnis", nick = "Erebektos"}}
local privateers = {{first="Talvios",last="Karnis",nick="Erebektos"}}
local function getRandomPrivateer()
local function getRandomPrivateer()
     local c = randomChoice(privateers)
     local c = randomChoice(privateers)
     if c and c.nick and math.random() < 0.25 then
     if c.nick and math.random() < 0.25 then
         return string.format("Captain %s ‘%s’ %s", c.first, c.nick, c.last)
         return string.format("Captain %s ‘%s’ %s", c.first, c.nick, c.last)
     end
     else
    if c then
         return string.format("Captain %s %s", c.first, c.last)
         return string.format("Captain %s %s", c.first, c.last)
     end
     end
    return "Captain"
end
end


-- 8) Owner selection logic
-- 9) Determine Owner/Operator
local function getOwner(vt, ct)
local function getOwner(vt, ct)
     if vt == "Ritual" then
     if vt == "Ritual"   then return randomChoice(ritualCults)
        return randomChoice(ritualCults) or "Independent Consortium"
     elseif vt == "Military" then return randomChoice(militaryDivs)
     elseif vt == "Military" then
     elseif vt == "Privateer" then return getRandomPrivateer()
        return randomChoice(militaryDivs) or "Independent Consortium"
     elseif vt == "Privateer" then
        return getRandomPrivateer()
     elseif vt == "Cargo" then
     elseif vt == "Cargo" then
         if ct == "Agricultural" then
         if ct == "Agricultural" then
             return randomChoice(agriCompanies) or "Independent Consortium"
             return randomChoice(agriCompanies)
         elseif ct == "Mining/Manufacturing" then
         elseif ct == "Mining/Manufacturing" then
             return randomChoice(miningCompanies) or "Independent Consortium"
             return randomChoice(miningCompanies)
         elseif ct == "Services" then
         elseif ct == "Services" then
             return randomChoice(serviceCompanies) or "Independent Consortium"
             return randomChoice(serviceCompanies)
         end
         end
     end
     end
Line 97: Line 119:
end
end


-- 9) Generate ship table
-- 10) Build the ship table
function p.generateShipTable()
function p.generateShipTable()
     math.randomseed(os.time())
     math.randomseed(os.time())
     local y, d = p.getCurrentDate()
     local y,d = p.getCurrentDate()
    local poolMap = {
        Agricultural = agriCompanies,
        ["Mining/Manufacturing"] = miningCompanies,
        Services = serviceCompanies
    }
     local ships = {}
     local ships = {}
    for i = 1, math.random(50, 80) do
        local hr = math.random(0, 23)
        local mn = math.random(0, 59)
        local vt = randomChoice(vesselTypes) or "Cargo"
        local ct = randomChoice(cargoTypes) or "Unspecified"
        local owner = getOwner(vt, ct)
        local ownerLogo = companyLogo[owner] and string.format("[[File:%s|20px]] ", companyLogo[owner]) or ""
        local home = randomChoice(cities) or cities[1]
        -- pick companies, include owner if cargo
        local picks = {}
        local count = math.random(3, 4)
        if vt == "Cargo" and ct ~= "Unspecified" and companyLogo[owner] then
            picks = {owner}
            local choices = {}
            for _, name in ipairs(poolMap[ct] or {}) do
                if name ~= owner then table.insert(choices, name) end
            end
            local more = randomN(choices, count - 1)
            for _, cname in ipairs(more) do table.insert(picks, cname) end
        else
            local flat = {}
            for _, list in pairs(poolMap) do
                for _, name in ipairs(list) do table.insert(flat, name) end
            end
            picks = randomN(flat, count)
        end
        -- build companies cell
        local compCell = "<ul>"
        for _, cname in ipairs(picks) do
            local logo = companyLogo[cname] and string.format("[[File:%s|20px]] ", companyLogo[cname]) or ""
            compCell = compCell .. string.format("<li>%s%s</li>", logo, cname)
        end
        compCell = compCell .. "</ul>"


        -- determine error
    for i=1,math.random(50,80) do
         local errList = {"Cargo Mislabeling", "Improper Documentation", "Surveillance Anomaly",
         local hr,mn = math.random(0,23),math.random(0,59)
                        "Inspection Failure", "Unregistered Ritual Cargo"}
        local vt,ct = randomChoice(vesselTypes),randomChoice(cargoTypes)
         local err = "None"
         local owner  = getOwner(vt,ct)
        if math.random() < 0.2 then
        local logo  = (companyLogo[owner] and "[[File:"..companyLogo[owner].."|20px]] " or "")
            err = randomChoice(errList) or "None"
         local home  = randomChoice(cities)
         end


         table.insert(ships, {
         table.insert(ships,{
             date = string.format("Day %d, Y.%d", d, y),
             date       = string.format("Day %d, Y.%d", d,y),
             time = string.format("%02d:%02d", hr, mn),
             time       = string.format("%02d:%02d", hr,mn),
             sort = hr * 60 + mn,
             sort       = hr*60+mn,
             vid = "VM-" .. math.random(10000, 99999),
             vid       = "VM-"..math.random(10000,99999),
             home = cityFlag[home] .. " " .. home,
             home       = cityFlag[home].." "..home,
             typ = vt,
             typ       = vt,
             ownerCell     = ownerLogo .. owner,
             ownerCell = logo..owner,
             cargotype     = ct,
             cargotype = ct,
            cargoCompanies = compCell,
             berth     = math.random(1,124),
             berth   = math.random(1, 124),
             teus       = math.random(100,1000),
             teus     = math.random(100, 1000),
             tonnage   = string.format("%.2f",math.random()*19000+1000),
             tonnage = string.format("%.2f", math.random() * 19000 + 1000),
             queue     = string.format("%.2f",math.random()*5.5+0.5),
             queue   = string.format("%.2f", math.random() * 5.5 + 0.5),
             turnaround = string.format("%.2f",math.random()*32+4),
             turnaround = string.format("%.2f", math.random() * 32 + 4),
             error     = (math.random()<0.2 and randomChoice{
             error   = err
                "Cargo Mislabeling","Improper Documentation","Surveillance Anomaly",
                "Inspection Failure","Unregistered Ritual Cargo"
            }) or "None"
         })
         })
     end
     end
    table.sort(ships, function(a, b) return a.sort < b.sort end)


     local out = {
    table.sort(ships,function(a,b)return a.sort<b.sort end)
 
     local out={
         '{| class="wikitable sortable"',
         '{| class="wikitable sortable"',
         '! Date !! Time !! Vessel ID !! Home City !! Type !! Owner/Operator !! Cargo Type !! Companies',
         '! Date !! Time !! Vessel ID !! Home City !! Type !! Owner/Operator !! Cargo Type',
         '!! Berth !! TEUs !! Tonnage (t) !! Queue (hrs) !! Turnaround (hrs) !! Error'
         '!! Berth !! TEUs !! Tonnage (t) !! Queue (hrs) !! Turnaround (hrs) !! Error'
     }
     }
     for _, s in ipairs(ships) do
 
        local rowDef = s.error ~= "None" and '|- bgcolor="#ffcccc"' or '|-'
     for _,s in ipairs(ships) do
        table.insert(out, rowDef)
         table.insert(out,string.format([[
         table.insert(out, string.format(
|-
            '| %s || %s || %s || %s || %s || %s || %s || %s || %d || %d || %s || %s || %s || %s',
| %s || %s || %s || %s || %s || %s || %s || %d || %d || %s || %s || %s || %s
             s.date, s.time, s.vid, s.home, s.typ,
]],
             s.ownerCell, s.cargotype, s.cargoCompanies,
             s.date,s.time,s.vid,s.home,s.typ,
             s.berth, s.teus, s.tonnage, s.queue, s.turnaround, s.error
             s.ownerCell,s.cargotype,
             s.berth,s.teus,s.tonnage,s.queue,s.turnaround,s.error
         ))
         ))
     end
     end
    table.insert(out, '|}')
    table.insert(out, "'''Error Key:'''")
    table.insert(out, "* '''Cargo Mislabeling:''' Manifest ≠ actual goods")
    table.insert(out, "* '''Improper Documentation:''' Missing or outdated papers")
    table.insert(out, "* '''Surveillance Anomaly:''' Unexpected heat/motion")
    table.insert(out, "* '''Inspection Failure:''' Customs/hatch failure")
    table.insert(out, "* '''Unregistered Ritual Cargo:''' Not pre-cleared by Temple Bank")


     return table.concat(out, "\n")
    table.insert(out,"|}\n\n'''Error Key:'')")
    table.insert(out,"* '''Cargo Mislabeling:''' Manifest ≠ actual goods")
    table.insert(out,"* '''Improper Documentation:''' Missing or outdated papers")
    table.insert(out,"* '''Surveillance Anomaly:''' Unexpected heat/motion")
    table.insert(out,"* '''Inspection Failure:''' Customs/hatch failure")
    table.insert(out,"* '''Unregistered Ritual Cargo:''' Not pre-cleared by Temple Bank")
 
     return table.concat(out,"\n")
end
end


function p.dailyReport()
function p.dailyReport()
     local y, d = p.getCurrentDate()
     local y,d = p.getCurrentDate()
     return string.format("'''General Port of Lake Morovia: Operational Log – Day %d, Year %d PSSC'''", d, y)
     local hdr = string.format("'''General Port of Lake Morovia: Operational Log – Day %d, Year %d PSSC'''",d,y)
          .. "\n" .. p.generateShipTable()
    return hdr.."\n"..p.generateShipTable()
end
end


return p
return p

Revision as of 19:23, 24 April 2025

Documentation for this module may be created at Module:GeneralPortOperations/doc

-- Module:GeneralPortDailyLog
local p = {}

-- 1) Date logic
function p.getCurrentDate()
    local start   = os.time{year=1999,month=8,day=6}
    local elapsed = math.floor((os.time() - start) / 86400)
    local year    = math.floor(elapsed / 183)
    local day     = (elapsed % 183) + 1
    return year, day
end

-- 2) Random helper
local function randomChoice(t)
    return t[math.random(#t)]
end

-- 3) Home ports list + flags
local cities = {
    "Aegirheim","Skýrophos","Bjornopolis","Norsolyra","Ephyra",
    "Symphonara","Delphica","Vaeringheim","Somniumpolis",
    "Keybir-Aviv","Sufriya","Jogi"
}
local cityFlag = {}
for _, c in ipairs(cities) do
    -- Normalize name: remove spaces/hyphens/apostrophes and strip accents
    local norm = c:gsub("[%s%-%’]","")
    norm = norm
        :gsub("Á","A"):gsub("á","a")
        :gsub("É","E"):gsub("é","e")
        :gsub("Í","I"):gsub("í","i")
        :gsub("Ó","O"):gsub("ó","o")
        :gsub("Ú","U"):gsub("ú","u")
        :gsub("Ý","Y"):gsub("ý","y")
    cityFlag[c] = string.format("[[File:%sFlag.png|20px]]", norm)
end

-- 4) Vessel & Cargo types
local vesselTypes = {"Cargo","Military","Ritual","Privateer"}
local cargoTypes  = {"Agricultural","Mining/Manufacturing","Services","Unspecified"}

-- 5) Ritual cults & military divisions
local ritualCults = {
    "Ordo Solis Invicti","Order of Aurora Mystica","Harmony Sanctum","Ignis Aeternum",
    "Celestial Harmony Sect","Guild of Golden Shadows","Azure Sentinel Sect","Reverie Nebulous",
    "Eon Fellowship","Order of the Umbral Oracle","Mystery of the Verdant Embrace","Conclave Illuminara",
    "Sanctum Vitalis","Temple Alabaster","Court of the Ironclad","Accord Concordia",
    "Mystery of the Stygian Veil","Sylvan Fellowship","Mystery of Red Mirth","Rex Catonis",
    "Sanctum Delphica","Ordo Amicitia","Temple Illuminata"
}
local militaryDivs = {
    "Alpazkigz Division","Odiferia Division","Vaeringheim Division","Haifa Division",
    "Jeseri Division","Hatch Ministry Division","New South Jangsong Division","Haifan Bassaridia Division"
}

-- 6) Company pools
local agriCompanies = {
    "Gladeseed Farmers' Union","Atterian Cattle Drivers","Noctic Fleet",
    "Jogiani Merchants of Manwine","Keepers of the Grove of Zoe Elm",
    "Sea-Elm Southern Meadery","Plains of Jogi","Ale of the Night Central Brewery",
    "Camel Herders of the Jangsong Province","Anterran Imports and Services",
    "Merchant Guild of the Poppy Goddess","Grand Cave Bee Meadery",
    "Cinammon Plains of Rouge","The Velvet Company","Seamstresses of Rouge",
    "Salurian Temple of Sacred Horehound","Bulhanu Ranchers' Association",
    "Suncliff Fisheries","Ministers of Mistress Mugwort",
    "Blood Vineyards of the Far North","Norsolyrian Wisp Rice Farmers Association",
    "Giid-Lisea Ranching Import Company","Bird Keepers of Saluria",
    "Hunters of the Giant Fanged Penguin","Knights Castle Reindeer Herders",
    "Lindley Whaling Company","Aminian Coffee Company"
}
local miningCompanies = {
    "Baratar Corporation","Roving Wind Farm Corporation",
    "Thalassian Temple Granite Export Cooperative","East Keltian Iron Company",
    "Mylecian Coal Ports","Merchants of the Valley of Diamonds",
    "East Keltian Timber Company","Onceanic Boot Company",
    "Commune of the Garganid Apostles","Shï Collective","Order of the Sphinx",
    "Market Hanavusu","Somniant Stock Fund"
}
local serviceCompanies = {
    "Lake Morovia Blockade Fund","Court of the Dark Harpy","Hatch Ministry",
    "Maritime Guild of the Cult of Maskmakers","Ergonian Spy Agency",
    "Temple Bank of the Reformed Stripping Path","Couriers of the Lizard Queen",
    "Temple University of Delphica","La Sái Ebile","Hellhound Breeders of Dragevik"
}

-- 7) Logos per company
local companyLogo = {}
local function addLogo(name, file)
    companyLogo[name] = file
end
-- addLogo calls for each company logo go here

-- 8) Privateer captains helper
local privateers = {{first="Talvios",last="Karnis",nick="Erebektos"}}
local function getRandomPrivateer()
    local c = randomChoice(privateers)
    if c.nick and math.random() < 0.25 then
        return string.format("Captain %s ‘%s’ %s", c.first, c.nick, c.last)
    else
        return string.format("Captain %s %s", c.first, c.last)
    end
end

-- 9) Determine Owner/Operator
local function getOwner(vt, ct)
    if vt == "Ritual"    then return randomChoice(ritualCults)
    elseif vt == "Military" then return randomChoice(militaryDivs)
    elseif vt == "Privateer" then return getRandomPrivateer()
    elseif vt == "Cargo" then
        if ct == "Agricultural" then
            return randomChoice(agriCompanies)
        elseif ct == "Mining/Manufacturing" then
            return randomChoice(miningCompanies)
        elseif ct == "Services" then
            return randomChoice(serviceCompanies)
        end
    end
    return "Independent Consortium"
end

-- 10) Build the ship table
function p.generateShipTable()
    math.randomseed(os.time())
    local y,d = p.getCurrentDate()
    local ships = {}

    for i=1,math.random(50,80) do
        local hr,mn = math.random(0,23),math.random(0,59)
        local vt,ct = randomChoice(vesselTypes),randomChoice(cargoTypes)
        local owner  = getOwner(vt,ct)
        local logo   = (companyLogo[owner] and "[[File:"..companyLogo[owner].."|20px]] " or "")
        local home   = randomChoice(cities)

        table.insert(ships,{
            date       = string.format("Day %d, Y.%d", d,y),
            time       = string.format("%02d:%02d", hr,mn),
            sort       = hr*60+mn,
            vid        = "VM-"..math.random(10000,99999),
            home       = cityFlag[home].." "..home,
            typ        = vt,
            ownerCell  = logo..owner,
            cargotype  = ct,
            berth      = math.random(1,124),
            teus       = math.random(100,1000),
            tonnage    = string.format("%.2f",math.random()*19000+1000),
            queue      = string.format("%.2f",math.random()*5.5+0.5),
            turnaround = string.format("%.2f",math.random()*32+4),
            error      = (math.random()<0.2 and randomChoice{
                "Cargo Mislabeling","Improper Documentation","Surveillance Anomaly",
                "Inspection Failure","Unregistered Ritual Cargo"
            }) or "None"
        })
    end

    table.sort(ships,function(a,b)return a.sort<b.sort end)

    local out={
        '{| class="wikitable sortable"',
        '! Date !! Time !! Vessel ID !! Home City !! Type !! Owner/Operator !! Cargo Type',
        '!! Berth !! TEUs !! Tonnage (t) !! Queue (hrs) !! Turnaround (hrs) !! Error'
    }

    for _,s in ipairs(ships) do
        table.insert(out,string.format([[
|-
| %s || %s || %s || %s || %s || %s || %s || %d || %d || %s || %s || %s || %s
]],
            s.date,s.time,s.vid,s.home,s.typ,
            s.ownerCell,s.cargotype,
            s.berth,s.teus,s.tonnage,s.queue,s.turnaround,s.error
        ))
    end

    table.insert(out,"|}\n\n'''Error Key:'')")
    table.insert(out,"* '''Cargo Mislabeling:''' Manifest ≠ actual goods")
    table.insert(out,"* '''Improper Documentation:''' Missing or outdated papers")
    table.insert(out,"* '''Surveillance Anomaly:''' Unexpected heat/motion")
    table.insert(out,"* '''Inspection Failure:''' Customs/hatch failure")
    table.insert(out,"* '''Unregistered Ritual Cargo:''' Not pre-cleared by Temple Bank")

    return table.concat(out,"\n")
end

function p.dailyReport()
    local y,d = p.getCurrentDate()
    local hdr = string.format("'''General Port of Lake Morovia: Operational Log – Day %d, Year %d PSSC'''",d,y)
    return hdr.."\n"..p.generateShipTable()
end

return p