To give some background, I am working on a mod that would allow templating (export/import) of vehicle equipment grids using blueprints. The export part was fairly simple, but import is giving me some headaches. The import code is currently based on using the item request proxies to deliver equipment via construction bots directly into the vehicle (with some code handling moving items from inventory into equipment grid etc).
However, this is turning out to be rather unreliable because some vehicles may or may not have an inventory etc. Now I am considering an alternative approach of trying to again use item request proxies, but this time around against an entity with an inventory that would act as an intermediate for final delivery into equipment grid. This way I could have a reliable and uniform delivery into an inventory of sufficient size, from which I could then move equipment into equipment grid of target vehicle entity.
Instead of creating some kind of invisible chest that I would move around periodically to match-up position with destination vehicle entity, I've been looking into maybe creating an entity based on spidertron instead, and utilising the LuaEntity::follow_target property. This way I would be able to have a moving inventory that would follow the target vehicle and have roughly the same position as the target vehicle entity, and with the item request proxies layered on top (and cancelable by player via right-click).
For this to look and work somewhat sanely, I would like to implement a spidertron entity (prototype) that would:
- Have high base top speed in order to be able to keep-up with most vehicles.
- Have ability to stay on top of exact position, without overshooting (when target vehicle is not moving).
- Instantly accelerate and decelerate (avoiding speed-up/wobble etc).
So, would anyone have an idea on how I would be able to achieve the three listed goals above for spidertron?
Best regards,
Branko
P.S.
Truth be told, I am starting to think that having an invisible chest-style container and doing periodic position updates might be the simpler way to go forward - at the expense of it looking a little bit ugly as it gets moved around.