I could do this in two ways each of them with advantages/disadvantages:
1- patch NetTool methods so when user adds/removes stuff, I would know.
2- before every simulation step when something is updated, I can check what has changed and then transfer data accordingly.
Approach 1:
- pros: is better at detecting when the nodes move.
- cons:
- it needs harmony.
- it is not so good at dealing with third party mods as they don't use NetTool to create/remove segments
Approach 2:
- pros:
- it does not need harmony
- is better at dealing with mods that don't use NetTool to add networks (eg NMT, Roundabout-Builder).
- cons:
- it requires to keep a data about all existing segments/nodes to be able to compare after with before.
I could do this in two ways each of them with advantages/disadvantages:
1- patch NetTool methods so when user adds/removes stuff, I would know.
2- before every simulation step when something is updated, I can check what has changed and then transfer data accordingly.
Approach 1:
Approach 2: