Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make direct connect requesters similar to normal requesters #2

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

liujisi
Copy link

@liujisi liujisi commented Sep 4, 2023

This is just a prototype and would need lots of tests/iteration before it's ready to merge. I'm using it in my local play through for tests.

  • direct connect stations instead of busy pulling, it will now it adds a request when no train is available.
  • subsequent updates to the stop/signal pair will skip the update when there is already a request pending.
  • the train state change handler will find the right requester to fulfill. Direct connect stops will be processed the same way as normal requester lamps. With a default priority of 50. When priority are equal, the longest waited request will be fulfilled. There's no difference between direct or lamp requester in terms of priority.
  • added a cooldown to limit how frequently to update direct connect stops to be inline with normal lamps.

@billbo99
Copy link
Owner

I am mostly just fixing NULL errors that pop up from time to time.
The original author has turned away from the game.

Let me know how you go and we can look at merging it into the main mod.

I dont know what Factorio 2.0 will change to trains, but there are some rumors about some major updates for train logic.

This whole mod needs to be broken up into more functions. If I was using SonarLint, it would hate how complex some of the fuctions have grown too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants