Giter Club home page Giter Club logo

Comments (4)

knighty avatar knighty commented on August 14, 2024

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.

dga711 avatar dga711 commented on August 14, 2024

@knighty Yeah. I would suggest having a separate task for the G1000 mod as your setup is different

from fspackages.

kaosfere avatar kaosfere commented on August 14, 2024

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.

knighty avatar knighty commented on August 14, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.