@hokomoko:
http://imolarpg.dyndns.org/trac/balatest/changeset/4925 fixes my memory, and
http://imolarpg.dyndns.org/trac/balatest/changeset/4927, I think does everything you asked for in #sy.
For gritty details, there are several minor engine issues that writing this gadget exposed, besides the ones that were already fixed:
(1) When a unit is detached it does not always continue with its command queue, sometimes it just hangs in midair. Afaics this is a bug. This is currently hackily worked around by a double CMD.WAIT sent after unit detachment. You can reproduce it (fairly easily, but not on 100% of detachments) using the gadget by commenting out the double wait. Let me know if you want a mantis
(2) Using the engine to draw the custom command means that the command line ends at the airbase, rather than in the center of the pad at which the unit is trying to land. It's a bit ugly, but there is no CMD_TYPE that can support parameters {airbaseID, padPieceNum}.
(3) Since units can only repair one target at a time, and an airbase can have multiple pads, "repairing" is done with SetUnitHealth and CMD.REPAIR is not active whilst it happens. This means its quite difficult for the repairing to use resources cleanly, because the rest of lua doesn't see it happening and can't control buildspeed, etc. It's not a regression - the same issue was present with hardcoded repair pads in Spring 100. Consequently there is no nano spray (and this part is a regression).