-
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
Basic support for Airports DLC #1458
base: master
Are you sure you want to change the base?
Conversation
added patch for priority check, traffic monitoring and vehicle position update(segment registering)
Currently runways/taxiways are essentially one-way train tracks, but for planes; if bidirectional taxiways/runways become a thing then lane connectors would be more useful. We'd need something like one-way train AI, but for planes. For me "vehicle" restrictions are far, far more useful:
|
I'm working on it but from what I tested STTAI (modified for taxiways) works only for super simple setups fails completely on slight more advanced ones mostly by causing deadlocks. It requires some sort of signaling process that could manage which vehicle can move and where should stop and wait. Obviously everything is doable, just need a good description what/when - decision tree.
Theoretically yes, but I haven't experimented with that. The biggest problem will me
If they are all set as sunset harbor tour vehicles then see above, otherwise, the same as vanilla airplanes they use
No, what would be the use case?
I plan to add AssetEditor support for more configurable properties (I already listed on trello what is possible to tweak) so the Asset creator could use vanilla |
I sometimes have planes taking v. strange routes as illustrated in image below: About 80% of time (green line), planes from the large/small stands (top-right of image) go towards the medium stands (top-left of image) on their way to the runway (bottom-left of image) when they should avoid that area completely and use the shorter and more direct route (blue line) which bypasses the medium stands. The point where the taxiway splits (one branch going to runway, the other to medium stands) would have restrictions so the shorter segment is for "takeoff only" and the longer segment (to medium stands) is for "landing only". |
Hmm, if you notice that only on this build it might be caused by AdvancedAI (it's enabled for aircrafts, I'm still experimenting with DLS) and segment penalties (congestion/traffic usage) |
@aubergine10 ok, I can clone vehicle and swap AI to |
Sorry, typo, by I think air tours is more relating to hot air balloons or something like that? |
…nto feature/airports-DLC-support � Conflicts: � TLM/TLM/Util/Extensions/VehicleExtensions.cs
It happens on In the example cited, another solution might be the aircraft size restrictions - eg. I could prevent small/large aircraft from using medium stands route. However, that's semantically incorrect and it wouldn't be viable on larger / more complex airports; hence the desire to have landing vs. takeoff (arrivals vs. departures?) restrictions. It's a way to limit a taxiway to "going to stand" or "going to runway" even if that taxiway is a viable route for the alternative. |
I don't know how to detect where vehicle is going and... pathfinding is a play of adding up penalties. I'm not sure how to "suggest" something when PF is calculating score for each lane till find the one is searching (starting point, since PF runs backwards, from finish to the start) |
Argh, I need to figure that out to limit number of unnecessary queries for better aircraft stand since now I use blocked counter - there is no reason to check it when airplane is blocked by traffic when tries to leave the airport |
…hey react slower than other vehicles), improved priority detection for planes, fixed a bug with speed limit at runway
…nto feature/airports-DLC-support � Conflicts: � TLM/TLM/Manager/Impl/LaneConnectionManager.cs
Updated code, PR description, in-progress tasks will be finished either later today or tomorrow, |
…s for cargo airplane stand recalculation, changes to speed calulations on the ground, yield stop position changes
@aubergine10 I've added few new features, let me know what you think, how it works etc. |
Work in progress 2022-03-19.19-33-16.mp4 |
@aubergine10 Question about size restrictions. How they should work?
Second option has more sense from asset creator perspective if we allow setting size restriction per asset in the Asset Editor. On the other hand with 1. you can achieve the same as with the 2. Settings does not apply to cargo vehicles since I can't really tell their size (one option would be to set size margins and automatically set the size depends on model of aircraft) 🤷♂️ |
@krzychu124 I think option 1 is best; at least from my own use case. For exmaple, I only want medium planes going down a certain taxiway (which leads exclusively to medium stands) and thus want to block both small and large planes on that taxiway. I would not be able to achieve that with option 2. For asset creators they'd just set whichever restrictions make sense for the size of taxiway/runway, ie. using option 1 to get the effect of option 2. |
|
||
// aircraft related flags | ||
GoingToOutside = 1 << 2, | ||
GoingFromOutside = 1 << 3, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would this be better named ComingFromOutside
?
Also, is there any merit to using existing vehicle flags such as Arriving
and Leaving
? Or Importing
and Exporting
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Arriving
and Leaving
are temporary flag, Import
, Export
are related with outside connection transfer.
maxNumSigns = RoadVehicleTypes.Length; | ||
} else if (VehicleRestrictionsManager.Instance.IsRailSegment(segmentInfo)) { | ||
maxNumSigns = RailVehicleTypes.Length; | ||
} else if (VehicleRestrictionsManager.Instance.IsPlaneNetInfo(segmentInfo)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inconsistent naming?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not really but I figure out better name
(connectionClass.m_subService == ItemClass.SubService.PublicTransportMonorail) || | ||
(connectionClass.m_subService == ItemClass.SubService.PublicTransportPlane) | ||
)))) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would this be a lot cleaner and more legible as
connectionClass.m_subservice is
ItemClass.SubService.PublicTransportTrain or
ItemClass.SubService.PublicTransportMetro or
ItemClass.SubService.PublicTransportMonorail or
ItemClass.SubService.PublicTransportPlane
Putting some possible icons for cargo aircraft: Scissor lifts:
Fork lift trucks: |
@krzychu124 Can you merge the latest master into this branch? It will help me examine your changes, which I want to do as part of making sure my XML Persistence design isn't too specific to traffic lights. |
Yeah, will do later today 😉 |
…nto feature/airports-DLC-support � Conflicts: � TLM/TLM/Manager/Impl/LaneConnection/LaneConnectionSubManager.cs � TLM/TLM/UI/SubTools/VehicleRestrictionsTool.cs � TLM/TLM/UI/Textures/RoadUI.cs
Have you been operating under the assumption that this change would break savegames? Because that was the impression I got, but I'm not sure it will. You might want to check that, because I believe enums are already stored as raw numbers, and I don't see any new types or fields being added. |
@Elesbaan70 TL;DR current PR does not introduce any incompatibility yet. At least not yet. I didn't push changes adding new things to the TMPE savegame data. Currently it only allows to "add" Passenger/CargoPlane enum to vehicle restrictions. Enum values are already available and it shouldn't break anything if you set lane vehicle restriction value with more enum flags (they will be ignored since in previous version of the mod (e.g. current I'll push new changes with regards to passenger airplane size restrictions probably tomorrow once I decide how data should look like because I would like to push final solution once, and not change it all the time (I'm lazy and I don't want to remember which savegame requires which mod version 😄 ) in case if you want to try testing your changes to data persistence 😉 BTW, that's why is still Draft PR - things may change or changes are not complete yet. |
@krzychu124 long time since april, where does it stands? what needs still to be done? |
Support for Airports DLC and Aircrafts/Taxiways in general
Update (19/Mar/2022)
Done
In progress
Planned
I'm thinking about how to implement size restrictions for taxiways/runways(?) (I've got working UI in-progress but I'm not sure how to handle it properly yet)
Dynamic cargo airplane stand selection:
2022-04-28.19-29-53.mp4
Closes #1354
Build zip