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
This commit is contained in:
Optera
2020-03-20 18:38:00 +01:00
parent 24579f444b
commit 326bd68fc6
4 changed files with 15 additions and 9 deletions

1
.gitignore vendored
View File

@@ -0,0 +1 @@
.vscode/*

View File

@@ -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 Version: 1.12.6
Date: 2020-03-07 Date: 2020-03-07
Bugfixes: Bugfixes:

View File

@@ -1,6 +1,6 @@
{ {
"name": "LogisticTrainNetwork", "name": "LogisticTrainNetwork",
"version": "1.12.6", "version": "1.12.7",
"title": "LTN - Logistic Train Network", "title": "LTN - Logistic Train Network",
"author": "Optera", "author": "Optera",
"contact": "https://forums.factorio.com/memberlist.php?mode=viewprofile&u=21729", "contact": "https://forums.factorio.com/memberlist.php?mode=viewprofile&u=21729",

View File

@@ -460,20 +460,20 @@ function UpdateStopOutput(trainStop)
for _, c in pairs(conditions) do 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.condition and c.condition.first_signal then -- loading without mods can make first signal nil?
if c.type == "item_count" then 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 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 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 end
elseif c.type == "fluid_count" then 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 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 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 end
end end