diff --git a/.gitignore b/.gitignore index e69de29..248bc89 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +.vscode/* diff --git a/changelog.txt b/changelog.txt index 9f9358c..52aa883 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,4 +1,9 @@ --------------------------------------------------------------------------------------------------- +Version: 1.12.7 +Date: 2020-03-20 + Bugfixes: + - removed support for train scedule conditions item/fluid > n https://forums.factorio.com/viewtopic.php?f=214&t=82576 +--------------------------------------------------------------------------------------------------- Version: 1.12.6 Date: 2020-03-07 Bugfixes: diff --git a/info.json b/info.json index 5437faf..278827b 100644 --- a/info.json +++ b/info.json @@ -1,6 +1,6 @@ { "name": "LogisticTrainNetwork", - "version": "1.12.6", + "version": "1.12.7", "title": "LTN - Logistic Train Network", "author": "Optera", "contact": "https://forums.factorio.com/memberlist.php?mode=viewprofile&u=21729", diff --git a/script/stop-update.lua b/script/stop-update.lua index 1d42015..693d8e0 100644 --- a/script/stop-update.lua +++ b/script/stop-update.lua @@ -460,20 +460,20 @@ function UpdateStopOutput(trainStop) for _, c in pairs(conditions) do if c.condition and c.condition.first_signal then -- loading without mods can make first signal nil? if c.type == "item_count" then - if (c.condition.comparator == "=" and c.condition.constant == 0) then --train expects to be unloaded of each of this item + if (c.condition.comparator == "=" and c.condition.constant == 0) then + --train expects to be unloaded of each of this item inventory[c.condition.first_signal.name] = nil - elseif c.condition.comparator == "≥" then --train expects to be loaded to x of this item + elseif c.condition.comparator == "≥" then + --train expects to be loaded to x of this item inventory[c.condition.first_signal.name] = c.condition.constant - elseif c.condition.comparator == ">" then --train expects to be loaded to x of this item - inventory[c.condition.first_signal.name] = c.condition.constant + 1 end elseif c.type == "fluid_count" then - if (c.condition.comparator == "=" and c.condition.constant == 0) then --train expects to be unloaded of each of this fluid + if (c.condition.comparator == "=" and c.condition.constant == 0) then + --train expects to be unloaded of each of this fluid fluidInventory[c.condition.first_signal.name] = -1 - elseif c.condition.comparator == "≥" then --train expects to be loaded to x of this fluid + elseif c.condition.comparator == "≥" then + --train expects to be loaded to x of this fluid fluidInventory[c.condition.first_signal.name] = c.condition.constant - elseif c.condition.comparator == ">" then --train expects to be loaded to x of this fluid - fluidInventory[c.condition.first_signal.name] = c.condition.constant + 1 end end end