Skip to content

Commit d755128

Browse files
committed
Release 2.0.0 / Support Facorio 2.0
1 parent 8761673 commit d755128

38 files changed

+196
-307
lines changed

.luarc.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
],
77
"hint.enable": false,
88
"diagnostics.globals": [
9-
"os"
9+
"os",
10+
"storage"
1011
]
1112
}

changelog.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
---------------------------------------------------------------------------------------------------
2+
Version: 2.0.0
3+
Date: 21-10-204
4+
Features:
5+
- Support Factorio 2.0 (I did not check with Space Age playthrough, so there might be bugs!)
6+
---------------------------------------------------------------------------------------------------
27
Version: 1.5.2
38
Date: 21-10-204
49
Minor Features:

control.lua

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@ local function init_new_player(index, player)
1818
-- initialize player(s) when mod is loaded into existing game
1919
player.print("init_new_player")
2020
TLBE.Config.reload({ player_index = index })
21-
TLBE.GUI.initialize(player, global.playerSettings[index])
21+
TLBE.GUI.initialize(player, storage.playerSettings[index])
2222

2323
player.print({ "mod-loaded" }, { r = 1, g = 0.5, b = 0 })
2424
player.print({ "mod-loaded2" })
2525
end
2626

2727
local function on_init()
28-
global.playerSettings = {}
28+
storage.playerSettings = {}
2929

3030
for index, player in pairs(game.players) do
3131
-- initialize player(s) when mod is loaded into existing game
@@ -37,7 +37,7 @@ local function on_init()
3737
if baseBBox ~= nil then
3838
-- Update base trackers of each player
3939
for index, _ in pairs(game.players) do
40-
local baseTracker = global.playerSettings[index].trackers[3]
40+
local baseTracker = storage.playerSettings[index].trackers[3]
4141
baseTracker.minPos = baseBBox.minPos
4242
baseTracker.maxPos = baseBBox.maxPos
4343
TLBE.Tracker.updateCenterAndSize(baseTracker)
@@ -57,7 +57,7 @@ local function on_configuration_changed(event)
5757
-- Sometimes playerSettings does not seem to be present when upgrading
5858
-- from older versions. We can just fix this issue here.
5959
for index, player in pairs(game.players) do
60-
if global.playerSettings[index] == nil then
60+
if storage.playerSettings[index] == nil then
6161
player.print({ "migration-fix-missing-player-data" })
6262
init_new_player(index, player)
6363
end
@@ -73,7 +73,7 @@ local function on_player_created(event)
7373
local player = game.players[event.player_index]
7474
player.print({ "mod-loaded2" }, { r = 1, g = 0.5, b = 0 })
7575

76-
TLBE.GUI.initialize(player, global.playerSettings[event.player_index])
76+
TLBE.GUI.initialize(player, storage.playerSettings[event.player_index])
7777
end
7878

7979

graphics/logo-24.png

482 Bytes
Loading

graphics/logo-32.png

634 Bytes
Loading

graphics/logo.png

-1.63 KB
Binary file not shown.

graphics/pause-camera-24.png

505 Bytes
Loading

graphics/pause-camera-32.png

651 Bytes
Loading

graphics/pause-camera.png

-3.02 KB
Binary file not shown.

graphics/play-white.png

-435 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)