disable factory assist.

It's not clean, but assist targets for factories are validated in commandmode.lua (around line 549, with the ValidateAssist sim callback). You could hook that function, check for your conditions, then clear the commands. That would prevent the assist order from materializing but wouldn't prevent the order queue from being cancelled etc. etc.

Alternatively, you could hook HandleEvent in controls/worldview.lua, check the click target, and eat the input command (return "true" from HandleEvent).

@clyf said in disable factory assist.:

but wouldn't prevent the order queue from being cancelled etc.

damn that's the key part for me.

thanks for the help regardless.

Thought it might be. Check out HandleEvent in worldview. Returning true from that function (called by and returning to the engine) will prevent the order from ever being given.

You can avoid losing the queue if you shift-click when you assist one factory to another

yeah but the missclick only ever happen when I'm trying to change rally for all factories.

If you use the move command mode (the order button or hotkey) then you can't click on another factory, it will always be a move order.

f2e198e0-8753-4d2b-92d3-60d62acfa213-image.png

A work of art is never finished, merely abandoned

yeah that's fair, and probably the best solution but that means I need to unbake two decades worth of muscle memory

@tatsu why would you right click a factory when you want to change the rally?

you're zoomed all the way out and a factory happens to be in the way of where you were clicking. when you're zoomed all the way out the clickable footprint of the factory is huge.

Hmm weird. I dont think this has ever happened to me. Guess you could also learn to zoom in a bit when you are clicking a new rally near your base. But yeah changing habits is hard after a while

Since we are talking about assisting factories, I suggest assist command automatically use SHIFT so that whatever is being built right now is not destroyed. Same for when you order a factory to stop assisting.