Merge pull request #293 from Hornwitser/alpha-bugfixes-2

Alpha bugfixes 2
This commit is contained in:
Hornwitser authored and GitHub committed 2020-05-06 20:13:22 +02:00
commit 4060c75142
2 files changed
+7 -2

No files matched your search

+6 -1
View File
@@ -141,7 +141,8 @@ function research_sync.sync_technologies(data)
for _, tech_data in pairs(game.json_to_table(data)) do
local tech = force.technologies[tech_data[nameIndex]]
if tech and tech.enabled and tech.level <= tech_data[levelIndex] then
tech.level = tech_data[levelIndex]
tech.level = math.min(tech_data[levelIndex], tech.prototype.max_level)
local progress
if tech_data[researchedIndex] then
tech.researched = true
@@ -188,6 +189,10 @@ function research_sync.research_technology(name, level)
return
end
if level > tech.prototype.max_level then
level = tech.prototype.max_level
end
global.research_sync.ignore_research_finished = true
if tech == force.current_research and tech.level == level then
force.research_progress = 1
+1 -1
View File
@@ -1,5 +1,5 @@
<title>Clusterio</title>
<link rel="stylesheet" type="text/css" href="/style.css">
<link rel="stylesheet" type="text/css" href="<%= locals.root %>style.css">
<script>root = "<%= locals.root %>";</script>
<script src="<%= locals.root %>external/jquery.js"></script>
<script src="<%= locals.root %>external/jquery-ui.js"></script>