Conversation
…enable it in DispatcherHintManager
|
Starting my look. (Still wrapping things up with other mods so I'll be a bit slow on the draw still.) A few notes to start:
Again, thanks for the code cleanup! I first wrote this mod when I was just starting out on C#/Unity modding and even today my software dev skills aren't close to good, so this refactored system should work out better than what I had planned. I'm also reachable via Altfuture Discord if you're in there. |
I use Visual Studio with the Jetbrains ReSharper plugin. The annotations are actually defined in one of the Unity assemblies and I decided to use them since they're already there. From a Visual Studio perspective, those are just attributes with no special meaning, so they shouldn't get in your way.
Fully agree. What I really want is to simplify the task tree using a visitor pattern and use that to generate nice flowing texts that tell you what to do and maybe hint at what's to do next. Like "[cars location info]. They need to be taken to C3L for loading and then moved to G1S."
Never gave that a thought - but that should actually be a low-hanging fruit that I might pick next. We might want to differentiate between tracks that are within a station (saying "on a track in MF") and section tracks. Might be a little bit tricky to determine, though. |
|
I just tested this on a Valve Index, for me the hint messages never disappear. Once you take a sheet in hand, that message will stay. If you drop it and take another one, both will stay. I compiled this myself with VS2022. |
|
Hi DerJJ. Thanks a lot for testing! I will have a look at it and try to find and fix it (blindly). |
|
@DerJJ, i pushed a quick fix for an obvious bug - floatie object never being destroyed. It would be great if you could have another look at it. |
|
I finished skimming over most of the refactor - this is much cleaner than I could have refactored it. (I slept through my software engineering course.) I plan on merging this within the week once we confirm the VR floaties go away as expected. (Thanks, DerJJ!) I probably want to bring attention to a few things I remembered with the original dispatcher for future notes/interest. First, we ideally shouldn't use a timer to force dispatcher hint updates every second. Using Harmony postfixes for event-driven updates is better, but that involves hours of reverse-engineering in dn/ILspy. Heck, the floatie loading process should be event-driven, but I guess I never found the best place to do it. Second, there was never a guarantee that Third, part of my original plan before I burnt out was to have the hint change depending on the page of the job book you were on. If you have Discord, I can be found in the Altfuture Discord under the same username as my GitHub. It's faster to reach me there if necessary. |
|
I will check it tonight (~12 hours, UTC +1), sorry I can't manage to test this earlier. |
|
An additional note while reviewing your code: From your initial comment I understood that this is a cleanup to be prepared for the next patch. One new major feature of Simulator will be i18n. However, I noticed you hardcoded all the user output. Any plans to extract that and read the (user output) strings from a resource? |
|
We can probably get i18n working after this merge. |
|
Can confirm that it works fine in VR now. |


Hi Cappycot
As discussed, this pull request includes all the refactorings I worked on during the last couple of weeks. Given that there is a significant chance that upcoming big releases of Derail Valley will break compatibility with mods, I think it will be vital to have the code base in good shape.
In addition, there are two new features:
I cannot test VR as I do not have any VR equipment. I think the refactored code base should work for VR as well but it would be great if you could verify this.
Please let me know what you think. I will be happy to get back to you with more details and features that I like to implement in the coming weeks.
Cheers
Banjobeni