Skip to content

Commit

Permalink
0.4
Browse files Browse the repository at this point in the history
recreate gui if upgrading while in farl
  • Loading branch information
Choumiko committed Aug 16, 2015
1 parent c7b92f1 commit 184ab8f
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
5 changes: 3 additions & 2 deletions FARL.lua
Original file line number Diff line number Diff line change
Expand Up @@ -656,7 +656,7 @@ FARL = {
check = self:findNeighbours(check[1][2], check[1][1])
if check and type(check) == "table" and check[1] and check[1][2] then
--debugDump(check[1][2],true)
table.insert(path, {rail=check[1][3], traveldir=check[1][1]})
table.insert(path, {rail=check[1][3], traveldir=(check[1][1]+4)%8})
self:protect(check[1][3])

behind = check[1][2]
Expand All @@ -677,7 +677,8 @@ FARL = {
self.maintenanceRail = self.path[1].rail
self.maintenanceDir = self.path[1].traveldir
self.lastrail = self.path[lag].rail
self.direction = (self.path[lag].traveldir +4) % 8
--self.direction = (self.path[lag].traveldir +4) % 8
self.direction = self.path[lag].traveldir
self:protect(self.lastPole)
self:flyingText2( "L", RED, true, self.lastrail.position)
else
Expand Down
4 changes: 4 additions & 0 deletions GUI.lua
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,10 @@ GUI = {
farl.driver.gui.left.farl.rows.buttons.start.caption = farl.active and {"text-stop"} or {"text-start"}
farl.driver.gui.left.farl.rows.buttons.cc.caption = farl.cruise and {"text-stopCC"} or {"text-startCC"}
farl.driver.gui.left.farl.rows.root.state = farl.settings.root
if not farl.driver.gui.left.farl.rows.maintenance then
GUI.destroyGui(farl.driver)
GUI.createGui(farl.driver)
end
farl.driver.gui.left.farl.rows.maintenance.state = farl.maintenance
end
end,
Expand Down
2 changes: 1 addition & 1 deletion control.lua
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ clearAreas = {
end
global.version = "0.3.4"
end
global.version = "0.3.4"
global.version = "0.4.0"
end

local function oninit() initGlob() end
Expand Down
2 changes: 1 addition & 1 deletion info.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "FARL",
"version": "0.3.32",
"version": "0.4.0",
"title": "Fully Automated Rail Layer",
"author": "Choumiko",
"contact": "www.factorioforums.com",
Expand Down

0 comments on commit 184ab8f

Please sign in to comment.