Open dvr333 opened 5 years ago
I think it would be sufficient to give static units move, fight, and patrol if they are morphing into a mobile unit. Many commands check their validity on AllowCommand so would also need to check whether a structure has the command on CommandFallback. It may be best to create some fake queuing commands, especially in the case of engine commands.
Cool, if that exposes the Move command when morphing (I'm not super familiar with how unitdefs are interpreted), then that's a huge chunk of the way there. Being able to Patrol/Fight is nice, but to me the priority thing is to have some way to get the Sparrow moving the moment it's ready.
Okay, tested it out. It certainly works. Shame the button shows when unmorphed and not morphing, I suppose that's an engine limitation.
Is it a shame? It isn't an engine limitation. I was midway through implementing adding/removal when I lost any sense of the purpose of what I was doing. How can a move command for the radar tower hurt people?
A permanent move command seems good.
The move command was so easy to add because it is a lua command. Patrol and Fight are built-in commands and likely have sanity checks that prevent them automatically appearing for static units.
That makes sense.
When morphing into a mobile unit, it's kindof annoying that you can't queue move commands until after the unit has finished morphing. Ideally, when the morph order is underway, the command card would change to the to-be-morphed unit to allow for order queuing during construction, just like with factory units under construction. If the morph is cancelled, then the commands would just get cancelled as well.