Feature/persist ferry
Persistent ferry routes, #3631
I resurrected an old branch I had on persistent ferry routes. Half of the work (simcallbacks, helper unit) was already merged years ago. The dummy unit wasn't destroyed correctly then but I fixed that now.
Needs to be tested, especially with multiple routes in same ferry route. Unfortunately we cannot access command queue on the UI side
Interesting - I'm not entirely sure how it works yet but I'll have a look 😄 .
It creates a hidden dummy unit that is part of the ferry order so even when the original transport(s) are dead the dummy unit keeps it alive.
I was about to try the same with persistent building orders but never got to it :)
What building orders would you want to be persistent?
Had an idea of making orders persistent so you can so if the engineers died you could just right click the order with some new engineers and they continue on the same stuff
But I've noticed that many orders creates a bit lag when you shift and it needs to show blueprints on map (when you queue up 100 t2 fabs etc)
Yes - the command queue is quite hefty on the simulation. I'll look into this PR next week.
I'll need to test that the dummy units doesn't count as real unit (not winning game until it's dead etc), maybe it should have INSIGNIFICANTUNIT or what the flag is called
I think it should have both INSIGNIFICANTUNIT and DUMMYUNIT. That way they're not picked up by the players or script in a meaningful way.
I've tested this with annihilation / supremacy / assassination now.
victory.lua checks the flag CanBeKilled when looking for still alive units so I use this flag on the transport beacon and ferry helper to make them not count.
Unfortunately I cannot set INSIGNIFICANTUNIT on the helper, it seems to make the ferry beacon order invisible
There's some odd behavior:
- (1) If you remove the transport beacon when transports are still attached they still try and transport - but there is no beacon anymore
- (2) If you queue a transport sequence, then reselect the unit, and queue up the remainder of the transport sequence it creates a new queue instead
I think we can fix (1) by issuing a stop order to all guarding units. Not sure how to approach (2).