Comments (4)
I think this is the best approach for our files. It achieves the goal of making sure that if we are in control of init, we are in control of which files get loaded via the html. It is still possible for a later mod to override a core in the original position but if we assume that other mods will use similar methods to be well behaved it should minimise the chance of breakage to a state where one of the mods simply won't work rather than the 2 mixing strangely.
Branching at html\pages_ui
means that looking at the HTML will make it very clear when we're loading files we've modified as it's right at the beginning of the URL, though I would not strongly argue that this alone is a compelling reason for that. The main benefit is we never have to worry about creating a WT folder later down the line as that's the html root directory.
As an addendum though, I would like to suggest that for the G1000 html files, we do override the root path because unlike the CJ4 we are modifying multiple planes. We can of course include multiple cfg files but I don't think this is a particularly great approach, especially for anything that uses the G1000 down the line. I can see a good argument still for doing it with the cfg files though, so if anyone feels like there's a particularly compelling argument for one side then it'd be good to hear.
from fspackages.
@knighty Yeah. I would suggest having a separate task for the G1000 mod as your setup is different
from fspackages.
One thing I would suggest, and @knighty and I were talking about this last night, is reconsidering where you add the alternate WorkingTitle reality. In my mind it makes more sense to branch at the location where you are introducing new code. In other words, I'd suggest a system that looks like this (just to mix up some stock, modified, and new files at different depths like we're likely to see):
html_ui\Pages\VCockpit\Instruments\NavSystems\AS1000\Shared\BaseAS1000.js
html_ui\Pages\VCockpit\Instruments\NavSystems\AS1000\Shared\WorkingTitle\Engine.js
html_ui\Pages\VCockpit\Instruments\NavSystems\AS1000\Shared\WorkingTitle\BaseAS1000.js
html_ui\Pages\VCockpit\Instruments\NavSystems\AS1000\PFD\WorkingTitle\AS1000_PFD.js
html_ui\Pages\VCockpit\Instruments\NavSystems\AS1000\Shared\CommonPFD_MFD.js
html_ui\Pages\VCockpit\Instruments\NavSystems\AS1000\Shared\WorkingTitle\CommonPFD_MFD.js
html_ui\Pages\VCockpit\Instruments\Shared\WorkingTitle\DataStore.js
html_ui\Pages\VCockpit\Instruments\Shared\WorkingTitle\FileHandler.js
Than this:
html_ui\Pages\VCockpit\Instruments\NavSystems\AS1000\Shared\BaseAS1000.js
html_ui\WorkingTitle\Pages\VCockpit\Instruments\NavSystems\AS1000\Shared\Engine.js
html_ui\WorkingTitle\Pages\VCockpit\Instruments\NavSystems\AS1000\Shared\BaseAS1000.js
html_ui\WorkingTitle\Pages\VCockpit\Instruments\NavSystems\AS1000\PFD\AS1000_PFD.js
html_ui\Pages\VCockpit\Instruments\NavSystems\AS1000\Shared\CommonPFD_MFD.js
html_ui\WorkingTitle\Pages\VCockpit\Instruments\NavSystems\AS1000\Shared\CommonPFD_MFD.js
html_ui\WorkingTitle\Pages\VCockpit\Instruments\Shared\DataStore.js
html_ui\WorkingTitle\Pages\VCockpit\Instruments\Shared\FileHandler.js
For my eyes/brain, it both looks cleaner and feels better and faster to start with the leaf node then track backwards until you find either a divergence point or the root, than it does to scan all the way back to the top past everything. But that's just me. 😁
from fspackages.
I finally understand where this disagreement is coming from now from your example files.
html_ui\Pages\VCockpit\Instruments\NavSystems\AS1000\Shared\CommonPFD_MFD.js
html_ui\Pages\VCockpit\Instruments\NavSystems\AS1000\Shared\WorkingTitle\CommonPFD_MFD.js
This would never exist. The idea was that if we touch a core file, it ends up in our own directory structure so there's no way a later mod can come along and touch it, and we will always be using that file because we have control over the init process. (mods can still replace core files we don't touch but there's no solution there, sans duplicating the entire package directory). If you wanted to subclass an existing class than I would give it a different name, like our WTEngine
which I think is a situation where it is fine to have a prefix on the class/file as it is a subclass rather than something new.
I do see where you're coming from though, by doing it your way it means sub classes are a bit cleaner which is maybe the direction you were coming at it from having just come off the back of the WTEngine
code
from fspackages.
Related Issues (20)
- fuel loss CJ4 during take-off / climb HOT 5
- G3x lag
- White Screens HOT 5
- CJ4 - climbing in FLC mode often stops climb too early
- G3000 Moving map not working
- G3000 HOT 1
- Honeycomb autopilot CJ4 HOT 2
- Working Title G3000 Weather injection conflict with SU11.
- Missing Buttons HOT 1
- waypoints do not load G1000nxi HOT 1
- GNS-Early-Access MSFS - Delete Approach Issue HOT 3
- COM audible when not the active HOT 3
- Traffic helicopters don't appear on the traffic map in case of their slow or almost zero ground speed
- CJ4 connecting with saitek multipanel
- G3000: Departure and approach problem
- Black Screen on Kodiak 100 after 1hr 5mins on air
- If it's the last time I come here to check for an update
- No screens for CJ4 navigraph HOT 1
- GNS 530/430 works for some paths, but not all
- installing working title Cessna Citation CJ$ for MSFS2020. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fspackages.