You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@n8rzz What if we just moved the icao, level, and name that are in the load list, and moved them to the individual airport files? Because if we removed the list, and somehow just told the sim to load all airports within the assets/airports folder, then it'd be like a two birds with one stone type simplification.
I agree it would be good to have those three properties in each airport json, I'm not sure that doing that would be the best solution.
I would like to avoid loading all files in a directory willy nilly and rather like the idea of having a list of files to load. Although it may seem cumbersome, it provides an explicit definition of things to load. That way we won't accidentally load something that doesn't belong (if that were ever to happen). It also gives us a way to loop through each airport and create a minimal instance before we have the full data set, i.e. we are loading only what we need when we need it.
I was speaking with a colleague today about doing this outside the bundle and I think we came up with a solution. It's not that pretty, but I think it will work. I'll basically move the airportLoadList.js into the assets folder and make it available on the window object. I'm not a fan of adding things to the window, but I think in this case it makes sense. This also keeps us out of evaluating folder contents which can get expensive and unsafe and allows for contributors to add to the list and not have to worry about re-bundling.
I think it will work but I haven't tried it yet. So we shall see.
see: zlsa#719
contributors should be able to add airports without needing npm and re-bundling.
airportLoadList.js
toassets/airports
and format to be jsonAirportController
to load this file as part of instantiation or one of the init methodsThe text was updated successfully, but these errors were encountered: