TriggerReactor

TriggerReactor

24.6k Downloads

Dedicated addon support for trg

wysohn opened this issue ยท 2 comments

commented

Currently, when a new system is developed by end-users, the .trg files will be separated, so it's hard to combine them and distribute them as one complete package.

Java, for example, can archive the .class files into a single .jar file, and the ClassLoader can handle the rest to unwrap and load all the necessary .class files while maintaining the handiness of combining necessary files into a single archive file.

I believe we can do the same thing.

Careful design is required since it will change the current file loading implementation of various manager classes.

commented

Since trg files are so small, compressing files wouldn't be necessary.

Let's just use plain folders:

TriggerReactor
  AreaTrigger
   ...
  plugins
    trgEssentialsv1.0
      AreaTrigger
       ...
commented

@gerzytet
I came up with an idea of why a zip file would be required.

  1. How do we know which file has to be discarded when an addon (let's call them addon from now on) is updated?

Perhaps a second version is published yet, we don't know which parts are updated.

  1. Generally, lots of small files take more time to upload than a zip file that is compressed.

It's because one zip file takes the specific continuous region of disk space, yet small pieces of the text file can be all over the place, so uploading them part by part is much less efficient than uploading them as a whole zip file.

This is not only for just uploading, but also will speed up the loading process. If compression is the issue, we can exclude compression and simply put them in a zip file without compression.

Java is also packaged in .jar (which is .zip in fact) for good reasons.

So I strongly think that we should stick with the archiving system instead of just folder and files.

What do you think?