Coder Social home page Coder Social logo

patapum / concurrenttrainrestriction Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 1.0 6.3 MB

Factorio mod. Restrict amount of trains trying to reach station simultaneously by circuit network.

Home Page: https://mods.factorio.com/mod/ConcurrentTrainRestriction

License: MIT License

Lua 100.00%
factorio factorio-mod

concurrenttrainrestriction's People

Contributors

joamla96 avatar patapum avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

joamla96

concurrenttrainrestriction's Issues

Failed to work if certain mod activated first.

Same report with the other mod (Train Skip Fulfilled Station).
This mod also doesn't work if it loaded after certain mod, although on this case, i manage to fnd at least one mod, FARL (Fully Automated Train Layer) is conflicting.

More detail report, and how i "fix" it in the mod portal page :
https://mods.factorio.com/mod/ConcurrentTrainRestriction/discussion/5cdbf14214ee39000cd128aa

In case you fixed it in next couple of days, sorry if i can't reply / test it due out of town for couple of weeks.

A tiny issue to fix the readme

So this mod is amazing, somehow not in the base game to be able to see how many trains are coming to the stop.

But there's a tiny issue I'm having, and solved, but the readme tutorial has the same problem. TL;DR the second train needed for a producing station can forget that it's scheduled for the stop it was sent to.

When a Producing station has 2 trains worth of items (not 1 or 3), The arithmetic combinator will set the Locomotive:"2" signal. Two trains are dispatched and the station will signal for the "-2" trains coming, and disables. The trains get their invisible train stop copy. The second train waits behind the first as it loads. But once the first train has loaded a bit, the contents of the chests are less than before, and now only have enough items for one train (not considering the fact that they have been loaded onto the current train) The signal then drops to request only one train, but two are already assigned. The train currently parked seems to be considered the one train it needs, and the second train drops its invisible train stop copy, and just goes elsewhere once it can. I can't say exactly why the invisible train stop is dropped, but the cause seems to be the train stop's enabled condition dropping to -1 instead of just 0.

Now the solution: hook up the train stop to read the train contents, and pass it to the arithmetic combinator along with chest contents. Then the total item count doesn't actually drop while the train is being loaded, so the requested # of trains won't drop.

Crash when renaming train stop

Log
4248.443 Error MainLoop.cpp:1184: Exception at tick 4753880: The mod Concurrent Train Restriction caused a non-recoverable error.
Please report this error to the mod author.

Error while running event ConcurrentTrainRestriction::on_tick (ID 0)
ConcurrentTrainRestriction/control.lua:220: bad argument #1 of 2 to '__newindex' (table expected, got nil)
stack traceback:
[C]: in function '__newindex'
ConcurrentTrainRestriction/control.lua:220: in function 'CheckOverload'
ConcurrentTrainRestriction/control.lua:66: in function 'UpdateTrainPaths'
ConcurrentTrainRestriction/control.lua:7: in function <ConcurrentTrainRestriction/control.lua:5

Provide better description on the Mod portal

This mod is pretty much invisible on the Mod portal. The description is so weak that it is impossible to search for this mod. Please add more description, so that the search function of the mod portal can find the mod.

For example, searching for train stop limit or even train limit, this mod doesn't come up. If it weren't for the link in the FFF discussion forum thread, I'd never have found it.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.