Skip to content

Commit

Permalink
Update code for updated stdlib
Browse files Browse the repository at this point in the history
  • Loading branch information
credomane committed Feb 6, 2018
1 parent 006257b commit 33ffa7e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
5 changes: 2 additions & 3 deletions control.lua
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@

--Include needed stdlib libs.
require "stdlib/config/config"
require "stdlib/core"
require "stdlib/entity/entity"
require "stdlib/event/gui"
require "stdlib/game"
require "stdlib/gui/gui"
require "stdlib/log/logger"
require "stdlib/string"
require 'stdlib/utils/string'

fm = {}
fm.log = Logger.new("FactorioMaps", "debug", true)
Expand Down
6 changes: 3 additions & 3 deletions fm/generateMap.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ function fm.generateMap(data)
local basePath = "FactorioMaps/" .. data.folderName
game.remove_path(basePath)

local inGameTotalWidth = math.ceil(math.abs(data.topLeft.x) + math.abs(data.bottomRight.x))
local inGameTotalHeight = math.ceil(math.abs(data.topLeft.y) + math.abs(data.bottomRight.y))
local inGameCenter = Area.center({data.topLeft, data.bottomRight})
local mapArea = Area.normalize(Area.round_to_integer({data.topLeft, data.bottomRight}))
local _ ,inGameTotalWidth, inGameTotalHeight, _ = Area.size(mapArea)
local inGameCenter = Area.center(mapArea)

--Resolution to use for grid sections
local gridSizes = {256, 512, 1024, 2048}
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": "FactorioMaps",
"version": "0.16.0",
"version": "0.16.1",
"title": "Google Maps Factorio style",
"author": "jeroon, credomane",
"contact": "https://github.com/credomane/",
Expand Down

0 comments on commit 33ffa7e

Please sign in to comment.