Skip to content

Make direct connect requesters similar to normal requesters#2

Open
liujisi wants to merge 2 commits into
billbo99:masterfrom
liujisi:master
Open

Make direct connect requesters similar to normal requesters#2
liujisi wants to merge 2 commits into
billbo99:masterfrom
liujisi:master

Conversation

@liujisi

@liujisi liujisi commented Sep 4, 2023

Copy link
Copy Markdown

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
Copy Markdown
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