Erabior / RouteManager

Mod for Railroader the game that adds basic automation for passenger routes
12 stars 5 forks source link

Improved experimental UI addresses #93 #99

Closed AMacro closed 6 months ago

AMacro commented 7 months ago

Experimental UI can now be instantiated correctly.

More work required to make it useful (so far just cosmetic/framework has been completed).

These commits are part of an experiment to allow trains to exchange passengers at interchange/transfer stations.

image image

AdamC1228 commented 7 months ago

This is very much along the lines of the implementation I was thinking of for the experimental UI to solve a lot of the issues with the Cochran and Alarka depot routing issues but with one difference. I was envisioning something nearly identical (and maybe its just not in your screenshots) but you would have an add button to add a new row where you can choose a station from the list. This would eliminate a lot of the complex and somewhat hackish workarounds that we have in place or are considering putting in place to solve the issue with the branch line(s).

This is more or less what I was trying to build but had not yet determined how to build. Either way I will definitely be looking forward to digging into your pr tomorrow.

image

AMacro commented 7 months ago

My friend and I were talking about doing that for phase 2

phase 1: get it working more or less as it currently does phase 2: exactly what you described

AMacro commented 7 months ago

So far, the UI appears to be doing its job, the routing mostly works with a minor issue, yet to be resolved.

Outstanding issue - in testing, everything worked as expected travelling west. Once the end of line was reached, the Hemmingway and Alarka passengers were re-collected prior to departing Bryson for Wilmot.

Being 10:30 PM here (GMT+10:30), I'll revisit this issue after work tomorrow and will hopefully have a further commit to resolve it.

image

[^1]:Currently not visually appealing, but fixable.

AdamC1228 commented 7 months ago

Just a few notes / changes that I have after skimming the git-hub change logs but overall I like what I see.

AMacro commented 7 months ago

The multiplayer broadcast changes should be their own pull request for tracking / discussion purposes.

Agreed - the broadcast wasn't supposed to be part of these commits - will remove

Instead of gutting / altering the existing methods for the code that currently controls everything, Id ask that even if it means duplicating certain methods and giving them an _dev at the end of the function name or outright changing the function names, that we ensure that the existing code / approach remains functioning

Agreed - will update accordingly

AMacro commented 6 months ago

Changes are now ready for testing/merging. Early testing indicates it may play ok with the game's new passenger AI mode, but further testing required.

Issues fixed in the dev functions (still exist in non/experimental mode):

Above fixes were required to get the new routing method to work.

All changed functions should now be in their own _dev version except where it doesn't make sense e.g. Dispatcher.Update() now has selection based on new UI mode that will start the _dev coroutrine or the original coroutine.

image

[^1]: May occur at other places too.

AdamC1228 commented 6 months ago

FYI: Alarka JCT (Pickup & Stop) -> Hemingway (Pickup & Stop). Loco departs hemingway torward bryson and fails to reverse. Passenger stops not copied to coaches.

Something is not quite right yet. Only had a few moments to sit down and look it over.

AMacro commented 6 months ago

I thought it was working, but, you're correct there still appears to be an issue. I'm wondering if we can use the inbuilt Graph, Searcher and RouteSearcher classes to help determine the direction/switches when moving off the main branch, or worst case, enumerate switches between loco and destination and determine if leaving the mainline and if the switch is incorrectly set announce "waiting for switch".