Модуль:Песочница/Pok: различия между версиями

мНет описания правки
м Отмена версии 76248, сделанной Pok (обсуждение)
Метка: отмена
Строка 40: Строка 40:
     local out = ""
     local out = ""
      
      
     local event = eventData[searchId]
     for _, event in ipairs(eventData) do
    if event then
        if event.id == searchId then
        local cellEvent = buildCellEvent(name, image, searchId)
            local cellEvent = buildCellEvent(name, image, searchId)
        local advert = (event.StationEvent and event.StationEvent.startAnnouncement) or ""
            local advert = (event.StationEvent and event.StationEvent.startAnnouncement) or ""
        local characteristicsList = buildCharacteristicsList(frame, event.StationEvent or {})
            local characteristicsList = buildCharacteristicsList(frame, event.StationEvent or {})


        out = out .. "|-\n"
            out = out .. "|-\n"
        out = out .. "! " .. cellEvent .. "\n"
            out = out .. "! " .. cellEvent .. "\n"
        if advert ~= "" then  
            if advert ~= "" then  
            out = out .. "| {{#invoke:Ftl|main|translation|" .. advert .. "}}\n"
                out = out .. "| {{#invoke:Ftl|main|translation|" .. advert .. "}}\n"
        else
            else
            out = out .. "| Происходит без объявления\n"
                out = out .. "| Происходит без объявления\n"
            end
            out = out .. "| " .. description .. "\n"
            out = out .. "| " .. characteristicsList
            break
         end
         end
        out = out .. "| " .. description .. "\n"
        out = out .. "| " .. characteristicsList
     end
     end