Skip to content

Commit

Permalink
rel 0.1.8
Browse files Browse the repository at this point in the history
added migration file
  • Loading branch information
Choumiko committed Feb 18, 2015
1 parent bccf5ab commit 8c8b209
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 8 deletions.
4 changes: 2 additions & 2 deletions FARL.lua
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ FARL = {
end,

parseBlueprints = function(self, bp)
glob.settings.bp = #bp == 2 and true or false
glob.settings.bp = #bp >= 2 and true or false
glob.settings.diagonal.lamps = {}
glob.settings.straight.lamps = {}
for j=1,#bp do
Expand Down Expand Up @@ -583,7 +583,7 @@ FARL = {
local rad = diff * (math.pi/4)
offset = rotate(pos, rad)
if glob.settings.flipPoles then
offset = rotate(offset, 4*(math.pi/4))
offset = rotate(offset, math.pi)
end
if diagonal then
local x,y = 0,0
Expand Down
6 changes: 2 additions & 4 deletions control.lua
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,6 @@ clearAreas =
local function initGlob()
if glob.version == nil or glob.version < "0.1.1" then
glob = {}
if game.forces.player.technologies["rail-signals"].researched then
game.forces.player.recipes["farl"].enabled = true
end
glob.settings = {}
glob.version = "0.1.1"
end
Expand Down Expand Up @@ -198,9 +195,10 @@ clearAreas =
glob.settings.straight = defaultsStraight
glob.settings.diagonal = defaultsDiagonal
end
glob.version = "0.1.8"
end
GUI.init()
glob.version = "0.1.5"
glob.version = "0.1.8"
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.1.7",
"version": "0.1.8",
"title": "Fully Automated Rail Layer",
"author": "Choumiko",
"contact": "www.factorioforums.com",
Expand Down
2 changes: 1 addition & 1 deletion locale/en/en.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ stg-ccNetWire-green = Green
stg-ccNetWire-red = Red
stg-ccNetWire-both = Both
stg-blueprint = Use blueprint
stg-blueprint-empty = Read blueprint
stg-blueprint-empty = Read blueprints

[entity-name]
farl=F.A.R.L.
Expand Down
10 changes: 10 additions & 0 deletions migrations/2015-02-18_FARL_0.1.8.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
for _, force in pairs(game.forces) do
force.resetrecipes()
force.resettechnologies()

local techs = force.technologies
local recipes = force.recipes
if techs["rail-signals"].researched then
recipes["farl"].enabled = true
end
end

0 comments on commit 8c8b209

Please sign in to comment.