Update version to 0.2.2, improve network cache handling, and enhance train state tracking
This commit is contained in:
@@ -19,7 +19,6 @@ function UpdateLabs(event)
|
||||
if lab and lab.valid then
|
||||
storage.labs[lab.unit_number] = lab
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
function RemoveLab(event)
|
||||
@@ -43,7 +42,7 @@ function GetEstimatedResearchTime()
|
||||
|
||||
local totalSpeed = storage.totalResearchSpeed
|
||||
|
||||
local remainingPercentage = 1-playerForce.research_progress
|
||||
local remainingPercentage = 1-math.min(playerForce.research_progress,1)
|
||||
local remainingUnits = remainingPercentage*researchTotalCost
|
||||
local estimatedSeconds = remainingUnits/totalSpeed
|
||||
|
||||
@@ -51,10 +50,11 @@ function GetEstimatedResearchTime()
|
||||
local returnTime = "---research-time---\n"..estimatedSeconds.."\n"
|
||||
local returnNameID = "---research-info---\n"..researchName.."\n"
|
||||
local returnProgress = "---research-progress---\n"..playerForce.research_progress.."\n"
|
||||
local returnCost = "---research-cost---\n"..researchTotalCost.."\n"
|
||||
|
||||
log("Reseach remaining "..returnTime)
|
||||
|
||||
return returnSpeed..returnTime..returnNameID..returnProgress
|
||||
return returnSpeed..returnTime..returnNameID..returnProgress..returnCost
|
||||
end
|
||||
|
||||
function UpdateLabInfos()
|
||||
|
||||
Reference in New Issue
Block a user