diff --git a/changelog.txt b/changelog.txt index 24d6d32..fd9bf27 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,4 +1,9 @@ --------------------------------------------------------------------------------------------------- +Version: 1.13.8 +Date: 2020-05-29 + Bugfixes: + - Checks adjusting requester amounts used stop.backer_name instead of stop.unit_number. https://forums.factorio.com/viewtopic.php?p=496164#p496164 +--------------------------------------------------------------------------------------------------- Version: 1.13.7 Date: 2020-05-27 Features: diff --git a/info.json b/info.json index 75451c7..f4a4e51 100644 --- a/info.json +++ b/info.json @@ -1,6 +1,6 @@ { "name": "LogisticTrainNetwork", - "version": "1.13.7", + "version": "1.13.8", "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 8b59787..3c41ecf 100644 --- a/script/stop-update.lua +++ b/script/stop-update.lua @@ -275,7 +275,7 @@ function UpdateStop(stopID, stop) traincount = stop.parked_train.get_item_count(signal_name) end - if delivery.to == stop.entity.backer_name then + if delivery.to_id == stop.entity.unit_number then local newcount = count + traincount if newcount > 0 then newcount = 0 end --make sure we don't turn it into a provider if debug_log then log("(UpdateStop) "..stop.entity.backer_name.." {"..network_id_string.."} updating requested count with train inventory: "..item.." "..count.."+"..traincount.."="..newcount) end @@ -295,7 +295,7 @@ function UpdateStop(stopID, stop) else -- calculate items +- deliveries - if delivery.to == stop.entity.backer_name then + if delivery.to_id == stop.entity.unit_number then local newcount = count + deliverycount if newcount > 0 then newcount = 0 end --make sure we don't turn it into a provider if debug_log then log("(UpdateStop) "..stop.entity.backer_name.." {"..network_id_string.."} updating requested count with delivery: "..item.." "..count.."+"..deliverycount.."="..newcount) end