Rinart73 Posted September 26, 2018 Share Posted September 26, 2018 Found two bugs in the "data\scripts\entity\minefounder.lua" and one in the "data\scripts\entity\stationfounder.lua". 1. Sometimes when you want to create "Silver & Platinum" mine, "Silver & Gold" will be created instead. This happens because of typical "Lua doesn't care about the order in 'for in pairs'". Also because factories is categorized by goods but there is no check if current good is the first output. How to fix: Line 123-125, replace: for _, productions in pairs(productionsByGood) do for index, production in pairs(productions) do with local production for _, productions in pairs(productionsByGood) do for index = 1, #productions do production = productions[index] Line 138-142, replace: if levels[result.level] ~= nil and not usedProductions[production.index] then usedProductions[production.index] = true table.insert(possibleProductions, {production=production, index=index}) end with if _ == production.results[1].name then if levels[result.level] ~= nil and not usedProductions[production.index] then usedProductions[production.index] = true table.insert(possibleProductions, {production=production, index=index}) end end 2. When you found a mine, it will have untranslated title. How to fix: Line 290, replace: station:invokeFunction("factory", "setProduction", production, 1) with station:invokeFunction("factory", "setProduction", production, 1) station:invokeFunction("factory", "updateTitle") And remove lines 281-285: if goodName == "Raw Oil" then station.title = "Oil Rig"%_t else station.title = "${good} Mine"%_t % {good = goodName} end -------- 3. Also, the same bug (wrong factory) can happen when founding stations. Just do the same in the "data\scripts\entity\stationfounder.lua" file: Line 335-338, replace: for _, productions in pairs(productionsByGood) do for index, production in pairs(productions) do with local production for _, productions in pairs(productionsByGood) do for index = 1, #productions do production = productions[index] And Line 342-336, replace: if levels[result.level] ~= nil and not usedProductions[production.index] then usedProductions[production.index] = true table.insert(possibleProductions, {production=production, index=index}) end with if _ == production.results[1].name then if levels[result.level] ~= nil and not usedProductions[production.index] then usedProductions[production.index] = true table.insert(possibleProductions, {production=production, index=index}) end end Link to comment Share on other sites More sharing options...
Rinart73 Posted October 11, 2018 Author Share Posted October 11, 2018 Bump, because I updated fixes and found out that the same "wrong station" bug happens in the "data\scripts\entity\stationfounder.lua" file when founding factories. Link to comment Share on other sites More sharing options...
Boxelware Team Qui_Sum Posted October 24, 2018 Boxelware Team Share Posted October 24, 2018 Thank you, these issues will be fixed in the next release! Link to comment Share on other sites More sharing options...
Laserzwei Posted October 28, 2018 Share Posted October 28, 2018 related: https://www.avorion.net/forum/index.php/topic,4635 Thanks for the fix :) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now