TommyC81 / TPF2-LineManager

A mod for TPF2 (Transport Fever 2) to manage vehicle numbers on lines.
GNU General Public License v3.0
6 stars 2 forks source link

Now more readable and slightly better #1

Closed RusteyBucket closed 2 years ago

RusteyBucket commented 2 years ago

Now with a lot more functions and all the really interesting ones at the top of the helper file, I have yet to finish figuring out all the transportMode settings, but I have identified 6 as steam trams. I just noticed I didn't adjust the readme or something, so that's something you'd have to do.

And I only managed limited testing, but it seems to work

TommyC81 commented 2 years ago

Thanks for this, I'll take a look as soon as time permits. Might be in a day or two due to the holiday season, let me know how testing goes in the meanwhile.

TommyC81 commented 2 years ago

I squashed and did some further cleaning up. Please take a look and let me know how this looks for you. Thanks for the help!

RusteyBucket commented 2 years ago

Looks fine to me so far

TommyC81 commented 2 years ago

Thanks! Found a few more minor things to tweak that I'll push in the coming days. Not sure if you meant to close the PR?

RusteyBucket commented 2 years ago

like that, I guess

TommyC81 commented 2 years ago

Perfect, And, no worries, I'm relatively new to the finer details of Git and GitHub as well. Appreciate the PR, a little booster to the development. I'll get it merged as soon as I can in case you want to continue from there. Something to look up is perhaps too Squash commits, especially when you get many small changes and reversions - them is much easier to follow.

TommyC81 commented 2 years ago

Just to keep you in the loop, I've made more changes that I'm fine tuning before submitting. Once all is done and dusted, I may do a completely clean commit with all changes. From there on, it's just a matter of getting to a bit more grip on git/gitjub/squashing/clean commits etc. The usual really. Thanks for your help, happy holidays!

RusteyBucket commented 2 years ago

Perfect, And, no worries, I'm relatively new to the finer details of Git and GitHub as well. Appreciate the PR, a little booster to the development. I'll get it merged as soon as I can in case you want to continue from there. Something to look up is perhaps too Squash commits, especially when you get many small changes and reversions - them is much easier to follow.

Ah, sorry, I've got the habit of committing everything, but I'll try to work on it... I do plan on continuing and thought that this was a decent point to sync it up since as of now, the big functions are actually accessible and most of the code is readable enough so others might be able to modify it to their needs...

I still want to clean up the depot and adding of vehicles and maybe put the important functions and variables into a separate config file and get to the bottom of the line table, after which I thought that maybe, I could try to enable cargo and trains the stupid way: let the user worry about any silly stuff like getting the right vehicles and making good lines, if that has any chance of actually working...

RusteyBucket commented 2 years ago

Thanks, Happy Holidays to you too

RusteyBucket commented 2 years ago

Got bored and implemented some debugging helps and started figuring out what the numbers actually mean...

TommyC81 commented 2 years ago

Thanks! I've been working on a "clean" commit in parallel that makes more use of the logging functions rather than a separate set of debugging variables. I'll have to take another look at how to merge all this together.

I can probably have this completed in a day or two.

Meanwhile, please assist in figuring out the type transport category 10 and 12 proper. I think they're both AIR (small and large?), or something to that extent.

TommyC81 commented 2 years ago

Forced a squash on the latest commits.

TommyC81 commented 2 years ago

Working on a merge in parallel. If you can hold off a little bit with further changes, I'll have something later today that you can rebase your own work on. Will close this PR then.

TommyC81 commented 2 years ago

I've now updated the main branch with bits and pieces of the changes in this PR, along with other minor tweaks and improvements. This includes further/better use of the logging functionality for debugging as well. Due to the number of differences in many bits and pieces, I will close this PR. Please continue from the version now in the main branch.

Again, many thanks for your contribution! I've added credit in all places I could think of, but let me know if something is missing!

RusteyBucket commented 2 years ago

Thanks! I've been working on a "clean" commit in parallel that makes more use of the logging functions rather than a separate set of debugging variables. I'll have to take another look at how to merge all this together.

I can probably have this completed in a day or two.

Meanwhile, please assist in figuring out the type transport category 10 and 12 proper. I think they're both AIR (small and large?), or something to that extent.

Great, sorry for mucking around with it, then.. I'm currently trying to get to the bottom of it, though thanks to my listing the lines in an actually usable form, figuring this all out should go a lot smoother... in theory, I guess I'll see

RusteyBucket commented 2 years ago

I've now updated the main branch with bits and pieces of the changes in this PR, along with other minor tweaks and improvements. This includes further/better use of the logging functionality for debugging as well. Due to the number of differences in many bits and pieces, I will close this PR. Please continue from the version now in the main branch.

Again, many thanks for your contribution! I've added credit in all places I could think of, but let me know if something is missing!

Now I've only gotta figure out how to get that version to continue from...

Once I've done that, I'll see

TommyC81 commented 2 years ago

The easiest seems to be to go to your cloned repository here on Github, you should have an option to "Fetch and merge" ("Fetch and rebase" or similar), and then in GitHub desktop you simply pull from the github repository again.

Note that there will be conflicts to resolve, so the easiest might be to start fresh from the current state of main and go from there. I've made some amendments to the code that doesn't fully include all your suggested changes, for instance note that I've renamed the variable keeping the linedata to "currentLineData" (previously "sampledLineData", renamed to avoid issues with the many similarly named variables). I've also made some other variables more verbose (for good or bad, I guess).

Again, thanks for your help! Much work to do, but step by step it can certainly grow further!

On Mon, Dec 27, 2021, 23:13 Rustey @.***> wrote:

I've now updated the main branch with bits and pieces of the changes in this PR, along with other minor tweaks and improvements. This includes further/better use of the logging functionality for debugging as well. Due to the number of differences in many bits and pieces, I will close this PR. Please continue from the version now in the main branch.

Again, many thanks for your contribution! I've added credit in all places I could think of, but let me know if something is missing!

Now I've only gotta figure out how to get that version to continue from...

Once I've done that, I'll see

— Reply to this email directly, view it on GitHub https://github.com/TommyC81/TPF2-LineManager/pull/1#issuecomment-1001707361, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAOQ3XGEZV7OMKH3TFS5BXLUTC3F7ANCNFSM5KVWN7NQ . You are receiving this because you modified the open/close state.Message ID: @.***>

RusteyBucket commented 2 years ago

yeah, it won't let me merge because reasons... I made another branch, but now I still have to get the main branch to be the good branch...

TommyC81 commented 2 years ago

To start, on Github, look for option "Fetch upstream". Then you have to make a pull/fetch in GitHub desktop to get those changes to your computer. Then, you can simply start making changes in your copy of the main branch.

If you need to pull changes from another branch (including main) within github desktop, you do that under the "branch tab", at the bottom there's an option to merge (and in later dialogue "rebase") those changes into your working branch.

On Mon, Dec 27, 2021, 23:40 Rustey @.***> wrote:

yeah, it won't let me merge because reasons... I made another branch, but now I still have to get the main branch to be the good branch...

— Reply to this email directly, view it on GitHub https://github.com/TommyC81/TPF2-LineManager/pull/1#issuecomment-1001715582, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAOQ3XDNXNDK2E2OYKGIJVDUTC6KBANCNFSM5KVWN7NQ . You are receiving this because you modified the open/close state.Message ID: @.***>

RusteyBucket commented 2 years ago

Phew, managed it somehow, don't ask me how