-
Notifications
You must be signed in to change notification settings - Fork 85
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
Issues with station tracks #1337
Comments
Confirmed bug with train station tracks - the speed icon appears, and interacts (eg. changes color on hover, and lanes highlight), but clicking has no effect: There are no errors in the logs. I suspect whatever handles the "click" is doing some extra checks on the segment and for some reason deciding it's not applicable for speed limits - I'll dig through the code shortly. |
What are these new directions |
Ok, I'm sure I've not seen these before, but looks like we have bunch of new directions to deal with: [Flags]
public enum Direction : byte
{
None = 0,
Forward = 1,
Backward = 2,
Both = 3,
+ Avoid = 0xC,
+ AvoidBackward = 7,
+ AvoidForward = 0xB,
+ AvoidBoth = 0xF
} EDIT: This will obviously affect stuff like |
Note: Still push out 11.6.4.3 to workshop today if poss. I think this update to directions flags is going to take a bit of time to deal with. For example, If my understanding of how flags work in C# is correct, that means TM:PE will be seeing that track as ffs, what did CO do here lol In any case, station tracks are going to need to deal with what is effectively |
|
Updated comments above; Both = And |
No, no... I think the case here is that |
Yeh, it's set like this:
|
oh.. I see that now: |
Even if that is the case, AvoidForward and AvoidBackward are reversed? |
I think it is related to the situation you can enter and exit segment in both ways but spawning on the segment allows moving only one direction |
Table above updated headings. |
Yes but code must check |
This is a freaking nightmare for any mod that interacts with Even |
public static NetInfo.Direction Simplify(this NetInfo.Direction dir) =>
(byte)dir < 4
? dir
: dir == Direction.Avoid
? Direction.None
: (Direction)((byte)dir >> 2);
var normalDirection = someDirection.Simplify();
public const NetInfo.Direction ForwardishMask = (NetInfo.Direction)(9);
public const NetInfo.Direction BackwardishMask = (NetInfo.Direction)(6); |
algernon provided some additional detail:
|
Oh damn I missed all the fun. I have been using avoid flags for a while and am quite familiar with them. CS has code to deal with avoid flags so I got my code from there :) At train station: |
Fixed in TM:PE 11.6.5.2
Describe the problem
Had a few people on TMPE workshop page mention that speed limit overlay isn't appearing on station tracks.
Not sure if this is just related to underground stations, will need some testing.
The text was updated successfully, but these errors were encountered: