Page 1 of 1

Odd production time remaining text

Posted: Sat, 6. Jan 18, 21:31
by MegaJohnny
So, this is mostly out of curiosity - but I've been perusing the code for the object detail menu, and found some strange logic for getting the production time left on a production module:

Code: Select all

local remainingtime = "4.2 " .. ReadText(1001, 112)
if proddata.state == "producing" and proddata.remainingtime == 0 then
    local clustermacro = GetComponentData(GetComponentData(menu.object, "clusterid"), "macro")
    if clustermacro == "cluster_a_macro" then
        -- Maelstrom
        remainingtime = "0.9 " .. ReadText(1001, 112)
    elseif clustermacro == "cluster_b_macro" then
        -- Albion
        remainingtime = "4.2 " .. ReadText(1001, 112)
    elseif clustermacro == "cluster_c_macro" then
        -- Omycron Lyrae
        remainingtime = "3.7 " .. ReadText(1001, 112)
    elseif clustermacro == "cluster_d_macro" then
        -- DeVries
        remainingtime = "11.4 " .. ReadText(1001, 112)
    end
else
    remainingtime = ConvertTimeString(proddata.remainingtime , "%h" .. ReadText(1001, 102) .. " %M" .. ReadText(1001, 103) .. " %S" .. ReadText(1001, 100))
end
Where text {1001, 112} is "Ga", with a comment saying it's giga-years. So if a production module is producing, but the remaining time is zero, I suppose this means it produces indefinitely. But every vanillla cluster gets a different fixed "very long time" - is this a funny way of saying it'll stop when the local star dies?!

I'm sure most others have observed this in-game, but I haven't properly played in a while, so this is all unfamiliar to me.

Posted: Sun, 7. Jan 18, 13:39
by UniTrader
yep, thats the Display Logic for Solar Power Plants or "a funny way of saying it'll stop when the local star dies".