Added Debuglog for ServerIndex
This commit is contained in:
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
factorio-metrics-exporter_0.1.3.zip
|
||||||
@@ -9,6 +9,7 @@ tickInterval = tonumber(settings.global["factorio-metrics-exporter-tick-interval
|
|||||||
udpAddress = 52555
|
udpAddress = 52555
|
||||||
isInitialized = false
|
isInitialized = false
|
||||||
sendIndex = 0
|
sendIndex = 0
|
||||||
|
serverIndex = 0
|
||||||
|
|
||||||
options = {
|
options = {
|
||||||
enableMod = false,
|
enableMod = false,
|
||||||
@@ -139,12 +140,16 @@ function SendAll(event)
|
|||||||
if(isInitialized == false) then
|
if(isInitialized == false) then
|
||||||
if game.is_multiplayer() then
|
if game.is_multiplayer() then
|
||||||
serverIndex = 0
|
serverIndex = 0
|
||||||
|
log("Loaded game as mulitplayer")
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
|
log("Loaded game as singleplayer")
|
||||||
serverIndex = 1
|
serverIndex = 1
|
||||||
end
|
end
|
||||||
isInitialized = true
|
isInitialized = true
|
||||||
|
|
||||||
|
log("ServerIndex is "..serverIndex.." now")
|
||||||
|
|
||||||
if PowerGridScanned == false then
|
if PowerGridScanned == false then
|
||||||
GenerateNetworks()
|
GenerateNetworks()
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user