Skip to content

Commit

Permalink
Fix for #18
Browse files Browse the repository at this point in the history
  • Loading branch information
eduran84 committed Mar 25, 2019
1 parent 2c5e060 commit e6c526c
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 7 deletions.
9 changes: 8 additions & 1 deletion changelog.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
---------------------------------------------------------------------------------------------------
Version: 0.9.6
Date: 2019-03-19

Bugfixes:
- Fixed trains leaving a fluid provider empty would cause crash.

---------------------------------------------------------------------------------------------------
Version: 0.9.5
Date: 2019-03-16
Date: 2019-03-18

Features:
- Added tooltips to station names on alert tab to display long names (https://forums.factorio.com/viewtopic.php?f=214&t=64842&start=40#p413677).
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": "LTN_Tracker",
"version": "0.9.5",
"version": "0.9.6",
"title": "LTN Tracker",
"author": "eduran",
"contact": "https://forums.factorio.com/memberlist.php?mode=viewprofile&u=1699",
Expand Down
6 changes: 3 additions & 3 deletions ltnt/const.lua
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ CONST.global = {
mod_prefix = "ltnt",
gui_events = {defines.events.on_gui_click, defines.events.on_gui_checked_state_changed, defines.events.on_gui_text_changed}, -- events handled by on_gui_event
mod_name_ltn = "LogisticTrainNetwork",
minimal_version_ltn = "01.10.03",
current_version_ltn = "01.10.03",
minimal_version_ltn = "01.10.04",
current_version_ltn = "01.10.04",
}

CONST.styles = {
Expand All @@ -34,7 +34,7 @@ CONST.ui_ctrl = {

-- data_processing.lua
CONST.proc = {
fluid_tolerance = 0.001,
fluid_tolerance = 0.1,
stops_per_tick = 20,
deliveries_per_tick = 20,
trains_per_tick = 30,
Expand Down
4 changes: 2 additions & 2 deletions ltnt/data_processing.lua
Original file line number Diff line number Diff line change
Expand Up @@ -447,9 +447,9 @@ local function on_pickup_completed(event)
local item_type, item_name = item_match(item)
local real_amount
if item_type == "item" then
real_amount = item_cargo[item_name]
real_amount = item_cargo[item_name] or 0
else
real_amount = fluid_cargo[item_name]
real_amount = fluid_cargo[item_name] or 0
end
if abs(real_amount - expected_amount) > FLUID_TOL then
raise_alert(delivery, train, "incorrect_cargo", {item_type, {[item_name] = real_amount}})
Expand Down

0 comments on commit e6c526c

Please sign in to comment.