feildmaster/Quantum-Connectors

Editing "circuits.yml"

feildmaster opened this issue · 3 comments

The current parsing of the circuits is silly. Should be worked to look more like:

  • circuit_1
    • type : 0
    • sender : x,y,z,world
    • receiver : x,y,z,world
  • circuit_2
    • type: 3
    • sender : x,y,z,world
    • receiver : x,y,z,world

Well, since you're considering mucking with how it's stored (there's people that probably have lots of circuits in their ymls already) ... let me throw out another idea:

How do you feel about storing this information in a database instead? I did that for my niftywarp plugin and it wasn't very hard at all. The Ebean stuff is very much like the Java Persistence API ... very easy to use.

Then we could just write a method that would take the contents of the yml file and parse it with the current code, and it can then just make new entries in the database.

a database huh... I had wanted to stay away from that. Plugins that stay within each other I find (personally) much easier.

But databases can be good too. to add to the list of "circuits," we should list what CHUNK the receivers (and i guess sender) are in, to dynamically load/unload chunks. (Though it might not work like that...)

Also: Name of circuit should be the receiver. Since there can only be one (currently) anyway... Unless you want to go by generated ID's in the database. That would work too, and enable multiple senders.

This is so annoying. Neon coded this so... strangely. I'll get it done though!